CSC 8560 Computer Networks: Link and Physical Layers Professor Henry Carter Fall 2017
Link Layer 6.1 Introduction and services 6.2 Error detection and correction 6.3 Multiple access protocols 6.4 LANs addressing, ARP Ethernet switches VLANS 6.5 link virtualization: MPLS 6.6 data center networking 6.7 a day in the life of a web request 2
Multiprotocol label switching (MPLS) initial goal: high-speed IP forwarding using fixed length label (instead of IP address) fast lookup using fixed length identifier (rather than shortest prefix matching) borrowing ideas from Virtual Circuit (VC) approach but IP datagram still keeps IP address! 3
MPLS capable routers a.k.a. label-switched router forward packets to outgoing interface based only on label value (don t inspect IP address) MPLS forwarding table distinct from IP forwarding tables flexibility: MPLS forwarding decisions can differ from those of IP use destination and source addresses to route flows to same destination differently (traffic engineering) re-route flows quickly if link fails: pre-computed backup paths (useful for VoIP) 4
MPLS versus IP paths IP routing: path to destination determined by destination address alone 5
MPLS versus IP paths IP routing: path to destination determined by destination address alone MPLS routing: path to destination can be based on source and dest. address fast reroute: precompute backup routes in case of link failure 6
Traffic Engineering and VPNs MPLS is becoming very popular because it allows admins to engineer traffic flowing through their network. Virtual Private Networks (VPNs) can allow certain customers to flow on paths not available to other traffic. Or at the very least, reserve some set of resources to make disparate networks feel as if they are one system. 7
Link Layer 6.1 Introduction and services 6.2 Error detection and correction 6.3 Multiple access protocols 6.4 LANs addressing, ARP Ethernet switches VLANS 6.5 link virtualization: MPLS 6.6 data center networking 6.7 a day in the life of a web request 8
Data center networks 10 s to 100 s of thousands of hosts, often closely coupled, in close proximity: e-business (e.g. Amazon) content-servers (e.g., YouTube, Akamai, Apple, Microsoft) search engines, data mining (e.g., Google) challenges: multiple applications, each serving massive numbers of clients managing/balancing load, avoiding processing, networking, data bottlenecks 9
Data center networks load balancer: application-layer routing receives external client requests directs workload within data center returns results to external client (hiding data center internals from client) 10
Data center networks rich interconnection among switches, racks: increased throughput between racks (multiple routing paths possible) increased reliability via redundancy 11
Link Layer 6.1 Introduction and services 6.2 Error detection and correction 6.3 Multiple access protocols 6.4 LANs addressing, ARP Ethernet switches VLANS 6.5 link virtualization: MPLS 6.6 data center networking 6.7 a day in the life of a web request 12
A day in the life of a web request journey down protocol stack complete! application, transport, network, link putting-it-all-together: synthesis! goal: identify, review, understand protocols (at all layers) involved in seemingly simple scenario: requesting www page scenario: student attaches laptop to campus network, requests/receives www.google.com 13
Scenario browser DNS server Comcast network 68.80.0.0/13 school network 68.80.2.0/24 web page web server 64.233.169.105 Google s network 64.233.160.0/19 14
Connecting to the Internet UDP IP Eth Phy UDP IP Eth Phy router (runs ) connecting laptop needs to get its own IP address, addr of first-hop router, addr of DNS server: use request encapsulated in UDP, encapsulated in IP, encapsulated in 802.3 Ethernet Ethernet frame broadcast (dest: FFFFFFFFFFFF) on LAN, received at router running server Ethernet demuxed to IP demuxed, UDP demuxed to 15
Connecting UDP IP Eth Phy UDP IP Eth Phy router (runs ) server formulates ACK containing client s IP address, IP address of first-hop router for client, name & IP address of DNS server encapsulation at server, frame forwarded (switch learning) through LAN, demultiplexing at client client receives ACK reply Client now has IP address, knows name & addr of DNS server, IP address of its firsthop router 16
ARP DNS DNS DNS ARP query DNS UDP IP Eth Phy ARP ARP reply ARP Eth Phy router (runs ) before sending HTTP request, need IP address of www.google.com: DNS DNS query created, encapsulated in UDP, encapsulated in IP, encapsulated in Eth. To send frame to router, need MAC address of router interface: ARP ARP query broadcast, received by router, which replies with ARP reply giving MAC address of router interface client now knows MAC address of first hop router, so can now send frame containing DNS query 17
DNS DNS DNS DNS DNS DNS UDP IP Eth Phy DNS DNS DNS DNS DNS UDP IP Eth Phy DNS server DNS Comcast network 68.80.0.0/13 router (runs ) IP datagram containing DNS query forwarded via LAN switch from client to 1 st hop router IP datagram forwarded from campus network into Comcast network, routed (tables created by RIP, OSPF, IS-IS and/or BGP routing protocols) to DNS server demuxed to DNS server DNS server replies to client with IP address of www.google.com 18
TCP HTTP SYNACK SYNACK SYNACK SYNACK SYNACK SYNACK HTTP TCP IP Eth Phy TCP IP Eth Phy web server 64.233.169.105 router (runs ) to send HTTP request, client first opens TCP socket to web server TCP SYN segment (step 1 in 3-way handshake) interdomain routed to web server web server responds with TCP SYNACK (step 2 in 3-way handshake) TCP connection established! 19
HTTP HTTP HTTP HTTP HTTP HTTP HTTP HTTP HTTP HTTP HTTP TCP IP Eth Phy HTTP TCP IP Eth Phy web server 64.233.169.105 router (runs ) HTTP request sent into TCP socket IP datagram containing HTTP request routed to www.google.com web server responds with HTTP reply (containing web page) IP datagram containing HTTP reply routed back to client web page finally (!!!) displayed 20
The Physical Layer The Physical Layer performs bit by bit transmission of the frames given to it by the Data Link Layer. The specifications of the Physical Layer include: Mechanical and electrical interfaces Sockets and wires used to connect the host to the network Voltage levels uses (e.g. -5V and +5V) Encoding techniques (e.g. Manchester encoding) Modulation techniques used (e.g. square wave) The bit rate and the baud rate. 21
Signal Transmission Electronic energy to send signals that communicate from one node to another Two methods of transmitting data Digital signaling Analog signaling 22
Parts of a Wave The maximum intensity of a wave is called the amplitude. The distance between two crests is the wavelength. Wavelength (l) or period Amplitude (a) The number of complete wave cycles every second is the frequency. The phase difference measures (as an angle) how far ahead one wave is when compared to another wave. Phase difference (f) Phase: Relative state of one wave to another in regards to timing 23
Analog Signaling Signals represented by an electromagnetic wave Signal is continuous and represents values in a range Uses one or more of the characteristics of an analog wave to represent values. 24
Digital Signaling Digital Signaling Digital signal represents discrete state (on or off) Practically instantaneous change Current State Encoding Data is encoding by the presence or absence of a signal A positive voltage might represent a binary zero or binary one or vise versa The current state indicates the value of the data 25
Manchester Encoding Each bit is encoded as a transition. Why is this better than binary encoding? 26
Propagation Effects Propagation Effects Signal changes as it travels Receiver may not be able to recognize it Original Signal Final Signal Distance 27
Propagation Effects: Attenuation Attenuation: signal gets weaker as it propagates Attenuation becomes greater with distance May become too weak to recognize In wireless networks, this is generally a function of the square of the distance. Signal Strength Distance 28
Propagation Effects: Distortion Distortion: signal changes shape as it propagates Adjacent bits may overlap May make recognition impossible for receiver Distance 29
Propagation Effects: Noise Noise: thermal energy in wire adds to signal Noise floor is average noise energy Random signal, so spikes sometimes occur Signal Strength Signal Spike Noise Noise Floor Time 30
Propagation Effects: SNR Want a high Signal-to-Noise Ratio (SNR) Signal strength divided by average noise strength As SNR falls, errors increase Signal Strength Signal SNR Noise Floor Distance 31
Propagation Effects: Interference Interference: energy from outside the wire Adds to signal, like noise Often intermittent, so hard to diagnose Signal Strength Signal Interference Time 32
Propagation Effects: Termination Interference can occur at cable terminator (connector, plug) Often, multiple wires in a bundle Each radiates some of its signal Causes interference in nearby wires Especially bad at termination, where wires are unwound and parallel Termination 33
Bandwidth Capacity of a media to carry information Total capacity may be divided into channels A channel is a portion of the total bandwidth used for a specific purpose Baseband The total capacity of the media is used for one channel Most LANs use baseband Broadband Divides the total bandwidth into many channels Each channel can carry a different signal Broadband carries many simultaneous transmissions 34
Analog vs Digital Digital Is less error prone In digital communication, it is often possible to reconstruct the original signal even after it has been affected by noise Distortion of the signal between the source and destination is eliminated voltage voltage analog signal time voltage voltage digital signal time Analog tim e time Little control over the signal distortion Old technology analog signal + noise When noise affects an analog signal, it is hard to deduce the original signal. digital signal + noise The original digital signal can be deduced despite the noise. 35
Benefits of Digital Transmission Reliability Can regenerate slightly damaged signals There are only two states. Change to closest E.g., if two states are voltages +10v (1) and -10v (0) and the signal is +8v, the signal is a 1 Error detection and correction Can correct errors in transmission Add a few bytes of error checking information Can ask for retransmission if an error is detected Original Received Regenerated 36
Benefits of Digital Transmission Encryption Encrypt (scramble) messages so that someone intercepting them cannot read them Compression Compress message before transmission Decompress at other end Compressed message places lighter load on transmission line, so less expensive to send Not always used 10101001 1010 Original Signal Compressed Signal 37
Modulation Because attenuation is frequency dependent, modems use a sine wave carrier of a particular frequency, and then modulate that frequency. Various modulations include: Binary Signal Amplitude modulation: Two different amplitudes of sine wave are used to represent 1's and 0's. Frequency modulation: Two (or more) different frequencies, close to the carrier frequency, are used. Phase modulation: The phase of the sine wave is changed by some fixed amount. 38
Shannon s Theorem Claude Shannon extended Nyquist s work to consider the maximum data rate of a noisy channel. If a noisy channel has bandwidth B Hz, and the signal to noise ratio is S/N, then the maximum number of bits/sec C is: C = B log2(1+s/n) SNR typically given in decibles (db) SNR (db) = 10 log10 (S/N) 39
Channel Types A channel is any conduit for sending information between devices. A simplex channel is unidirectional, which means data can only be sent in one direction. For example, a TV channel only carries data from the transmitter to your TV set. Your TV set cannot send information back. A half-duplex channel allows information to flow in either direction (but not simultaneously). Devices at either end of the channel must take it in turns to transmit information whilst the other listens. For example, a walkie-talkie either transmits or receives but not both at the same time. A full-duplex channel allows data to be sent in both directions simultaneously. A full-duplex channel can be formed from two simplex channels carrying data in opposite directions. This may make it more expensive than a half-duplex channel. There is no waiting for turns or for the devices swap roles, as is the case with a half-duplex channel. This means full-duplex can be faster and more efficient. 40
Media Types Types of Media Cable (conducted media) Coaxial Twisted pair (UTP) Shielded twisted pair (STP) Fiber optic Radiated Infrared Microwave Radio 41
Media Selection Cost For actual media and connecting devices such as NICs hubs etc Installation Difficulty to work with media Special tools, training Capacity The amount of information that can be transmitted in a giving period of time Measured as Bits per second bps (preferred) Baud (discrete signals per second) Bandwidth (range of frequencies) Node Capacity Number of network devices that can be connected to the media Attenuation Weakening of the signal over distance Electromagnetic Interference (EMI) Distortion of signal caused by outside electromagnetic fields Caused by large motors, proximity to power sources Other noise sources White (Gaussian) noise Impulse noise Crosstalk Echo 42
Physical Layer - Redux There are countless issues to be dealt with here. Think of all the new devices that have been created in the past decade. So many use different physical layer technologies. Students interested in getting hands-on experience with all of the layers discussed in this class should consider courses in electrical and computer engineering! 43
Next Time... Textbook Chapter 7.1-7.9 Remember, you need to read it BEFORE you come to class! Homework: Project 3 due in 1 week! Homework 3 will be posted soon 44