chapter 6 the link layer and lansljilja/ensc427/news/kurose_ross/chapter_6_v8... · 2021. 3....
TRANSCRIPT
![Page 1: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/1.jpg)
Computer Networking A Top-Down Approach 8th edition Jim Kurose Keith RossPearson 2020
Chapter 6The Link Layer and LANsA note on the use of these PowerPoint slidesWersquore making these slides freely available to all (faculty students readers) Theyrsquore in PowerPoint form so you see the animations and can add modify and delete slides (including this one) and slide content to suit your needs They obviously represent a lot of work on our part In return for use we only ask the following
sect If you use these slides (eg in a class) that you mention their source (after all wersquod like people to use our book)
sect If you post any slides on a www site that you note that they are adapted from (or perhaps identical to) our slides and note our copyright of this material
For a revision history see the slide note for this page
Thanks and enjoy JFKKWR
All material copyright 1996-2020JF Kurose and KW Ross All Rights Reserved
Link layer and LANs our goals
sectunderstand principles behind link layer servicesbull error detection correctionbull sharing a broadcast channel
multiple accessbull link layer addressingbull local area networks
Ethernet VLANssectdatacenter networks
sect instantiation implementation of various link layer technologies
Link Layer 6-2
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-3
Link layer introductionterminologysect hosts and routers nodessect communication channels that
connect adjacent nodes along communication path linksbull wired bull wireless bull LANs
sect layer-2 packet frame encapsulates datagram
mobile network
enterprisenetwork
national or global ISP
datacenter network
link layer has responsibility of transferring datagram from one node to physically adjacent node over a link
Link Layer 6-4
Link layer context
sect datagram transferred by different link protocols over different linksbull eg WiFi on first link Ethernet
on next link
sect each link protocol provides different servicesbull eg may or may not provide
reliable data transfer over link
transportation analogysect trip from Princeton to Lausannebull limo Princeton to JFKbull plane JFK to Genevabull train Geneva to Lausanne
sect tourist = datagramsect transport segment =
communication linksect transportation mode = link-layer
protocolsect travel agent = routing algorithm
Link Layer 6-5
Link layer servicessect framing link accessbull encapsulate datagram into frame adding
header trailerbull channel access if shared mediumbull ldquoMACrdquo addresses in frame headers identify
source destination (different from IP address)
sect reliable delivery between adjacent nodesbull we already know how to do thisbull seldom used on low bit-error linksbull wireless links high error ratesbull Q why both link-level and end-end
reliability
hellip
hellip
Link Layer 6-6
Link layer services (more)sect flow control bull pacing between adjacent sending and
receiving nodessect error detection bull errors caused by signal attenuation noise bull receiver detects errors signals
retransmission or drops frame sect error correction bull receiver identifies and corrects bit error(s)
without retransmissionsect half-duplex and full-duplexbull with half duplex nodes at both ends of
link can transmit but not at same time
hellip
hellip
Link Layer 6-7
Where is the link layer implemented
sect in each-and-every hostsect link layer implemented in
network interface card (NIC) or on a chipbull Ethernet WiFi card or chipbull implements link physical layer
sect attaches into hostrsquos system buses
sect combination of hardware software firmware
controller
physical
cpu memory
host bus (eg PCI)
network interface
applicationtransportnetworklink
linkphysical
Link Layer 6-8
controller
physical
memory CPU
Interfaces communicating
controller
physical
cpu memory
applicationtransportnetworklink
linkphysical
applicationtransportnetworklink
linkphysical
sending sidesect encapsulates datagram in framesect adds error checking bits reliable data
transfer flow control etc
receiving sidesect looks for errors reliable data
transfer flow control etcsect extracts datagram passes to
upper layer at receiving side
linkhlinkh datagram
datagram
datagram
Link Layer 6-9
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsecterror detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-10
Error detection
Link Layer 6-11
EDC error detection and correction bits (eg redundancy)D data protected by error checking may include header fields
Error detection not 100 reliablesect protocol may miss
some errors but rarelysect larger EDC field yields
better detection and correction
datagram
D EDC
d data bits
bit-error prone link
Drsquo EDCrsquo
allbits in Drsquo
OK
Ndetected error
otherwise
datagram
Parity checking
Link Layer 6-12
single bit paritysect detect single bit errors
0111000110101011 1
paritybit
d data bits
two-dimensional bit paritysect detect and correct single bit errors
d11d21
di1
d1j+1d2j+1
dij+1
d1jd2j
dij
di+11 di+1j+1di+1j
row parity
columnparity
0 1 1 1 0 1
1 0 1 0 1 11 1 1 1 0 0
1 0 1 0 1 0
no errors
0 1 1 1 0 1
1 0 1 0 1 11 0 1 1 0 0
1 0 1 0 1 0parityerror
parityerror
detectedand
correctablesingle-bit
error
Even parity set parity bit so there is an even number of 1rsquos
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Internet checksum (review)
sendersect treat contents of UDP
segment (including UDP header fields and IP addresses) as sequence of 16-bit integers
sect checksum addition (onersquos complement sum) of segment content
sect checksum value put into UDP checksum field
receiversect compute checksum of received
segmentsect check if computed checksum equals
checksum field valuebull not equal - error detectedbull equal - no error detected But maybe
errors nonetheless More later hellip
Goal detect errors (ie flipped bits) in transmitted segment
Transport Layer 3-13
Cyclic Redundancy Check (CRC)sectmore powerful error-detection codingsectD data bits (given think of these as a binary number)
sectG bit pattern (generator) of r+1 bits (given)
Link Layer 6-14
goal choose r CRC bits R such that ltDRgt exactly divisible by G (mod 2) bull receiver knows G divides ltDRgt by G If non-zero remainder error detectedbull can detect all burst errors less than r+1 bitsbull widely used in practice (Ethernet 80211 WiFi)
r CRC bitsd data bits
D R
ltDRgt = D 2r XOR R
bit pattern
formula for bit pattern
Link Layer 6-15
Cyclic Redundancy Check (CRC) exampleWe want
D2r XOR R = nG
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
D2rG
R = remainder [ ]
or equivalentlyD2r = nG XOR R
or equivalentlyif we divide D2r by G want remainder R to satisfy
1 0 0 1
1 0 1 0
1 0 10 0 0
1 0 0 1
1 0 0 1
1 0 0 1
0 0 01 1 0
1 1 0 0
1 0 1 0
0 1 1
0 1 1
D
R
1 0 0 1
G0 0 01 0 1 1 1 0
2r
1 0 1
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sectmultiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-16
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 2: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/2.jpg)
Link layer and LANs our goals
sectunderstand principles behind link layer servicesbull error detection correctionbull sharing a broadcast channel
multiple accessbull link layer addressingbull local area networks
Ethernet VLANssectdatacenter networks
sect instantiation implementation of various link layer technologies
Link Layer 6-2
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-3
Link layer introductionterminologysect hosts and routers nodessect communication channels that
connect adjacent nodes along communication path linksbull wired bull wireless bull LANs
sect layer-2 packet frame encapsulates datagram
mobile network
enterprisenetwork
national or global ISP
datacenter network
link layer has responsibility of transferring datagram from one node to physically adjacent node over a link
Link Layer 6-4
Link layer context
sect datagram transferred by different link protocols over different linksbull eg WiFi on first link Ethernet
on next link
sect each link protocol provides different servicesbull eg may or may not provide
reliable data transfer over link
transportation analogysect trip from Princeton to Lausannebull limo Princeton to JFKbull plane JFK to Genevabull train Geneva to Lausanne
sect tourist = datagramsect transport segment =
communication linksect transportation mode = link-layer
protocolsect travel agent = routing algorithm
Link Layer 6-5
Link layer servicessect framing link accessbull encapsulate datagram into frame adding
header trailerbull channel access if shared mediumbull ldquoMACrdquo addresses in frame headers identify
source destination (different from IP address)
sect reliable delivery between adjacent nodesbull we already know how to do thisbull seldom used on low bit-error linksbull wireless links high error ratesbull Q why both link-level and end-end
reliability
hellip
hellip
Link Layer 6-6
Link layer services (more)sect flow control bull pacing between adjacent sending and
receiving nodessect error detection bull errors caused by signal attenuation noise bull receiver detects errors signals
retransmission or drops frame sect error correction bull receiver identifies and corrects bit error(s)
without retransmissionsect half-duplex and full-duplexbull with half duplex nodes at both ends of
link can transmit but not at same time
hellip
hellip
Link Layer 6-7
Where is the link layer implemented
sect in each-and-every hostsect link layer implemented in
network interface card (NIC) or on a chipbull Ethernet WiFi card or chipbull implements link physical layer
sect attaches into hostrsquos system buses
sect combination of hardware software firmware
controller
physical
cpu memory
host bus (eg PCI)
network interface
applicationtransportnetworklink
linkphysical
Link Layer 6-8
controller
physical
memory CPU
Interfaces communicating
controller
physical
cpu memory
applicationtransportnetworklink
linkphysical
applicationtransportnetworklink
linkphysical
sending sidesect encapsulates datagram in framesect adds error checking bits reliable data
transfer flow control etc
receiving sidesect looks for errors reliable data
transfer flow control etcsect extracts datagram passes to
upper layer at receiving side
linkhlinkh datagram
datagram
datagram
Link Layer 6-9
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsecterror detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-10
Error detection
Link Layer 6-11
EDC error detection and correction bits (eg redundancy)D data protected by error checking may include header fields
Error detection not 100 reliablesect protocol may miss
some errors but rarelysect larger EDC field yields
better detection and correction
datagram
D EDC
d data bits
bit-error prone link
Drsquo EDCrsquo
allbits in Drsquo
OK
Ndetected error
otherwise
datagram
Parity checking
Link Layer 6-12
single bit paritysect detect single bit errors
0111000110101011 1
paritybit
d data bits
two-dimensional bit paritysect detect and correct single bit errors
d11d21
di1
d1j+1d2j+1
dij+1
d1jd2j
dij
di+11 di+1j+1di+1j
row parity
columnparity
0 1 1 1 0 1
1 0 1 0 1 11 1 1 1 0 0
1 0 1 0 1 0
no errors
0 1 1 1 0 1
1 0 1 0 1 11 0 1 1 0 0
1 0 1 0 1 0parityerror
parityerror
detectedand
correctablesingle-bit
error
Even parity set parity bit so there is an even number of 1rsquos
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Internet checksum (review)
sendersect treat contents of UDP
segment (including UDP header fields and IP addresses) as sequence of 16-bit integers
sect checksum addition (onersquos complement sum) of segment content
sect checksum value put into UDP checksum field
receiversect compute checksum of received
segmentsect check if computed checksum equals
checksum field valuebull not equal - error detectedbull equal - no error detected But maybe
errors nonetheless More later hellip
Goal detect errors (ie flipped bits) in transmitted segment
Transport Layer 3-13
Cyclic Redundancy Check (CRC)sectmore powerful error-detection codingsectD data bits (given think of these as a binary number)
sectG bit pattern (generator) of r+1 bits (given)
Link Layer 6-14
goal choose r CRC bits R such that ltDRgt exactly divisible by G (mod 2) bull receiver knows G divides ltDRgt by G If non-zero remainder error detectedbull can detect all burst errors less than r+1 bitsbull widely used in practice (Ethernet 80211 WiFi)
r CRC bitsd data bits
D R
ltDRgt = D 2r XOR R
bit pattern
formula for bit pattern
Link Layer 6-15
Cyclic Redundancy Check (CRC) exampleWe want
D2r XOR R = nG
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
D2rG
R = remainder [ ]
or equivalentlyD2r = nG XOR R
or equivalentlyif we divide D2r by G want remainder R to satisfy
1 0 0 1
1 0 1 0
1 0 10 0 0
1 0 0 1
1 0 0 1
1 0 0 1
0 0 01 1 0
1 1 0 0
1 0 1 0
0 1 1
0 1 1
D
R
1 0 0 1
G0 0 01 0 1 1 1 0
2r
1 0 1
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sectmultiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-16
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 3: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/3.jpg)
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-3
Link layer introductionterminologysect hosts and routers nodessect communication channels that
connect adjacent nodes along communication path linksbull wired bull wireless bull LANs
sect layer-2 packet frame encapsulates datagram
mobile network
enterprisenetwork
national or global ISP
datacenter network
link layer has responsibility of transferring datagram from one node to physically adjacent node over a link
Link Layer 6-4
Link layer context
sect datagram transferred by different link protocols over different linksbull eg WiFi on first link Ethernet
on next link
sect each link protocol provides different servicesbull eg may or may not provide
reliable data transfer over link
transportation analogysect trip from Princeton to Lausannebull limo Princeton to JFKbull plane JFK to Genevabull train Geneva to Lausanne
sect tourist = datagramsect transport segment =
communication linksect transportation mode = link-layer
protocolsect travel agent = routing algorithm
Link Layer 6-5
Link layer servicessect framing link accessbull encapsulate datagram into frame adding
header trailerbull channel access if shared mediumbull ldquoMACrdquo addresses in frame headers identify
source destination (different from IP address)
sect reliable delivery between adjacent nodesbull we already know how to do thisbull seldom used on low bit-error linksbull wireless links high error ratesbull Q why both link-level and end-end
reliability
hellip
hellip
Link Layer 6-6
Link layer services (more)sect flow control bull pacing between adjacent sending and
receiving nodessect error detection bull errors caused by signal attenuation noise bull receiver detects errors signals
retransmission or drops frame sect error correction bull receiver identifies and corrects bit error(s)
without retransmissionsect half-duplex and full-duplexbull with half duplex nodes at both ends of
link can transmit but not at same time
hellip
hellip
Link Layer 6-7
Where is the link layer implemented
sect in each-and-every hostsect link layer implemented in
network interface card (NIC) or on a chipbull Ethernet WiFi card or chipbull implements link physical layer
sect attaches into hostrsquos system buses
sect combination of hardware software firmware
controller
physical
cpu memory
host bus (eg PCI)
network interface
applicationtransportnetworklink
linkphysical
Link Layer 6-8
controller
physical
memory CPU
Interfaces communicating
controller
physical
cpu memory
applicationtransportnetworklink
linkphysical
applicationtransportnetworklink
linkphysical
sending sidesect encapsulates datagram in framesect adds error checking bits reliable data
transfer flow control etc
receiving sidesect looks for errors reliable data
transfer flow control etcsect extracts datagram passes to
upper layer at receiving side
linkhlinkh datagram
datagram
datagram
Link Layer 6-9
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsecterror detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-10
Error detection
Link Layer 6-11
EDC error detection and correction bits (eg redundancy)D data protected by error checking may include header fields
Error detection not 100 reliablesect protocol may miss
some errors but rarelysect larger EDC field yields
better detection and correction
datagram
D EDC
d data bits
bit-error prone link
Drsquo EDCrsquo
allbits in Drsquo
OK
Ndetected error
otherwise
datagram
Parity checking
Link Layer 6-12
single bit paritysect detect single bit errors
0111000110101011 1
paritybit
d data bits
two-dimensional bit paritysect detect and correct single bit errors
d11d21
di1
d1j+1d2j+1
dij+1
d1jd2j
dij
di+11 di+1j+1di+1j
row parity
columnparity
0 1 1 1 0 1
1 0 1 0 1 11 1 1 1 0 0
1 0 1 0 1 0
no errors
0 1 1 1 0 1
1 0 1 0 1 11 0 1 1 0 0
1 0 1 0 1 0parityerror
parityerror
detectedand
correctablesingle-bit
error
Even parity set parity bit so there is an even number of 1rsquos
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Internet checksum (review)
sendersect treat contents of UDP
segment (including UDP header fields and IP addresses) as sequence of 16-bit integers
sect checksum addition (onersquos complement sum) of segment content
sect checksum value put into UDP checksum field
receiversect compute checksum of received
segmentsect check if computed checksum equals
checksum field valuebull not equal - error detectedbull equal - no error detected But maybe
errors nonetheless More later hellip
Goal detect errors (ie flipped bits) in transmitted segment
Transport Layer 3-13
Cyclic Redundancy Check (CRC)sectmore powerful error-detection codingsectD data bits (given think of these as a binary number)
sectG bit pattern (generator) of r+1 bits (given)
Link Layer 6-14
goal choose r CRC bits R such that ltDRgt exactly divisible by G (mod 2) bull receiver knows G divides ltDRgt by G If non-zero remainder error detectedbull can detect all burst errors less than r+1 bitsbull widely used in practice (Ethernet 80211 WiFi)
r CRC bitsd data bits
D R
ltDRgt = D 2r XOR R
bit pattern
formula for bit pattern
Link Layer 6-15
Cyclic Redundancy Check (CRC) exampleWe want
D2r XOR R = nG
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
D2rG
R = remainder [ ]
or equivalentlyD2r = nG XOR R
or equivalentlyif we divide D2r by G want remainder R to satisfy
1 0 0 1
1 0 1 0
1 0 10 0 0
1 0 0 1
1 0 0 1
1 0 0 1
0 0 01 1 0
1 1 0 0
1 0 1 0
0 1 1
0 1 1
D
R
1 0 0 1
G0 0 01 0 1 1 1 0
2r
1 0 1
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sectmultiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-16
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 4: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/4.jpg)
Link layer introductionterminologysect hosts and routers nodessect communication channels that
connect adjacent nodes along communication path linksbull wired bull wireless bull LANs
sect layer-2 packet frame encapsulates datagram
mobile network
enterprisenetwork
national or global ISP
datacenter network
link layer has responsibility of transferring datagram from one node to physically adjacent node over a link
Link Layer 6-4
Link layer context
sect datagram transferred by different link protocols over different linksbull eg WiFi on first link Ethernet
on next link
sect each link protocol provides different servicesbull eg may or may not provide
reliable data transfer over link
transportation analogysect trip from Princeton to Lausannebull limo Princeton to JFKbull plane JFK to Genevabull train Geneva to Lausanne
sect tourist = datagramsect transport segment =
communication linksect transportation mode = link-layer
protocolsect travel agent = routing algorithm
Link Layer 6-5
Link layer servicessect framing link accessbull encapsulate datagram into frame adding
header trailerbull channel access if shared mediumbull ldquoMACrdquo addresses in frame headers identify
source destination (different from IP address)
sect reliable delivery between adjacent nodesbull we already know how to do thisbull seldom used on low bit-error linksbull wireless links high error ratesbull Q why both link-level and end-end
reliability
hellip
hellip
Link Layer 6-6
Link layer services (more)sect flow control bull pacing between adjacent sending and
receiving nodessect error detection bull errors caused by signal attenuation noise bull receiver detects errors signals
retransmission or drops frame sect error correction bull receiver identifies and corrects bit error(s)
without retransmissionsect half-duplex and full-duplexbull with half duplex nodes at both ends of
link can transmit but not at same time
hellip
hellip
Link Layer 6-7
Where is the link layer implemented
sect in each-and-every hostsect link layer implemented in
network interface card (NIC) or on a chipbull Ethernet WiFi card or chipbull implements link physical layer
sect attaches into hostrsquos system buses
sect combination of hardware software firmware
controller
physical
cpu memory
host bus (eg PCI)
network interface
applicationtransportnetworklink
linkphysical
Link Layer 6-8
controller
physical
memory CPU
Interfaces communicating
controller
physical
cpu memory
applicationtransportnetworklink
linkphysical
applicationtransportnetworklink
linkphysical
sending sidesect encapsulates datagram in framesect adds error checking bits reliable data
transfer flow control etc
receiving sidesect looks for errors reliable data
transfer flow control etcsect extracts datagram passes to
upper layer at receiving side
linkhlinkh datagram
datagram
datagram
Link Layer 6-9
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsecterror detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-10
Error detection
Link Layer 6-11
EDC error detection and correction bits (eg redundancy)D data protected by error checking may include header fields
Error detection not 100 reliablesect protocol may miss
some errors but rarelysect larger EDC field yields
better detection and correction
datagram
D EDC
d data bits
bit-error prone link
Drsquo EDCrsquo
allbits in Drsquo
OK
Ndetected error
otherwise
datagram
Parity checking
Link Layer 6-12
single bit paritysect detect single bit errors
0111000110101011 1
paritybit
d data bits
two-dimensional bit paritysect detect and correct single bit errors
d11d21
di1
d1j+1d2j+1
dij+1
d1jd2j
dij
di+11 di+1j+1di+1j
row parity
columnparity
0 1 1 1 0 1
1 0 1 0 1 11 1 1 1 0 0
1 0 1 0 1 0
no errors
0 1 1 1 0 1
1 0 1 0 1 11 0 1 1 0 0
1 0 1 0 1 0parityerror
parityerror
detectedand
correctablesingle-bit
error
Even parity set parity bit so there is an even number of 1rsquos
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Internet checksum (review)
sendersect treat contents of UDP
segment (including UDP header fields and IP addresses) as sequence of 16-bit integers
sect checksum addition (onersquos complement sum) of segment content
sect checksum value put into UDP checksum field
receiversect compute checksum of received
segmentsect check if computed checksum equals
checksum field valuebull not equal - error detectedbull equal - no error detected But maybe
errors nonetheless More later hellip
Goal detect errors (ie flipped bits) in transmitted segment
Transport Layer 3-13
Cyclic Redundancy Check (CRC)sectmore powerful error-detection codingsectD data bits (given think of these as a binary number)
sectG bit pattern (generator) of r+1 bits (given)
Link Layer 6-14
goal choose r CRC bits R such that ltDRgt exactly divisible by G (mod 2) bull receiver knows G divides ltDRgt by G If non-zero remainder error detectedbull can detect all burst errors less than r+1 bitsbull widely used in practice (Ethernet 80211 WiFi)
r CRC bitsd data bits
D R
ltDRgt = D 2r XOR R
bit pattern
formula for bit pattern
Link Layer 6-15
Cyclic Redundancy Check (CRC) exampleWe want
D2r XOR R = nG
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
D2rG
R = remainder [ ]
or equivalentlyD2r = nG XOR R
or equivalentlyif we divide D2r by G want remainder R to satisfy
1 0 0 1
1 0 1 0
1 0 10 0 0
1 0 0 1
1 0 0 1
1 0 0 1
0 0 01 1 0
1 1 0 0
1 0 1 0
0 1 1
0 1 1
D
R
1 0 0 1
G0 0 01 0 1 1 1 0
2r
1 0 1
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sectmultiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-16
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 5: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/5.jpg)
Link layer context
sect datagram transferred by different link protocols over different linksbull eg WiFi on first link Ethernet
on next link
sect each link protocol provides different servicesbull eg may or may not provide
reliable data transfer over link
transportation analogysect trip from Princeton to Lausannebull limo Princeton to JFKbull plane JFK to Genevabull train Geneva to Lausanne
sect tourist = datagramsect transport segment =
communication linksect transportation mode = link-layer
protocolsect travel agent = routing algorithm
Link Layer 6-5
Link layer servicessect framing link accessbull encapsulate datagram into frame adding
header trailerbull channel access if shared mediumbull ldquoMACrdquo addresses in frame headers identify
source destination (different from IP address)
sect reliable delivery between adjacent nodesbull we already know how to do thisbull seldom used on low bit-error linksbull wireless links high error ratesbull Q why both link-level and end-end
reliability
hellip
hellip
Link Layer 6-6
Link layer services (more)sect flow control bull pacing between adjacent sending and
receiving nodessect error detection bull errors caused by signal attenuation noise bull receiver detects errors signals
retransmission or drops frame sect error correction bull receiver identifies and corrects bit error(s)
without retransmissionsect half-duplex and full-duplexbull with half duplex nodes at both ends of
link can transmit but not at same time
hellip
hellip
Link Layer 6-7
Where is the link layer implemented
sect in each-and-every hostsect link layer implemented in
network interface card (NIC) or on a chipbull Ethernet WiFi card or chipbull implements link physical layer
sect attaches into hostrsquos system buses
sect combination of hardware software firmware
controller
physical
cpu memory
host bus (eg PCI)
network interface
applicationtransportnetworklink
linkphysical
Link Layer 6-8
controller
physical
memory CPU
Interfaces communicating
controller
physical
cpu memory
applicationtransportnetworklink
linkphysical
applicationtransportnetworklink
linkphysical
sending sidesect encapsulates datagram in framesect adds error checking bits reliable data
transfer flow control etc
receiving sidesect looks for errors reliable data
transfer flow control etcsect extracts datagram passes to
upper layer at receiving side
linkhlinkh datagram
datagram
datagram
Link Layer 6-9
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsecterror detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-10
Error detection
Link Layer 6-11
EDC error detection and correction bits (eg redundancy)D data protected by error checking may include header fields
Error detection not 100 reliablesect protocol may miss
some errors but rarelysect larger EDC field yields
better detection and correction
datagram
D EDC
d data bits
bit-error prone link
Drsquo EDCrsquo
allbits in Drsquo
OK
Ndetected error
otherwise
datagram
Parity checking
Link Layer 6-12
single bit paritysect detect single bit errors
0111000110101011 1
paritybit
d data bits
two-dimensional bit paritysect detect and correct single bit errors
d11d21
di1
d1j+1d2j+1
dij+1
d1jd2j
dij
di+11 di+1j+1di+1j
row parity
columnparity
0 1 1 1 0 1
1 0 1 0 1 11 1 1 1 0 0
1 0 1 0 1 0
no errors
0 1 1 1 0 1
1 0 1 0 1 11 0 1 1 0 0
1 0 1 0 1 0parityerror
parityerror
detectedand
correctablesingle-bit
error
Even parity set parity bit so there is an even number of 1rsquos
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Internet checksum (review)
sendersect treat contents of UDP
segment (including UDP header fields and IP addresses) as sequence of 16-bit integers
sect checksum addition (onersquos complement sum) of segment content
sect checksum value put into UDP checksum field
receiversect compute checksum of received
segmentsect check if computed checksum equals
checksum field valuebull not equal - error detectedbull equal - no error detected But maybe
errors nonetheless More later hellip
Goal detect errors (ie flipped bits) in transmitted segment
Transport Layer 3-13
Cyclic Redundancy Check (CRC)sectmore powerful error-detection codingsectD data bits (given think of these as a binary number)
sectG bit pattern (generator) of r+1 bits (given)
Link Layer 6-14
goal choose r CRC bits R such that ltDRgt exactly divisible by G (mod 2) bull receiver knows G divides ltDRgt by G If non-zero remainder error detectedbull can detect all burst errors less than r+1 bitsbull widely used in practice (Ethernet 80211 WiFi)
r CRC bitsd data bits
D R
ltDRgt = D 2r XOR R
bit pattern
formula for bit pattern
Link Layer 6-15
Cyclic Redundancy Check (CRC) exampleWe want
D2r XOR R = nG
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
D2rG
R = remainder [ ]
or equivalentlyD2r = nG XOR R
or equivalentlyif we divide D2r by G want remainder R to satisfy
1 0 0 1
1 0 1 0
1 0 10 0 0
1 0 0 1
1 0 0 1
1 0 0 1
0 0 01 1 0
1 1 0 0
1 0 1 0
0 1 1
0 1 1
D
R
1 0 0 1
G0 0 01 0 1 1 1 0
2r
1 0 1
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sectmultiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-16
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 6: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/6.jpg)
Link layer servicessect framing link accessbull encapsulate datagram into frame adding
header trailerbull channel access if shared mediumbull ldquoMACrdquo addresses in frame headers identify
source destination (different from IP address)
sect reliable delivery between adjacent nodesbull we already know how to do thisbull seldom used on low bit-error linksbull wireless links high error ratesbull Q why both link-level and end-end
reliability
hellip
hellip
Link Layer 6-6
Link layer services (more)sect flow control bull pacing between adjacent sending and
receiving nodessect error detection bull errors caused by signal attenuation noise bull receiver detects errors signals
retransmission or drops frame sect error correction bull receiver identifies and corrects bit error(s)
without retransmissionsect half-duplex and full-duplexbull with half duplex nodes at both ends of
link can transmit but not at same time
hellip
hellip
Link Layer 6-7
Where is the link layer implemented
sect in each-and-every hostsect link layer implemented in
network interface card (NIC) or on a chipbull Ethernet WiFi card or chipbull implements link physical layer
sect attaches into hostrsquos system buses
sect combination of hardware software firmware
controller
physical
cpu memory
host bus (eg PCI)
network interface
applicationtransportnetworklink
linkphysical
Link Layer 6-8
controller
physical
memory CPU
Interfaces communicating
controller
physical
cpu memory
applicationtransportnetworklink
linkphysical
applicationtransportnetworklink
linkphysical
sending sidesect encapsulates datagram in framesect adds error checking bits reliable data
transfer flow control etc
receiving sidesect looks for errors reliable data
transfer flow control etcsect extracts datagram passes to
upper layer at receiving side
linkhlinkh datagram
datagram
datagram
Link Layer 6-9
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsecterror detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-10
Error detection
Link Layer 6-11
EDC error detection and correction bits (eg redundancy)D data protected by error checking may include header fields
Error detection not 100 reliablesect protocol may miss
some errors but rarelysect larger EDC field yields
better detection and correction
datagram
D EDC
d data bits
bit-error prone link
Drsquo EDCrsquo
allbits in Drsquo
OK
Ndetected error
otherwise
datagram
Parity checking
Link Layer 6-12
single bit paritysect detect single bit errors
0111000110101011 1
paritybit
d data bits
two-dimensional bit paritysect detect and correct single bit errors
d11d21
di1
d1j+1d2j+1
dij+1
d1jd2j
dij
di+11 di+1j+1di+1j
row parity
columnparity
0 1 1 1 0 1
1 0 1 0 1 11 1 1 1 0 0
1 0 1 0 1 0
no errors
0 1 1 1 0 1
1 0 1 0 1 11 0 1 1 0 0
1 0 1 0 1 0parityerror
parityerror
detectedand
correctablesingle-bit
error
Even parity set parity bit so there is an even number of 1rsquos
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Internet checksum (review)
sendersect treat contents of UDP
segment (including UDP header fields and IP addresses) as sequence of 16-bit integers
sect checksum addition (onersquos complement sum) of segment content
sect checksum value put into UDP checksum field
receiversect compute checksum of received
segmentsect check if computed checksum equals
checksum field valuebull not equal - error detectedbull equal - no error detected But maybe
errors nonetheless More later hellip
Goal detect errors (ie flipped bits) in transmitted segment
Transport Layer 3-13
Cyclic Redundancy Check (CRC)sectmore powerful error-detection codingsectD data bits (given think of these as a binary number)
sectG bit pattern (generator) of r+1 bits (given)
Link Layer 6-14
goal choose r CRC bits R such that ltDRgt exactly divisible by G (mod 2) bull receiver knows G divides ltDRgt by G If non-zero remainder error detectedbull can detect all burst errors less than r+1 bitsbull widely used in practice (Ethernet 80211 WiFi)
r CRC bitsd data bits
D R
ltDRgt = D 2r XOR R
bit pattern
formula for bit pattern
Link Layer 6-15
Cyclic Redundancy Check (CRC) exampleWe want
D2r XOR R = nG
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
D2rG
R = remainder [ ]
or equivalentlyD2r = nG XOR R
or equivalentlyif we divide D2r by G want remainder R to satisfy
1 0 0 1
1 0 1 0
1 0 10 0 0
1 0 0 1
1 0 0 1
1 0 0 1
0 0 01 1 0
1 1 0 0
1 0 1 0
0 1 1
0 1 1
D
R
1 0 0 1
G0 0 01 0 1 1 1 0
2r
1 0 1
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sectmultiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-16
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 7: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/7.jpg)
Link layer services (more)sect flow control bull pacing between adjacent sending and
receiving nodessect error detection bull errors caused by signal attenuation noise bull receiver detects errors signals
retransmission or drops frame sect error correction bull receiver identifies and corrects bit error(s)
without retransmissionsect half-duplex and full-duplexbull with half duplex nodes at both ends of
link can transmit but not at same time
hellip
hellip
Link Layer 6-7
Where is the link layer implemented
sect in each-and-every hostsect link layer implemented in
network interface card (NIC) or on a chipbull Ethernet WiFi card or chipbull implements link physical layer
sect attaches into hostrsquos system buses
sect combination of hardware software firmware
controller
physical
cpu memory
host bus (eg PCI)
network interface
applicationtransportnetworklink
linkphysical
Link Layer 6-8
controller
physical
memory CPU
Interfaces communicating
controller
physical
cpu memory
applicationtransportnetworklink
linkphysical
applicationtransportnetworklink
linkphysical
sending sidesect encapsulates datagram in framesect adds error checking bits reliable data
transfer flow control etc
receiving sidesect looks for errors reliable data
transfer flow control etcsect extracts datagram passes to
upper layer at receiving side
linkhlinkh datagram
datagram
datagram
Link Layer 6-9
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsecterror detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-10
Error detection
Link Layer 6-11
EDC error detection and correction bits (eg redundancy)D data protected by error checking may include header fields
Error detection not 100 reliablesect protocol may miss
some errors but rarelysect larger EDC field yields
better detection and correction
datagram
D EDC
d data bits
bit-error prone link
Drsquo EDCrsquo
allbits in Drsquo
OK
Ndetected error
otherwise
datagram
Parity checking
Link Layer 6-12
single bit paritysect detect single bit errors
0111000110101011 1
paritybit
d data bits
two-dimensional bit paritysect detect and correct single bit errors
d11d21
di1
d1j+1d2j+1
dij+1
d1jd2j
dij
di+11 di+1j+1di+1j
row parity
columnparity
0 1 1 1 0 1
1 0 1 0 1 11 1 1 1 0 0
1 0 1 0 1 0
no errors
0 1 1 1 0 1
1 0 1 0 1 11 0 1 1 0 0
1 0 1 0 1 0parityerror
parityerror
detectedand
correctablesingle-bit
error
Even parity set parity bit so there is an even number of 1rsquos
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Internet checksum (review)
sendersect treat contents of UDP
segment (including UDP header fields and IP addresses) as sequence of 16-bit integers
sect checksum addition (onersquos complement sum) of segment content
sect checksum value put into UDP checksum field
receiversect compute checksum of received
segmentsect check if computed checksum equals
checksum field valuebull not equal - error detectedbull equal - no error detected But maybe
errors nonetheless More later hellip
Goal detect errors (ie flipped bits) in transmitted segment
Transport Layer 3-13
Cyclic Redundancy Check (CRC)sectmore powerful error-detection codingsectD data bits (given think of these as a binary number)
sectG bit pattern (generator) of r+1 bits (given)
Link Layer 6-14
goal choose r CRC bits R such that ltDRgt exactly divisible by G (mod 2) bull receiver knows G divides ltDRgt by G If non-zero remainder error detectedbull can detect all burst errors less than r+1 bitsbull widely used in practice (Ethernet 80211 WiFi)
r CRC bitsd data bits
D R
ltDRgt = D 2r XOR R
bit pattern
formula for bit pattern
Link Layer 6-15
Cyclic Redundancy Check (CRC) exampleWe want
D2r XOR R = nG
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
D2rG
R = remainder [ ]
or equivalentlyD2r = nG XOR R
or equivalentlyif we divide D2r by G want remainder R to satisfy
1 0 0 1
1 0 1 0
1 0 10 0 0
1 0 0 1
1 0 0 1
1 0 0 1
0 0 01 1 0
1 1 0 0
1 0 1 0
0 1 1
0 1 1
D
R
1 0 0 1
G0 0 01 0 1 1 1 0
2r
1 0 1
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sectmultiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-16
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 8: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/8.jpg)
Where is the link layer implemented
sect in each-and-every hostsect link layer implemented in
network interface card (NIC) or on a chipbull Ethernet WiFi card or chipbull implements link physical layer
sect attaches into hostrsquos system buses
sect combination of hardware software firmware
controller
physical
cpu memory
host bus (eg PCI)
network interface
applicationtransportnetworklink
linkphysical
Link Layer 6-8
controller
physical
memory CPU
Interfaces communicating
controller
physical
cpu memory
applicationtransportnetworklink
linkphysical
applicationtransportnetworklink
linkphysical
sending sidesect encapsulates datagram in framesect adds error checking bits reliable data
transfer flow control etc
receiving sidesect looks for errors reliable data
transfer flow control etcsect extracts datagram passes to
upper layer at receiving side
linkhlinkh datagram
datagram
datagram
Link Layer 6-9
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsecterror detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-10
Error detection
Link Layer 6-11
EDC error detection and correction bits (eg redundancy)D data protected by error checking may include header fields
Error detection not 100 reliablesect protocol may miss
some errors but rarelysect larger EDC field yields
better detection and correction
datagram
D EDC
d data bits
bit-error prone link
Drsquo EDCrsquo
allbits in Drsquo
OK
Ndetected error
otherwise
datagram
Parity checking
Link Layer 6-12
single bit paritysect detect single bit errors
0111000110101011 1
paritybit
d data bits
two-dimensional bit paritysect detect and correct single bit errors
d11d21
di1
d1j+1d2j+1
dij+1
d1jd2j
dij
di+11 di+1j+1di+1j
row parity
columnparity
0 1 1 1 0 1
1 0 1 0 1 11 1 1 1 0 0
1 0 1 0 1 0
no errors
0 1 1 1 0 1
1 0 1 0 1 11 0 1 1 0 0
1 0 1 0 1 0parityerror
parityerror
detectedand
correctablesingle-bit
error
Even parity set parity bit so there is an even number of 1rsquos
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Internet checksum (review)
sendersect treat contents of UDP
segment (including UDP header fields and IP addresses) as sequence of 16-bit integers
sect checksum addition (onersquos complement sum) of segment content
sect checksum value put into UDP checksum field
receiversect compute checksum of received
segmentsect check if computed checksum equals
checksum field valuebull not equal - error detectedbull equal - no error detected But maybe
errors nonetheless More later hellip
Goal detect errors (ie flipped bits) in transmitted segment
Transport Layer 3-13
Cyclic Redundancy Check (CRC)sectmore powerful error-detection codingsectD data bits (given think of these as a binary number)
sectG bit pattern (generator) of r+1 bits (given)
Link Layer 6-14
goal choose r CRC bits R such that ltDRgt exactly divisible by G (mod 2) bull receiver knows G divides ltDRgt by G If non-zero remainder error detectedbull can detect all burst errors less than r+1 bitsbull widely used in practice (Ethernet 80211 WiFi)
r CRC bitsd data bits
D R
ltDRgt = D 2r XOR R
bit pattern
formula for bit pattern
Link Layer 6-15
Cyclic Redundancy Check (CRC) exampleWe want
D2r XOR R = nG
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
D2rG
R = remainder [ ]
or equivalentlyD2r = nG XOR R
or equivalentlyif we divide D2r by G want remainder R to satisfy
1 0 0 1
1 0 1 0
1 0 10 0 0
1 0 0 1
1 0 0 1
1 0 0 1
0 0 01 1 0
1 1 0 0
1 0 1 0
0 1 1
0 1 1
D
R
1 0 0 1
G0 0 01 0 1 1 1 0
2r
1 0 1
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sectmultiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-16
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 9: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/9.jpg)
controller
physical
memory CPU
Interfaces communicating
controller
physical
cpu memory
applicationtransportnetworklink
linkphysical
applicationtransportnetworklink
linkphysical
sending sidesect encapsulates datagram in framesect adds error checking bits reliable data
transfer flow control etc
receiving sidesect looks for errors reliable data
transfer flow control etcsect extracts datagram passes to
upper layer at receiving side
linkhlinkh datagram
datagram
datagram
Link Layer 6-9
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsecterror detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-10
Error detection
Link Layer 6-11
EDC error detection and correction bits (eg redundancy)D data protected by error checking may include header fields
Error detection not 100 reliablesect protocol may miss
some errors but rarelysect larger EDC field yields
better detection and correction
datagram
D EDC
d data bits
bit-error prone link
Drsquo EDCrsquo
allbits in Drsquo
OK
Ndetected error
otherwise
datagram
Parity checking
Link Layer 6-12
single bit paritysect detect single bit errors
0111000110101011 1
paritybit
d data bits
two-dimensional bit paritysect detect and correct single bit errors
d11d21
di1
d1j+1d2j+1
dij+1
d1jd2j
dij
di+11 di+1j+1di+1j
row parity
columnparity
0 1 1 1 0 1
1 0 1 0 1 11 1 1 1 0 0
1 0 1 0 1 0
no errors
0 1 1 1 0 1
1 0 1 0 1 11 0 1 1 0 0
1 0 1 0 1 0parityerror
parityerror
detectedand
correctablesingle-bit
error
Even parity set parity bit so there is an even number of 1rsquos
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Internet checksum (review)
sendersect treat contents of UDP
segment (including UDP header fields and IP addresses) as sequence of 16-bit integers
sect checksum addition (onersquos complement sum) of segment content
sect checksum value put into UDP checksum field
receiversect compute checksum of received
segmentsect check if computed checksum equals
checksum field valuebull not equal - error detectedbull equal - no error detected But maybe
errors nonetheless More later hellip
Goal detect errors (ie flipped bits) in transmitted segment
Transport Layer 3-13
Cyclic Redundancy Check (CRC)sectmore powerful error-detection codingsectD data bits (given think of these as a binary number)
sectG bit pattern (generator) of r+1 bits (given)
Link Layer 6-14
goal choose r CRC bits R such that ltDRgt exactly divisible by G (mod 2) bull receiver knows G divides ltDRgt by G If non-zero remainder error detectedbull can detect all burst errors less than r+1 bitsbull widely used in practice (Ethernet 80211 WiFi)
r CRC bitsd data bits
D R
ltDRgt = D 2r XOR R
bit pattern
formula for bit pattern
Link Layer 6-15
Cyclic Redundancy Check (CRC) exampleWe want
D2r XOR R = nG
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
D2rG
R = remainder [ ]
or equivalentlyD2r = nG XOR R
or equivalentlyif we divide D2r by G want remainder R to satisfy
1 0 0 1
1 0 1 0
1 0 10 0 0
1 0 0 1
1 0 0 1
1 0 0 1
0 0 01 1 0
1 1 0 0
1 0 1 0
0 1 1
0 1 1
D
R
1 0 0 1
G0 0 01 0 1 1 1 0
2r
1 0 1
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sectmultiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-16
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 10: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/10.jpg)
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsecterror detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-10
Error detection
Link Layer 6-11
EDC error detection and correction bits (eg redundancy)D data protected by error checking may include header fields
Error detection not 100 reliablesect protocol may miss
some errors but rarelysect larger EDC field yields
better detection and correction
datagram
D EDC
d data bits
bit-error prone link
Drsquo EDCrsquo
allbits in Drsquo
OK
Ndetected error
otherwise
datagram
Parity checking
Link Layer 6-12
single bit paritysect detect single bit errors
0111000110101011 1
paritybit
d data bits
two-dimensional bit paritysect detect and correct single bit errors
d11d21
di1
d1j+1d2j+1
dij+1
d1jd2j
dij
di+11 di+1j+1di+1j
row parity
columnparity
0 1 1 1 0 1
1 0 1 0 1 11 1 1 1 0 0
1 0 1 0 1 0
no errors
0 1 1 1 0 1
1 0 1 0 1 11 0 1 1 0 0
1 0 1 0 1 0parityerror
parityerror
detectedand
correctablesingle-bit
error
Even parity set parity bit so there is an even number of 1rsquos
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Internet checksum (review)
sendersect treat contents of UDP
segment (including UDP header fields and IP addresses) as sequence of 16-bit integers
sect checksum addition (onersquos complement sum) of segment content
sect checksum value put into UDP checksum field
receiversect compute checksum of received
segmentsect check if computed checksum equals
checksum field valuebull not equal - error detectedbull equal - no error detected But maybe
errors nonetheless More later hellip
Goal detect errors (ie flipped bits) in transmitted segment
Transport Layer 3-13
Cyclic Redundancy Check (CRC)sectmore powerful error-detection codingsectD data bits (given think of these as a binary number)
sectG bit pattern (generator) of r+1 bits (given)
Link Layer 6-14
goal choose r CRC bits R such that ltDRgt exactly divisible by G (mod 2) bull receiver knows G divides ltDRgt by G If non-zero remainder error detectedbull can detect all burst errors less than r+1 bitsbull widely used in practice (Ethernet 80211 WiFi)
r CRC bitsd data bits
D R
ltDRgt = D 2r XOR R
bit pattern
formula for bit pattern
Link Layer 6-15
Cyclic Redundancy Check (CRC) exampleWe want
D2r XOR R = nG
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
D2rG
R = remainder [ ]
or equivalentlyD2r = nG XOR R
or equivalentlyif we divide D2r by G want remainder R to satisfy
1 0 0 1
1 0 1 0
1 0 10 0 0
1 0 0 1
1 0 0 1
1 0 0 1
0 0 01 1 0
1 1 0 0
1 0 1 0
0 1 1
0 1 1
D
R
1 0 0 1
G0 0 01 0 1 1 1 0
2r
1 0 1
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sectmultiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-16
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 11: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/11.jpg)
Error detection
Link Layer 6-11
EDC error detection and correction bits (eg redundancy)D data protected by error checking may include header fields
Error detection not 100 reliablesect protocol may miss
some errors but rarelysect larger EDC field yields
better detection and correction
datagram
D EDC
d data bits
bit-error prone link
Drsquo EDCrsquo
allbits in Drsquo
OK
Ndetected error
otherwise
datagram
Parity checking
Link Layer 6-12
single bit paritysect detect single bit errors
0111000110101011 1
paritybit
d data bits
two-dimensional bit paritysect detect and correct single bit errors
d11d21
di1
d1j+1d2j+1
dij+1
d1jd2j
dij
di+11 di+1j+1di+1j
row parity
columnparity
0 1 1 1 0 1
1 0 1 0 1 11 1 1 1 0 0
1 0 1 0 1 0
no errors
0 1 1 1 0 1
1 0 1 0 1 11 0 1 1 0 0
1 0 1 0 1 0parityerror
parityerror
detectedand
correctablesingle-bit
error
Even parity set parity bit so there is an even number of 1rsquos
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Internet checksum (review)
sendersect treat contents of UDP
segment (including UDP header fields and IP addresses) as sequence of 16-bit integers
sect checksum addition (onersquos complement sum) of segment content
sect checksum value put into UDP checksum field
receiversect compute checksum of received
segmentsect check if computed checksum equals
checksum field valuebull not equal - error detectedbull equal - no error detected But maybe
errors nonetheless More later hellip
Goal detect errors (ie flipped bits) in transmitted segment
Transport Layer 3-13
Cyclic Redundancy Check (CRC)sectmore powerful error-detection codingsectD data bits (given think of these as a binary number)
sectG bit pattern (generator) of r+1 bits (given)
Link Layer 6-14
goal choose r CRC bits R such that ltDRgt exactly divisible by G (mod 2) bull receiver knows G divides ltDRgt by G If non-zero remainder error detectedbull can detect all burst errors less than r+1 bitsbull widely used in practice (Ethernet 80211 WiFi)
r CRC bitsd data bits
D R
ltDRgt = D 2r XOR R
bit pattern
formula for bit pattern
Link Layer 6-15
Cyclic Redundancy Check (CRC) exampleWe want
D2r XOR R = nG
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
D2rG
R = remainder [ ]
or equivalentlyD2r = nG XOR R
or equivalentlyif we divide D2r by G want remainder R to satisfy
1 0 0 1
1 0 1 0
1 0 10 0 0
1 0 0 1
1 0 0 1
1 0 0 1
0 0 01 1 0
1 1 0 0
1 0 1 0
0 1 1
0 1 1
D
R
1 0 0 1
G0 0 01 0 1 1 1 0
2r
1 0 1
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sectmultiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-16
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 12: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/12.jpg)
Parity checking
Link Layer 6-12
single bit paritysect detect single bit errors
0111000110101011 1
paritybit
d data bits
two-dimensional bit paritysect detect and correct single bit errors
d11d21
di1
d1j+1d2j+1
dij+1
d1jd2j
dij
di+11 di+1j+1di+1j
row parity
columnparity
0 1 1 1 0 1
1 0 1 0 1 11 1 1 1 0 0
1 0 1 0 1 0
no errors
0 1 1 1 0 1
1 0 1 0 1 11 0 1 1 0 0
1 0 1 0 1 0parityerror
parityerror
detectedand
correctablesingle-bit
error
Even parity set parity bit so there is an even number of 1rsquos
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
Internet checksum (review)
sendersect treat contents of UDP
segment (including UDP header fields and IP addresses) as sequence of 16-bit integers
sect checksum addition (onersquos complement sum) of segment content
sect checksum value put into UDP checksum field
receiversect compute checksum of received
segmentsect check if computed checksum equals
checksum field valuebull not equal - error detectedbull equal - no error detected But maybe
errors nonetheless More later hellip
Goal detect errors (ie flipped bits) in transmitted segment
Transport Layer 3-13
Cyclic Redundancy Check (CRC)sectmore powerful error-detection codingsectD data bits (given think of these as a binary number)
sectG bit pattern (generator) of r+1 bits (given)
Link Layer 6-14
goal choose r CRC bits R such that ltDRgt exactly divisible by G (mod 2) bull receiver knows G divides ltDRgt by G If non-zero remainder error detectedbull can detect all burst errors less than r+1 bitsbull widely used in practice (Ethernet 80211 WiFi)
r CRC bitsd data bits
D R
ltDRgt = D 2r XOR R
bit pattern
formula for bit pattern
Link Layer 6-15
Cyclic Redundancy Check (CRC) exampleWe want
D2r XOR R = nG
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
D2rG
R = remainder [ ]
or equivalentlyD2r = nG XOR R
or equivalentlyif we divide D2r by G want remainder R to satisfy
1 0 0 1
1 0 1 0
1 0 10 0 0
1 0 0 1
1 0 0 1
1 0 0 1
0 0 01 1 0
1 1 0 0
1 0 1 0
0 1 1
0 1 1
D
R
1 0 0 1
G0 0 01 0 1 1 1 0
2r
1 0 1
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sectmultiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-16
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 13: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/13.jpg)
Internet checksum (review)
sendersect treat contents of UDP
segment (including UDP header fields and IP addresses) as sequence of 16-bit integers
sect checksum addition (onersquos complement sum) of segment content
sect checksum value put into UDP checksum field
receiversect compute checksum of received
segmentsect check if computed checksum equals
checksum field valuebull not equal - error detectedbull equal - no error detected But maybe
errors nonetheless More later hellip
Goal detect errors (ie flipped bits) in transmitted segment
Transport Layer 3-13
Cyclic Redundancy Check (CRC)sectmore powerful error-detection codingsectD data bits (given think of these as a binary number)
sectG bit pattern (generator) of r+1 bits (given)
Link Layer 6-14
goal choose r CRC bits R such that ltDRgt exactly divisible by G (mod 2) bull receiver knows G divides ltDRgt by G If non-zero remainder error detectedbull can detect all burst errors less than r+1 bitsbull widely used in practice (Ethernet 80211 WiFi)
r CRC bitsd data bits
D R
ltDRgt = D 2r XOR R
bit pattern
formula for bit pattern
Link Layer 6-15
Cyclic Redundancy Check (CRC) exampleWe want
D2r XOR R = nG
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
D2rG
R = remainder [ ]
or equivalentlyD2r = nG XOR R
or equivalentlyif we divide D2r by G want remainder R to satisfy
1 0 0 1
1 0 1 0
1 0 10 0 0
1 0 0 1
1 0 0 1
1 0 0 1
0 0 01 1 0
1 1 0 0
1 0 1 0
0 1 1
0 1 1
D
R
1 0 0 1
G0 0 01 0 1 1 1 0
2r
1 0 1
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sectmultiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-16
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 14: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/14.jpg)
Cyclic Redundancy Check (CRC)sectmore powerful error-detection codingsectD data bits (given think of these as a binary number)
sectG bit pattern (generator) of r+1 bits (given)
Link Layer 6-14
goal choose r CRC bits R such that ltDRgt exactly divisible by G (mod 2) bull receiver knows G divides ltDRgt by G If non-zero remainder error detectedbull can detect all burst errors less than r+1 bitsbull widely used in practice (Ethernet 80211 WiFi)
r CRC bitsd data bits
D R
ltDRgt = D 2r XOR R
bit pattern
formula for bit pattern
Link Layer 6-15
Cyclic Redundancy Check (CRC) exampleWe want
D2r XOR R = nG
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
D2rG
R = remainder [ ]
or equivalentlyD2r = nG XOR R
or equivalentlyif we divide D2r by G want remainder R to satisfy
1 0 0 1
1 0 1 0
1 0 10 0 0
1 0 0 1
1 0 0 1
1 0 0 1
0 0 01 1 0
1 1 0 0
1 0 1 0
0 1 1
0 1 1
D
R
1 0 0 1
G0 0 01 0 1 1 1 0
2r
1 0 1
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sectmultiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-16
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 15: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/15.jpg)
Link Layer 6-15
Cyclic Redundancy Check (CRC) exampleWe want
D2r XOR R = nG
Check out the online interactive exercises for more examples httpgaiacsumassedukurose_rossinteractive
D2rG
R = remainder [ ]
or equivalentlyD2r = nG XOR R
or equivalentlyif we divide D2r by G want remainder R to satisfy
1 0 0 1
1 0 1 0
1 0 10 0 0
1 0 0 1
1 0 0 1
1 0 0 1
0 0 01 1 0
1 1 0 0
1 0 1 0
0 1 1
0 1 1
D
R
1 0 0 1
G0 0 01 0 1 1 1 0
2r
1 0 1
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sectmultiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-16
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 16: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/16.jpg)
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sectmultiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-16
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 17: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/17.jpg)
Multiple access links protocols
Link Layer 6-17
two types of ldquolinksrdquosect point-to-point
bull point-to-point link between Ethernet switch hostbull PPP for dial-up access
sect broadcast (shared wire or medium)bull old-fashioned Ethernetbull upstream HFC in cable-based access networkbull 80211 wireless LAN 4G4G satellite
shared wire (eg cabled Ethernet) shared radio WiFi shared radio satellite humans at a cocktail party
(shared air acoustical)shared radio 4G5G
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 18: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/18.jpg)
Multiple access protocols
Link Layer 6-18
sect single shared broadcast channel sect two or more simultaneous transmissions by nodes interference bull collision if node receives two or more signals at the same time
sect distributed algorithm that determines how nodes share channel ie determine when node can transmit
sect communication about channel sharing must use channel itself bull no out-of-band channel for coordination
multiple access protocol
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 19: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/19.jpg)
An ideal multiple access protocol
Link Layer 6-19
given multiple access channel (MAC) of rate R bpsdesiderata
1 when one node wants to transmit it can send at rate R2 when M nodes want to transmit each can send at average
rate RM3 fully decentralizedbull no special node to coordinate transmissionsbull no synchronization of clocks slots
4 simple
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 20: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/20.jpg)
MAC protocols taxonomy
Link Layer 6-20
three broad classessect channel partitioningbull divide channel into smaller ldquopiecesrdquo (time slots frequency code)bull allocate piece to node for exclusive use
sect random accessbull channel not divided allow collisionsbull ldquorecoverrdquo from collisions
sect ldquotaking turnsrdquobull nodes take turns but nodes with more to send can take longer turns
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 21: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/21.jpg)
Channel partitioning MAC protocols TDMA
Link Layer 6-21
TDMA time division multiple access sect access to channel in ldquoroundsrdquo sect each station gets fixed length slot (length = packet transmission
time) in each round sect unused slots go idle sect example 6-station LAN 134 have packets to send slots 256 idle
1 3 4 1 3 4
6-slotframe
6-slotframe
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 22: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/22.jpg)
Channel partitioning MAC protocols FDMA
Link Layer 6-22
FDMA frequency division multiple access sect channel spectrum divided into frequency bandssect each station assigned fixed frequency bandsect unused transmission time in frequency bands go idle sect example 6-station LAN 134 have packet to send frequency bands 256 idle
frequ
ency
ban
ds
time
FDM cable
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 23: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/23.jpg)
Random access protocols
Link Layer 6-23
sect when node has packet to sendbull transmit at full channel data rate Rbull no a priori coordination among nodes
sect two or more transmitting nodes ldquocollisionrdquosect random access MAC protocol specifies bull how to detect collisionsbull how to recover from collisions (eg via delayed retransmissions)
sect examples of random access MAC protocolsbull ALOHA slotted ALOHAbull CSMA CSMACD CSMACA
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 24: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/24.jpg)
Slotted ALOHA
Link Layer 6-24
assumptionssect all frames same sizesect time divided into equal size
slots (time to transmit 1 frame)sect nodes start to transmit only
slot beginning sect nodes are synchronizedsect if 2 or more nodes transmit in
slot all nodes detect collision
operationsect when node obtains fresh
frame transmits in next slotbull if no collision node can send
new frame in next slotbull if collision node retransmits
frame in each subsequent slot with probability p until success
randomization ndash why
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 25: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/25.jpg)
Slotted ALOHA
Link Layer 6-25
Prossect single active node can
continuously transmit at full rate of channel
sect highly decentralized only slots in nodes need to be in sync
sect simple
Conssect collisions wasting slotssect idle slotssect nodes may be able to detect collision in
less than time to transmit packetsect clock synchronization
1 1 1 1
2
3
2 2
3 3
node 1
node 2
node 3
C C CS S SE E E
C collisionS successE empty
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 26: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/26.jpg)
efficiency long-run fraction of successful slots (many nodes all with many frames to send)sect suppose N nodes with many frames to send each transmits in slot
with probability pbull prob that given node has success in a slot = p(1-p)N-1
bull prob that any node has a success = Np(1-p)N-1
bull max efficiency find p that maximizes Np(1-p)N-1
bull for many nodes take limit of Np(1-p)N-1 as N goes to infinity gives
max efficiency = 1e = 37sect at best channel used for useful transmissions 37 of time
Slotted ALOHA efficiency
Link Layer 6-26
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 27: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/27.jpg)
Pure ALOHA
Link Layer 6-27
sect unslotted Aloha simpler no synchronizationbull when frame first arrives transmit immediately
sect collision probability increases with no synchronizationbull frame sent at t0 collides with other frames sent in [t0-1t0+1]
t0 + 1t0 - 1 t0
will overlapwith end of
irsquos frame
will overlapwith start of
irsquos frame
sect pure Aloha efficiency 18
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 28: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/28.jpg)
CSMA (carrier sense multiple access)
Link Layer 6-28
simple CSMA listen before transmitbull if channel sensed idle transmit entire framebull if channel sensed busy defer transmission
sect human analogy donʼt interrupt others
CSMACD CSMA with collision detectionbull collisions detected within short timebull colliding transmissions aborted reducing channel wastagebull collision detection easy in wired difficult with wireless
sect human analogy the polite conversationalist
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 29: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/29.jpg)
CSMA collisions
Link Layer 6-29
sect collisions can still occur with carrier sensing bull propagation delay means two nodes
may not hear each otherrsquos just-started transmission
sect collision entire packet transmission time wastedbull distance amp propagation delay play
role in in determining collision probability
spatial layout of nodes
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 30: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/30.jpg)
CSMACD
Link Layer 6-30
sect CSMACS reduces the amount of time wasted in collisionsbull transmission aborted on collision
detection
spatial layout of nodes
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 31: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/31.jpg)
Ethernet CSMACD algorithm
Link Layer 6-31
1 NIC receives datagram from network layer creates frame2 If NIC senses channel
if idle start frame transmission if busy wait until channel idle then transmit
3 If NIC transmits entire frame without collision NIC is done with frame
4 If NIC detects another transmission while sending abort send jam signal5 After aborting NIC enters binary (exponential) backoff
bull after mth collision NIC chooses K at random from 012 hellip 2m-1 NIC waits K512 bit times returns to Step 2
bull more collisions longer backoff interval
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 32: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/32.jpg)
CSMACD efficiency
Link Layer 6-32
sect Tprop = max prop delay between 2 nodes in LANsect ttrans = time to transmit max-size frame
sect efficiency goes to 1 bull as tprop goes to 0bull as ttrans goes to infinity
sect better performance than ALOHA and simple cheap decentralized
transprop ttefficiency
511
+=
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 33: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/33.jpg)
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-33
channel partitioning MAC protocolssect share channel efficiently and fairly at high loadsect inefficient at low load delay in channel access 1N bandwidth
allocated even if only 1 active node random access MAC protocolssect efficient at low load single node can fully utilize channelsect high load collision overhead
ldquotaking turnsrdquo protocolssect look for best of both worlds
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 34: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/34.jpg)
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-34
pollingsect master node ldquoinvitesrdquo other nodes
to transmit in turnsect typically used with ldquodumbrdquo
devicessect concernsbull polling overhead bull latencybull single point of failure (master)
master
slaves
poll
data
data
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 35: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/35.jpg)
ldquoTaking turnsrdquo MAC protocols
Link Layer 6-35
token passingsect control token passed from one
node to next sequentiallysect token messagesect concernsbull token overhead bull latencybull single point of failure
(token)
T
data
(nothingto send)
T
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 36: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/36.jpg)
Cable access network FDM TDM and random access
Link Layer 6-36
cable headend
CMTS
ISP cable modemtermination system
cablemodemsplitter
hellip
hellip
Internet frames TV channels control transmitted downstream at different frequencies
sect multiple downstream (broadcast) FDM channels up to 16 Gbpschannel sect single CMTS transmits into channels
sect multiple upstream channels (up to 1 Gbpschannel)sect multiple access all users contend (random access) for certain upstream
channel time slots others assigned TDM
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 37: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/37.jpg)
Cable access network
Link Layer 6-37
DOCSIS data over cable service interface specificaitonsect FDM over upstream downstream frequency channelssect TDM upstream some slots assigned some have contentionbull downstream MAP frame assigns upstream slotsbull request for upstream slots (and data) transmitted random access (binary
backoff) in selected slots
Residences with cable modems
Downstream channel i
Upstream channel j
MAP frame forInterval [t1 t2]
t1 t2
Assigned minislots containing cable modemupstream data frames
Minislots containing minislots request frames
cable headend
CMTS
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 38: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/38.jpg)
Summary of MAC protocols
Link Layer 6-38
sect channel partitioning by time frequency or codebull Time Division Frequency Division
sect random access (dynamic) bull ALOHA S-ALOHA CSMA CSMACDbull carrier sensing easy in some technologies (wire) hard in others
(wireless)bull CSMACD used in Ethernetbull CSMACA used in 80211
sect taking turnsbull polling from central site token passingbull Bluetooth FDDI token ring
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 39: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/39.jpg)
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-39
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 40: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/40.jpg)
MAC addresses
Link Layer 6-40
sect 32-bit IP address bull network-layer address for interfacebull used for layer 3 (network layer) forwardingbull eg 12811940136
sect MAC (or LAN or physical or Ethernet) addressbull function used ldquolocallyrdquo to get frame from one interface to another
physically-connected interface (same subnet in IP-addressing sense)bull 48-bit MAC address (for most LANs) burned in NIC ROM also
sometimes software settable
hexadecimal (base 16) notation(each ldquonumeralrdquo represents 4 bits)
bull eg 1A-2F-BB-76-09-AD
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 41: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/41.jpg)
MAC addresses
Link Layer 6-41
each interface on LAN sect has unique 48-bit MAC addresssect has a locally unique 32-bit IP address (as wersquove seen)
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN(wired or wireless)
137196724
137196778
137196714
137196788
137196723
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 42: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/42.jpg)
MAC addresses
Link Layer 6-42
sect MAC address allocation administered by IEEEsect manufacturer buys portion of MAC address space (to
assure uniqueness)sect analogybull MAC address like Social Security Numberbull IP address like postal address
sect MAC flat address portability bull can move interface from one LAN to anotherbull recall IP address not portable depends on IP subnet to which
node is attached
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 43: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/43.jpg)
ARP address resolution protocol
Link Layer 6-43
ARP table each IP node (host router) on LAN has table
Question how to determine interfacersquos MAC address knowing its IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
137196778
137196714
137196788
137196723
ARP
ARP
ARPARP
bull IPMAC address mappings for some LAN nodeslt IP address MAC address TTLgt
bull TTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 44: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/44.jpg)
ARP protocol in action
Link Layer 6-44
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A broadcasts ARP query containing Bs IP addrbull destination MAC address = FF-FF-FF-FF-FF-FFbull all nodes on LAN receive ARP query
1Source MAC 71-65-F7-2B-08-53Source IP 137196723Target IP address 137196714hellip
1
Ethernet frame (sent to FF-FF-FF-FF-FF-FF)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 45: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/45.jpg)
ARP protocol in action
Link Layer 6-45
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
B replies to A with ARP response giving its MAC address
2
Target IP address 137196714Target MAC address
58-23-D7-FA-20-B0hellip
2
ARP message into Ethernet frame (sent to 71-65-F7-2B-08-53)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 46: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/46.jpg)
ARP protocol in action
Link Layer 6-46
58-23-D7-FA-20-B0137196714
B
C
D
TTL
71-65-F7-2B-08-53137196723
A
ARP table in AIP addr MAC addr TTL
example A wants to send datagram to Bbull Bʼs MAC address not in Arsquos ARP table so A uses ARP to find Brsquos MAC address
A receives Brsquos reply adds B entry into its local ARP table
3
137196714
58-23-D7-FA-20-B0 500
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 47: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/47.jpg)
Routing to another subnet addressing
Link Layer 6-47
walkthrough sending a datagram from A to B via Rsect focus on addressing ndash at IP (datagram) and MAC layer (frame) levels
RA B
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55 222222222222
49-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
sect assume thatbull A knows Brsquos IP addressbull A knows IP address of first hop router R (how)bull A knows Rrsquos MAC address (how)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 48: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/48.jpg)
Routing to another subnet addressing
Link Layer 6-48
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IP src 111111111111IP dest 222222222222
sect A creates IP datagram with IP source A destination B sect A creates link-layer frame containing A-to-B IP datagrambull Rs MAC address is framersquos destination
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 49: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/49.jpg)
Routing to another subnet addressing
Link Layer 6-49
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
sect frame sent from A to R
IPEthPhy
sect frame received at R datagram removed passed up to IP
MAC src 74-29-9C-E8-FF-55MAC dest E6-E9-00-17-BB-4B
IP src 111111111111IP dest 222222222222
IP src 111111111111IP dest 222222222222
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 50: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/50.jpg)
Routing to another subnet addressing
Link Layer 6-50
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2A
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
IPEthPhy
Routing to another subnet addressing
Link Layer 6-51
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
IP src 111111111111IP dest 222222222222
MAC src 1A-23-F9-CD-06-9BMAC dest 49-BD-D2-C7-56-2Asect transmits link-layer frame
sect R determines outgoing interface passes datagram with IP source A destination B to link layer
sect R creates link-layer frame containing A-to-B IP datagram Frame destination address Bs MAC address
Routing to another subnet addressing
Link Layer 6-52
R
1A-23-F9-CD-06-9B222222222220
111111111110E6-E9-00-17-BB-4BCC-49-DE-D0-AB-7D
111111111112
11111111111174-29-9C-E8-FF-55
A
22222222222249-BD-D2-C7-56-2A
22222222222188-B2-2F-54-1A-0F
B
IPEthPhy
IPEthPhy
sect B receives frame extracts IP datagram destination B sect B passes datagram up protocol stack to IP
IP src 111111111111IP dest 222222222222
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-53
Ethernet
Link Layer 6-54
ldquodominantrdquo wired LAN technology sect first widely used LAN technologysect simpler cheapsect kept up with speed race 10 Mbps ndash 400 Gbps sect single chip multiple speeds (eg Broadcom BCM5761)
Metcalfersquos Ethernet sketch
httpswwwusptogovlearning-and-resourcesjourneys-innovationaudio-storiesdefying-doubters
Ethernet physical topology
Link Layer 6-55
sect bus popular through mid 90sbull all nodes in same collision domain (can collide with each other)
bus coaxial cable switched
sect switched prevails todaybull active link-layer 2 switch in centerbull each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with
each other)
Ethernet frame structure
Link Layer 6-56
sending interface encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
destaddress
sourceaddress data (payload) CRCpreamble
type
preamble sect used to synchronize receiver sender clock ratessect 7 bytes of 10101010 followed by one byte of 10101011
Ethernet frame structure (more)
Link Layer 6-57
destaddress
sourceaddress data (payload) CRCpreamble
type
sect addresses 6 byte source destination MAC addressesbull if adapter receives frame with matching destination address or with broadcast
address (eg ARP packet) it passes data in frame to network layer protocolbull otherwise adapter discards frame
sect type indicates higher layer protocol bull mostly IP but others possible eg Novell IPX AppleTalkbull used to demultiplex up at receiver
sect CRC cyclic redundancy check at receiverbull error detected frame is dropped
Ethernet unreliable connectionless
Link Layer 6-58
sectconnectionless no handshaking between sending and receiving NICs
sectunreliable receiving NIC doesnrsquot send ACKs or NAKs to sending NICbull data in dropped frames recovered only if initial sender uses
higher layer rdt (eg TCP) otherwise dropped data lostsectEthernetrsquos MAC protocol unslotted CSMACD with binary
backoff
8023 Ethernet standards link amp physical layers
Link Layer 6-59
bull different physical layer media fiber cable
applicationtransportnetwork
linkphysical
MAC protocoland frame format
100BASE-TX
100BASE-T4
100BASE-FX100BASE-T2
100BASE-SX 100BASE-BX
fiber physical layercopper (twister pair) physical layer
sect many different Ethernet standardsbull common MAC protocol and frame formatbull different speeds 2 Mbps 10 Mbps 100 Mbps 1Gbps 10 Gbps 40 Gbps
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-60
Ethernet switch
Link Layer 6-61
sect Switch is a link-layer device takes an active rolebull store forward Ethernet framesbull examine incoming framersquos MAC address selectively forward frame
to one-or-more outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
sect transparent hosts unaware of presence of switches
sect plug-and-play self-learningbull switches do not need to be configured
Switch multiple simultaneous transmissions
Link Layer 6-62
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisions
Switch multiple simultaneous transmissions
Link Layer 6-63
switch with six interfaces (123456)
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sect hosts have dedicated direct connection to switch
sect switches buffer packetssect Ethernet protocol used on each
incoming link so bull no collisions full duplexbull each link is its own collision
domainsect switching A-to-Arsquo and B-to-Brsquo can transmit
simultaneously without collisionsbull but A-to-Arsquo and C to Arsquo can not happen
simultaneously
Switch forwarding table
Link Layer 6-64
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Q how does switch know Arsquo reachable via interface 4 Brsquo reachable via interface 5A each switch has a switch table each entrysect (MAC address of host interface to reach
host time stamp)sect looks like a routing table
Q how are entries created maintained in switch table sect something like a routing protocol
Switch self-learning
Link Layer 6-65
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
sectswitch learns which hosts can be reached through which interfaces
A Arsquo
Source ADest Arsquo
MAC addr interface TTLSwitch table
(initially empty)A 1 60
bull when frame received switch ldquolearnsrdquo location of sender incoming LAN segmentbull records senderlocation pair
in switch table
Switch frame filteringforwarding
Link Layer 6-66
when frame received at switch1 record incoming link MAC address of sending host2 index switch table using MAC destination address3 if entry found for destination
then if destination on segment from which frame arrived
then drop frameelse forward frame on interface indicated by entry
else flood forward on all interfaces except arriving interface
A
Arsquo
B
Brsquo C
Crsquo
1 2
345
6
Self-learning forwarding example
Link Layer 6-67
A Arsquo
Source ADest Arsquo
MAC addr interface TTLswitch table
(initially empty)A 1 60
A ArsquoA ArsquoA ArsquoA ArsquoA Arsquo
Arsquo A
Arsquo 4 60
sect frame destination Arsquo location unknown flood
sect destination A location known selectively send
on just one link
Interconnecting switches
Link Layer 6-68
self-learning switches can be connected together
Q sending from A to G - how does S1 know to forward frame destined to G via S4 and S3
sect A self learning (works exactly the same as in single-switch case)
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Self-learning multi-switch example
Link Layer 6-69
Suppose C sends frame to I I responds to C
Q show switch tables and packet forwarding in S1 S2 S3 S4
A
B
S1
C D
E
FS2
S4
S3
H
I
G
Small institutional network
Link Layer 6-70
to externalnetwork
router
IP subnet
mail server
web server
Switches vs routers
Link Layer 6-71
applicationtransportnetwork
linkphysical
networklink
physical
linkphysical
switch
datagram
applicationtransportnetwork
linkphysical
frame
frame
framedatagram
6-71
both are store-and-forward sect routers network-layer devices (examine
network-layer headers)sect switches link-layer devices (examine
link-layer headers)
both have forwarding tablessect routers compute tables using routing
algorithms IP addressessect switches learn forwarding table using
flooding learning MAC addresses
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-72
Virtual LANs (VLANs) motivation
Link Layer 6-73
Computer Science EE
Q what happens as LAN sizes scale users change point of attachment
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy issues
Virtual LANs (VLANs) motivation
Link Layer 6-74
administrative issuessect CS user moves office to EE - physically
attached to EE switch but wants to remain logically attached to CS switch
Computer Science EE
single broadcast domainsect scaling all layer-2 broadcast traffic
(ARP DHCP unknown MAC) must cross entire LAN
sect efficiency security privacy efficiency issues
Q what happens as LAN sizes scale users change point of attachment
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-75
switch(es) supporting VLAN capabilities can be configured to define multiple virtual LANS over single physical LAN infrastructure
Virtual Local Area Network (VLAN)
port-based VLAN switch ports grouped (by switch management software) so that single physical switch helliphellip
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
hellip operates as multiple virtual switches
1
82
7
EE (VLAN ports 1-8)
hellip
9
1610
15
hellip
CS (VLAN ports 9-15)
1
82
7 9
1610
15
Port-based VLANs
Link Layer 6-76
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
sect traffic isolation frames tofrom ports 1-8 can only reach ports 1-8bull can also define VLAN based on MAC
addresses of endpoints rather than switch port
sect dynamic membership ports can be dynamically assigned among VLANs
sect forwarding between VLANS done via routing (just as with separate switches)bull in practice vendors sell combined switches
plus routers
1
82
7 9
1610
15
VLANS spanning multiple switches
Link Layer 6-77
hellip
EE (VLAN ports 1-8) CS (VLAN ports 9-15)
hellip
5
82
7
hellip
16
1
6
3
4
Ports 235 belong to EE VLANPorts 4678 belong to CS VLAN
trunk port carries frames between VLANS defined over multiple physical switchessect frames forwarded within VLAN between switches canrsquot be vanilla 8021
frames (must carry VLAN ID info)sect 8021q protocol addsremoved additional header fields for frames
forwarded between trunk ports
8021Q VLAN frame format
Link Layer 6-78
8021 Ethernet framedestaddress
sourceaddress data (payload) CRCpreamble
type
2-byte Tag Protocol Identifier(value 81-00) Tag Control Information
(12 bit VLAN ID field 3 bit priority field like IP TOS)
Recomputed CRC
8021Q framedestaddress
sourceaddress data (payload) CRCpreamble
type
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-79
label Exp S TTL
20 3 1 5
Multiprotocol label switching (MPLS)
Link Layer 6-80
sect goal high-speed IP forwarding among network of MPLS-capable routers using fixed length label (instead of shortest prefix matching) bull faster lookup using fixed length identifierbull borrowing ideas from Virtual Circuit (VC) approachbull but IP datagram still keeps IP address
remainder of Ethernet frame including IP header with IP source destination addressesMPLS headerEthernet
headerremainder of Ethernet frame including IP
header with IP source destination addresses
MPLS capable routers
Link Layer 6-81
sect aka label-switched routersect forward packets to outgoing interface based only on label
value (donrsquot inspect IP address)bull MPLS forwarding table distinct from IP forwarding tables
sect flexibility MPLS forwarding decisions can differ from those of IPbull use destination and source addresses to route flows to same
destination differently (traffic engineering)bull re-route flows quickly if link fails pre-computed backup paths
MPLS versus IP paths
Link Layer 6-82
R2
D
R3R5
A
R6
R4
sect IP routing path to destination determined by destination address alone
IP router
MPLS versus IP paths
Link Layer 6-83
R2
D
R3R5
A
R6
IP routerR4
sect IP routing path to destination determined by destination address alone
IPMPLS router
IPMPLS entry router (R4) can use different MPLS routes to A based eg on IP source address or other fields
sect MPLS routing path to destination can be based on source anddestination addressbull flavor of generalized forwarding (MPLS 10 years earlier)bull fast reroute precompute backup routes in case of link failure
R1
MPLS signaling
Link Layer 6-84
sect modify OSPF IS-IS link-state flooding protocols to carry info used by MPLS routing bull eg link bandwidth amount of ldquoreservedrdquo link bandwidth
R2
D
R3R5
A
R6
R4modified link state flooding
RSVP-TE
sect entry MPLS router uses RSVP-TE signaling protocol to set up MPLS forwarding at downstream routers
R1
MPLS forwarding tables
Link Layer 6-85
in out outlabel label dest interface
6 - A 0
in out outlabel label dest interface
10 6 A 112 9 D 0
in out outlabel label dest interface
8 6 A 0
in out outlabel label dest interface
10 A 012 D 08 A 1
R2
D
R3R5
A
R6
R4
R1
0
100
1
0
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-86
Datacenter networks
Link Layer 6-87
10rsquos to 100rsquos of thousands of hosts often closely coupled in close proximitysect e-business (eg Amazon)sect content-servers (eg YouTube Akamai Apple Microsoft)sect search engines data mining (eg Google)
challengessect multiple applications each serving
massive numbers of clients sect reliabilitysect managingbalancing load avoiding
processing networking data bottlenecks Inside a 40-ft Microsoft container Chicago data center
Datacenter networks network elements
Link Layer 6-88
Server rackssect 20- 40 server blades hosts
Top of Rack (TOR) switchsect one per racksect 40-100Gbps Ethernet to blades
Tier-2 switchessect connecting to ~16 TORs below
Tier-1 switchessect connecting to ~16 T-2s below
Border routerssect connections outside datacenter
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks network elements
Link Layer 6-89
Facebook F16 data center network topology
httpsengineeringfbcomdata-center-engineeringf16-minipack (posted 32019)
Datacenter networks multipath
Link Layer 6-90
9 10 11 12 13 14 15 16
two disjoint paths highlighted between racks 1 and 11
sect rich interconnection among switches racksbull increased throughput between racks (multiple routing paths possible)bull increased reliability via redundancy
hellip
hellip
hellip
hellip
hellip
hellip
hellip
hellip
Datacenter networks application-layer routing
Link Layer 6-91
Load balancer
Internet
load balancer application-layer routingsect receives external
client requestssect directs workload
within data centersect returns results to
external client (hiding data center internals from client)
sect link layer bull RoCE remote DMA (RDMA) over Converged Ethernet
sect transport layer bull ECN (explicit congestion notification) used in transport-layer congestion
control (DCTCP DCQCN)bull experimentation with hop-by-hop (backpressure) congestion control
sect routing managementbull SDN widely used withinamong organizationsrsquo datacentersbull place related services data as close as possible (eg in same rack or nearby
rack) to minimize tier-2 tier-1 communication
Datacenter networks protocol innovations
Link Layer 6-92
Link layer LANs roadmap
sect a day in the life of a web request
sect introductionsect error detection correction sect multiple access protocolssect LANsbull addressing ARPbull Ethernetbull switchesbull VLANs
sect link virtualization MPLSsect data center networking
Link Layer 6-93
Synthesis a day in the life of a web request
Link Layer 6-94
sect our journey down the protocol stack is now completebull application transport network link
sect putting-it-all-together synthesisbull goal identify review understand protocols (at all layers) involved in
seemingly simple scenario requesting www pagebull scenario student attaches laptop to campus network requestsreceives
wwwgooglecom
A day in the life scenario
Link Layer 6-95
Comcast network 68800013
Googlersquos network 64233160019 64233169105
web server
DNS server
school network 68802024
browser
web page
sect arriving mobile client attaches to network hellip
sect requests web page wwwgooglecom
scenario
Sounds simple
A day in the life connecting to the Internet
Link Layer 6-96
router has DHCP server
arriving mobileDHCP client
sect connecting laptop needs to get its own IP address addr of first-hop router addr of DNS server use DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCP
DHCP
DHCPUDP
IPEthPhy
DHCP
DHCP
DHCP
DHCPDHCP
sect DHCP request encapsulated in UDP encapsulated in IP encapsulated in 8023 Ethernet
sect Ethernet frame broadcast (dest FFFFFFFFFFFF) on LAN received at router running DHCP server
sect Ethernet demuxed to IP demuxed UDP demuxed to DHCP
A day in the life connecting to the Internet
Link Layer 6-97
router has DHCP server
arriving mobileDHCP client
DHCPUDP
IPEthPhy
DHCPUDP
IPEthPhy
sect DHCP server formulates DHCP ACK containing clientrsquos IP address IP address of first-hop router for client name amp IP address of DNS server
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP
DHCP sect encapsulation at DHCP server frame forwarded (switch learning) through LAN demultiplexing at client
Client now has IP address knows name amp addr of DNS server IP address of its first-hop router
sect DHCP client receives DHCP ACK reply
A day in the lifehellip ARP (before DNS before HTTP)
Link Layer 6-98
router has ARP server
arriving mobileARP client
DNSUDP
IPEthPhy
EthPhy
ARP
sect before sending HTTP request need IP address of wwwgooglecom DNS
DNS
DNS
DNS
sect DNS query created encapsulated in UDP encapsulated in IP encapsulated in Eth To send frame to router need MAC address of router interface ARP
sect ARP query broadcast received by router which replies with ARP reply giving MAC address of router interface
sect client now knows MAC address of first hop router so can now send frame containing DNS query
ARP queryARP
ARP reply
A day in the lifehellip using DNS
Link Layer 6-99
DNSUDP
IPEthPhy
Comcast network 68800013
DNS server
DNS
DNS
DNS
DNS
DNS
sect IP datagram containing DNS query forwarded via LAN switch from client to 1st hop router
sect IP datagram forwarded from campus network into Comcast network routed (tables created by RIP OSPF IS-IS andor BGP routing protocols) to DNS server
sect demuxed to DNSsect DNS replies to client
with IP address of wwwgooglecom
DNSUDP
IPEthPhy
DNS
DNS
DNS
DNS
DNS
A day in the lifehellipTCP connection carrying HTTP
Link Layer 6-100
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTP sect to send HTTP request client first opens TCP socket to web server
sect TCP SYN segment (step 1 in TCP 3-way handshake) inter-domain routed to web server
sect TCP connection established
SYN
SYN
SYN
SYN
TCPIPEthPhy
SYN
SYN
SYN
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
SYNACK
sect web server responds with TCP SYNACK (step 2 in TCP 3-way handshake)
A day in the lifehellip HTTP requestreply
Link Layer 6-101
Comcast network 68800013
64233169105Google web server
HTTPTCPIPEthPhy
HTTPTCPIPEthPhy
HTTP sect HTTP request sent into TCP socket
sect IP datagram containing HTTP request routed to wwwgooglecom
sect IP datagram containing HTTP reply routed back to client
sect web server responds with HTTP reply (containing web page)
HTTP
HTTP
HTTPHTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
HTTP
sect web page finally () displayed
Chapter 6 Summary
Link Layer 6-102
sect principles behind data link layer servicesbull error detection correctionbull sharing a broadcast channel multiple accessbull link layer addressing
sect instantiation implementation of various link layer technologiesbull Ethernetbull switched LANS VLANsbull virtualized networks as a link layer MPLS
sect synthesis a day in the life of a web request
Chapter 6 letrsquos take a breath
Link Layer 6-103
sect journey down protocol stack complete (except PHY)sect solid understanding of networking principles practicesect hellip could stop here hellip but more interesting topicsbull wirelessbull security
Additional Chapter 6 slides
Network Layer 5-104
Pure ALOHA efficiency
Link Layer 6-105
P(success by given node) = P(node transmits) P(no other node transmits in [t0-1t0]P(no other node transmits in [t0-1t0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)
hellip choosing optimum p and then letting n= 1(2e) = 18
even worse than slotted Aloha
![Page 51: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/51.jpg)
![Page 52: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/52.jpg)
![Page 53: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/53.jpg)
![Page 54: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/54.jpg)
![Page 55: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/55.jpg)
![Page 56: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/56.jpg)
![Page 57: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/57.jpg)
![Page 58: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/58.jpg)
![Page 59: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/59.jpg)
![Page 60: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/60.jpg)
![Page 61: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/61.jpg)
![Page 62: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/62.jpg)
![Page 63: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/63.jpg)
![Page 64: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/64.jpg)
![Page 65: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/65.jpg)
![Page 66: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/66.jpg)
![Page 67: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/67.jpg)
![Page 68: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/68.jpg)
![Page 69: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/69.jpg)
![Page 70: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/70.jpg)
![Page 71: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/71.jpg)
![Page 72: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/72.jpg)
![Page 73: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/73.jpg)
![Page 74: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/74.jpg)
![Page 75: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/75.jpg)
![Page 76: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/76.jpg)
![Page 77: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/77.jpg)
![Page 78: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/78.jpg)
![Page 79: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/79.jpg)
![Page 80: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/80.jpg)
![Page 81: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/81.jpg)
![Page 82: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/82.jpg)
![Page 83: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/83.jpg)
![Page 84: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/84.jpg)
![Page 85: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/85.jpg)
![Page 86: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/86.jpg)
![Page 87: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/87.jpg)
![Page 88: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/88.jpg)
![Page 89: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/89.jpg)
![Page 90: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/90.jpg)
![Page 91: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/91.jpg)
![Page 92: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/92.jpg)
![Page 93: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/93.jpg)
![Page 94: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/94.jpg)
![Page 95: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/95.jpg)
![Page 96: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/96.jpg)
![Page 97: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/97.jpg)
![Page 98: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/98.jpg)
![Page 99: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/99.jpg)
![Page 100: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/100.jpg)
![Page 101: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/101.jpg)
![Page 102: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/102.jpg)
![Page 103: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/103.jpg)
![Page 104: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/104.jpg)
![Page 105: Chapter 6 The Link Layer and LANsljilja/ENSC427/News/Kurose_Ross/Chapter_6_v8... · 2021. 3. 16. · Computer Networking: A Top-Down Approach 8thedition Jim Kurose, Keith Ross Pearson,](https://reader035.vdocuments.us/reader035/viewer/2022081518/612c86e9bcba6928197f8c86/html5/thumbnails/105.jpg)