Link Layer Link Layer: Introduction
Transcript of Link Layer Link Layer: Introduction
Ch 5Chapter 5Link Layer and LANsLink Layer and LANs
A note on the use of these ppt slidesWersquore making these slides freely available to all (faculty students readers) Theyrsquore in PowerPoint form so you can add modify and delete slides (including this one) and slide content to suit your needs They obviously Computer Networking
A T D A h ( g ) y y yrepresent a lot of work on our part In return for use we only ask the following
If you use these slides (eg in a class) in substantially unaltered form that you mention their source (after all wersquod like people to use our book)
If you post any slides in substantially unaltered form on a www site that
A Top Down Approach 4th edition Jim Kurose Keith RossAddis W sl J l If you post any slides in substantially unaltered form 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
Thanks and enjoy JFKKWR
Addison-Wesley July 2007
5 DataLink Layer 5-1
All material copyright 1996-2007JF Kurose and KW Ross All Rights Reserved
Chapter 5 The Data Link LayerChapter 5 The Data Link LayerOur goalsOur goals
understand principles behind data link layer servicesservices
error detection correctionsharing a broadcast channel multiple accesslink layer addressingreliable data transfer flow control done
i t ti ti d i l t ti f i li k instantiation and implementation of various link layer technologies
5 DataLink Layer 5-2
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link virtualization ATM MPLS
53Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-3
Link Layer IntroductionLink Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along connect adjacent nodes along communication path are links
wired linksi l li kwireless links
LANslayer-2 packet is a framey p encapsulates datagram
data-link layer has responsibility of transferring datagram from one node
5 DataLink Layer 5-4
g gto adjacent node over a link
Link layer contextydatagram transferred by transportation analogy
trip from Princeton to different link protocols over different links
Eth n t n fi st link
trip from Princeton to Lausanne
limo Princeton to JFKeg Ethernet on first link frame relay on intermediate links 80211
l l k
plane JFK to Genevatrain Geneva to Lausanne
don last linkeach link protocol provides different
tourist = datagramtransport segment =
i ti li kprovides different services
eg may or may not
communication linktransportation mode = link layer protocoleg may or may not
provide rdt over linklink layer protocoltravel agent = routing algorithm
5 DataLink Layer 5-5
algorithm
Link Layer ServicesLink Layer Servicesframing link accessframing link access
encapsulate datagram into frame adding header trailerchannel access if shared mediumf m mldquoMACrdquo addresses used in frame headers to identify source dest
diff t f IP dd bull different from IP addressreliable delivery between adjacent nodes
we learned how to do this already (chapter 3)we learned how to do this already (chapter 3)seldom used on low bit-error link (fiber some twisted pair)wireless links high error rates
bull Q why both link-level and end-end reliability
5 DataLink Layer 5-6
Link Layer Services (more)Link Layer Services (more)
flow controlpacing between adjacent sending and receiving nodes
error detectionerrors caused by signal attenuation noise
d f receiver detects presence of errors bull signals sender for retransmission or drops frame
tierror correctionreceiver identifies and corrects bit error(s) without resorting to retransmissionresorting to retransmission
half-duplex and full-duplexwith half duplex nodes at both ends of link can transmit
5 DataLink Layer 5-7
p but not at same time
Where is the link layer implementedWhere is the link layer implemented
in each and every hostin each and every hostlink layer implemented in ldquoadaptorrdquo (aka network host schematicadaptor (aka network interface card NIC)
Ethernet card PCMCI cpu memory
applicationtransportnetwork
linkcard 80211 cardimplements link physical layer controller
host bus (e g PCI)
link
layerattaches into hostrsquos system buses
physicaltransmission
(eg PCI)link
physical
ycombination of hardware software
network adaptercard
5 DataLink Layer 5-8
firmware
Adaptors CommunicatingAdaptors Communicating
controller controller
datagram datagram
controller
sending host receiving hostdatagram
frame
sending sideencapsulates datagram in f
receiving sidelooks for errors rdt flow
t l tframeadds error checking bits rdt flow control etc
control etcextracts datagram passes to upper layer at receiving
5 DataLink Layer 5-9
pp y gside
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-10
Error DetectionError DetectionEDC= Error Detection and Correction bits (redundancy)D D d b h k l d h d f ld D = Data protected by error checking may include header fields
bull Error detection not 100 reliablebull protocol may miss some errors but rarelybull larger EDC field yields better detection and correction
otherwise
5 DataLink Layer 5-11
Parity CheckingParity CheckingSingle Bit Parity Two Dimensional Bit ParitySingle Bit ParityDetect single bit errors
Two Dimensional Bit ParityDetect and correct single bit errors
0 0
5 DataLink Layer 5-12
Internet checksum (review)Internet checksum (review)
Goal detect ldquoerrorsrdquo (e g flipped bits) in transmitted Goal detect errors (eg flipped bits) in transmitted packet (note used at transport layer only)
Sendertreat segment contents
Receivercompute checksum of received segmentas sequence of 16-bit
integerschecksum addition (1rsquos
received segmentcheck if computed checksum equals checksum field valuechecksum addition (1 s
complement sum) of segment contentss d ts h ks
NO - error detectedYES - no error detected But maybe errors sender puts checksum
value into UDP checksum field
But maybe errors nonetheless
5 DataLink Layer 5-13
Checksumming Cyclic Redundancy CheckChecksumming Cyclic Redundancy Checkview data bits D as a binary numberychoose r+1 bit pattern (generator) Ggoal choose r CRC bits R such that
D R tl di i ibl b G ( d l 2) ltDRgt exactly divisible by G (modulo 2) receiver knows G divides ltDRgt by G If non-zero remainder error detectedcan detect all burst errors less than r+1 bits
widely used in practice (Ethernet 80211 WiFi ATM)
5 DataLink Layer 5-14
CRC ExampleCRC ExampleWant
D2r XOR R = nGequivalentlyq y
D2r = nG XOR R equivalentlyq y
if we divide D2r by G want remainder R
R = remainder[ ]D2r
G
5 DataLink Layer 5-15
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-16
Multiple Access Links and ProtocolspTwo types of ldquolinksrdquo
i t t i tpoint-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and hostpoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)old-fashioned Ethernetold fashioned Ethernetupstream HFC80211 wireless LAN
sh d i ( h d RFhumans at a
kt il p t
5 DataLink Layer 5-17
shared wire (eg cabled Ethernet)
shared RF(eg 80211 WiFi)
shared RF(satellite)
cocktail party (shared air acoustical)
Multiple Access protocolsMultiple Access protocolssingle shared broadcast channel single shared broadcast channel two or more simultaneous transmissions by nodes interference
collision if node receives two or more signals at the same timemultiple access protocol
distributed algorithm that determines how nodes share channel ie determine when node can transmitcommunication about channel sharing must use channel itself
f b d h l f di ino out-of-band channel for coordination
5 DataLink Layer 5-18
Ideal Multiple Access ProtocolIdeal Multiple Access Protocol
B d h l f R bBroadcast channel of rate R bps1 when one node wants to transmit it can send at
t Rrate R2 when M nodes want to transmit each can send at
average rate RMaverage rate RM3 fully decentralized
no special node to coordinate transmissionsno special node to coordinate transmissionsno synchronization of clocks slots
4 simple4 simple
5 DataLink Layer 5-19
MAC Protocols a taxonomyMAC Protocols a taxonomyThree broad classes
Channel Partitioningdivide channel into smaller ldquopiecesrdquo (time slots f d )frequency code)allocate piece to node for exclusive use
Random AccessRandom Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquonodes take turns but nodes with more to send can take longer turns
5 DataLink Layer 5-20
Channel Partitioning MAC protocols TDMAChannel Partitioning MAC protocols TDMA
TDMA time division multiple accessTDMA time division multiple accessaccess to channel in rounds each station gets fixed length slot (length = pkt each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle unused slots go idle example 6-station LAN 134 have pkt slots 256 idle idle
6-slotframe
1 3 4 1 3 4
5 DataLink Layer 5-21
Channel Partitioning MAC protocols FDMAChannel Partitioning MAC protocols FDMA
FDMA frequency division multiple accessFDMA frequency division multiple accesschannel spectrum divided into frequency bandseach station assigned fixed frequency bandeach station assigned fixed frequency bandunused transmission time in frequency bands go idle example 6-station LAN 1 3 4 have pkt frequency example 6-station LAN 134 have pkt frequency bands 256 idle
cy b
ands
freq
uenc
FDM cable
5 DataLink Layer 5-22
f
Random Access ProtocolsRandom Access Protocols
Wh d h k dWhen node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodesno a priori coordination among nodes
two or more transmitting nodes づ ldquocollisionrdquorandom access MAC protocol specifies random access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed how to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
5 DataLink Layer 5-23
CSMA CSMACD CSMACA
Slotted ALOHASlotted ALOHA
A ti O tiAssumptionsall frames same sizetime divided into equal
Operationwhen node obtains fresh frame transmits in next time divided into equal
size slots (time to transmit 1 frame)
frame transmits in next slot
if no collision node can nodes start to transmit only slot beginning
d h i d
send new frame in next slotif collision node nodes are synchronized
if 2 or more nodes transmit in slot all
if collision node retransmits frame in each subsequent slot transmit in slot all
nodes detect collisionq
with prob p until success
5 DataLink Layer 5-24
Slotted ALOHA
P s ConsProssingle active node can continuously transmit
Conscollisions wasting slotsidle slotscontinuously transmit
at full rate of channelhighly decentralized
idle slotsnodes may be able to detect collision in less highly decentralized
only slots in nodes need to be in sync
than time to transmit packetclock synchronization
5 DataLink Layer 5-25
ysimple
clock synchronization
Slotted Aloha efficiencyymax efficiency find p that maximizes
Efficiency long-run fraction of successful slots p that maximizes
Np(1-p)N-1
for many nodes take
fraction of successful slots (many nodes all with many frames to send)
suppose N nodes with
for many nodes take limit of Np(1-p)N-1
as N goes to infinity
frames to send)
many frames to send each transmits in slot with probability p
g ygives
Max efficiency = 1e = 37with probability pprob that given node has success in a slot =
At best channelused for useful has success in a slot =
p(1-p)N-1
prob that any node has
used for useful transmissions 37of time
5 DataLink Layer 5-26
p ya success = Np(1-p)N-1
Pure (unslotted) ALOHAPure (unslotted) ALOHAunslotted Aloha simpler no synchronizationunslotted Aloha simpler no synchronizationwhen frame first arrives
transmit immediately transmit immediately collision probability increases
frame sent at t0 collides with other frames sent in [t0-1t0+1]0 [ 0 0 ]
5 DataLink Layer 5-27
Pure Aloha efficiencyPure Aloha efficiencyP(success by given node) = P(node transmits) P(success by g ven node) P(node transm ts)
P(no other node transmits in [p0-1p0] P(no other node transmits in [p0-1 p0] P(no other node transmits in [p0 1p0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)= p (1 p)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18
even worse than slotted Aloha
5 DataLink Layer 5-28
CSMA (Carrier Sense Multiple Access)CSMA (Carrier Sense Multiple Access)
CSMA listen before transmitIf channel sensed idle transmit entire framef chann s ns transm t nt r fram
If channel sensed busy defer transmission
human analogy donrsquot interrupt others
5 DataLink Layer 5-29
CSMA collisionsCSMA collisionsc llisi ns c n still ccu
spatial layout of nodes
collisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmission
collisionentire packet transmission time wasted
tnoterole of distance amp propagation delay in determining collision y gprobability
5 DataLink Layer 5-30
CSMACD (Collision Detection)CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMACSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel colliding transmissions aborted reducing channel wastage
collision detectioncollision detectioneasy in wired LANs measure signal strengths compare transmitted received signalscompare transmitted received signalsdifficult in wireless LANs received signal strength overwhelmed by local transmission strength overwhelmed by local transmission strength
human analogy the polite conversationalist
5 DataLink Layer 5-31
CSMACD collision detectionCSMACD collision detection
5 DataLink Layer 5-32
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocols
h l i i i M C lchannel partitioning MAC protocolsshare channel efficiently and fairly at high loadinefficient at low load delay in channel access 1N bandwidth allocated even if only 1 active node node
Random access MAC protocolsefficient at low load single node can fully efficient at low load single node can fully utilize channelhigh load collision overheadhigh load collision overhead
ldquotaking turnsrdquo protocolslook for best of both worlds
5 DataLink Layer 5-33
look for best of both worlds
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsPollingPolling
master node ldquoinvitesrdquo slave nodes d tinvites slave nodes to transmit in turntypically used with master
polldata
typically used with ldquodumbrdquo slave devicesconcerns
data
polling overhead latency slavessingle point of failure (master)
5 DataLink Layer 5-34
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsToken passingoken pass ng
control token passed from one node to next
T
sequentiallytoken message (nothing
concernstoken overhead
to send)T
latencysingle point of failure (token)(token)
5 DataLink Layer 5-35
data
Summary of MAC protocolsSummary of MAC protocols
h l i i i b i f dchannel partitioning by time frequency or codeTime Division Frequency Divisiond ss (d i ) random access (dynamic) ALOHA S-ALOHA CSMA CSMACDcarrier sensing easy in some technologies (wire) hard in carrier sensing easy in some technologies (wire) hard in others (wireless)CSMACD used in EthernetCSMACA used in 80211
taking turnslli f l i k ipolling from central site token passing
Bluetooth FDDI IBM Token Ring
5 DataLink Layer 5-36
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-37
MAC Addresses and ARPMAC Addresses and ARP
32-bit IP address network-layer addressyused to get datagram to destination IP subnet
MAC (or LAN or physical or Ethernet) MAC (or LAN or physical or Ethernet) address
f n ti n t f m f m n int f t n th function get frame from one interface to another physically-connected interface (same network)48 bit MAC address (for most LANs)48 bit MAC address (for most LANs)
bull burned in NIC ROM also sometimes software settable
5 DataLink Layer 5-38
LAN Addresses and ARPLAN Addresses and ARPEach adapter on LAN has unique LAN address
Broadcast address =FF-FF-FF-FF-FF-FF
1A-2F-BB-76-09-AD
= adapterLAN
(wired ori l )
58-23-D7-FA-20-B071-65-F7-2B-08-53
wireless)
0C-C4-11-6F-E3-98
5 DataLink Layer 5-39
LAN Address (more)LAN Address (more)
M C dd ll i d i i d b IEEEMAC address allocation administered by IEEEmanufacturer buys portion of MAC address space (t ss i ss)(to assure uniqueness)analogy
( ) MAC dd lik S i l S it N b(a) MAC address like Social Security Number(b) IP address like postal address
MAC fl dd づ bili MAC flat address づ portability can move LAN card from one LAN to another
IP hi chic l dd ss NOT p t blIP hierarchical address NOT portableaddress depends on IP subnet to which node is attached
5 DataLink Layer 5-40
ARP Address Resolution ProtocolAR Address Resolut on rotocol
Each IP node (host Question how to determine Each IP node (host router) on LAN has ARP table
Question how to determineMAC address of Bknowing Brsquos IP address
ARP table IPMAC address mappings for
knowing B s IP address
137196778 pp gsome LAN nodes
lt IP address MAC address TTLgtTTL (Tim T Li ) tim
1A-2F-BB-76-09-AD
137196723 137196714
TTL (Time To Live) time after which address mapping will be forgotten ( ll 20 )58-23-D7-FA-20-B071-65-F7-2B-08-53
LAN
(typically 20 min)58 23 D7 FA 20 B0
0C-C4-11-6F-E3-98137 196 7 88
5 DataLink Layer 5-41
137196788
ARP protocol Same LAN (network)
A wants to send datagram t B d Brsquo MAC dd A h ( ) IP tto B and Brsquos MAC address not in Arsquos ARP tableA broadcasts ARP query
A caches (saves) IP-to-MAC address pair in its ARP table until information q y
packet containing Bs IP address
dest MAC address = FF
becomes old (times out) soft state information that times out (goes dest MAC address = FF-
FF-FF-FF-FF-FFall machines on LAN
that times out (goes away) unless refreshed
ARP is ldquoplug-and-playrdquoreceive ARP query
B receives ARP packet replies to A with its (Bs)
p g p ynodes create their ARP tables without intervention from net replies to A with its (B s)
MAC addressframe sent to Arsquos MAC address (unicast)
intervention from net administrator
5 DataLink Layer 5-42
address (unicast)
Addressing routing to another LANwalkthrough send datagram from A to B via R
ssume A kn s Brsquos IP ddress
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
assume A knows B s IP address
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112B
222222222222
CC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
t ARP t bl s i t R f h IP two ARP tables in router R one for each IP network (LAN)
5 DataLink Layer 5-43
A creates IP datagram with source A destination B A uses ARP to get Rrsquos MAC address for 111 111 111 110A uses ARP to get R s MAC address for 111111111110A creates link-layer frame with Rs MAC address as dest frame contains A-to-B IP datagram This is a really importantArsquos NIC sends frame Rrsquos NIC receives frame R r m v s IP d t r m fr m Eth rn t fr m s s its
This is a really importantexample ndash make sure youunderstand
R removes IP datagram from Ethernet frame sees its destined to BR uses ARP to get Brsquos MAC address gR creates frame containing A-to-B IP datagram sends to B
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112
B222222222222
5 DataLink Layer 5-44
RCC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-45
Ethernetldquodominantrdquo wired LAN technology
cheap $20 for NICfirst widely used LAN technologyy gysimpler cheaper than token LANs and ATMkept up with speed race 10 Mbps ndash 10 Gbps p p p p p
Metcalfersquos Ethernetsketch
5 DataLink Layer 5-46
Star topologyp gybus topology popular through mid 90s
all nodes in same collision domain (can collide with each all nodes in same collision domain (can collide with each other)
today star topology prevails h active switch in center
each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with each other)
switch
b l bl
5 DataLink Layer 5-47
bus coaxial cable star
Ethernet Frame StructuremSending adapter encapsulates IP datagram (or other g p p g (
network layer protocol packet) in Ethernet frame
Preamble7 bytes with pattern 10101010 followed by one y p ybyte with pattern 10101011used to synchronize receiver sender clock rates
5 DataLink Layer 5-48
Ethernet Frame Structure (more)Ethernet Frame Structure (more)Addresses 6 bytesy
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocolpasses data in frame to network layer protocolotherwise adapter discards frame
Type indicates higher layer protocol (mostly IP Type indicates higher layer protocol (mostly IP but others possible eg Novell IPX AppleTalk)CRC checked at receiver if error is detected frame is dropped
5 DataLink Layer 5-49
Ethernet Unreliable connectionlessEthernet Unreliable connectionless
i l N h d h ki b di d connectionless No handshaking between sending and receiving NICs
li bl i i NIC d s rsquot s d ks ks unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC
stream of datagrams passed to network layer can have gaps stream of datagrams passed to network layer can have gaps (missing datagrams)gaps will be filled if app is using TCPotherwise app will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
5 DataLink Layer 5-50
Ethernet CSMACD algorithmg1 NIC receives datagram 4 If NIC detects another
from network layer creates frame
2 f N C h l dl
transmission while transmitting aborts and sends jam signal2 If NIC senses channel idle
starts frame transmission If NIC senses channel
sends jam signal5 After aborting NIC
enters exponential If NIC senses channel busy waits until channel idle then transmits
enters exponential backoff after mth collision NIC chooses K at
3 If NIC transmits entire frame without detecting
random from 012hellip2m-1 NIC waits K 512 bi i
ganother transmission NIC is done with frame
K512 bit times returns to Step 2
5 DataLink Layer 5-51
Ethernetrsquos CSMACD (more)Ethernet s CSMACD (more)Jam Signal make sure all Exponential Backoffg
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10
pGoal adapt retransmission attempts to estimated current loadBit time 1 microsec for 10
Mbps Ethernet for K=1023 wait time is about 50 msec
current loadheavy load random wait will be longer
about 50 msec first collision choose K from 01 delay is K 512 bit transmission timestransm ss on t m safter second collision choose K from 0123hellipft t lli i h K
Seeinteract with Javaapplet on AWL Web site
after ten collisions choose K from 01234hellip1023
pphighly recommended
5 DataLink Layer 5-52
CSMACD efficiencyCSMACD efficiency
T d l b 2 d i L NTprop = max prop delay between 2 nodes in LANttrans = time to transmit max-size frame
efficiency 1
=
efficiency goes to 1
transprop ttff y
51+
efficiency goes to 1 as tprop goes to 0as ttrans goes to infinitytrans g y
better performance than ALOHA and simple cheap decentralized
5 DataLink Layer 5-53
p
8023 Ethernet Standards Link amp Physical Layersy y
many different Ethernet standardsycommon MAC protocol and frame formatdifferent speeds 2 Mbps 10 Mbps 100 Mbps 1Gb 10G b1Gbps 10G bpsdifferent physical layer media fiber cable
MAC protocolapplicationtransportnetwork
li k
MAC protocoland frame format
100BASE-TX 100BASE-FX100BASE-T2link
physical100BASE-T4 100BASE-SX 100BASE-BX
5 DataLink Layer 5-54
fiber physical layercopper (twisterpair) physical layer
Manchester encodingManchester encoding
used in 10BaseTeach bit has a transitionallows clocks in sending and receiving nodes to g gsynchronize to each other
no need for a centralized global clock among nodes
5 DataLink Layer 5-55
Hey this is physical-layer stuff
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3 Multiple access
58 Link Virtualization ATM MPLS
53 Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-56
Hubshellip physical-layer (ldquodumbrdquo) repeaters
bits coming in one link go out all other links at bits coming in one link go out all other links at same rateall nodes connected to hub can collide with one anotherno frame bufferinggno CSMACD at hub host NICs detect collisions
twisted pair
hub
5 DataLink Layer 5-57
Switchlink-layer device smarter than hubs take yactive role
store forward Ethernet framesexamine incoming framersquos MAC address selectively forward frame to one-or-more
l k h f f d d outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
transparenthosts are unaware of presence of switches
plug-and-play self-learningswitches do not need to be configured
5 DataLink Layer 5-58
g
Switch allows multiple simultaneous ptransmissions
A
hosts have dedicated direct connection to switch
BCrsquo
switches buffer packetsEthernet protocol used on each incoming link but no
1 2 345
6
each incoming link but no collisions full duplex
each link is its own collision C
45
domainswitching A-to-Arsquo and B-to-Brsquo simultaneously
ArsquoBrsquo
to-B simultaneously without collisions
not possible with dumb hub
switch with six interfaces(123456)
5 DataLink Layer 5-59
Switch TableSwitch Table
Q h d s s it h k th t A
Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5
BCrsquo
B reachable via interface 5A each switch has a switch table each entry
1 2 345
6ta ach ntry
(MAC address of host interface to reach host time stamp) C
45
looks like a routing tableQ how are entries created
i t i d i it h t bl
ArsquoBrsquo
maintained in switch table something like a routing protocol
switch with six interfaces(123456)
5 DataLink Layer 5-60
protocol
Switch self-learning Source ASwitch self-learning
s it h l s hi h h sts A A Arsquo
Dest Arsquo
switch learns which hosts can be reached through which interfaces
BCrsquo
which interfaceswhen frame received switch ldquolearnsrdquo location of
d i i LAN
1 2 345
6
sender incoming LAN segmentrecords senderlocation
C
45
pair in switch tableArsquoBrsquo
MAC addr interface TTLMAC addr interface TTLSwitch table
(initially empty)A 1 60
5 DataLink Layer 5-61
Switch frame filteringforwardingWhen frame received
1 record link associated with sending host2 ind x s itch t bl usin MAC d st dd ss2 index switch table using MAC dest address3 if entry found for destination
then then if dest on segment from which frame arrived
then drop the framethen drop the frameelse forward the frame on interface indicated
else flood forward on all but the interface
on which the frame arrived5 DataLink Layer 5-62
on which the frame arrived
Self-learning Source ASelf learning forwarding
lA A Arsquo
Dest Arsquo
exampleBCrsquo
frame destinati n 1 2 345
6A ArsquoA ArsquoA ArsquoA ArsquoA Arsquoframe destination unknown floodd ti ti A
C
45
Arsquo A
destination A location knownselective send
ArsquoBrsquo
MAC addr interface TTL
selective send
MAC addr interface TTLSwitch table
(initially empty)A 1 60Arsquo 4 60
5 DataLink Layer 5-63
Interconnecting switchesg
switches can be connected togetherg
S
S4
A
B
S1
C DF
S2S3
IB C D
E HI
G
Q sending from A to G - how does S1 know to forward frame destined to F via S and S forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)
5 DataLink Layer 5-64
single switch case)
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
Link layer contextydatagram transferred by transportation analogy
trip from Princeton to different link protocols over different links
Eth n t n fi st link
trip from Princeton to Lausanne
limo Princeton to JFKeg Ethernet on first link frame relay on intermediate links 80211
l l k
plane JFK to Genevatrain Geneva to Lausanne
don last linkeach link protocol provides different
tourist = datagramtransport segment =
i ti li kprovides different services
eg may or may not
communication linktransportation mode = link layer protocoleg may or may not
provide rdt over linklink layer protocoltravel agent = routing algorithm
5 DataLink Layer 5-5
algorithm
Link Layer ServicesLink Layer Servicesframing link accessframing link access
encapsulate datagram into frame adding header trailerchannel access if shared mediumf m mldquoMACrdquo addresses used in frame headers to identify source dest
diff t f IP dd bull different from IP addressreliable delivery between adjacent nodes
we learned how to do this already (chapter 3)we learned how to do this already (chapter 3)seldom used on low bit-error link (fiber some twisted pair)wireless links high error rates
bull Q why both link-level and end-end reliability
5 DataLink Layer 5-6
Link Layer Services (more)Link Layer Services (more)
flow controlpacing between adjacent sending and receiving nodes
error detectionerrors caused by signal attenuation noise
d f receiver detects presence of errors bull signals sender for retransmission or drops frame
tierror correctionreceiver identifies and corrects bit error(s) without resorting to retransmissionresorting to retransmission
half-duplex and full-duplexwith half duplex nodes at both ends of link can transmit
5 DataLink Layer 5-7
p but not at same time
Where is the link layer implementedWhere is the link layer implemented
in each and every hostin each and every hostlink layer implemented in ldquoadaptorrdquo (aka network host schematicadaptor (aka network interface card NIC)
Ethernet card PCMCI cpu memory
applicationtransportnetwork
linkcard 80211 cardimplements link physical layer controller
host bus (e g PCI)
link
layerattaches into hostrsquos system buses
physicaltransmission
(eg PCI)link
physical
ycombination of hardware software
network adaptercard
5 DataLink Layer 5-8
firmware
Adaptors CommunicatingAdaptors Communicating
controller controller
datagram datagram
controller
sending host receiving hostdatagram
frame
sending sideencapsulates datagram in f
receiving sidelooks for errors rdt flow
t l tframeadds error checking bits rdt flow control etc
control etcextracts datagram passes to upper layer at receiving
5 DataLink Layer 5-9
pp y gside
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-10
Error DetectionError DetectionEDC= Error Detection and Correction bits (redundancy)D D d b h k l d h d f ld D = Data protected by error checking may include header fields
bull Error detection not 100 reliablebull protocol may miss some errors but rarelybull larger EDC field yields better detection and correction
otherwise
5 DataLink Layer 5-11
Parity CheckingParity CheckingSingle Bit Parity Two Dimensional Bit ParitySingle Bit ParityDetect single bit errors
Two Dimensional Bit ParityDetect and correct single bit errors
0 0
5 DataLink Layer 5-12
Internet checksum (review)Internet checksum (review)
Goal detect ldquoerrorsrdquo (e g flipped bits) in transmitted Goal detect errors (eg flipped bits) in transmitted packet (note used at transport layer only)
Sendertreat segment contents
Receivercompute checksum of received segmentas sequence of 16-bit
integerschecksum addition (1rsquos
received segmentcheck if computed checksum equals checksum field valuechecksum addition (1 s
complement sum) of segment contentss d ts h ks
NO - error detectedYES - no error detected But maybe errors sender puts checksum
value into UDP checksum field
But maybe errors nonetheless
5 DataLink Layer 5-13
Checksumming Cyclic Redundancy CheckChecksumming Cyclic Redundancy Checkview data bits D as a binary numberychoose r+1 bit pattern (generator) Ggoal choose r CRC bits R such that
D R tl di i ibl b G ( d l 2) ltDRgt exactly divisible by G (modulo 2) receiver knows G divides ltDRgt by G If non-zero remainder error detectedcan detect all burst errors less than r+1 bits
widely used in practice (Ethernet 80211 WiFi ATM)
5 DataLink Layer 5-14
CRC ExampleCRC ExampleWant
D2r XOR R = nGequivalentlyq y
D2r = nG XOR R equivalentlyq y
if we divide D2r by G want remainder R
R = remainder[ ]D2r
G
5 DataLink Layer 5-15
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-16
Multiple Access Links and ProtocolspTwo types of ldquolinksrdquo
i t t i tpoint-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and hostpoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)old-fashioned Ethernetold fashioned Ethernetupstream HFC80211 wireless LAN
sh d i ( h d RFhumans at a
kt il p t
5 DataLink Layer 5-17
shared wire (eg cabled Ethernet)
shared RF(eg 80211 WiFi)
shared RF(satellite)
cocktail party (shared air acoustical)
Multiple Access protocolsMultiple Access protocolssingle shared broadcast channel single shared broadcast channel two or more simultaneous transmissions by nodes interference
collision if node receives two or more signals at the same timemultiple access protocol
distributed algorithm that determines how nodes share channel ie determine when node can transmitcommunication about channel sharing must use channel itself
f b d h l f di ino out-of-band channel for coordination
5 DataLink Layer 5-18
Ideal Multiple Access ProtocolIdeal Multiple Access Protocol
B d h l f R bBroadcast channel of rate R bps1 when one node wants to transmit it can send at
t Rrate R2 when M nodes want to transmit each can send at
average rate RMaverage rate RM3 fully decentralized
no special node to coordinate transmissionsno special node to coordinate transmissionsno synchronization of clocks slots
4 simple4 simple
5 DataLink Layer 5-19
MAC Protocols a taxonomyMAC Protocols a taxonomyThree broad classes
Channel Partitioningdivide channel into smaller ldquopiecesrdquo (time slots f d )frequency code)allocate piece to node for exclusive use
Random AccessRandom Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquonodes take turns but nodes with more to send can take longer turns
5 DataLink Layer 5-20
Channel Partitioning MAC protocols TDMAChannel Partitioning MAC protocols TDMA
TDMA time division multiple accessTDMA time division multiple accessaccess to channel in rounds each station gets fixed length slot (length = pkt each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle unused slots go idle example 6-station LAN 134 have pkt slots 256 idle idle
6-slotframe
1 3 4 1 3 4
5 DataLink Layer 5-21
Channel Partitioning MAC protocols FDMAChannel Partitioning MAC protocols FDMA
FDMA frequency division multiple accessFDMA frequency division multiple accesschannel spectrum divided into frequency bandseach station assigned fixed frequency bandeach station assigned fixed frequency bandunused transmission time in frequency bands go idle example 6-station LAN 1 3 4 have pkt frequency example 6-station LAN 134 have pkt frequency bands 256 idle
cy b
ands
freq
uenc
FDM cable
5 DataLink Layer 5-22
f
Random Access ProtocolsRandom Access Protocols
Wh d h k dWhen node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodesno a priori coordination among nodes
two or more transmitting nodes づ ldquocollisionrdquorandom access MAC protocol specifies random access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed how to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
5 DataLink Layer 5-23
CSMA CSMACD CSMACA
Slotted ALOHASlotted ALOHA
A ti O tiAssumptionsall frames same sizetime divided into equal
Operationwhen node obtains fresh frame transmits in next time divided into equal
size slots (time to transmit 1 frame)
frame transmits in next slot
if no collision node can nodes start to transmit only slot beginning
d h i d
send new frame in next slotif collision node nodes are synchronized
if 2 or more nodes transmit in slot all
if collision node retransmits frame in each subsequent slot transmit in slot all
nodes detect collisionq
with prob p until success
5 DataLink Layer 5-24
Slotted ALOHA
P s ConsProssingle active node can continuously transmit
Conscollisions wasting slotsidle slotscontinuously transmit
at full rate of channelhighly decentralized
idle slotsnodes may be able to detect collision in less highly decentralized
only slots in nodes need to be in sync
than time to transmit packetclock synchronization
5 DataLink Layer 5-25
ysimple
clock synchronization
Slotted Aloha efficiencyymax efficiency find p that maximizes
Efficiency long-run fraction of successful slots p that maximizes
Np(1-p)N-1
for many nodes take
fraction of successful slots (many nodes all with many frames to send)
suppose N nodes with
for many nodes take limit of Np(1-p)N-1
as N goes to infinity
frames to send)
many frames to send each transmits in slot with probability p
g ygives
Max efficiency = 1e = 37with probability pprob that given node has success in a slot =
At best channelused for useful has success in a slot =
p(1-p)N-1
prob that any node has
used for useful transmissions 37of time
5 DataLink Layer 5-26
p ya success = Np(1-p)N-1
Pure (unslotted) ALOHAPure (unslotted) ALOHAunslotted Aloha simpler no synchronizationunslotted Aloha simpler no synchronizationwhen frame first arrives
transmit immediately transmit immediately collision probability increases
frame sent at t0 collides with other frames sent in [t0-1t0+1]0 [ 0 0 ]
5 DataLink Layer 5-27
Pure Aloha efficiencyPure Aloha efficiencyP(success by given node) = P(node transmits) P(success by g ven node) P(node transm ts)
P(no other node transmits in [p0-1p0] P(no other node transmits in [p0-1 p0] P(no other node transmits in [p0 1p0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)= p (1 p)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18
even worse than slotted Aloha
5 DataLink Layer 5-28
CSMA (Carrier Sense Multiple Access)CSMA (Carrier Sense Multiple Access)
CSMA listen before transmitIf channel sensed idle transmit entire framef chann s ns transm t nt r fram
If channel sensed busy defer transmission
human analogy donrsquot interrupt others
5 DataLink Layer 5-29
CSMA collisionsCSMA collisionsc llisi ns c n still ccu
spatial layout of nodes
collisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmission
collisionentire packet transmission time wasted
tnoterole of distance amp propagation delay in determining collision y gprobability
5 DataLink Layer 5-30
CSMACD (Collision Detection)CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMACSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel colliding transmissions aborted reducing channel wastage
collision detectioncollision detectioneasy in wired LANs measure signal strengths compare transmitted received signalscompare transmitted received signalsdifficult in wireless LANs received signal strength overwhelmed by local transmission strength overwhelmed by local transmission strength
human analogy the polite conversationalist
5 DataLink Layer 5-31
CSMACD collision detectionCSMACD collision detection
5 DataLink Layer 5-32
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocols
h l i i i M C lchannel partitioning MAC protocolsshare channel efficiently and fairly at high loadinefficient at low load delay in channel access 1N bandwidth allocated even if only 1 active node node
Random access MAC protocolsefficient at low load single node can fully efficient at low load single node can fully utilize channelhigh load collision overheadhigh load collision overhead
ldquotaking turnsrdquo protocolslook for best of both worlds
5 DataLink Layer 5-33
look for best of both worlds
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsPollingPolling
master node ldquoinvitesrdquo slave nodes d tinvites slave nodes to transmit in turntypically used with master
polldata
typically used with ldquodumbrdquo slave devicesconcerns
data
polling overhead latency slavessingle point of failure (master)
5 DataLink Layer 5-34
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsToken passingoken pass ng
control token passed from one node to next
T
sequentiallytoken message (nothing
concernstoken overhead
to send)T
latencysingle point of failure (token)(token)
5 DataLink Layer 5-35
data
Summary of MAC protocolsSummary of MAC protocols
h l i i i b i f dchannel partitioning by time frequency or codeTime Division Frequency Divisiond ss (d i ) random access (dynamic) ALOHA S-ALOHA CSMA CSMACDcarrier sensing easy in some technologies (wire) hard in carrier sensing easy in some technologies (wire) hard in others (wireless)CSMACD used in EthernetCSMACA used in 80211
taking turnslli f l i k ipolling from central site token passing
Bluetooth FDDI IBM Token Ring
5 DataLink Layer 5-36
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-37
MAC Addresses and ARPMAC Addresses and ARP
32-bit IP address network-layer addressyused to get datagram to destination IP subnet
MAC (or LAN or physical or Ethernet) MAC (or LAN or physical or Ethernet) address
f n ti n t f m f m n int f t n th function get frame from one interface to another physically-connected interface (same network)48 bit MAC address (for most LANs)48 bit MAC address (for most LANs)
bull burned in NIC ROM also sometimes software settable
5 DataLink Layer 5-38
LAN Addresses and ARPLAN Addresses and ARPEach adapter on LAN has unique LAN address
Broadcast address =FF-FF-FF-FF-FF-FF
1A-2F-BB-76-09-AD
= adapterLAN
(wired ori l )
58-23-D7-FA-20-B071-65-F7-2B-08-53
wireless)
0C-C4-11-6F-E3-98
5 DataLink Layer 5-39
LAN Address (more)LAN Address (more)
M C dd ll i d i i d b IEEEMAC address allocation administered by IEEEmanufacturer buys portion of MAC address space (t ss i ss)(to assure uniqueness)analogy
( ) MAC dd lik S i l S it N b(a) MAC address like Social Security Number(b) IP address like postal address
MAC fl dd づ bili MAC flat address づ portability can move LAN card from one LAN to another
IP hi chic l dd ss NOT p t blIP hierarchical address NOT portableaddress depends on IP subnet to which node is attached
5 DataLink Layer 5-40
ARP Address Resolution ProtocolAR Address Resolut on rotocol
Each IP node (host Question how to determine Each IP node (host router) on LAN has ARP table
Question how to determineMAC address of Bknowing Brsquos IP address
ARP table IPMAC address mappings for
knowing B s IP address
137196778 pp gsome LAN nodes
lt IP address MAC address TTLgtTTL (Tim T Li ) tim
1A-2F-BB-76-09-AD
137196723 137196714
TTL (Time To Live) time after which address mapping will be forgotten ( ll 20 )58-23-D7-FA-20-B071-65-F7-2B-08-53
LAN
(typically 20 min)58 23 D7 FA 20 B0
0C-C4-11-6F-E3-98137 196 7 88
5 DataLink Layer 5-41
137196788
ARP protocol Same LAN (network)
A wants to send datagram t B d Brsquo MAC dd A h ( ) IP tto B and Brsquos MAC address not in Arsquos ARP tableA broadcasts ARP query
A caches (saves) IP-to-MAC address pair in its ARP table until information q y
packet containing Bs IP address
dest MAC address = FF
becomes old (times out) soft state information that times out (goes dest MAC address = FF-
FF-FF-FF-FF-FFall machines on LAN
that times out (goes away) unless refreshed
ARP is ldquoplug-and-playrdquoreceive ARP query
B receives ARP packet replies to A with its (Bs)
p g p ynodes create their ARP tables without intervention from net replies to A with its (B s)
MAC addressframe sent to Arsquos MAC address (unicast)
intervention from net administrator
5 DataLink Layer 5-42
address (unicast)
Addressing routing to another LANwalkthrough send datagram from A to B via R
ssume A kn s Brsquos IP ddress
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
assume A knows B s IP address
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112B
222222222222
CC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
t ARP t bl s i t R f h IP two ARP tables in router R one for each IP network (LAN)
5 DataLink Layer 5-43
A creates IP datagram with source A destination B A uses ARP to get Rrsquos MAC address for 111 111 111 110A uses ARP to get R s MAC address for 111111111110A creates link-layer frame with Rs MAC address as dest frame contains A-to-B IP datagram This is a really importantArsquos NIC sends frame Rrsquos NIC receives frame R r m v s IP d t r m fr m Eth rn t fr m s s its
This is a really importantexample ndash make sure youunderstand
R removes IP datagram from Ethernet frame sees its destined to BR uses ARP to get Brsquos MAC address gR creates frame containing A-to-B IP datagram sends to B
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112
B222222222222
5 DataLink Layer 5-44
RCC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-45
Ethernetldquodominantrdquo wired LAN technology
cheap $20 for NICfirst widely used LAN technologyy gysimpler cheaper than token LANs and ATMkept up with speed race 10 Mbps ndash 10 Gbps p p p p p
Metcalfersquos Ethernetsketch
5 DataLink Layer 5-46
Star topologyp gybus topology popular through mid 90s
all nodes in same collision domain (can collide with each all nodes in same collision domain (can collide with each other)
today star topology prevails h active switch in center
each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with each other)
switch
b l bl
5 DataLink Layer 5-47
bus coaxial cable star
Ethernet Frame StructuremSending adapter encapsulates IP datagram (or other g p p g (
network layer protocol packet) in Ethernet frame
Preamble7 bytes with pattern 10101010 followed by one y p ybyte with pattern 10101011used to synchronize receiver sender clock rates
5 DataLink Layer 5-48
Ethernet Frame Structure (more)Ethernet Frame Structure (more)Addresses 6 bytesy
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocolpasses data in frame to network layer protocolotherwise adapter discards frame
Type indicates higher layer protocol (mostly IP Type indicates higher layer protocol (mostly IP but others possible eg Novell IPX AppleTalk)CRC checked at receiver if error is detected frame is dropped
5 DataLink Layer 5-49
Ethernet Unreliable connectionlessEthernet Unreliable connectionless
i l N h d h ki b di d connectionless No handshaking between sending and receiving NICs
li bl i i NIC d s rsquot s d ks ks unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC
stream of datagrams passed to network layer can have gaps stream of datagrams passed to network layer can have gaps (missing datagrams)gaps will be filled if app is using TCPotherwise app will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
5 DataLink Layer 5-50
Ethernet CSMACD algorithmg1 NIC receives datagram 4 If NIC detects another
from network layer creates frame
2 f N C h l dl
transmission while transmitting aborts and sends jam signal2 If NIC senses channel idle
starts frame transmission If NIC senses channel
sends jam signal5 After aborting NIC
enters exponential If NIC senses channel busy waits until channel idle then transmits
enters exponential backoff after mth collision NIC chooses K at
3 If NIC transmits entire frame without detecting
random from 012hellip2m-1 NIC waits K 512 bi i
ganother transmission NIC is done with frame
K512 bit times returns to Step 2
5 DataLink Layer 5-51
Ethernetrsquos CSMACD (more)Ethernet s CSMACD (more)Jam Signal make sure all Exponential Backoffg
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10
pGoal adapt retransmission attempts to estimated current loadBit time 1 microsec for 10
Mbps Ethernet for K=1023 wait time is about 50 msec
current loadheavy load random wait will be longer
about 50 msec first collision choose K from 01 delay is K 512 bit transmission timestransm ss on t m safter second collision choose K from 0123hellipft t lli i h K
Seeinteract with Javaapplet on AWL Web site
after ten collisions choose K from 01234hellip1023
pphighly recommended
5 DataLink Layer 5-52
CSMACD efficiencyCSMACD efficiency
T d l b 2 d i L NTprop = max prop delay between 2 nodes in LANttrans = time to transmit max-size frame
efficiency 1
=
efficiency goes to 1
transprop ttff y
51+
efficiency goes to 1 as tprop goes to 0as ttrans goes to infinitytrans g y
better performance than ALOHA and simple cheap decentralized
5 DataLink Layer 5-53
p
8023 Ethernet Standards Link amp Physical Layersy y
many different Ethernet standardsycommon MAC protocol and frame formatdifferent speeds 2 Mbps 10 Mbps 100 Mbps 1Gb 10G b1Gbps 10G bpsdifferent physical layer media fiber cable
MAC protocolapplicationtransportnetwork
li k
MAC protocoland frame format
100BASE-TX 100BASE-FX100BASE-T2link
physical100BASE-T4 100BASE-SX 100BASE-BX
5 DataLink Layer 5-54
fiber physical layercopper (twisterpair) physical layer
Manchester encodingManchester encoding
used in 10BaseTeach bit has a transitionallows clocks in sending and receiving nodes to g gsynchronize to each other
no need for a centralized global clock among nodes
5 DataLink Layer 5-55
Hey this is physical-layer stuff
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3 Multiple access
58 Link Virtualization ATM MPLS
53 Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-56
Hubshellip physical-layer (ldquodumbrdquo) repeaters
bits coming in one link go out all other links at bits coming in one link go out all other links at same rateall nodes connected to hub can collide with one anotherno frame bufferinggno CSMACD at hub host NICs detect collisions
twisted pair
hub
5 DataLink Layer 5-57
Switchlink-layer device smarter than hubs take yactive role
store forward Ethernet framesexamine incoming framersquos MAC address selectively forward frame to one-or-more
l k h f f d d outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
transparenthosts are unaware of presence of switches
plug-and-play self-learningswitches do not need to be configured
5 DataLink Layer 5-58
g
Switch allows multiple simultaneous ptransmissions
A
hosts have dedicated direct connection to switch
BCrsquo
switches buffer packetsEthernet protocol used on each incoming link but no
1 2 345
6
each incoming link but no collisions full duplex
each link is its own collision C
45
domainswitching A-to-Arsquo and B-to-Brsquo simultaneously
ArsquoBrsquo
to-B simultaneously without collisions
not possible with dumb hub
switch with six interfaces(123456)
5 DataLink Layer 5-59
Switch TableSwitch Table
Q h d s s it h k th t A
Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5
BCrsquo
B reachable via interface 5A each switch has a switch table each entry
1 2 345
6ta ach ntry
(MAC address of host interface to reach host time stamp) C
45
looks like a routing tableQ how are entries created
i t i d i it h t bl
ArsquoBrsquo
maintained in switch table something like a routing protocol
switch with six interfaces(123456)
5 DataLink Layer 5-60
protocol
Switch self-learning Source ASwitch self-learning
s it h l s hi h h sts A A Arsquo
Dest Arsquo
switch learns which hosts can be reached through which interfaces
BCrsquo
which interfaceswhen frame received switch ldquolearnsrdquo location of
d i i LAN
1 2 345
6
sender incoming LAN segmentrecords senderlocation
C
45
pair in switch tableArsquoBrsquo
MAC addr interface TTLMAC addr interface TTLSwitch table
(initially empty)A 1 60
5 DataLink Layer 5-61
Switch frame filteringforwardingWhen frame received
1 record link associated with sending host2 ind x s itch t bl usin MAC d st dd ss2 index switch table using MAC dest address3 if entry found for destination
then then if dest on segment from which frame arrived
then drop the framethen drop the frameelse forward the frame on interface indicated
else flood forward on all but the interface
on which the frame arrived5 DataLink Layer 5-62
on which the frame arrived
Self-learning Source ASelf learning forwarding
lA A Arsquo
Dest Arsquo
exampleBCrsquo
frame destinati n 1 2 345
6A ArsquoA ArsquoA ArsquoA ArsquoA Arsquoframe destination unknown floodd ti ti A
C
45
Arsquo A
destination A location knownselective send
ArsquoBrsquo
MAC addr interface TTL
selective send
MAC addr interface TTLSwitch table
(initially empty)A 1 60Arsquo 4 60
5 DataLink Layer 5-63
Interconnecting switchesg
switches can be connected togetherg
S
S4
A
B
S1
C DF
S2S3
IB C D
E HI
G
Q sending from A to G - how does S1 know to forward frame destined to F via S and S forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)
5 DataLink Layer 5-64
single switch case)
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
Adaptors CommunicatingAdaptors Communicating
controller controller
datagram datagram
controller
sending host receiving hostdatagram
frame
sending sideencapsulates datagram in f
receiving sidelooks for errors rdt flow
t l tframeadds error checking bits rdt flow control etc
control etcextracts datagram passes to upper layer at receiving
5 DataLink Layer 5-9
pp y gside
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-10
Error DetectionError DetectionEDC= Error Detection and Correction bits (redundancy)D D d b h k l d h d f ld D = Data protected by error checking may include header fields
bull Error detection not 100 reliablebull protocol may miss some errors but rarelybull larger EDC field yields better detection and correction
otherwise
5 DataLink Layer 5-11
Parity CheckingParity CheckingSingle Bit Parity Two Dimensional Bit ParitySingle Bit ParityDetect single bit errors
Two Dimensional Bit ParityDetect and correct single bit errors
0 0
5 DataLink Layer 5-12
Internet checksum (review)Internet checksum (review)
Goal detect ldquoerrorsrdquo (e g flipped bits) in transmitted Goal detect errors (eg flipped bits) in transmitted packet (note used at transport layer only)
Sendertreat segment contents
Receivercompute checksum of received segmentas sequence of 16-bit
integerschecksum addition (1rsquos
received segmentcheck if computed checksum equals checksum field valuechecksum addition (1 s
complement sum) of segment contentss d ts h ks
NO - error detectedYES - no error detected But maybe errors sender puts checksum
value into UDP checksum field
But maybe errors nonetheless
5 DataLink Layer 5-13
Checksumming Cyclic Redundancy CheckChecksumming Cyclic Redundancy Checkview data bits D as a binary numberychoose r+1 bit pattern (generator) Ggoal choose r CRC bits R such that
D R tl di i ibl b G ( d l 2) ltDRgt exactly divisible by G (modulo 2) receiver knows G divides ltDRgt by G If non-zero remainder error detectedcan detect all burst errors less than r+1 bits
widely used in practice (Ethernet 80211 WiFi ATM)
5 DataLink Layer 5-14
CRC ExampleCRC ExampleWant
D2r XOR R = nGequivalentlyq y
D2r = nG XOR R equivalentlyq y
if we divide D2r by G want remainder R
R = remainder[ ]D2r
G
5 DataLink Layer 5-15
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-16
Multiple Access Links and ProtocolspTwo types of ldquolinksrdquo
i t t i tpoint-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and hostpoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)old-fashioned Ethernetold fashioned Ethernetupstream HFC80211 wireless LAN
sh d i ( h d RFhumans at a
kt il p t
5 DataLink Layer 5-17
shared wire (eg cabled Ethernet)
shared RF(eg 80211 WiFi)
shared RF(satellite)
cocktail party (shared air acoustical)
Multiple Access protocolsMultiple Access protocolssingle shared broadcast channel single shared broadcast channel two or more simultaneous transmissions by nodes interference
collision if node receives two or more signals at the same timemultiple access protocol
distributed algorithm that determines how nodes share channel ie determine when node can transmitcommunication about channel sharing must use channel itself
f b d h l f di ino out-of-band channel for coordination
5 DataLink Layer 5-18
Ideal Multiple Access ProtocolIdeal Multiple Access Protocol
B d h l f R bBroadcast channel of rate R bps1 when one node wants to transmit it can send at
t Rrate R2 when M nodes want to transmit each can send at
average rate RMaverage rate RM3 fully decentralized
no special node to coordinate transmissionsno special node to coordinate transmissionsno synchronization of clocks slots
4 simple4 simple
5 DataLink Layer 5-19
MAC Protocols a taxonomyMAC Protocols a taxonomyThree broad classes
Channel Partitioningdivide channel into smaller ldquopiecesrdquo (time slots f d )frequency code)allocate piece to node for exclusive use
Random AccessRandom Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquonodes take turns but nodes with more to send can take longer turns
5 DataLink Layer 5-20
Channel Partitioning MAC protocols TDMAChannel Partitioning MAC protocols TDMA
TDMA time division multiple accessTDMA time division multiple accessaccess to channel in rounds each station gets fixed length slot (length = pkt each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle unused slots go idle example 6-station LAN 134 have pkt slots 256 idle idle
6-slotframe
1 3 4 1 3 4
5 DataLink Layer 5-21
Channel Partitioning MAC protocols FDMAChannel Partitioning MAC protocols FDMA
FDMA frequency division multiple accessFDMA frequency division multiple accesschannel spectrum divided into frequency bandseach station assigned fixed frequency bandeach station assigned fixed frequency bandunused transmission time in frequency bands go idle example 6-station LAN 1 3 4 have pkt frequency example 6-station LAN 134 have pkt frequency bands 256 idle
cy b
ands
freq
uenc
FDM cable
5 DataLink Layer 5-22
f
Random Access ProtocolsRandom Access Protocols
Wh d h k dWhen node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodesno a priori coordination among nodes
two or more transmitting nodes づ ldquocollisionrdquorandom access MAC protocol specifies random access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed how to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
5 DataLink Layer 5-23
CSMA CSMACD CSMACA
Slotted ALOHASlotted ALOHA
A ti O tiAssumptionsall frames same sizetime divided into equal
Operationwhen node obtains fresh frame transmits in next time divided into equal
size slots (time to transmit 1 frame)
frame transmits in next slot
if no collision node can nodes start to transmit only slot beginning
d h i d
send new frame in next slotif collision node nodes are synchronized
if 2 or more nodes transmit in slot all
if collision node retransmits frame in each subsequent slot transmit in slot all
nodes detect collisionq
with prob p until success
5 DataLink Layer 5-24
Slotted ALOHA
P s ConsProssingle active node can continuously transmit
Conscollisions wasting slotsidle slotscontinuously transmit
at full rate of channelhighly decentralized
idle slotsnodes may be able to detect collision in less highly decentralized
only slots in nodes need to be in sync
than time to transmit packetclock synchronization
5 DataLink Layer 5-25
ysimple
clock synchronization
Slotted Aloha efficiencyymax efficiency find p that maximizes
Efficiency long-run fraction of successful slots p that maximizes
Np(1-p)N-1
for many nodes take
fraction of successful slots (many nodes all with many frames to send)
suppose N nodes with
for many nodes take limit of Np(1-p)N-1
as N goes to infinity
frames to send)
many frames to send each transmits in slot with probability p
g ygives
Max efficiency = 1e = 37with probability pprob that given node has success in a slot =
At best channelused for useful has success in a slot =
p(1-p)N-1
prob that any node has
used for useful transmissions 37of time
5 DataLink Layer 5-26
p ya success = Np(1-p)N-1
Pure (unslotted) ALOHAPure (unslotted) ALOHAunslotted Aloha simpler no synchronizationunslotted Aloha simpler no synchronizationwhen frame first arrives
transmit immediately transmit immediately collision probability increases
frame sent at t0 collides with other frames sent in [t0-1t0+1]0 [ 0 0 ]
5 DataLink Layer 5-27
Pure Aloha efficiencyPure Aloha efficiencyP(success by given node) = P(node transmits) P(success by g ven node) P(node transm ts)
P(no other node transmits in [p0-1p0] P(no other node transmits in [p0-1 p0] P(no other node transmits in [p0 1p0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)= p (1 p)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18
even worse than slotted Aloha
5 DataLink Layer 5-28
CSMA (Carrier Sense Multiple Access)CSMA (Carrier Sense Multiple Access)
CSMA listen before transmitIf channel sensed idle transmit entire framef chann s ns transm t nt r fram
If channel sensed busy defer transmission
human analogy donrsquot interrupt others
5 DataLink Layer 5-29
CSMA collisionsCSMA collisionsc llisi ns c n still ccu
spatial layout of nodes
collisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmission
collisionentire packet transmission time wasted
tnoterole of distance amp propagation delay in determining collision y gprobability
5 DataLink Layer 5-30
CSMACD (Collision Detection)CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMACSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel colliding transmissions aborted reducing channel wastage
collision detectioncollision detectioneasy in wired LANs measure signal strengths compare transmitted received signalscompare transmitted received signalsdifficult in wireless LANs received signal strength overwhelmed by local transmission strength overwhelmed by local transmission strength
human analogy the polite conversationalist
5 DataLink Layer 5-31
CSMACD collision detectionCSMACD collision detection
5 DataLink Layer 5-32
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocols
h l i i i M C lchannel partitioning MAC protocolsshare channel efficiently and fairly at high loadinefficient at low load delay in channel access 1N bandwidth allocated even if only 1 active node node
Random access MAC protocolsefficient at low load single node can fully efficient at low load single node can fully utilize channelhigh load collision overheadhigh load collision overhead
ldquotaking turnsrdquo protocolslook for best of both worlds
5 DataLink Layer 5-33
look for best of both worlds
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsPollingPolling
master node ldquoinvitesrdquo slave nodes d tinvites slave nodes to transmit in turntypically used with master
polldata
typically used with ldquodumbrdquo slave devicesconcerns
data
polling overhead latency slavessingle point of failure (master)
5 DataLink Layer 5-34
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsToken passingoken pass ng
control token passed from one node to next
T
sequentiallytoken message (nothing
concernstoken overhead
to send)T
latencysingle point of failure (token)(token)
5 DataLink Layer 5-35
data
Summary of MAC protocolsSummary of MAC protocols
h l i i i b i f dchannel partitioning by time frequency or codeTime Division Frequency Divisiond ss (d i ) random access (dynamic) ALOHA S-ALOHA CSMA CSMACDcarrier sensing easy in some technologies (wire) hard in carrier sensing easy in some technologies (wire) hard in others (wireless)CSMACD used in EthernetCSMACA used in 80211
taking turnslli f l i k ipolling from central site token passing
Bluetooth FDDI IBM Token Ring
5 DataLink Layer 5-36
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-37
MAC Addresses and ARPMAC Addresses and ARP
32-bit IP address network-layer addressyused to get datagram to destination IP subnet
MAC (or LAN or physical or Ethernet) MAC (or LAN or physical or Ethernet) address
f n ti n t f m f m n int f t n th function get frame from one interface to another physically-connected interface (same network)48 bit MAC address (for most LANs)48 bit MAC address (for most LANs)
bull burned in NIC ROM also sometimes software settable
5 DataLink Layer 5-38
LAN Addresses and ARPLAN Addresses and ARPEach adapter on LAN has unique LAN address
Broadcast address =FF-FF-FF-FF-FF-FF
1A-2F-BB-76-09-AD
= adapterLAN
(wired ori l )
58-23-D7-FA-20-B071-65-F7-2B-08-53
wireless)
0C-C4-11-6F-E3-98
5 DataLink Layer 5-39
LAN Address (more)LAN Address (more)
M C dd ll i d i i d b IEEEMAC address allocation administered by IEEEmanufacturer buys portion of MAC address space (t ss i ss)(to assure uniqueness)analogy
( ) MAC dd lik S i l S it N b(a) MAC address like Social Security Number(b) IP address like postal address
MAC fl dd づ bili MAC flat address づ portability can move LAN card from one LAN to another
IP hi chic l dd ss NOT p t blIP hierarchical address NOT portableaddress depends on IP subnet to which node is attached
5 DataLink Layer 5-40
ARP Address Resolution ProtocolAR Address Resolut on rotocol
Each IP node (host Question how to determine Each IP node (host router) on LAN has ARP table
Question how to determineMAC address of Bknowing Brsquos IP address
ARP table IPMAC address mappings for
knowing B s IP address
137196778 pp gsome LAN nodes
lt IP address MAC address TTLgtTTL (Tim T Li ) tim
1A-2F-BB-76-09-AD
137196723 137196714
TTL (Time To Live) time after which address mapping will be forgotten ( ll 20 )58-23-D7-FA-20-B071-65-F7-2B-08-53
LAN
(typically 20 min)58 23 D7 FA 20 B0
0C-C4-11-6F-E3-98137 196 7 88
5 DataLink Layer 5-41
137196788
ARP protocol Same LAN (network)
A wants to send datagram t B d Brsquo MAC dd A h ( ) IP tto B and Brsquos MAC address not in Arsquos ARP tableA broadcasts ARP query
A caches (saves) IP-to-MAC address pair in its ARP table until information q y
packet containing Bs IP address
dest MAC address = FF
becomes old (times out) soft state information that times out (goes dest MAC address = FF-
FF-FF-FF-FF-FFall machines on LAN
that times out (goes away) unless refreshed
ARP is ldquoplug-and-playrdquoreceive ARP query
B receives ARP packet replies to A with its (Bs)
p g p ynodes create their ARP tables without intervention from net replies to A with its (B s)
MAC addressframe sent to Arsquos MAC address (unicast)
intervention from net administrator
5 DataLink Layer 5-42
address (unicast)
Addressing routing to another LANwalkthrough send datagram from A to B via R
ssume A kn s Brsquos IP ddress
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
assume A knows B s IP address
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112B
222222222222
CC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
t ARP t bl s i t R f h IP two ARP tables in router R one for each IP network (LAN)
5 DataLink Layer 5-43
A creates IP datagram with source A destination B A uses ARP to get Rrsquos MAC address for 111 111 111 110A uses ARP to get R s MAC address for 111111111110A creates link-layer frame with Rs MAC address as dest frame contains A-to-B IP datagram This is a really importantArsquos NIC sends frame Rrsquos NIC receives frame R r m v s IP d t r m fr m Eth rn t fr m s s its
This is a really importantexample ndash make sure youunderstand
R removes IP datagram from Ethernet frame sees its destined to BR uses ARP to get Brsquos MAC address gR creates frame containing A-to-B IP datagram sends to B
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112
B222222222222
5 DataLink Layer 5-44
RCC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-45
Ethernetldquodominantrdquo wired LAN technology
cheap $20 for NICfirst widely used LAN technologyy gysimpler cheaper than token LANs and ATMkept up with speed race 10 Mbps ndash 10 Gbps p p p p p
Metcalfersquos Ethernetsketch
5 DataLink Layer 5-46
Star topologyp gybus topology popular through mid 90s
all nodes in same collision domain (can collide with each all nodes in same collision domain (can collide with each other)
today star topology prevails h active switch in center
each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with each other)
switch
b l bl
5 DataLink Layer 5-47
bus coaxial cable star
Ethernet Frame StructuremSending adapter encapsulates IP datagram (or other g p p g (
network layer protocol packet) in Ethernet frame
Preamble7 bytes with pattern 10101010 followed by one y p ybyte with pattern 10101011used to synchronize receiver sender clock rates
5 DataLink Layer 5-48
Ethernet Frame Structure (more)Ethernet Frame Structure (more)Addresses 6 bytesy
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocolpasses data in frame to network layer protocolotherwise adapter discards frame
Type indicates higher layer protocol (mostly IP Type indicates higher layer protocol (mostly IP but others possible eg Novell IPX AppleTalk)CRC checked at receiver if error is detected frame is dropped
5 DataLink Layer 5-49
Ethernet Unreliable connectionlessEthernet Unreliable connectionless
i l N h d h ki b di d connectionless No handshaking between sending and receiving NICs
li bl i i NIC d s rsquot s d ks ks unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC
stream of datagrams passed to network layer can have gaps stream of datagrams passed to network layer can have gaps (missing datagrams)gaps will be filled if app is using TCPotherwise app will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
5 DataLink Layer 5-50
Ethernet CSMACD algorithmg1 NIC receives datagram 4 If NIC detects another
from network layer creates frame
2 f N C h l dl
transmission while transmitting aborts and sends jam signal2 If NIC senses channel idle
starts frame transmission If NIC senses channel
sends jam signal5 After aborting NIC
enters exponential If NIC senses channel busy waits until channel idle then transmits
enters exponential backoff after mth collision NIC chooses K at
3 If NIC transmits entire frame without detecting
random from 012hellip2m-1 NIC waits K 512 bi i
ganother transmission NIC is done with frame
K512 bit times returns to Step 2
5 DataLink Layer 5-51
Ethernetrsquos CSMACD (more)Ethernet s CSMACD (more)Jam Signal make sure all Exponential Backoffg
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10
pGoal adapt retransmission attempts to estimated current loadBit time 1 microsec for 10
Mbps Ethernet for K=1023 wait time is about 50 msec
current loadheavy load random wait will be longer
about 50 msec first collision choose K from 01 delay is K 512 bit transmission timestransm ss on t m safter second collision choose K from 0123hellipft t lli i h K
Seeinteract with Javaapplet on AWL Web site
after ten collisions choose K from 01234hellip1023
pphighly recommended
5 DataLink Layer 5-52
CSMACD efficiencyCSMACD efficiency
T d l b 2 d i L NTprop = max prop delay between 2 nodes in LANttrans = time to transmit max-size frame
efficiency 1
=
efficiency goes to 1
transprop ttff y
51+
efficiency goes to 1 as tprop goes to 0as ttrans goes to infinitytrans g y
better performance than ALOHA and simple cheap decentralized
5 DataLink Layer 5-53
p
8023 Ethernet Standards Link amp Physical Layersy y
many different Ethernet standardsycommon MAC protocol and frame formatdifferent speeds 2 Mbps 10 Mbps 100 Mbps 1Gb 10G b1Gbps 10G bpsdifferent physical layer media fiber cable
MAC protocolapplicationtransportnetwork
li k
MAC protocoland frame format
100BASE-TX 100BASE-FX100BASE-T2link
physical100BASE-T4 100BASE-SX 100BASE-BX
5 DataLink Layer 5-54
fiber physical layercopper (twisterpair) physical layer
Manchester encodingManchester encoding
used in 10BaseTeach bit has a transitionallows clocks in sending and receiving nodes to g gsynchronize to each other
no need for a centralized global clock among nodes
5 DataLink Layer 5-55
Hey this is physical-layer stuff
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3 Multiple access
58 Link Virtualization ATM MPLS
53 Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-56
Hubshellip physical-layer (ldquodumbrdquo) repeaters
bits coming in one link go out all other links at bits coming in one link go out all other links at same rateall nodes connected to hub can collide with one anotherno frame bufferinggno CSMACD at hub host NICs detect collisions
twisted pair
hub
5 DataLink Layer 5-57
Switchlink-layer device smarter than hubs take yactive role
store forward Ethernet framesexamine incoming framersquos MAC address selectively forward frame to one-or-more
l k h f f d d outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
transparenthosts are unaware of presence of switches
plug-and-play self-learningswitches do not need to be configured
5 DataLink Layer 5-58
g
Switch allows multiple simultaneous ptransmissions
A
hosts have dedicated direct connection to switch
BCrsquo
switches buffer packetsEthernet protocol used on each incoming link but no
1 2 345
6
each incoming link but no collisions full duplex
each link is its own collision C
45
domainswitching A-to-Arsquo and B-to-Brsquo simultaneously
ArsquoBrsquo
to-B simultaneously without collisions
not possible with dumb hub
switch with six interfaces(123456)
5 DataLink Layer 5-59
Switch TableSwitch Table
Q h d s s it h k th t A
Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5
BCrsquo
B reachable via interface 5A each switch has a switch table each entry
1 2 345
6ta ach ntry
(MAC address of host interface to reach host time stamp) C
45
looks like a routing tableQ how are entries created
i t i d i it h t bl
ArsquoBrsquo
maintained in switch table something like a routing protocol
switch with six interfaces(123456)
5 DataLink Layer 5-60
protocol
Switch self-learning Source ASwitch self-learning
s it h l s hi h h sts A A Arsquo
Dest Arsquo
switch learns which hosts can be reached through which interfaces
BCrsquo
which interfaceswhen frame received switch ldquolearnsrdquo location of
d i i LAN
1 2 345
6
sender incoming LAN segmentrecords senderlocation
C
45
pair in switch tableArsquoBrsquo
MAC addr interface TTLMAC addr interface TTLSwitch table
(initially empty)A 1 60
5 DataLink Layer 5-61
Switch frame filteringforwardingWhen frame received
1 record link associated with sending host2 ind x s itch t bl usin MAC d st dd ss2 index switch table using MAC dest address3 if entry found for destination
then then if dest on segment from which frame arrived
then drop the framethen drop the frameelse forward the frame on interface indicated
else flood forward on all but the interface
on which the frame arrived5 DataLink Layer 5-62
on which the frame arrived
Self-learning Source ASelf learning forwarding
lA A Arsquo
Dest Arsquo
exampleBCrsquo
frame destinati n 1 2 345
6A ArsquoA ArsquoA ArsquoA ArsquoA Arsquoframe destination unknown floodd ti ti A
C
45
Arsquo A
destination A location knownselective send
ArsquoBrsquo
MAC addr interface TTL
selective send
MAC addr interface TTLSwitch table
(initially empty)A 1 60Arsquo 4 60
5 DataLink Layer 5-63
Interconnecting switchesg
switches can be connected togetherg
S
S4
A
B
S1
C DF
S2S3
IB C D
E HI
G
Q sending from A to G - how does S1 know to forward frame destined to F via S and S forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)
5 DataLink Layer 5-64
single switch case)
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
Internet checksum (review)Internet checksum (review)
Goal detect ldquoerrorsrdquo (e g flipped bits) in transmitted Goal detect errors (eg flipped bits) in transmitted packet (note used at transport layer only)
Sendertreat segment contents
Receivercompute checksum of received segmentas sequence of 16-bit
integerschecksum addition (1rsquos
received segmentcheck if computed checksum equals checksum field valuechecksum addition (1 s
complement sum) of segment contentss d ts h ks
NO - error detectedYES - no error detected But maybe errors sender puts checksum
value into UDP checksum field
But maybe errors nonetheless
5 DataLink Layer 5-13
Checksumming Cyclic Redundancy CheckChecksumming Cyclic Redundancy Checkview data bits D as a binary numberychoose r+1 bit pattern (generator) Ggoal choose r CRC bits R such that
D R tl di i ibl b G ( d l 2) ltDRgt exactly divisible by G (modulo 2) receiver knows G divides ltDRgt by G If non-zero remainder error detectedcan detect all burst errors less than r+1 bits
widely used in practice (Ethernet 80211 WiFi ATM)
5 DataLink Layer 5-14
CRC ExampleCRC ExampleWant
D2r XOR R = nGequivalentlyq y
D2r = nG XOR R equivalentlyq y
if we divide D2r by G want remainder R
R = remainder[ ]D2r
G
5 DataLink Layer 5-15
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-16
Multiple Access Links and ProtocolspTwo types of ldquolinksrdquo
i t t i tpoint-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and hostpoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)old-fashioned Ethernetold fashioned Ethernetupstream HFC80211 wireless LAN
sh d i ( h d RFhumans at a
kt il p t
5 DataLink Layer 5-17
shared wire (eg cabled Ethernet)
shared RF(eg 80211 WiFi)
shared RF(satellite)
cocktail party (shared air acoustical)
Multiple Access protocolsMultiple Access protocolssingle shared broadcast channel single shared broadcast channel two or more simultaneous transmissions by nodes interference
collision if node receives two or more signals at the same timemultiple access protocol
distributed algorithm that determines how nodes share channel ie determine when node can transmitcommunication about channel sharing must use channel itself
f b d h l f di ino out-of-band channel for coordination
5 DataLink Layer 5-18
Ideal Multiple Access ProtocolIdeal Multiple Access Protocol
B d h l f R bBroadcast channel of rate R bps1 when one node wants to transmit it can send at
t Rrate R2 when M nodes want to transmit each can send at
average rate RMaverage rate RM3 fully decentralized
no special node to coordinate transmissionsno special node to coordinate transmissionsno synchronization of clocks slots
4 simple4 simple
5 DataLink Layer 5-19
MAC Protocols a taxonomyMAC Protocols a taxonomyThree broad classes
Channel Partitioningdivide channel into smaller ldquopiecesrdquo (time slots f d )frequency code)allocate piece to node for exclusive use
Random AccessRandom Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquonodes take turns but nodes with more to send can take longer turns
5 DataLink Layer 5-20
Channel Partitioning MAC protocols TDMAChannel Partitioning MAC protocols TDMA
TDMA time division multiple accessTDMA time division multiple accessaccess to channel in rounds each station gets fixed length slot (length = pkt each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle unused slots go idle example 6-station LAN 134 have pkt slots 256 idle idle
6-slotframe
1 3 4 1 3 4
5 DataLink Layer 5-21
Channel Partitioning MAC protocols FDMAChannel Partitioning MAC protocols FDMA
FDMA frequency division multiple accessFDMA frequency division multiple accesschannel spectrum divided into frequency bandseach station assigned fixed frequency bandeach station assigned fixed frequency bandunused transmission time in frequency bands go idle example 6-station LAN 1 3 4 have pkt frequency example 6-station LAN 134 have pkt frequency bands 256 idle
cy b
ands
freq
uenc
FDM cable
5 DataLink Layer 5-22
f
Random Access ProtocolsRandom Access Protocols
Wh d h k dWhen node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodesno a priori coordination among nodes
two or more transmitting nodes づ ldquocollisionrdquorandom access MAC protocol specifies random access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed how to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
5 DataLink Layer 5-23
CSMA CSMACD CSMACA
Slotted ALOHASlotted ALOHA
A ti O tiAssumptionsall frames same sizetime divided into equal
Operationwhen node obtains fresh frame transmits in next time divided into equal
size slots (time to transmit 1 frame)
frame transmits in next slot
if no collision node can nodes start to transmit only slot beginning
d h i d
send new frame in next slotif collision node nodes are synchronized
if 2 or more nodes transmit in slot all
if collision node retransmits frame in each subsequent slot transmit in slot all
nodes detect collisionq
with prob p until success
5 DataLink Layer 5-24
Slotted ALOHA
P s ConsProssingle active node can continuously transmit
Conscollisions wasting slotsidle slotscontinuously transmit
at full rate of channelhighly decentralized
idle slotsnodes may be able to detect collision in less highly decentralized
only slots in nodes need to be in sync
than time to transmit packetclock synchronization
5 DataLink Layer 5-25
ysimple
clock synchronization
Slotted Aloha efficiencyymax efficiency find p that maximizes
Efficiency long-run fraction of successful slots p that maximizes
Np(1-p)N-1
for many nodes take
fraction of successful slots (many nodes all with many frames to send)
suppose N nodes with
for many nodes take limit of Np(1-p)N-1
as N goes to infinity
frames to send)
many frames to send each transmits in slot with probability p
g ygives
Max efficiency = 1e = 37with probability pprob that given node has success in a slot =
At best channelused for useful has success in a slot =
p(1-p)N-1
prob that any node has
used for useful transmissions 37of time
5 DataLink Layer 5-26
p ya success = Np(1-p)N-1
Pure (unslotted) ALOHAPure (unslotted) ALOHAunslotted Aloha simpler no synchronizationunslotted Aloha simpler no synchronizationwhen frame first arrives
transmit immediately transmit immediately collision probability increases
frame sent at t0 collides with other frames sent in [t0-1t0+1]0 [ 0 0 ]
5 DataLink Layer 5-27
Pure Aloha efficiencyPure Aloha efficiencyP(success by given node) = P(node transmits) P(success by g ven node) P(node transm ts)
P(no other node transmits in [p0-1p0] P(no other node transmits in [p0-1 p0] P(no other node transmits in [p0 1p0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)= p (1 p)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18
even worse than slotted Aloha
5 DataLink Layer 5-28
CSMA (Carrier Sense Multiple Access)CSMA (Carrier Sense Multiple Access)
CSMA listen before transmitIf channel sensed idle transmit entire framef chann s ns transm t nt r fram
If channel sensed busy defer transmission
human analogy donrsquot interrupt others
5 DataLink Layer 5-29
CSMA collisionsCSMA collisionsc llisi ns c n still ccu
spatial layout of nodes
collisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmission
collisionentire packet transmission time wasted
tnoterole of distance amp propagation delay in determining collision y gprobability
5 DataLink Layer 5-30
CSMACD (Collision Detection)CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMACSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel colliding transmissions aborted reducing channel wastage
collision detectioncollision detectioneasy in wired LANs measure signal strengths compare transmitted received signalscompare transmitted received signalsdifficult in wireless LANs received signal strength overwhelmed by local transmission strength overwhelmed by local transmission strength
human analogy the polite conversationalist
5 DataLink Layer 5-31
CSMACD collision detectionCSMACD collision detection
5 DataLink Layer 5-32
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocols
h l i i i M C lchannel partitioning MAC protocolsshare channel efficiently and fairly at high loadinefficient at low load delay in channel access 1N bandwidth allocated even if only 1 active node node
Random access MAC protocolsefficient at low load single node can fully efficient at low load single node can fully utilize channelhigh load collision overheadhigh load collision overhead
ldquotaking turnsrdquo protocolslook for best of both worlds
5 DataLink Layer 5-33
look for best of both worlds
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsPollingPolling
master node ldquoinvitesrdquo slave nodes d tinvites slave nodes to transmit in turntypically used with master
polldata
typically used with ldquodumbrdquo slave devicesconcerns
data
polling overhead latency slavessingle point of failure (master)
5 DataLink Layer 5-34
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsToken passingoken pass ng
control token passed from one node to next
T
sequentiallytoken message (nothing
concernstoken overhead
to send)T
latencysingle point of failure (token)(token)
5 DataLink Layer 5-35
data
Summary of MAC protocolsSummary of MAC protocols
h l i i i b i f dchannel partitioning by time frequency or codeTime Division Frequency Divisiond ss (d i ) random access (dynamic) ALOHA S-ALOHA CSMA CSMACDcarrier sensing easy in some technologies (wire) hard in carrier sensing easy in some technologies (wire) hard in others (wireless)CSMACD used in EthernetCSMACA used in 80211
taking turnslli f l i k ipolling from central site token passing
Bluetooth FDDI IBM Token Ring
5 DataLink Layer 5-36
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-37
MAC Addresses and ARPMAC Addresses and ARP
32-bit IP address network-layer addressyused to get datagram to destination IP subnet
MAC (or LAN or physical or Ethernet) MAC (or LAN or physical or Ethernet) address
f n ti n t f m f m n int f t n th function get frame from one interface to another physically-connected interface (same network)48 bit MAC address (for most LANs)48 bit MAC address (for most LANs)
bull burned in NIC ROM also sometimes software settable
5 DataLink Layer 5-38
LAN Addresses and ARPLAN Addresses and ARPEach adapter on LAN has unique LAN address
Broadcast address =FF-FF-FF-FF-FF-FF
1A-2F-BB-76-09-AD
= adapterLAN
(wired ori l )
58-23-D7-FA-20-B071-65-F7-2B-08-53
wireless)
0C-C4-11-6F-E3-98
5 DataLink Layer 5-39
LAN Address (more)LAN Address (more)
M C dd ll i d i i d b IEEEMAC address allocation administered by IEEEmanufacturer buys portion of MAC address space (t ss i ss)(to assure uniqueness)analogy
( ) MAC dd lik S i l S it N b(a) MAC address like Social Security Number(b) IP address like postal address
MAC fl dd づ bili MAC flat address づ portability can move LAN card from one LAN to another
IP hi chic l dd ss NOT p t blIP hierarchical address NOT portableaddress depends on IP subnet to which node is attached
5 DataLink Layer 5-40
ARP Address Resolution ProtocolAR Address Resolut on rotocol
Each IP node (host Question how to determine Each IP node (host router) on LAN has ARP table
Question how to determineMAC address of Bknowing Brsquos IP address
ARP table IPMAC address mappings for
knowing B s IP address
137196778 pp gsome LAN nodes
lt IP address MAC address TTLgtTTL (Tim T Li ) tim
1A-2F-BB-76-09-AD
137196723 137196714
TTL (Time To Live) time after which address mapping will be forgotten ( ll 20 )58-23-D7-FA-20-B071-65-F7-2B-08-53
LAN
(typically 20 min)58 23 D7 FA 20 B0
0C-C4-11-6F-E3-98137 196 7 88
5 DataLink Layer 5-41
137196788
ARP protocol Same LAN (network)
A wants to send datagram t B d Brsquo MAC dd A h ( ) IP tto B and Brsquos MAC address not in Arsquos ARP tableA broadcasts ARP query
A caches (saves) IP-to-MAC address pair in its ARP table until information q y
packet containing Bs IP address
dest MAC address = FF
becomes old (times out) soft state information that times out (goes dest MAC address = FF-
FF-FF-FF-FF-FFall machines on LAN
that times out (goes away) unless refreshed
ARP is ldquoplug-and-playrdquoreceive ARP query
B receives ARP packet replies to A with its (Bs)
p g p ynodes create their ARP tables without intervention from net replies to A with its (B s)
MAC addressframe sent to Arsquos MAC address (unicast)
intervention from net administrator
5 DataLink Layer 5-42
address (unicast)
Addressing routing to another LANwalkthrough send datagram from A to B via R
ssume A kn s Brsquos IP ddress
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
assume A knows B s IP address
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112B
222222222222
CC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
t ARP t bl s i t R f h IP two ARP tables in router R one for each IP network (LAN)
5 DataLink Layer 5-43
A creates IP datagram with source A destination B A uses ARP to get Rrsquos MAC address for 111 111 111 110A uses ARP to get R s MAC address for 111111111110A creates link-layer frame with Rs MAC address as dest frame contains A-to-B IP datagram This is a really importantArsquos NIC sends frame Rrsquos NIC receives frame R r m v s IP d t r m fr m Eth rn t fr m s s its
This is a really importantexample ndash make sure youunderstand
R removes IP datagram from Ethernet frame sees its destined to BR uses ARP to get Brsquos MAC address gR creates frame containing A-to-B IP datagram sends to B
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112
B222222222222
5 DataLink Layer 5-44
RCC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-45
Ethernetldquodominantrdquo wired LAN technology
cheap $20 for NICfirst widely used LAN technologyy gysimpler cheaper than token LANs and ATMkept up with speed race 10 Mbps ndash 10 Gbps p p p p p
Metcalfersquos Ethernetsketch
5 DataLink Layer 5-46
Star topologyp gybus topology popular through mid 90s
all nodes in same collision domain (can collide with each all nodes in same collision domain (can collide with each other)
today star topology prevails h active switch in center
each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with each other)
switch
b l bl
5 DataLink Layer 5-47
bus coaxial cable star
Ethernet Frame StructuremSending adapter encapsulates IP datagram (or other g p p g (
network layer protocol packet) in Ethernet frame
Preamble7 bytes with pattern 10101010 followed by one y p ybyte with pattern 10101011used to synchronize receiver sender clock rates
5 DataLink Layer 5-48
Ethernet Frame Structure (more)Ethernet Frame Structure (more)Addresses 6 bytesy
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocolpasses data in frame to network layer protocolotherwise adapter discards frame
Type indicates higher layer protocol (mostly IP Type indicates higher layer protocol (mostly IP but others possible eg Novell IPX AppleTalk)CRC checked at receiver if error is detected frame is dropped
5 DataLink Layer 5-49
Ethernet Unreliable connectionlessEthernet Unreliable connectionless
i l N h d h ki b di d connectionless No handshaking between sending and receiving NICs
li bl i i NIC d s rsquot s d ks ks unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC
stream of datagrams passed to network layer can have gaps stream of datagrams passed to network layer can have gaps (missing datagrams)gaps will be filled if app is using TCPotherwise app will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
5 DataLink Layer 5-50
Ethernet CSMACD algorithmg1 NIC receives datagram 4 If NIC detects another
from network layer creates frame
2 f N C h l dl
transmission while transmitting aborts and sends jam signal2 If NIC senses channel idle
starts frame transmission If NIC senses channel
sends jam signal5 After aborting NIC
enters exponential If NIC senses channel busy waits until channel idle then transmits
enters exponential backoff after mth collision NIC chooses K at
3 If NIC transmits entire frame without detecting
random from 012hellip2m-1 NIC waits K 512 bi i
ganother transmission NIC is done with frame
K512 bit times returns to Step 2
5 DataLink Layer 5-51
Ethernetrsquos CSMACD (more)Ethernet s CSMACD (more)Jam Signal make sure all Exponential Backoffg
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10
pGoal adapt retransmission attempts to estimated current loadBit time 1 microsec for 10
Mbps Ethernet for K=1023 wait time is about 50 msec
current loadheavy load random wait will be longer
about 50 msec first collision choose K from 01 delay is K 512 bit transmission timestransm ss on t m safter second collision choose K from 0123hellipft t lli i h K
Seeinteract with Javaapplet on AWL Web site
after ten collisions choose K from 01234hellip1023
pphighly recommended
5 DataLink Layer 5-52
CSMACD efficiencyCSMACD efficiency
T d l b 2 d i L NTprop = max prop delay between 2 nodes in LANttrans = time to transmit max-size frame
efficiency 1
=
efficiency goes to 1
transprop ttff y
51+
efficiency goes to 1 as tprop goes to 0as ttrans goes to infinitytrans g y
better performance than ALOHA and simple cheap decentralized
5 DataLink Layer 5-53
p
8023 Ethernet Standards Link amp Physical Layersy y
many different Ethernet standardsycommon MAC protocol and frame formatdifferent speeds 2 Mbps 10 Mbps 100 Mbps 1Gb 10G b1Gbps 10G bpsdifferent physical layer media fiber cable
MAC protocolapplicationtransportnetwork
li k
MAC protocoland frame format
100BASE-TX 100BASE-FX100BASE-T2link
physical100BASE-T4 100BASE-SX 100BASE-BX
5 DataLink Layer 5-54
fiber physical layercopper (twisterpair) physical layer
Manchester encodingManchester encoding
used in 10BaseTeach bit has a transitionallows clocks in sending and receiving nodes to g gsynchronize to each other
no need for a centralized global clock among nodes
5 DataLink Layer 5-55
Hey this is physical-layer stuff
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3 Multiple access
58 Link Virtualization ATM MPLS
53 Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-56
Hubshellip physical-layer (ldquodumbrdquo) repeaters
bits coming in one link go out all other links at bits coming in one link go out all other links at same rateall nodes connected to hub can collide with one anotherno frame bufferinggno CSMACD at hub host NICs detect collisions
twisted pair
hub
5 DataLink Layer 5-57
Switchlink-layer device smarter than hubs take yactive role
store forward Ethernet framesexamine incoming framersquos MAC address selectively forward frame to one-or-more
l k h f f d d outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
transparenthosts are unaware of presence of switches
plug-and-play self-learningswitches do not need to be configured
5 DataLink Layer 5-58
g
Switch allows multiple simultaneous ptransmissions
A
hosts have dedicated direct connection to switch
BCrsquo
switches buffer packetsEthernet protocol used on each incoming link but no
1 2 345
6
each incoming link but no collisions full duplex
each link is its own collision C
45
domainswitching A-to-Arsquo and B-to-Brsquo simultaneously
ArsquoBrsquo
to-B simultaneously without collisions
not possible with dumb hub
switch with six interfaces(123456)
5 DataLink Layer 5-59
Switch TableSwitch Table
Q h d s s it h k th t A
Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5
BCrsquo
B reachable via interface 5A each switch has a switch table each entry
1 2 345
6ta ach ntry
(MAC address of host interface to reach host time stamp) C
45
looks like a routing tableQ how are entries created
i t i d i it h t bl
ArsquoBrsquo
maintained in switch table something like a routing protocol
switch with six interfaces(123456)
5 DataLink Layer 5-60
protocol
Switch self-learning Source ASwitch self-learning
s it h l s hi h h sts A A Arsquo
Dest Arsquo
switch learns which hosts can be reached through which interfaces
BCrsquo
which interfaceswhen frame received switch ldquolearnsrdquo location of
d i i LAN
1 2 345
6
sender incoming LAN segmentrecords senderlocation
C
45
pair in switch tableArsquoBrsquo
MAC addr interface TTLMAC addr interface TTLSwitch table
(initially empty)A 1 60
5 DataLink Layer 5-61
Switch frame filteringforwardingWhen frame received
1 record link associated with sending host2 ind x s itch t bl usin MAC d st dd ss2 index switch table using MAC dest address3 if entry found for destination
then then if dest on segment from which frame arrived
then drop the framethen drop the frameelse forward the frame on interface indicated
else flood forward on all but the interface
on which the frame arrived5 DataLink Layer 5-62
on which the frame arrived
Self-learning Source ASelf learning forwarding
lA A Arsquo
Dest Arsquo
exampleBCrsquo
frame destinati n 1 2 345
6A ArsquoA ArsquoA ArsquoA ArsquoA Arsquoframe destination unknown floodd ti ti A
C
45
Arsquo A
destination A location knownselective send
ArsquoBrsquo
MAC addr interface TTL
selective send
MAC addr interface TTLSwitch table
(initially empty)A 1 60Arsquo 4 60
5 DataLink Layer 5-63
Interconnecting switchesg
switches can be connected togetherg
S
S4
A
B
S1
C DF
S2S3
IB C D
E HI
G
Q sending from A to G - how does S1 know to forward frame destined to F via S and S forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)
5 DataLink Layer 5-64
single switch case)
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
Multiple Access Links and ProtocolspTwo types of ldquolinksrdquo
i t t i tpoint-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and hostpoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)old-fashioned Ethernetold fashioned Ethernetupstream HFC80211 wireless LAN
sh d i ( h d RFhumans at a
kt il p t
5 DataLink Layer 5-17
shared wire (eg cabled Ethernet)
shared RF(eg 80211 WiFi)
shared RF(satellite)
cocktail party (shared air acoustical)
Multiple Access protocolsMultiple Access protocolssingle shared broadcast channel single shared broadcast channel two or more simultaneous transmissions by nodes interference
collision if node receives two or more signals at the same timemultiple access protocol
distributed algorithm that determines how nodes share channel ie determine when node can transmitcommunication about channel sharing must use channel itself
f b d h l f di ino out-of-band channel for coordination
5 DataLink Layer 5-18
Ideal Multiple Access ProtocolIdeal Multiple Access Protocol
B d h l f R bBroadcast channel of rate R bps1 when one node wants to transmit it can send at
t Rrate R2 when M nodes want to transmit each can send at
average rate RMaverage rate RM3 fully decentralized
no special node to coordinate transmissionsno special node to coordinate transmissionsno synchronization of clocks slots
4 simple4 simple
5 DataLink Layer 5-19
MAC Protocols a taxonomyMAC Protocols a taxonomyThree broad classes
Channel Partitioningdivide channel into smaller ldquopiecesrdquo (time slots f d )frequency code)allocate piece to node for exclusive use
Random AccessRandom Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquonodes take turns but nodes with more to send can take longer turns
5 DataLink Layer 5-20
Channel Partitioning MAC protocols TDMAChannel Partitioning MAC protocols TDMA
TDMA time division multiple accessTDMA time division multiple accessaccess to channel in rounds each station gets fixed length slot (length = pkt each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle unused slots go idle example 6-station LAN 134 have pkt slots 256 idle idle
6-slotframe
1 3 4 1 3 4
5 DataLink Layer 5-21
Channel Partitioning MAC protocols FDMAChannel Partitioning MAC protocols FDMA
FDMA frequency division multiple accessFDMA frequency division multiple accesschannel spectrum divided into frequency bandseach station assigned fixed frequency bandeach station assigned fixed frequency bandunused transmission time in frequency bands go idle example 6-station LAN 1 3 4 have pkt frequency example 6-station LAN 134 have pkt frequency bands 256 idle
cy b
ands
freq
uenc
FDM cable
5 DataLink Layer 5-22
f
Random Access ProtocolsRandom Access Protocols
Wh d h k dWhen node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodesno a priori coordination among nodes
two or more transmitting nodes づ ldquocollisionrdquorandom access MAC protocol specifies random access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed how to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
5 DataLink Layer 5-23
CSMA CSMACD CSMACA
Slotted ALOHASlotted ALOHA
A ti O tiAssumptionsall frames same sizetime divided into equal
Operationwhen node obtains fresh frame transmits in next time divided into equal
size slots (time to transmit 1 frame)
frame transmits in next slot
if no collision node can nodes start to transmit only slot beginning
d h i d
send new frame in next slotif collision node nodes are synchronized
if 2 or more nodes transmit in slot all
if collision node retransmits frame in each subsequent slot transmit in slot all
nodes detect collisionq
with prob p until success
5 DataLink Layer 5-24
Slotted ALOHA
P s ConsProssingle active node can continuously transmit
Conscollisions wasting slotsidle slotscontinuously transmit
at full rate of channelhighly decentralized
idle slotsnodes may be able to detect collision in less highly decentralized
only slots in nodes need to be in sync
than time to transmit packetclock synchronization
5 DataLink Layer 5-25
ysimple
clock synchronization
Slotted Aloha efficiencyymax efficiency find p that maximizes
Efficiency long-run fraction of successful slots p that maximizes
Np(1-p)N-1
for many nodes take
fraction of successful slots (many nodes all with many frames to send)
suppose N nodes with
for many nodes take limit of Np(1-p)N-1
as N goes to infinity
frames to send)
many frames to send each transmits in slot with probability p
g ygives
Max efficiency = 1e = 37with probability pprob that given node has success in a slot =
At best channelused for useful has success in a slot =
p(1-p)N-1
prob that any node has
used for useful transmissions 37of time
5 DataLink Layer 5-26
p ya success = Np(1-p)N-1
Pure (unslotted) ALOHAPure (unslotted) ALOHAunslotted Aloha simpler no synchronizationunslotted Aloha simpler no synchronizationwhen frame first arrives
transmit immediately transmit immediately collision probability increases
frame sent at t0 collides with other frames sent in [t0-1t0+1]0 [ 0 0 ]
5 DataLink Layer 5-27
Pure Aloha efficiencyPure Aloha efficiencyP(success by given node) = P(node transmits) P(success by g ven node) P(node transm ts)
P(no other node transmits in [p0-1p0] P(no other node transmits in [p0-1 p0] P(no other node transmits in [p0 1p0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)= p (1 p)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18
even worse than slotted Aloha
5 DataLink Layer 5-28
CSMA (Carrier Sense Multiple Access)CSMA (Carrier Sense Multiple Access)
CSMA listen before transmitIf channel sensed idle transmit entire framef chann s ns transm t nt r fram
If channel sensed busy defer transmission
human analogy donrsquot interrupt others
5 DataLink Layer 5-29
CSMA collisionsCSMA collisionsc llisi ns c n still ccu
spatial layout of nodes
collisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmission
collisionentire packet transmission time wasted
tnoterole of distance amp propagation delay in determining collision y gprobability
5 DataLink Layer 5-30
CSMACD (Collision Detection)CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMACSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel colliding transmissions aborted reducing channel wastage
collision detectioncollision detectioneasy in wired LANs measure signal strengths compare transmitted received signalscompare transmitted received signalsdifficult in wireless LANs received signal strength overwhelmed by local transmission strength overwhelmed by local transmission strength
human analogy the polite conversationalist
5 DataLink Layer 5-31
CSMACD collision detectionCSMACD collision detection
5 DataLink Layer 5-32
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocols
h l i i i M C lchannel partitioning MAC protocolsshare channel efficiently and fairly at high loadinefficient at low load delay in channel access 1N bandwidth allocated even if only 1 active node node
Random access MAC protocolsefficient at low load single node can fully efficient at low load single node can fully utilize channelhigh load collision overheadhigh load collision overhead
ldquotaking turnsrdquo protocolslook for best of both worlds
5 DataLink Layer 5-33
look for best of both worlds
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsPollingPolling
master node ldquoinvitesrdquo slave nodes d tinvites slave nodes to transmit in turntypically used with master
polldata
typically used with ldquodumbrdquo slave devicesconcerns
data
polling overhead latency slavessingle point of failure (master)
5 DataLink Layer 5-34
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsToken passingoken pass ng
control token passed from one node to next
T
sequentiallytoken message (nothing
concernstoken overhead
to send)T
latencysingle point of failure (token)(token)
5 DataLink Layer 5-35
data
Summary of MAC protocolsSummary of MAC protocols
h l i i i b i f dchannel partitioning by time frequency or codeTime Division Frequency Divisiond ss (d i ) random access (dynamic) ALOHA S-ALOHA CSMA CSMACDcarrier sensing easy in some technologies (wire) hard in carrier sensing easy in some technologies (wire) hard in others (wireless)CSMACD used in EthernetCSMACA used in 80211
taking turnslli f l i k ipolling from central site token passing
Bluetooth FDDI IBM Token Ring
5 DataLink Layer 5-36
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-37
MAC Addresses and ARPMAC Addresses and ARP
32-bit IP address network-layer addressyused to get datagram to destination IP subnet
MAC (or LAN or physical or Ethernet) MAC (or LAN or physical or Ethernet) address
f n ti n t f m f m n int f t n th function get frame from one interface to another physically-connected interface (same network)48 bit MAC address (for most LANs)48 bit MAC address (for most LANs)
bull burned in NIC ROM also sometimes software settable
5 DataLink Layer 5-38
LAN Addresses and ARPLAN Addresses and ARPEach adapter on LAN has unique LAN address
Broadcast address =FF-FF-FF-FF-FF-FF
1A-2F-BB-76-09-AD
= adapterLAN
(wired ori l )
58-23-D7-FA-20-B071-65-F7-2B-08-53
wireless)
0C-C4-11-6F-E3-98
5 DataLink Layer 5-39
LAN Address (more)LAN Address (more)
M C dd ll i d i i d b IEEEMAC address allocation administered by IEEEmanufacturer buys portion of MAC address space (t ss i ss)(to assure uniqueness)analogy
( ) MAC dd lik S i l S it N b(a) MAC address like Social Security Number(b) IP address like postal address
MAC fl dd づ bili MAC flat address づ portability can move LAN card from one LAN to another
IP hi chic l dd ss NOT p t blIP hierarchical address NOT portableaddress depends on IP subnet to which node is attached
5 DataLink Layer 5-40
ARP Address Resolution ProtocolAR Address Resolut on rotocol
Each IP node (host Question how to determine Each IP node (host router) on LAN has ARP table
Question how to determineMAC address of Bknowing Brsquos IP address
ARP table IPMAC address mappings for
knowing B s IP address
137196778 pp gsome LAN nodes
lt IP address MAC address TTLgtTTL (Tim T Li ) tim
1A-2F-BB-76-09-AD
137196723 137196714
TTL (Time To Live) time after which address mapping will be forgotten ( ll 20 )58-23-D7-FA-20-B071-65-F7-2B-08-53
LAN
(typically 20 min)58 23 D7 FA 20 B0
0C-C4-11-6F-E3-98137 196 7 88
5 DataLink Layer 5-41
137196788
ARP protocol Same LAN (network)
A wants to send datagram t B d Brsquo MAC dd A h ( ) IP tto B and Brsquos MAC address not in Arsquos ARP tableA broadcasts ARP query
A caches (saves) IP-to-MAC address pair in its ARP table until information q y
packet containing Bs IP address
dest MAC address = FF
becomes old (times out) soft state information that times out (goes dest MAC address = FF-
FF-FF-FF-FF-FFall machines on LAN
that times out (goes away) unless refreshed
ARP is ldquoplug-and-playrdquoreceive ARP query
B receives ARP packet replies to A with its (Bs)
p g p ynodes create their ARP tables without intervention from net replies to A with its (B s)
MAC addressframe sent to Arsquos MAC address (unicast)
intervention from net administrator
5 DataLink Layer 5-42
address (unicast)
Addressing routing to another LANwalkthrough send datagram from A to B via R
ssume A kn s Brsquos IP ddress
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
assume A knows B s IP address
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112B
222222222222
CC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
t ARP t bl s i t R f h IP two ARP tables in router R one for each IP network (LAN)
5 DataLink Layer 5-43
A creates IP datagram with source A destination B A uses ARP to get Rrsquos MAC address for 111 111 111 110A uses ARP to get R s MAC address for 111111111110A creates link-layer frame with Rs MAC address as dest frame contains A-to-B IP datagram This is a really importantArsquos NIC sends frame Rrsquos NIC receives frame R r m v s IP d t r m fr m Eth rn t fr m s s its
This is a really importantexample ndash make sure youunderstand
R removes IP datagram from Ethernet frame sees its destined to BR uses ARP to get Brsquos MAC address gR creates frame containing A-to-B IP datagram sends to B
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112
B222222222222
5 DataLink Layer 5-44
RCC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-45
Ethernetldquodominantrdquo wired LAN technology
cheap $20 for NICfirst widely used LAN technologyy gysimpler cheaper than token LANs and ATMkept up with speed race 10 Mbps ndash 10 Gbps p p p p p
Metcalfersquos Ethernetsketch
5 DataLink Layer 5-46
Star topologyp gybus topology popular through mid 90s
all nodes in same collision domain (can collide with each all nodes in same collision domain (can collide with each other)
today star topology prevails h active switch in center
each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with each other)
switch
b l bl
5 DataLink Layer 5-47
bus coaxial cable star
Ethernet Frame StructuremSending adapter encapsulates IP datagram (or other g p p g (
network layer protocol packet) in Ethernet frame
Preamble7 bytes with pattern 10101010 followed by one y p ybyte with pattern 10101011used to synchronize receiver sender clock rates
5 DataLink Layer 5-48
Ethernet Frame Structure (more)Ethernet Frame Structure (more)Addresses 6 bytesy
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocolpasses data in frame to network layer protocolotherwise adapter discards frame
Type indicates higher layer protocol (mostly IP Type indicates higher layer protocol (mostly IP but others possible eg Novell IPX AppleTalk)CRC checked at receiver if error is detected frame is dropped
5 DataLink Layer 5-49
Ethernet Unreliable connectionlessEthernet Unreliable connectionless
i l N h d h ki b di d connectionless No handshaking between sending and receiving NICs
li bl i i NIC d s rsquot s d ks ks unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC
stream of datagrams passed to network layer can have gaps stream of datagrams passed to network layer can have gaps (missing datagrams)gaps will be filled if app is using TCPotherwise app will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
5 DataLink Layer 5-50
Ethernet CSMACD algorithmg1 NIC receives datagram 4 If NIC detects another
from network layer creates frame
2 f N C h l dl
transmission while transmitting aborts and sends jam signal2 If NIC senses channel idle
starts frame transmission If NIC senses channel
sends jam signal5 After aborting NIC
enters exponential If NIC senses channel busy waits until channel idle then transmits
enters exponential backoff after mth collision NIC chooses K at
3 If NIC transmits entire frame without detecting
random from 012hellip2m-1 NIC waits K 512 bi i
ganother transmission NIC is done with frame
K512 bit times returns to Step 2
5 DataLink Layer 5-51
Ethernetrsquos CSMACD (more)Ethernet s CSMACD (more)Jam Signal make sure all Exponential Backoffg
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10
pGoal adapt retransmission attempts to estimated current loadBit time 1 microsec for 10
Mbps Ethernet for K=1023 wait time is about 50 msec
current loadheavy load random wait will be longer
about 50 msec first collision choose K from 01 delay is K 512 bit transmission timestransm ss on t m safter second collision choose K from 0123hellipft t lli i h K
Seeinteract with Javaapplet on AWL Web site
after ten collisions choose K from 01234hellip1023
pphighly recommended
5 DataLink Layer 5-52
CSMACD efficiencyCSMACD efficiency
T d l b 2 d i L NTprop = max prop delay between 2 nodes in LANttrans = time to transmit max-size frame
efficiency 1
=
efficiency goes to 1
transprop ttff y
51+
efficiency goes to 1 as tprop goes to 0as ttrans goes to infinitytrans g y
better performance than ALOHA and simple cheap decentralized
5 DataLink Layer 5-53
p
8023 Ethernet Standards Link amp Physical Layersy y
many different Ethernet standardsycommon MAC protocol and frame formatdifferent speeds 2 Mbps 10 Mbps 100 Mbps 1Gb 10G b1Gbps 10G bpsdifferent physical layer media fiber cable
MAC protocolapplicationtransportnetwork
li k
MAC protocoland frame format
100BASE-TX 100BASE-FX100BASE-T2link
physical100BASE-T4 100BASE-SX 100BASE-BX
5 DataLink Layer 5-54
fiber physical layercopper (twisterpair) physical layer
Manchester encodingManchester encoding
used in 10BaseTeach bit has a transitionallows clocks in sending and receiving nodes to g gsynchronize to each other
no need for a centralized global clock among nodes
5 DataLink Layer 5-55
Hey this is physical-layer stuff
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3 Multiple access
58 Link Virtualization ATM MPLS
53 Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-56
Hubshellip physical-layer (ldquodumbrdquo) repeaters
bits coming in one link go out all other links at bits coming in one link go out all other links at same rateall nodes connected to hub can collide with one anotherno frame bufferinggno CSMACD at hub host NICs detect collisions
twisted pair
hub
5 DataLink Layer 5-57
Switchlink-layer device smarter than hubs take yactive role
store forward Ethernet framesexamine incoming framersquos MAC address selectively forward frame to one-or-more
l k h f f d d outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
transparenthosts are unaware of presence of switches
plug-and-play self-learningswitches do not need to be configured
5 DataLink Layer 5-58
g
Switch allows multiple simultaneous ptransmissions
A
hosts have dedicated direct connection to switch
BCrsquo
switches buffer packetsEthernet protocol used on each incoming link but no
1 2 345
6
each incoming link but no collisions full duplex
each link is its own collision C
45
domainswitching A-to-Arsquo and B-to-Brsquo simultaneously
ArsquoBrsquo
to-B simultaneously without collisions
not possible with dumb hub
switch with six interfaces(123456)
5 DataLink Layer 5-59
Switch TableSwitch Table
Q h d s s it h k th t A
Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5
BCrsquo
B reachable via interface 5A each switch has a switch table each entry
1 2 345
6ta ach ntry
(MAC address of host interface to reach host time stamp) C
45
looks like a routing tableQ how are entries created
i t i d i it h t bl
ArsquoBrsquo
maintained in switch table something like a routing protocol
switch with six interfaces(123456)
5 DataLink Layer 5-60
protocol
Switch self-learning Source ASwitch self-learning
s it h l s hi h h sts A A Arsquo
Dest Arsquo
switch learns which hosts can be reached through which interfaces
BCrsquo
which interfaceswhen frame received switch ldquolearnsrdquo location of
d i i LAN
1 2 345
6
sender incoming LAN segmentrecords senderlocation
C
45
pair in switch tableArsquoBrsquo
MAC addr interface TTLMAC addr interface TTLSwitch table
(initially empty)A 1 60
5 DataLink Layer 5-61
Switch frame filteringforwardingWhen frame received
1 record link associated with sending host2 ind x s itch t bl usin MAC d st dd ss2 index switch table using MAC dest address3 if entry found for destination
then then if dest on segment from which frame arrived
then drop the framethen drop the frameelse forward the frame on interface indicated
else flood forward on all but the interface
on which the frame arrived5 DataLink Layer 5-62
on which the frame arrived
Self-learning Source ASelf learning forwarding
lA A Arsquo
Dest Arsquo
exampleBCrsquo
frame destinati n 1 2 345
6A ArsquoA ArsquoA ArsquoA ArsquoA Arsquoframe destination unknown floodd ti ti A
C
45
Arsquo A
destination A location knownselective send
ArsquoBrsquo
MAC addr interface TTL
selective send
MAC addr interface TTLSwitch table
(initially empty)A 1 60Arsquo 4 60
5 DataLink Layer 5-63
Interconnecting switchesg
switches can be connected togetherg
S
S4
A
B
S1
C DF
S2S3
IB C D
E HI
G
Q sending from A to G - how does S1 know to forward frame destined to F via S and S forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)
5 DataLink Layer 5-64
single switch case)
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
Channel Partitioning MAC protocols TDMAChannel Partitioning MAC protocols TDMA
TDMA time division multiple accessTDMA time division multiple accessaccess to channel in rounds each station gets fixed length slot (length = pkt each station gets fixed length slot (length = pkt trans time) in each round unused slots go idle unused slots go idle example 6-station LAN 134 have pkt slots 256 idle idle
6-slotframe
1 3 4 1 3 4
5 DataLink Layer 5-21
Channel Partitioning MAC protocols FDMAChannel Partitioning MAC protocols FDMA
FDMA frequency division multiple accessFDMA frequency division multiple accesschannel spectrum divided into frequency bandseach station assigned fixed frequency bandeach station assigned fixed frequency bandunused transmission time in frequency bands go idle example 6-station LAN 1 3 4 have pkt frequency example 6-station LAN 134 have pkt frequency bands 256 idle
cy b
ands
freq
uenc
FDM cable
5 DataLink Layer 5-22
f
Random Access ProtocolsRandom Access Protocols
Wh d h k dWhen node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodesno a priori coordination among nodes
two or more transmitting nodes づ ldquocollisionrdquorandom access MAC protocol specifies random access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed how to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
5 DataLink Layer 5-23
CSMA CSMACD CSMACA
Slotted ALOHASlotted ALOHA
A ti O tiAssumptionsall frames same sizetime divided into equal
Operationwhen node obtains fresh frame transmits in next time divided into equal
size slots (time to transmit 1 frame)
frame transmits in next slot
if no collision node can nodes start to transmit only slot beginning
d h i d
send new frame in next slotif collision node nodes are synchronized
if 2 or more nodes transmit in slot all
if collision node retransmits frame in each subsequent slot transmit in slot all
nodes detect collisionq
with prob p until success
5 DataLink Layer 5-24
Slotted ALOHA
P s ConsProssingle active node can continuously transmit
Conscollisions wasting slotsidle slotscontinuously transmit
at full rate of channelhighly decentralized
idle slotsnodes may be able to detect collision in less highly decentralized
only slots in nodes need to be in sync
than time to transmit packetclock synchronization
5 DataLink Layer 5-25
ysimple
clock synchronization
Slotted Aloha efficiencyymax efficiency find p that maximizes
Efficiency long-run fraction of successful slots p that maximizes
Np(1-p)N-1
for many nodes take
fraction of successful slots (many nodes all with many frames to send)
suppose N nodes with
for many nodes take limit of Np(1-p)N-1
as N goes to infinity
frames to send)
many frames to send each transmits in slot with probability p
g ygives
Max efficiency = 1e = 37with probability pprob that given node has success in a slot =
At best channelused for useful has success in a slot =
p(1-p)N-1
prob that any node has
used for useful transmissions 37of time
5 DataLink Layer 5-26
p ya success = Np(1-p)N-1
Pure (unslotted) ALOHAPure (unslotted) ALOHAunslotted Aloha simpler no synchronizationunslotted Aloha simpler no synchronizationwhen frame first arrives
transmit immediately transmit immediately collision probability increases
frame sent at t0 collides with other frames sent in [t0-1t0+1]0 [ 0 0 ]
5 DataLink Layer 5-27
Pure Aloha efficiencyPure Aloha efficiencyP(success by given node) = P(node transmits) P(success by g ven node) P(node transm ts)
P(no other node transmits in [p0-1p0] P(no other node transmits in [p0-1 p0] P(no other node transmits in [p0 1p0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)= p (1 p)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18
even worse than slotted Aloha
5 DataLink Layer 5-28
CSMA (Carrier Sense Multiple Access)CSMA (Carrier Sense Multiple Access)
CSMA listen before transmitIf channel sensed idle transmit entire framef chann s ns transm t nt r fram
If channel sensed busy defer transmission
human analogy donrsquot interrupt others
5 DataLink Layer 5-29
CSMA collisionsCSMA collisionsc llisi ns c n still ccu
spatial layout of nodes
collisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmission
collisionentire packet transmission time wasted
tnoterole of distance amp propagation delay in determining collision y gprobability
5 DataLink Layer 5-30
CSMACD (Collision Detection)CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMACSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel colliding transmissions aborted reducing channel wastage
collision detectioncollision detectioneasy in wired LANs measure signal strengths compare transmitted received signalscompare transmitted received signalsdifficult in wireless LANs received signal strength overwhelmed by local transmission strength overwhelmed by local transmission strength
human analogy the polite conversationalist
5 DataLink Layer 5-31
CSMACD collision detectionCSMACD collision detection
5 DataLink Layer 5-32
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocols
h l i i i M C lchannel partitioning MAC protocolsshare channel efficiently and fairly at high loadinefficient at low load delay in channel access 1N bandwidth allocated even if only 1 active node node
Random access MAC protocolsefficient at low load single node can fully efficient at low load single node can fully utilize channelhigh load collision overheadhigh load collision overhead
ldquotaking turnsrdquo protocolslook for best of both worlds
5 DataLink Layer 5-33
look for best of both worlds
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsPollingPolling
master node ldquoinvitesrdquo slave nodes d tinvites slave nodes to transmit in turntypically used with master
polldata
typically used with ldquodumbrdquo slave devicesconcerns
data
polling overhead latency slavessingle point of failure (master)
5 DataLink Layer 5-34
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsToken passingoken pass ng
control token passed from one node to next
T
sequentiallytoken message (nothing
concernstoken overhead
to send)T
latencysingle point of failure (token)(token)
5 DataLink Layer 5-35
data
Summary of MAC protocolsSummary of MAC protocols
h l i i i b i f dchannel partitioning by time frequency or codeTime Division Frequency Divisiond ss (d i ) random access (dynamic) ALOHA S-ALOHA CSMA CSMACDcarrier sensing easy in some technologies (wire) hard in carrier sensing easy in some technologies (wire) hard in others (wireless)CSMACD used in EthernetCSMACA used in 80211
taking turnslli f l i k ipolling from central site token passing
Bluetooth FDDI IBM Token Ring
5 DataLink Layer 5-36
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-37
MAC Addresses and ARPMAC Addresses and ARP
32-bit IP address network-layer addressyused to get datagram to destination IP subnet
MAC (or LAN or physical or Ethernet) MAC (or LAN or physical or Ethernet) address
f n ti n t f m f m n int f t n th function get frame from one interface to another physically-connected interface (same network)48 bit MAC address (for most LANs)48 bit MAC address (for most LANs)
bull burned in NIC ROM also sometimes software settable
5 DataLink Layer 5-38
LAN Addresses and ARPLAN Addresses and ARPEach adapter on LAN has unique LAN address
Broadcast address =FF-FF-FF-FF-FF-FF
1A-2F-BB-76-09-AD
= adapterLAN
(wired ori l )
58-23-D7-FA-20-B071-65-F7-2B-08-53
wireless)
0C-C4-11-6F-E3-98
5 DataLink Layer 5-39
LAN Address (more)LAN Address (more)
M C dd ll i d i i d b IEEEMAC address allocation administered by IEEEmanufacturer buys portion of MAC address space (t ss i ss)(to assure uniqueness)analogy
( ) MAC dd lik S i l S it N b(a) MAC address like Social Security Number(b) IP address like postal address
MAC fl dd づ bili MAC flat address づ portability can move LAN card from one LAN to another
IP hi chic l dd ss NOT p t blIP hierarchical address NOT portableaddress depends on IP subnet to which node is attached
5 DataLink Layer 5-40
ARP Address Resolution ProtocolAR Address Resolut on rotocol
Each IP node (host Question how to determine Each IP node (host router) on LAN has ARP table
Question how to determineMAC address of Bknowing Brsquos IP address
ARP table IPMAC address mappings for
knowing B s IP address
137196778 pp gsome LAN nodes
lt IP address MAC address TTLgtTTL (Tim T Li ) tim
1A-2F-BB-76-09-AD
137196723 137196714
TTL (Time To Live) time after which address mapping will be forgotten ( ll 20 )58-23-D7-FA-20-B071-65-F7-2B-08-53
LAN
(typically 20 min)58 23 D7 FA 20 B0
0C-C4-11-6F-E3-98137 196 7 88
5 DataLink Layer 5-41
137196788
ARP protocol Same LAN (network)
A wants to send datagram t B d Brsquo MAC dd A h ( ) IP tto B and Brsquos MAC address not in Arsquos ARP tableA broadcasts ARP query
A caches (saves) IP-to-MAC address pair in its ARP table until information q y
packet containing Bs IP address
dest MAC address = FF
becomes old (times out) soft state information that times out (goes dest MAC address = FF-
FF-FF-FF-FF-FFall machines on LAN
that times out (goes away) unless refreshed
ARP is ldquoplug-and-playrdquoreceive ARP query
B receives ARP packet replies to A with its (Bs)
p g p ynodes create their ARP tables without intervention from net replies to A with its (B s)
MAC addressframe sent to Arsquos MAC address (unicast)
intervention from net administrator
5 DataLink Layer 5-42
address (unicast)
Addressing routing to another LANwalkthrough send datagram from A to B via R
ssume A kn s Brsquos IP ddress
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
assume A knows B s IP address
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112B
222222222222
CC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
t ARP t bl s i t R f h IP two ARP tables in router R one for each IP network (LAN)
5 DataLink Layer 5-43
A creates IP datagram with source A destination B A uses ARP to get Rrsquos MAC address for 111 111 111 110A uses ARP to get R s MAC address for 111111111110A creates link-layer frame with Rs MAC address as dest frame contains A-to-B IP datagram This is a really importantArsquos NIC sends frame Rrsquos NIC receives frame R r m v s IP d t r m fr m Eth rn t fr m s s its
This is a really importantexample ndash make sure youunderstand
R removes IP datagram from Ethernet frame sees its destined to BR uses ARP to get Brsquos MAC address gR creates frame containing A-to-B IP datagram sends to B
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112
B222222222222
5 DataLink Layer 5-44
RCC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-45
Ethernetldquodominantrdquo wired LAN technology
cheap $20 for NICfirst widely used LAN technologyy gysimpler cheaper than token LANs and ATMkept up with speed race 10 Mbps ndash 10 Gbps p p p p p
Metcalfersquos Ethernetsketch
5 DataLink Layer 5-46
Star topologyp gybus topology popular through mid 90s
all nodes in same collision domain (can collide with each all nodes in same collision domain (can collide with each other)
today star topology prevails h active switch in center
each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with each other)
switch
b l bl
5 DataLink Layer 5-47
bus coaxial cable star
Ethernet Frame StructuremSending adapter encapsulates IP datagram (or other g p p g (
network layer protocol packet) in Ethernet frame
Preamble7 bytes with pattern 10101010 followed by one y p ybyte with pattern 10101011used to synchronize receiver sender clock rates
5 DataLink Layer 5-48
Ethernet Frame Structure (more)Ethernet Frame Structure (more)Addresses 6 bytesy
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocolpasses data in frame to network layer protocolotherwise adapter discards frame
Type indicates higher layer protocol (mostly IP Type indicates higher layer protocol (mostly IP but others possible eg Novell IPX AppleTalk)CRC checked at receiver if error is detected frame is dropped
5 DataLink Layer 5-49
Ethernet Unreliable connectionlessEthernet Unreliable connectionless
i l N h d h ki b di d connectionless No handshaking between sending and receiving NICs
li bl i i NIC d s rsquot s d ks ks unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC
stream of datagrams passed to network layer can have gaps stream of datagrams passed to network layer can have gaps (missing datagrams)gaps will be filled if app is using TCPotherwise app will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
5 DataLink Layer 5-50
Ethernet CSMACD algorithmg1 NIC receives datagram 4 If NIC detects another
from network layer creates frame
2 f N C h l dl
transmission while transmitting aborts and sends jam signal2 If NIC senses channel idle
starts frame transmission If NIC senses channel
sends jam signal5 After aborting NIC
enters exponential If NIC senses channel busy waits until channel idle then transmits
enters exponential backoff after mth collision NIC chooses K at
3 If NIC transmits entire frame without detecting
random from 012hellip2m-1 NIC waits K 512 bi i
ganother transmission NIC is done with frame
K512 bit times returns to Step 2
5 DataLink Layer 5-51
Ethernetrsquos CSMACD (more)Ethernet s CSMACD (more)Jam Signal make sure all Exponential Backoffg
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10
pGoal adapt retransmission attempts to estimated current loadBit time 1 microsec for 10
Mbps Ethernet for K=1023 wait time is about 50 msec
current loadheavy load random wait will be longer
about 50 msec first collision choose K from 01 delay is K 512 bit transmission timestransm ss on t m safter second collision choose K from 0123hellipft t lli i h K
Seeinteract with Javaapplet on AWL Web site
after ten collisions choose K from 01234hellip1023
pphighly recommended
5 DataLink Layer 5-52
CSMACD efficiencyCSMACD efficiency
T d l b 2 d i L NTprop = max prop delay between 2 nodes in LANttrans = time to transmit max-size frame
efficiency 1
=
efficiency goes to 1
transprop ttff y
51+
efficiency goes to 1 as tprop goes to 0as ttrans goes to infinitytrans g y
better performance than ALOHA and simple cheap decentralized
5 DataLink Layer 5-53
p
8023 Ethernet Standards Link amp Physical Layersy y
many different Ethernet standardsycommon MAC protocol and frame formatdifferent speeds 2 Mbps 10 Mbps 100 Mbps 1Gb 10G b1Gbps 10G bpsdifferent physical layer media fiber cable
MAC protocolapplicationtransportnetwork
li k
MAC protocoland frame format
100BASE-TX 100BASE-FX100BASE-T2link
physical100BASE-T4 100BASE-SX 100BASE-BX
5 DataLink Layer 5-54
fiber physical layercopper (twisterpair) physical layer
Manchester encodingManchester encoding
used in 10BaseTeach bit has a transitionallows clocks in sending and receiving nodes to g gsynchronize to each other
no need for a centralized global clock among nodes
5 DataLink Layer 5-55
Hey this is physical-layer stuff
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3 Multiple access
58 Link Virtualization ATM MPLS
53 Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-56
Hubshellip physical-layer (ldquodumbrdquo) repeaters
bits coming in one link go out all other links at bits coming in one link go out all other links at same rateall nodes connected to hub can collide with one anotherno frame bufferinggno CSMACD at hub host NICs detect collisions
twisted pair
hub
5 DataLink Layer 5-57
Switchlink-layer device smarter than hubs take yactive role
store forward Ethernet framesexamine incoming framersquos MAC address selectively forward frame to one-or-more
l k h f f d d outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
transparenthosts are unaware of presence of switches
plug-and-play self-learningswitches do not need to be configured
5 DataLink Layer 5-58
g
Switch allows multiple simultaneous ptransmissions
A
hosts have dedicated direct connection to switch
BCrsquo
switches buffer packetsEthernet protocol used on each incoming link but no
1 2 345
6
each incoming link but no collisions full duplex
each link is its own collision C
45
domainswitching A-to-Arsquo and B-to-Brsquo simultaneously
ArsquoBrsquo
to-B simultaneously without collisions
not possible with dumb hub
switch with six interfaces(123456)
5 DataLink Layer 5-59
Switch TableSwitch Table
Q h d s s it h k th t A
Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5
BCrsquo
B reachable via interface 5A each switch has a switch table each entry
1 2 345
6ta ach ntry
(MAC address of host interface to reach host time stamp) C
45
looks like a routing tableQ how are entries created
i t i d i it h t bl
ArsquoBrsquo
maintained in switch table something like a routing protocol
switch with six interfaces(123456)
5 DataLink Layer 5-60
protocol
Switch self-learning Source ASwitch self-learning
s it h l s hi h h sts A A Arsquo
Dest Arsquo
switch learns which hosts can be reached through which interfaces
BCrsquo
which interfaceswhen frame received switch ldquolearnsrdquo location of
d i i LAN
1 2 345
6
sender incoming LAN segmentrecords senderlocation
C
45
pair in switch tableArsquoBrsquo
MAC addr interface TTLMAC addr interface TTLSwitch table
(initially empty)A 1 60
5 DataLink Layer 5-61
Switch frame filteringforwardingWhen frame received
1 record link associated with sending host2 ind x s itch t bl usin MAC d st dd ss2 index switch table using MAC dest address3 if entry found for destination
then then if dest on segment from which frame arrived
then drop the framethen drop the frameelse forward the frame on interface indicated
else flood forward on all but the interface
on which the frame arrived5 DataLink Layer 5-62
on which the frame arrived
Self-learning Source ASelf learning forwarding
lA A Arsquo
Dest Arsquo
exampleBCrsquo
frame destinati n 1 2 345
6A ArsquoA ArsquoA ArsquoA ArsquoA Arsquoframe destination unknown floodd ti ti A
C
45
Arsquo A
destination A location knownselective send
ArsquoBrsquo
MAC addr interface TTL
selective send
MAC addr interface TTLSwitch table
(initially empty)A 1 60Arsquo 4 60
5 DataLink Layer 5-63
Interconnecting switchesg
switches can be connected togetherg
S
S4
A
B
S1
C DF
S2S3
IB C D
E HI
G
Q sending from A to G - how does S1 know to forward frame destined to F via S and S forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)
5 DataLink Layer 5-64
single switch case)
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
Slotted ALOHA
P s ConsProssingle active node can continuously transmit
Conscollisions wasting slotsidle slotscontinuously transmit
at full rate of channelhighly decentralized
idle slotsnodes may be able to detect collision in less highly decentralized
only slots in nodes need to be in sync
than time to transmit packetclock synchronization
5 DataLink Layer 5-25
ysimple
clock synchronization
Slotted Aloha efficiencyymax efficiency find p that maximizes
Efficiency long-run fraction of successful slots p that maximizes
Np(1-p)N-1
for many nodes take
fraction of successful slots (many nodes all with many frames to send)
suppose N nodes with
for many nodes take limit of Np(1-p)N-1
as N goes to infinity
frames to send)
many frames to send each transmits in slot with probability p
g ygives
Max efficiency = 1e = 37with probability pprob that given node has success in a slot =
At best channelused for useful has success in a slot =
p(1-p)N-1
prob that any node has
used for useful transmissions 37of time
5 DataLink Layer 5-26
p ya success = Np(1-p)N-1
Pure (unslotted) ALOHAPure (unslotted) ALOHAunslotted Aloha simpler no synchronizationunslotted Aloha simpler no synchronizationwhen frame first arrives
transmit immediately transmit immediately collision probability increases
frame sent at t0 collides with other frames sent in [t0-1t0+1]0 [ 0 0 ]
5 DataLink Layer 5-27
Pure Aloha efficiencyPure Aloha efficiencyP(success by given node) = P(node transmits) P(success by g ven node) P(node transm ts)
P(no other node transmits in [p0-1p0] P(no other node transmits in [p0-1 p0] P(no other node transmits in [p0 1p0]
= p (1-p)N-1 (1-p)N-1
= p (1-p)2(N-1)= p (1 p)
hellip choosing optimum p and then letting n -gt infty
= 1(2e) = 18
even worse than slotted Aloha
5 DataLink Layer 5-28
CSMA (Carrier Sense Multiple Access)CSMA (Carrier Sense Multiple Access)
CSMA listen before transmitIf channel sensed idle transmit entire framef chann s ns transm t nt r fram
If channel sensed busy defer transmission
human analogy donrsquot interrupt others
5 DataLink Layer 5-29
CSMA collisionsCSMA collisionsc llisi ns c n still ccu
spatial layout of nodes
collisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmission
collisionentire packet transmission time wasted
tnoterole of distance amp propagation delay in determining collision y gprobability
5 DataLink Layer 5-30
CSMACD (Collision Detection)CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMACSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel colliding transmissions aborted reducing channel wastage
collision detectioncollision detectioneasy in wired LANs measure signal strengths compare transmitted received signalscompare transmitted received signalsdifficult in wireless LANs received signal strength overwhelmed by local transmission strength overwhelmed by local transmission strength
human analogy the polite conversationalist
5 DataLink Layer 5-31
CSMACD collision detectionCSMACD collision detection
5 DataLink Layer 5-32
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocols
h l i i i M C lchannel partitioning MAC protocolsshare channel efficiently and fairly at high loadinefficient at low load delay in channel access 1N bandwidth allocated even if only 1 active node node
Random access MAC protocolsefficient at low load single node can fully efficient at low load single node can fully utilize channelhigh load collision overheadhigh load collision overhead
ldquotaking turnsrdquo protocolslook for best of both worlds
5 DataLink Layer 5-33
look for best of both worlds
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsPollingPolling
master node ldquoinvitesrdquo slave nodes d tinvites slave nodes to transmit in turntypically used with master
polldata
typically used with ldquodumbrdquo slave devicesconcerns
data
polling overhead latency slavessingle point of failure (master)
5 DataLink Layer 5-34
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsToken passingoken pass ng
control token passed from one node to next
T
sequentiallytoken message (nothing
concernstoken overhead
to send)T
latencysingle point of failure (token)(token)
5 DataLink Layer 5-35
data
Summary of MAC protocolsSummary of MAC protocols
h l i i i b i f dchannel partitioning by time frequency or codeTime Division Frequency Divisiond ss (d i ) random access (dynamic) ALOHA S-ALOHA CSMA CSMACDcarrier sensing easy in some technologies (wire) hard in carrier sensing easy in some technologies (wire) hard in others (wireless)CSMACD used in EthernetCSMACA used in 80211
taking turnslli f l i k ipolling from central site token passing
Bluetooth FDDI IBM Token Ring
5 DataLink Layer 5-36
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-37
MAC Addresses and ARPMAC Addresses and ARP
32-bit IP address network-layer addressyused to get datagram to destination IP subnet
MAC (or LAN or physical or Ethernet) MAC (or LAN or physical or Ethernet) address
f n ti n t f m f m n int f t n th function get frame from one interface to another physically-connected interface (same network)48 bit MAC address (for most LANs)48 bit MAC address (for most LANs)
bull burned in NIC ROM also sometimes software settable
5 DataLink Layer 5-38
LAN Addresses and ARPLAN Addresses and ARPEach adapter on LAN has unique LAN address
Broadcast address =FF-FF-FF-FF-FF-FF
1A-2F-BB-76-09-AD
= adapterLAN
(wired ori l )
58-23-D7-FA-20-B071-65-F7-2B-08-53
wireless)
0C-C4-11-6F-E3-98
5 DataLink Layer 5-39
LAN Address (more)LAN Address (more)
M C dd ll i d i i d b IEEEMAC address allocation administered by IEEEmanufacturer buys portion of MAC address space (t ss i ss)(to assure uniqueness)analogy
( ) MAC dd lik S i l S it N b(a) MAC address like Social Security Number(b) IP address like postal address
MAC fl dd づ bili MAC flat address づ portability can move LAN card from one LAN to another
IP hi chic l dd ss NOT p t blIP hierarchical address NOT portableaddress depends on IP subnet to which node is attached
5 DataLink Layer 5-40
ARP Address Resolution ProtocolAR Address Resolut on rotocol
Each IP node (host Question how to determine Each IP node (host router) on LAN has ARP table
Question how to determineMAC address of Bknowing Brsquos IP address
ARP table IPMAC address mappings for
knowing B s IP address
137196778 pp gsome LAN nodes
lt IP address MAC address TTLgtTTL (Tim T Li ) tim
1A-2F-BB-76-09-AD
137196723 137196714
TTL (Time To Live) time after which address mapping will be forgotten ( ll 20 )58-23-D7-FA-20-B071-65-F7-2B-08-53
LAN
(typically 20 min)58 23 D7 FA 20 B0
0C-C4-11-6F-E3-98137 196 7 88
5 DataLink Layer 5-41
137196788
ARP protocol Same LAN (network)
A wants to send datagram t B d Brsquo MAC dd A h ( ) IP tto B and Brsquos MAC address not in Arsquos ARP tableA broadcasts ARP query
A caches (saves) IP-to-MAC address pair in its ARP table until information q y
packet containing Bs IP address
dest MAC address = FF
becomes old (times out) soft state information that times out (goes dest MAC address = FF-
FF-FF-FF-FF-FFall machines on LAN
that times out (goes away) unless refreshed
ARP is ldquoplug-and-playrdquoreceive ARP query
B receives ARP packet replies to A with its (Bs)
p g p ynodes create their ARP tables without intervention from net replies to A with its (B s)
MAC addressframe sent to Arsquos MAC address (unicast)
intervention from net administrator
5 DataLink Layer 5-42
address (unicast)
Addressing routing to another LANwalkthrough send datagram from A to B via R
ssume A kn s Brsquos IP ddress
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
assume A knows B s IP address
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112B
222222222222
CC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
t ARP t bl s i t R f h IP two ARP tables in router R one for each IP network (LAN)
5 DataLink Layer 5-43
A creates IP datagram with source A destination B A uses ARP to get Rrsquos MAC address for 111 111 111 110A uses ARP to get R s MAC address for 111111111110A creates link-layer frame with Rs MAC address as dest frame contains A-to-B IP datagram This is a really importantArsquos NIC sends frame Rrsquos NIC receives frame R r m v s IP d t r m fr m Eth rn t fr m s s its
This is a really importantexample ndash make sure youunderstand
R removes IP datagram from Ethernet frame sees its destined to BR uses ARP to get Brsquos MAC address gR creates frame containing A-to-B IP datagram sends to B
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112
B222222222222
5 DataLink Layer 5-44
RCC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-45
Ethernetldquodominantrdquo wired LAN technology
cheap $20 for NICfirst widely used LAN technologyy gysimpler cheaper than token LANs and ATMkept up with speed race 10 Mbps ndash 10 Gbps p p p p p
Metcalfersquos Ethernetsketch
5 DataLink Layer 5-46
Star topologyp gybus topology popular through mid 90s
all nodes in same collision domain (can collide with each all nodes in same collision domain (can collide with each other)
today star topology prevails h active switch in center
each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with each other)
switch
b l bl
5 DataLink Layer 5-47
bus coaxial cable star
Ethernet Frame StructuremSending adapter encapsulates IP datagram (or other g p p g (
network layer protocol packet) in Ethernet frame
Preamble7 bytes with pattern 10101010 followed by one y p ybyte with pattern 10101011used to synchronize receiver sender clock rates
5 DataLink Layer 5-48
Ethernet Frame Structure (more)Ethernet Frame Structure (more)Addresses 6 bytesy
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocolpasses data in frame to network layer protocolotherwise adapter discards frame
Type indicates higher layer protocol (mostly IP Type indicates higher layer protocol (mostly IP but others possible eg Novell IPX AppleTalk)CRC checked at receiver if error is detected frame is dropped
5 DataLink Layer 5-49
Ethernet Unreliable connectionlessEthernet Unreliable connectionless
i l N h d h ki b di d connectionless No handshaking between sending and receiving NICs
li bl i i NIC d s rsquot s d ks ks unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC
stream of datagrams passed to network layer can have gaps stream of datagrams passed to network layer can have gaps (missing datagrams)gaps will be filled if app is using TCPotherwise app will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
5 DataLink Layer 5-50
Ethernet CSMACD algorithmg1 NIC receives datagram 4 If NIC detects another
from network layer creates frame
2 f N C h l dl
transmission while transmitting aborts and sends jam signal2 If NIC senses channel idle
starts frame transmission If NIC senses channel
sends jam signal5 After aborting NIC
enters exponential If NIC senses channel busy waits until channel idle then transmits
enters exponential backoff after mth collision NIC chooses K at
3 If NIC transmits entire frame without detecting
random from 012hellip2m-1 NIC waits K 512 bi i
ganother transmission NIC is done with frame
K512 bit times returns to Step 2
5 DataLink Layer 5-51
Ethernetrsquos CSMACD (more)Ethernet s CSMACD (more)Jam Signal make sure all Exponential Backoffg
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10
pGoal adapt retransmission attempts to estimated current loadBit time 1 microsec for 10
Mbps Ethernet for K=1023 wait time is about 50 msec
current loadheavy load random wait will be longer
about 50 msec first collision choose K from 01 delay is K 512 bit transmission timestransm ss on t m safter second collision choose K from 0123hellipft t lli i h K
Seeinteract with Javaapplet on AWL Web site
after ten collisions choose K from 01234hellip1023
pphighly recommended
5 DataLink Layer 5-52
CSMACD efficiencyCSMACD efficiency
T d l b 2 d i L NTprop = max prop delay between 2 nodes in LANttrans = time to transmit max-size frame
efficiency 1
=
efficiency goes to 1
transprop ttff y
51+
efficiency goes to 1 as tprop goes to 0as ttrans goes to infinitytrans g y
better performance than ALOHA and simple cheap decentralized
5 DataLink Layer 5-53
p
8023 Ethernet Standards Link amp Physical Layersy y
many different Ethernet standardsycommon MAC protocol and frame formatdifferent speeds 2 Mbps 10 Mbps 100 Mbps 1Gb 10G b1Gbps 10G bpsdifferent physical layer media fiber cable
MAC protocolapplicationtransportnetwork
li k
MAC protocoland frame format
100BASE-TX 100BASE-FX100BASE-T2link
physical100BASE-T4 100BASE-SX 100BASE-BX
5 DataLink Layer 5-54
fiber physical layercopper (twisterpair) physical layer
Manchester encodingManchester encoding
used in 10BaseTeach bit has a transitionallows clocks in sending and receiving nodes to g gsynchronize to each other
no need for a centralized global clock among nodes
5 DataLink Layer 5-55
Hey this is physical-layer stuff
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3 Multiple access
58 Link Virtualization ATM MPLS
53 Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-56
Hubshellip physical-layer (ldquodumbrdquo) repeaters
bits coming in one link go out all other links at bits coming in one link go out all other links at same rateall nodes connected to hub can collide with one anotherno frame bufferinggno CSMACD at hub host NICs detect collisions
twisted pair
hub
5 DataLink Layer 5-57
Switchlink-layer device smarter than hubs take yactive role
store forward Ethernet framesexamine incoming framersquos MAC address selectively forward frame to one-or-more
l k h f f d d outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
transparenthosts are unaware of presence of switches
plug-and-play self-learningswitches do not need to be configured
5 DataLink Layer 5-58
g
Switch allows multiple simultaneous ptransmissions
A
hosts have dedicated direct connection to switch
BCrsquo
switches buffer packetsEthernet protocol used on each incoming link but no
1 2 345
6
each incoming link but no collisions full duplex
each link is its own collision C
45
domainswitching A-to-Arsquo and B-to-Brsquo simultaneously
ArsquoBrsquo
to-B simultaneously without collisions
not possible with dumb hub
switch with six interfaces(123456)
5 DataLink Layer 5-59
Switch TableSwitch Table
Q h d s s it h k th t A
Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5
BCrsquo
B reachable via interface 5A each switch has a switch table each entry
1 2 345
6ta ach ntry
(MAC address of host interface to reach host time stamp) C
45
looks like a routing tableQ how are entries created
i t i d i it h t bl
ArsquoBrsquo
maintained in switch table something like a routing protocol
switch with six interfaces(123456)
5 DataLink Layer 5-60
protocol
Switch self-learning Source ASwitch self-learning
s it h l s hi h h sts A A Arsquo
Dest Arsquo
switch learns which hosts can be reached through which interfaces
BCrsquo
which interfaceswhen frame received switch ldquolearnsrdquo location of
d i i LAN
1 2 345
6
sender incoming LAN segmentrecords senderlocation
C
45
pair in switch tableArsquoBrsquo
MAC addr interface TTLMAC addr interface TTLSwitch table
(initially empty)A 1 60
5 DataLink Layer 5-61
Switch frame filteringforwardingWhen frame received
1 record link associated with sending host2 ind x s itch t bl usin MAC d st dd ss2 index switch table using MAC dest address3 if entry found for destination
then then if dest on segment from which frame arrived
then drop the framethen drop the frameelse forward the frame on interface indicated
else flood forward on all but the interface
on which the frame arrived5 DataLink Layer 5-62
on which the frame arrived
Self-learning Source ASelf learning forwarding
lA A Arsquo
Dest Arsquo
exampleBCrsquo
frame destinati n 1 2 345
6A ArsquoA ArsquoA ArsquoA ArsquoA Arsquoframe destination unknown floodd ti ti A
C
45
Arsquo A
destination A location knownselective send
ArsquoBrsquo
MAC addr interface TTL
selective send
MAC addr interface TTLSwitch table
(initially empty)A 1 60Arsquo 4 60
5 DataLink Layer 5-63
Interconnecting switchesg
switches can be connected togetherg
S
S4
A
B
S1
C DF
S2S3
IB C D
E HI
G
Q sending from A to G - how does S1 know to forward frame destined to F via S and S forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)
5 DataLink Layer 5-64
single switch case)
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
CSMA (Carrier Sense Multiple Access)CSMA (Carrier Sense Multiple Access)
CSMA listen before transmitIf channel sensed idle transmit entire framef chann s ns transm t nt r fram
If channel sensed busy defer transmission
human analogy donrsquot interrupt others
5 DataLink Layer 5-29
CSMA collisionsCSMA collisionsc llisi ns c n still ccu
spatial layout of nodes
collisions can still occurpropagation delay means two nodes may not heareach otherrsquos transmission
collisionentire packet transmission time wasted
tnoterole of distance amp propagation delay in determining collision y gprobability
5 DataLink Layer 5-30
CSMACD (Collision Detection)CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMACSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel colliding transmissions aborted reducing channel wastage
collision detectioncollision detectioneasy in wired LANs measure signal strengths compare transmitted received signalscompare transmitted received signalsdifficult in wireless LANs received signal strength overwhelmed by local transmission strength overwhelmed by local transmission strength
human analogy the polite conversationalist
5 DataLink Layer 5-31
CSMACD collision detectionCSMACD collision detection
5 DataLink Layer 5-32
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocols
h l i i i M C lchannel partitioning MAC protocolsshare channel efficiently and fairly at high loadinefficient at low load delay in channel access 1N bandwidth allocated even if only 1 active node node
Random access MAC protocolsefficient at low load single node can fully efficient at low load single node can fully utilize channelhigh load collision overheadhigh load collision overhead
ldquotaking turnsrdquo protocolslook for best of both worlds
5 DataLink Layer 5-33
look for best of both worlds
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsPollingPolling
master node ldquoinvitesrdquo slave nodes d tinvites slave nodes to transmit in turntypically used with master
polldata
typically used with ldquodumbrdquo slave devicesconcerns
data
polling overhead latency slavessingle point of failure (master)
5 DataLink Layer 5-34
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsToken passingoken pass ng
control token passed from one node to next
T
sequentiallytoken message (nothing
concernstoken overhead
to send)T
latencysingle point of failure (token)(token)
5 DataLink Layer 5-35
data
Summary of MAC protocolsSummary of MAC protocols
h l i i i b i f dchannel partitioning by time frequency or codeTime Division Frequency Divisiond ss (d i ) random access (dynamic) ALOHA S-ALOHA CSMA CSMACDcarrier sensing easy in some technologies (wire) hard in carrier sensing easy in some technologies (wire) hard in others (wireless)CSMACD used in EthernetCSMACA used in 80211
taking turnslli f l i k ipolling from central site token passing
Bluetooth FDDI IBM Token Ring
5 DataLink Layer 5-36
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-37
MAC Addresses and ARPMAC Addresses and ARP
32-bit IP address network-layer addressyused to get datagram to destination IP subnet
MAC (or LAN or physical or Ethernet) MAC (or LAN or physical or Ethernet) address
f n ti n t f m f m n int f t n th function get frame from one interface to another physically-connected interface (same network)48 bit MAC address (for most LANs)48 bit MAC address (for most LANs)
bull burned in NIC ROM also sometimes software settable
5 DataLink Layer 5-38
LAN Addresses and ARPLAN Addresses and ARPEach adapter on LAN has unique LAN address
Broadcast address =FF-FF-FF-FF-FF-FF
1A-2F-BB-76-09-AD
= adapterLAN
(wired ori l )
58-23-D7-FA-20-B071-65-F7-2B-08-53
wireless)
0C-C4-11-6F-E3-98
5 DataLink Layer 5-39
LAN Address (more)LAN Address (more)
M C dd ll i d i i d b IEEEMAC address allocation administered by IEEEmanufacturer buys portion of MAC address space (t ss i ss)(to assure uniqueness)analogy
( ) MAC dd lik S i l S it N b(a) MAC address like Social Security Number(b) IP address like postal address
MAC fl dd づ bili MAC flat address づ portability can move LAN card from one LAN to another
IP hi chic l dd ss NOT p t blIP hierarchical address NOT portableaddress depends on IP subnet to which node is attached
5 DataLink Layer 5-40
ARP Address Resolution ProtocolAR Address Resolut on rotocol
Each IP node (host Question how to determine Each IP node (host router) on LAN has ARP table
Question how to determineMAC address of Bknowing Brsquos IP address
ARP table IPMAC address mappings for
knowing B s IP address
137196778 pp gsome LAN nodes
lt IP address MAC address TTLgtTTL (Tim T Li ) tim
1A-2F-BB-76-09-AD
137196723 137196714
TTL (Time To Live) time after which address mapping will be forgotten ( ll 20 )58-23-D7-FA-20-B071-65-F7-2B-08-53
LAN
(typically 20 min)58 23 D7 FA 20 B0
0C-C4-11-6F-E3-98137 196 7 88
5 DataLink Layer 5-41
137196788
ARP protocol Same LAN (network)
A wants to send datagram t B d Brsquo MAC dd A h ( ) IP tto B and Brsquos MAC address not in Arsquos ARP tableA broadcasts ARP query
A caches (saves) IP-to-MAC address pair in its ARP table until information q y
packet containing Bs IP address
dest MAC address = FF
becomes old (times out) soft state information that times out (goes dest MAC address = FF-
FF-FF-FF-FF-FFall machines on LAN
that times out (goes away) unless refreshed
ARP is ldquoplug-and-playrdquoreceive ARP query
B receives ARP packet replies to A with its (Bs)
p g p ynodes create their ARP tables without intervention from net replies to A with its (B s)
MAC addressframe sent to Arsquos MAC address (unicast)
intervention from net administrator
5 DataLink Layer 5-42
address (unicast)
Addressing routing to another LANwalkthrough send datagram from A to B via R
ssume A kn s Brsquos IP ddress
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
assume A knows B s IP address
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112B
222222222222
CC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
t ARP t bl s i t R f h IP two ARP tables in router R one for each IP network (LAN)
5 DataLink Layer 5-43
A creates IP datagram with source A destination B A uses ARP to get Rrsquos MAC address for 111 111 111 110A uses ARP to get R s MAC address for 111111111110A creates link-layer frame with Rs MAC address as dest frame contains A-to-B IP datagram This is a really importantArsquos NIC sends frame Rrsquos NIC receives frame R r m v s IP d t r m fr m Eth rn t fr m s s its
This is a really importantexample ndash make sure youunderstand
R removes IP datagram from Ethernet frame sees its destined to BR uses ARP to get Brsquos MAC address gR creates frame containing A-to-B IP datagram sends to B
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112
B222222222222
5 DataLink Layer 5-44
RCC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-45
Ethernetldquodominantrdquo wired LAN technology
cheap $20 for NICfirst widely used LAN technologyy gysimpler cheaper than token LANs and ATMkept up with speed race 10 Mbps ndash 10 Gbps p p p p p
Metcalfersquos Ethernetsketch
5 DataLink Layer 5-46
Star topologyp gybus topology popular through mid 90s
all nodes in same collision domain (can collide with each all nodes in same collision domain (can collide with each other)
today star topology prevails h active switch in center
each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with each other)
switch
b l bl
5 DataLink Layer 5-47
bus coaxial cable star
Ethernet Frame StructuremSending adapter encapsulates IP datagram (or other g p p g (
network layer protocol packet) in Ethernet frame
Preamble7 bytes with pattern 10101010 followed by one y p ybyte with pattern 10101011used to synchronize receiver sender clock rates
5 DataLink Layer 5-48
Ethernet Frame Structure (more)Ethernet Frame Structure (more)Addresses 6 bytesy
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocolpasses data in frame to network layer protocolotherwise adapter discards frame
Type indicates higher layer protocol (mostly IP Type indicates higher layer protocol (mostly IP but others possible eg Novell IPX AppleTalk)CRC checked at receiver if error is detected frame is dropped
5 DataLink Layer 5-49
Ethernet Unreliable connectionlessEthernet Unreliable connectionless
i l N h d h ki b di d connectionless No handshaking between sending and receiving NICs
li bl i i NIC d s rsquot s d ks ks unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC
stream of datagrams passed to network layer can have gaps stream of datagrams passed to network layer can have gaps (missing datagrams)gaps will be filled if app is using TCPotherwise app will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
5 DataLink Layer 5-50
Ethernet CSMACD algorithmg1 NIC receives datagram 4 If NIC detects another
from network layer creates frame
2 f N C h l dl
transmission while transmitting aborts and sends jam signal2 If NIC senses channel idle
starts frame transmission If NIC senses channel
sends jam signal5 After aborting NIC
enters exponential If NIC senses channel busy waits until channel idle then transmits
enters exponential backoff after mth collision NIC chooses K at
3 If NIC transmits entire frame without detecting
random from 012hellip2m-1 NIC waits K 512 bi i
ganother transmission NIC is done with frame
K512 bit times returns to Step 2
5 DataLink Layer 5-51
Ethernetrsquos CSMACD (more)Ethernet s CSMACD (more)Jam Signal make sure all Exponential Backoffg
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10
pGoal adapt retransmission attempts to estimated current loadBit time 1 microsec for 10
Mbps Ethernet for K=1023 wait time is about 50 msec
current loadheavy load random wait will be longer
about 50 msec first collision choose K from 01 delay is K 512 bit transmission timestransm ss on t m safter second collision choose K from 0123hellipft t lli i h K
Seeinteract with Javaapplet on AWL Web site
after ten collisions choose K from 01234hellip1023
pphighly recommended
5 DataLink Layer 5-52
CSMACD efficiencyCSMACD efficiency
T d l b 2 d i L NTprop = max prop delay between 2 nodes in LANttrans = time to transmit max-size frame
efficiency 1
=
efficiency goes to 1
transprop ttff y
51+
efficiency goes to 1 as tprop goes to 0as ttrans goes to infinitytrans g y
better performance than ALOHA and simple cheap decentralized
5 DataLink Layer 5-53
p
8023 Ethernet Standards Link amp Physical Layersy y
many different Ethernet standardsycommon MAC protocol and frame formatdifferent speeds 2 Mbps 10 Mbps 100 Mbps 1Gb 10G b1Gbps 10G bpsdifferent physical layer media fiber cable
MAC protocolapplicationtransportnetwork
li k
MAC protocoland frame format
100BASE-TX 100BASE-FX100BASE-T2link
physical100BASE-T4 100BASE-SX 100BASE-BX
5 DataLink Layer 5-54
fiber physical layercopper (twisterpair) physical layer
Manchester encodingManchester encoding
used in 10BaseTeach bit has a transitionallows clocks in sending and receiving nodes to g gsynchronize to each other
no need for a centralized global clock among nodes
5 DataLink Layer 5-55
Hey this is physical-layer stuff
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3 Multiple access
58 Link Virtualization ATM MPLS
53 Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-56
Hubshellip physical-layer (ldquodumbrdquo) repeaters
bits coming in one link go out all other links at bits coming in one link go out all other links at same rateall nodes connected to hub can collide with one anotherno frame bufferinggno CSMACD at hub host NICs detect collisions
twisted pair
hub
5 DataLink Layer 5-57
Switchlink-layer device smarter than hubs take yactive role
store forward Ethernet framesexamine incoming framersquos MAC address selectively forward frame to one-or-more
l k h f f d d outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
transparenthosts are unaware of presence of switches
plug-and-play self-learningswitches do not need to be configured
5 DataLink Layer 5-58
g
Switch allows multiple simultaneous ptransmissions
A
hosts have dedicated direct connection to switch
BCrsquo
switches buffer packetsEthernet protocol used on each incoming link but no
1 2 345
6
each incoming link but no collisions full duplex
each link is its own collision C
45
domainswitching A-to-Arsquo and B-to-Brsquo simultaneously
ArsquoBrsquo
to-B simultaneously without collisions
not possible with dumb hub
switch with six interfaces(123456)
5 DataLink Layer 5-59
Switch TableSwitch Table
Q h d s s it h k th t A
Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5
BCrsquo
B reachable via interface 5A each switch has a switch table each entry
1 2 345
6ta ach ntry
(MAC address of host interface to reach host time stamp) C
45
looks like a routing tableQ how are entries created
i t i d i it h t bl
ArsquoBrsquo
maintained in switch table something like a routing protocol
switch with six interfaces(123456)
5 DataLink Layer 5-60
protocol
Switch self-learning Source ASwitch self-learning
s it h l s hi h h sts A A Arsquo
Dest Arsquo
switch learns which hosts can be reached through which interfaces
BCrsquo
which interfaceswhen frame received switch ldquolearnsrdquo location of
d i i LAN
1 2 345
6
sender incoming LAN segmentrecords senderlocation
C
45
pair in switch tableArsquoBrsquo
MAC addr interface TTLMAC addr interface TTLSwitch table
(initially empty)A 1 60
5 DataLink Layer 5-61
Switch frame filteringforwardingWhen frame received
1 record link associated with sending host2 ind x s itch t bl usin MAC d st dd ss2 index switch table using MAC dest address3 if entry found for destination
then then if dest on segment from which frame arrived
then drop the framethen drop the frameelse forward the frame on interface indicated
else flood forward on all but the interface
on which the frame arrived5 DataLink Layer 5-62
on which the frame arrived
Self-learning Source ASelf learning forwarding
lA A Arsquo
Dest Arsquo
exampleBCrsquo
frame destinati n 1 2 345
6A ArsquoA ArsquoA ArsquoA ArsquoA Arsquoframe destination unknown floodd ti ti A
C
45
Arsquo A
destination A location knownselective send
ArsquoBrsquo
MAC addr interface TTL
selective send
MAC addr interface TTLSwitch table
(initially empty)A 1 60Arsquo 4 60
5 DataLink Layer 5-63
Interconnecting switchesg
switches can be connected togetherg
S
S4
A
B
S1
C DF
S2S3
IB C D
E HI
G
Q sending from A to G - how does S1 know to forward frame destined to F via S and S forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)
5 DataLink Layer 5-64
single switch case)
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocols
h l i i i M C lchannel partitioning MAC protocolsshare channel efficiently and fairly at high loadinefficient at low load delay in channel access 1N bandwidth allocated even if only 1 active node node
Random access MAC protocolsefficient at low load single node can fully efficient at low load single node can fully utilize channelhigh load collision overheadhigh load collision overhead
ldquotaking turnsrdquo protocolslook for best of both worlds
5 DataLink Layer 5-33
look for best of both worlds
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsPollingPolling
master node ldquoinvitesrdquo slave nodes d tinvites slave nodes to transmit in turntypically used with master
polldata
typically used with ldquodumbrdquo slave devicesconcerns
data
polling overhead latency slavessingle point of failure (master)
5 DataLink Layer 5-34
ldquoTaking Turnsrdquo MAC protocolsTaking Turns MAC protocolsToken passingoken pass ng
control token passed from one node to next
T
sequentiallytoken message (nothing
concernstoken overhead
to send)T
latencysingle point of failure (token)(token)
5 DataLink Layer 5-35
data
Summary of MAC protocolsSummary of MAC protocols
h l i i i b i f dchannel partitioning by time frequency or codeTime Division Frequency Divisiond ss (d i ) random access (dynamic) ALOHA S-ALOHA CSMA CSMACDcarrier sensing easy in some technologies (wire) hard in carrier sensing easy in some technologies (wire) hard in others (wireless)CSMACD used in EthernetCSMACA used in 80211
taking turnslli f l i k ipolling from central site token passing
Bluetooth FDDI IBM Token Ring
5 DataLink Layer 5-36
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-37
MAC Addresses and ARPMAC Addresses and ARP
32-bit IP address network-layer addressyused to get datagram to destination IP subnet
MAC (or LAN or physical or Ethernet) MAC (or LAN or physical or Ethernet) address
f n ti n t f m f m n int f t n th function get frame from one interface to another physically-connected interface (same network)48 bit MAC address (for most LANs)48 bit MAC address (for most LANs)
bull burned in NIC ROM also sometimes software settable
5 DataLink Layer 5-38
LAN Addresses and ARPLAN Addresses and ARPEach adapter on LAN has unique LAN address
Broadcast address =FF-FF-FF-FF-FF-FF
1A-2F-BB-76-09-AD
= adapterLAN
(wired ori l )
58-23-D7-FA-20-B071-65-F7-2B-08-53
wireless)
0C-C4-11-6F-E3-98
5 DataLink Layer 5-39
LAN Address (more)LAN Address (more)
M C dd ll i d i i d b IEEEMAC address allocation administered by IEEEmanufacturer buys portion of MAC address space (t ss i ss)(to assure uniqueness)analogy
( ) MAC dd lik S i l S it N b(a) MAC address like Social Security Number(b) IP address like postal address
MAC fl dd づ bili MAC flat address づ portability can move LAN card from one LAN to another
IP hi chic l dd ss NOT p t blIP hierarchical address NOT portableaddress depends on IP subnet to which node is attached
5 DataLink Layer 5-40
ARP Address Resolution ProtocolAR Address Resolut on rotocol
Each IP node (host Question how to determine Each IP node (host router) on LAN has ARP table
Question how to determineMAC address of Bknowing Brsquos IP address
ARP table IPMAC address mappings for
knowing B s IP address
137196778 pp gsome LAN nodes
lt IP address MAC address TTLgtTTL (Tim T Li ) tim
1A-2F-BB-76-09-AD
137196723 137196714
TTL (Time To Live) time after which address mapping will be forgotten ( ll 20 )58-23-D7-FA-20-B071-65-F7-2B-08-53
LAN
(typically 20 min)58 23 D7 FA 20 B0
0C-C4-11-6F-E3-98137 196 7 88
5 DataLink Layer 5-41
137196788
ARP protocol Same LAN (network)
A wants to send datagram t B d Brsquo MAC dd A h ( ) IP tto B and Brsquos MAC address not in Arsquos ARP tableA broadcasts ARP query
A caches (saves) IP-to-MAC address pair in its ARP table until information q y
packet containing Bs IP address
dest MAC address = FF
becomes old (times out) soft state information that times out (goes dest MAC address = FF-
FF-FF-FF-FF-FFall machines on LAN
that times out (goes away) unless refreshed
ARP is ldquoplug-and-playrdquoreceive ARP query
B receives ARP packet replies to A with its (Bs)
p g p ynodes create their ARP tables without intervention from net replies to A with its (B s)
MAC addressframe sent to Arsquos MAC address (unicast)
intervention from net administrator
5 DataLink Layer 5-42
address (unicast)
Addressing routing to another LANwalkthrough send datagram from A to B via R
ssume A kn s Brsquos IP ddress
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
assume A knows B s IP address
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112B
222222222222
CC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
t ARP t bl s i t R f h IP two ARP tables in router R one for each IP network (LAN)
5 DataLink Layer 5-43
A creates IP datagram with source A destination B A uses ARP to get Rrsquos MAC address for 111 111 111 110A uses ARP to get R s MAC address for 111111111110A creates link-layer frame with Rs MAC address as dest frame contains A-to-B IP datagram This is a really importantArsquos NIC sends frame Rrsquos NIC receives frame R r m v s IP d t r m fr m Eth rn t fr m s s its
This is a really importantexample ndash make sure youunderstand
R removes IP datagram from Ethernet frame sees its destined to BR uses ARP to get Brsquos MAC address gR creates frame containing A-to-B IP datagram sends to B
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112
B222222222222
5 DataLink Layer 5-44
RCC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-45
Ethernetldquodominantrdquo wired LAN technology
cheap $20 for NICfirst widely used LAN technologyy gysimpler cheaper than token LANs and ATMkept up with speed race 10 Mbps ndash 10 Gbps p p p p p
Metcalfersquos Ethernetsketch
5 DataLink Layer 5-46
Star topologyp gybus topology popular through mid 90s
all nodes in same collision domain (can collide with each all nodes in same collision domain (can collide with each other)
today star topology prevails h active switch in center
each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with each other)
switch
b l bl
5 DataLink Layer 5-47
bus coaxial cable star
Ethernet Frame StructuremSending adapter encapsulates IP datagram (or other g p p g (
network layer protocol packet) in Ethernet frame
Preamble7 bytes with pattern 10101010 followed by one y p ybyte with pattern 10101011used to synchronize receiver sender clock rates
5 DataLink Layer 5-48
Ethernet Frame Structure (more)Ethernet Frame Structure (more)Addresses 6 bytesy
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocolpasses data in frame to network layer protocolotherwise adapter discards frame
Type indicates higher layer protocol (mostly IP Type indicates higher layer protocol (mostly IP but others possible eg Novell IPX AppleTalk)CRC checked at receiver if error is detected frame is dropped
5 DataLink Layer 5-49
Ethernet Unreliable connectionlessEthernet Unreliable connectionless
i l N h d h ki b di d connectionless No handshaking between sending and receiving NICs
li bl i i NIC d s rsquot s d ks ks unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC
stream of datagrams passed to network layer can have gaps stream of datagrams passed to network layer can have gaps (missing datagrams)gaps will be filled if app is using TCPotherwise app will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
5 DataLink Layer 5-50
Ethernet CSMACD algorithmg1 NIC receives datagram 4 If NIC detects another
from network layer creates frame
2 f N C h l dl
transmission while transmitting aborts and sends jam signal2 If NIC senses channel idle
starts frame transmission If NIC senses channel
sends jam signal5 After aborting NIC
enters exponential If NIC senses channel busy waits until channel idle then transmits
enters exponential backoff after mth collision NIC chooses K at
3 If NIC transmits entire frame without detecting
random from 012hellip2m-1 NIC waits K 512 bi i
ganother transmission NIC is done with frame
K512 bit times returns to Step 2
5 DataLink Layer 5-51
Ethernetrsquos CSMACD (more)Ethernet s CSMACD (more)Jam Signal make sure all Exponential Backoffg
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10
pGoal adapt retransmission attempts to estimated current loadBit time 1 microsec for 10
Mbps Ethernet for K=1023 wait time is about 50 msec
current loadheavy load random wait will be longer
about 50 msec first collision choose K from 01 delay is K 512 bit transmission timestransm ss on t m safter second collision choose K from 0123hellipft t lli i h K
Seeinteract with Javaapplet on AWL Web site
after ten collisions choose K from 01234hellip1023
pphighly recommended
5 DataLink Layer 5-52
CSMACD efficiencyCSMACD efficiency
T d l b 2 d i L NTprop = max prop delay between 2 nodes in LANttrans = time to transmit max-size frame
efficiency 1
=
efficiency goes to 1
transprop ttff y
51+
efficiency goes to 1 as tprop goes to 0as ttrans goes to infinitytrans g y
better performance than ALOHA and simple cheap decentralized
5 DataLink Layer 5-53
p
8023 Ethernet Standards Link amp Physical Layersy y
many different Ethernet standardsycommon MAC protocol and frame formatdifferent speeds 2 Mbps 10 Mbps 100 Mbps 1Gb 10G b1Gbps 10G bpsdifferent physical layer media fiber cable
MAC protocolapplicationtransportnetwork
li k
MAC protocoland frame format
100BASE-TX 100BASE-FX100BASE-T2link
physical100BASE-T4 100BASE-SX 100BASE-BX
5 DataLink Layer 5-54
fiber physical layercopper (twisterpair) physical layer
Manchester encodingManchester encoding
used in 10BaseTeach bit has a transitionallows clocks in sending and receiving nodes to g gsynchronize to each other
no need for a centralized global clock among nodes
5 DataLink Layer 5-55
Hey this is physical-layer stuff
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3 Multiple access
58 Link Virtualization ATM MPLS
53 Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-56
Hubshellip physical-layer (ldquodumbrdquo) repeaters
bits coming in one link go out all other links at bits coming in one link go out all other links at same rateall nodes connected to hub can collide with one anotherno frame bufferinggno CSMACD at hub host NICs detect collisions
twisted pair
hub
5 DataLink Layer 5-57
Switchlink-layer device smarter than hubs take yactive role
store forward Ethernet framesexamine incoming framersquos MAC address selectively forward frame to one-or-more
l k h f f d d outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
transparenthosts are unaware of presence of switches
plug-and-play self-learningswitches do not need to be configured
5 DataLink Layer 5-58
g
Switch allows multiple simultaneous ptransmissions
A
hosts have dedicated direct connection to switch
BCrsquo
switches buffer packetsEthernet protocol used on each incoming link but no
1 2 345
6
each incoming link but no collisions full duplex
each link is its own collision C
45
domainswitching A-to-Arsquo and B-to-Brsquo simultaneously
ArsquoBrsquo
to-B simultaneously without collisions
not possible with dumb hub
switch with six interfaces(123456)
5 DataLink Layer 5-59
Switch TableSwitch Table
Q h d s s it h k th t A
Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5
BCrsquo
B reachable via interface 5A each switch has a switch table each entry
1 2 345
6ta ach ntry
(MAC address of host interface to reach host time stamp) C
45
looks like a routing tableQ how are entries created
i t i d i it h t bl
ArsquoBrsquo
maintained in switch table something like a routing protocol
switch with six interfaces(123456)
5 DataLink Layer 5-60
protocol
Switch self-learning Source ASwitch self-learning
s it h l s hi h h sts A A Arsquo
Dest Arsquo
switch learns which hosts can be reached through which interfaces
BCrsquo
which interfaceswhen frame received switch ldquolearnsrdquo location of
d i i LAN
1 2 345
6
sender incoming LAN segmentrecords senderlocation
C
45
pair in switch tableArsquoBrsquo
MAC addr interface TTLMAC addr interface TTLSwitch table
(initially empty)A 1 60
5 DataLink Layer 5-61
Switch frame filteringforwardingWhen frame received
1 record link associated with sending host2 ind x s itch t bl usin MAC d st dd ss2 index switch table using MAC dest address3 if entry found for destination
then then if dest on segment from which frame arrived
then drop the framethen drop the frameelse forward the frame on interface indicated
else flood forward on all but the interface
on which the frame arrived5 DataLink Layer 5-62
on which the frame arrived
Self-learning Source ASelf learning forwarding
lA A Arsquo
Dest Arsquo
exampleBCrsquo
frame destinati n 1 2 345
6A ArsquoA ArsquoA ArsquoA ArsquoA Arsquoframe destination unknown floodd ti ti A
C
45
Arsquo A
destination A location knownselective send
ArsquoBrsquo
MAC addr interface TTL
selective send
MAC addr interface TTLSwitch table
(initially empty)A 1 60Arsquo 4 60
5 DataLink Layer 5-63
Interconnecting switchesg
switches can be connected togetherg
S
S4
A
B
S1
C DF
S2S3
IB C D
E HI
G
Q sending from A to G - how does S1 know to forward frame destined to F via S and S forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)
5 DataLink Layer 5-64
single switch case)
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-37
MAC Addresses and ARPMAC Addresses and ARP
32-bit IP address network-layer addressyused to get datagram to destination IP subnet
MAC (or LAN or physical or Ethernet) MAC (or LAN or physical or Ethernet) address
f n ti n t f m f m n int f t n th function get frame from one interface to another physically-connected interface (same network)48 bit MAC address (for most LANs)48 bit MAC address (for most LANs)
bull burned in NIC ROM also sometimes software settable
5 DataLink Layer 5-38
LAN Addresses and ARPLAN Addresses and ARPEach adapter on LAN has unique LAN address
Broadcast address =FF-FF-FF-FF-FF-FF
1A-2F-BB-76-09-AD
= adapterLAN
(wired ori l )
58-23-D7-FA-20-B071-65-F7-2B-08-53
wireless)
0C-C4-11-6F-E3-98
5 DataLink Layer 5-39
LAN Address (more)LAN Address (more)
M C dd ll i d i i d b IEEEMAC address allocation administered by IEEEmanufacturer buys portion of MAC address space (t ss i ss)(to assure uniqueness)analogy
( ) MAC dd lik S i l S it N b(a) MAC address like Social Security Number(b) IP address like postal address
MAC fl dd づ bili MAC flat address づ portability can move LAN card from one LAN to another
IP hi chic l dd ss NOT p t blIP hierarchical address NOT portableaddress depends on IP subnet to which node is attached
5 DataLink Layer 5-40
ARP Address Resolution ProtocolAR Address Resolut on rotocol
Each IP node (host Question how to determine Each IP node (host router) on LAN has ARP table
Question how to determineMAC address of Bknowing Brsquos IP address
ARP table IPMAC address mappings for
knowing B s IP address
137196778 pp gsome LAN nodes
lt IP address MAC address TTLgtTTL (Tim T Li ) tim
1A-2F-BB-76-09-AD
137196723 137196714
TTL (Time To Live) time after which address mapping will be forgotten ( ll 20 )58-23-D7-FA-20-B071-65-F7-2B-08-53
LAN
(typically 20 min)58 23 D7 FA 20 B0
0C-C4-11-6F-E3-98137 196 7 88
5 DataLink Layer 5-41
137196788
ARP protocol Same LAN (network)
A wants to send datagram t B d Brsquo MAC dd A h ( ) IP tto B and Brsquos MAC address not in Arsquos ARP tableA broadcasts ARP query
A caches (saves) IP-to-MAC address pair in its ARP table until information q y
packet containing Bs IP address
dest MAC address = FF
becomes old (times out) soft state information that times out (goes dest MAC address = FF-
FF-FF-FF-FF-FFall machines on LAN
that times out (goes away) unless refreshed
ARP is ldquoplug-and-playrdquoreceive ARP query
B receives ARP packet replies to A with its (Bs)
p g p ynodes create their ARP tables without intervention from net replies to A with its (B s)
MAC addressframe sent to Arsquos MAC address (unicast)
intervention from net administrator
5 DataLink Layer 5-42
address (unicast)
Addressing routing to another LANwalkthrough send datagram from A to B via R
ssume A kn s Brsquos IP ddress
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
assume A knows B s IP address
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112B
222222222222
CC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
t ARP t bl s i t R f h IP two ARP tables in router R one for each IP network (LAN)
5 DataLink Layer 5-43
A creates IP datagram with source A destination B A uses ARP to get Rrsquos MAC address for 111 111 111 110A uses ARP to get R s MAC address for 111111111110A creates link-layer frame with Rs MAC address as dest frame contains A-to-B IP datagram This is a really importantArsquos NIC sends frame Rrsquos NIC receives frame R r m v s IP d t r m fr m Eth rn t fr m s s its
This is a really importantexample ndash make sure youunderstand
R removes IP datagram from Ethernet frame sees its destined to BR uses ARP to get Brsquos MAC address gR creates frame containing A-to-B IP datagram sends to B
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112
B222222222222
5 DataLink Layer 5-44
RCC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-45
Ethernetldquodominantrdquo wired LAN technology
cheap $20 for NICfirst widely used LAN technologyy gysimpler cheaper than token LANs and ATMkept up with speed race 10 Mbps ndash 10 Gbps p p p p p
Metcalfersquos Ethernetsketch
5 DataLink Layer 5-46
Star topologyp gybus topology popular through mid 90s
all nodes in same collision domain (can collide with each all nodes in same collision domain (can collide with each other)
today star topology prevails h active switch in center
each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with each other)
switch
b l bl
5 DataLink Layer 5-47
bus coaxial cable star
Ethernet Frame StructuremSending adapter encapsulates IP datagram (or other g p p g (
network layer protocol packet) in Ethernet frame
Preamble7 bytes with pattern 10101010 followed by one y p ybyte with pattern 10101011used to synchronize receiver sender clock rates
5 DataLink Layer 5-48
Ethernet Frame Structure (more)Ethernet Frame Structure (more)Addresses 6 bytesy
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocolpasses data in frame to network layer protocolotherwise adapter discards frame
Type indicates higher layer protocol (mostly IP Type indicates higher layer protocol (mostly IP but others possible eg Novell IPX AppleTalk)CRC checked at receiver if error is detected frame is dropped
5 DataLink Layer 5-49
Ethernet Unreliable connectionlessEthernet Unreliable connectionless
i l N h d h ki b di d connectionless No handshaking between sending and receiving NICs
li bl i i NIC d s rsquot s d ks ks unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC
stream of datagrams passed to network layer can have gaps stream of datagrams passed to network layer can have gaps (missing datagrams)gaps will be filled if app is using TCPotherwise app will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
5 DataLink Layer 5-50
Ethernet CSMACD algorithmg1 NIC receives datagram 4 If NIC detects another
from network layer creates frame
2 f N C h l dl
transmission while transmitting aborts and sends jam signal2 If NIC senses channel idle
starts frame transmission If NIC senses channel
sends jam signal5 After aborting NIC
enters exponential If NIC senses channel busy waits until channel idle then transmits
enters exponential backoff after mth collision NIC chooses K at
3 If NIC transmits entire frame without detecting
random from 012hellip2m-1 NIC waits K 512 bi i
ganother transmission NIC is done with frame
K512 bit times returns to Step 2
5 DataLink Layer 5-51
Ethernetrsquos CSMACD (more)Ethernet s CSMACD (more)Jam Signal make sure all Exponential Backoffg
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10
pGoal adapt retransmission attempts to estimated current loadBit time 1 microsec for 10
Mbps Ethernet for K=1023 wait time is about 50 msec
current loadheavy load random wait will be longer
about 50 msec first collision choose K from 01 delay is K 512 bit transmission timestransm ss on t m safter second collision choose K from 0123hellipft t lli i h K
Seeinteract with Javaapplet on AWL Web site
after ten collisions choose K from 01234hellip1023
pphighly recommended
5 DataLink Layer 5-52
CSMACD efficiencyCSMACD efficiency
T d l b 2 d i L NTprop = max prop delay between 2 nodes in LANttrans = time to transmit max-size frame
efficiency 1
=
efficiency goes to 1
transprop ttff y
51+
efficiency goes to 1 as tprop goes to 0as ttrans goes to infinitytrans g y
better performance than ALOHA and simple cheap decentralized
5 DataLink Layer 5-53
p
8023 Ethernet Standards Link amp Physical Layersy y
many different Ethernet standardsycommon MAC protocol and frame formatdifferent speeds 2 Mbps 10 Mbps 100 Mbps 1Gb 10G b1Gbps 10G bpsdifferent physical layer media fiber cable
MAC protocolapplicationtransportnetwork
li k
MAC protocoland frame format
100BASE-TX 100BASE-FX100BASE-T2link
physical100BASE-T4 100BASE-SX 100BASE-BX
5 DataLink Layer 5-54
fiber physical layercopper (twisterpair) physical layer
Manchester encodingManchester encoding
used in 10BaseTeach bit has a transitionallows clocks in sending and receiving nodes to g gsynchronize to each other
no need for a centralized global clock among nodes
5 DataLink Layer 5-55
Hey this is physical-layer stuff
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3 Multiple access
58 Link Virtualization ATM MPLS
53 Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-56
Hubshellip physical-layer (ldquodumbrdquo) repeaters
bits coming in one link go out all other links at bits coming in one link go out all other links at same rateall nodes connected to hub can collide with one anotherno frame bufferinggno CSMACD at hub host NICs detect collisions
twisted pair
hub
5 DataLink Layer 5-57
Switchlink-layer device smarter than hubs take yactive role
store forward Ethernet framesexamine incoming framersquos MAC address selectively forward frame to one-or-more
l k h f f d d outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
transparenthosts are unaware of presence of switches
plug-and-play self-learningswitches do not need to be configured
5 DataLink Layer 5-58
g
Switch allows multiple simultaneous ptransmissions
A
hosts have dedicated direct connection to switch
BCrsquo
switches buffer packetsEthernet protocol used on each incoming link but no
1 2 345
6
each incoming link but no collisions full duplex
each link is its own collision C
45
domainswitching A-to-Arsquo and B-to-Brsquo simultaneously
ArsquoBrsquo
to-B simultaneously without collisions
not possible with dumb hub
switch with six interfaces(123456)
5 DataLink Layer 5-59
Switch TableSwitch Table
Q h d s s it h k th t A
Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5
BCrsquo
B reachable via interface 5A each switch has a switch table each entry
1 2 345
6ta ach ntry
(MAC address of host interface to reach host time stamp) C
45
looks like a routing tableQ how are entries created
i t i d i it h t bl
ArsquoBrsquo
maintained in switch table something like a routing protocol
switch with six interfaces(123456)
5 DataLink Layer 5-60
protocol
Switch self-learning Source ASwitch self-learning
s it h l s hi h h sts A A Arsquo
Dest Arsquo
switch learns which hosts can be reached through which interfaces
BCrsquo
which interfaceswhen frame received switch ldquolearnsrdquo location of
d i i LAN
1 2 345
6
sender incoming LAN segmentrecords senderlocation
C
45
pair in switch tableArsquoBrsquo
MAC addr interface TTLMAC addr interface TTLSwitch table
(initially empty)A 1 60
5 DataLink Layer 5-61
Switch frame filteringforwardingWhen frame received
1 record link associated with sending host2 ind x s itch t bl usin MAC d st dd ss2 index switch table using MAC dest address3 if entry found for destination
then then if dest on segment from which frame arrived
then drop the framethen drop the frameelse forward the frame on interface indicated
else flood forward on all but the interface
on which the frame arrived5 DataLink Layer 5-62
on which the frame arrived
Self-learning Source ASelf learning forwarding
lA A Arsquo
Dest Arsquo
exampleBCrsquo
frame destinati n 1 2 345
6A ArsquoA ArsquoA ArsquoA ArsquoA Arsquoframe destination unknown floodd ti ti A
C
45
Arsquo A
destination A location knownselective send
ArsquoBrsquo
MAC addr interface TTL
selective send
MAC addr interface TTLSwitch table
(initially empty)A 1 60Arsquo 4 60
5 DataLink Layer 5-63
Interconnecting switchesg
switches can be connected togetherg
S
S4
A
B
S1
C DF
S2S3
IB C D
E HI
G
Q sending from A to G - how does S1 know to forward frame destined to F via S and S forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)
5 DataLink Layer 5-64
single switch case)
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
ARP Address Resolution ProtocolAR Address Resolut on rotocol
Each IP node (host Question how to determine Each IP node (host router) on LAN has ARP table
Question how to determineMAC address of Bknowing Brsquos IP address
ARP table IPMAC address mappings for
knowing B s IP address
137196778 pp gsome LAN nodes
lt IP address MAC address TTLgtTTL (Tim T Li ) tim
1A-2F-BB-76-09-AD
137196723 137196714
TTL (Time To Live) time after which address mapping will be forgotten ( ll 20 )58-23-D7-FA-20-B071-65-F7-2B-08-53
LAN
(typically 20 min)58 23 D7 FA 20 B0
0C-C4-11-6F-E3-98137 196 7 88
5 DataLink Layer 5-41
137196788
ARP protocol Same LAN (network)
A wants to send datagram t B d Brsquo MAC dd A h ( ) IP tto B and Brsquos MAC address not in Arsquos ARP tableA broadcasts ARP query
A caches (saves) IP-to-MAC address pair in its ARP table until information q y
packet containing Bs IP address
dest MAC address = FF
becomes old (times out) soft state information that times out (goes dest MAC address = FF-
FF-FF-FF-FF-FFall machines on LAN
that times out (goes away) unless refreshed
ARP is ldquoplug-and-playrdquoreceive ARP query
B receives ARP packet replies to A with its (Bs)
p g p ynodes create their ARP tables without intervention from net replies to A with its (B s)
MAC addressframe sent to Arsquos MAC address (unicast)
intervention from net administrator
5 DataLink Layer 5-42
address (unicast)
Addressing routing to another LANwalkthrough send datagram from A to B via R
ssume A kn s Brsquos IP ddress
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
assume A knows B s IP address
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112B
222222222222
CC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
t ARP t bl s i t R f h IP two ARP tables in router R one for each IP network (LAN)
5 DataLink Layer 5-43
A creates IP datagram with source A destination B A uses ARP to get Rrsquos MAC address for 111 111 111 110A uses ARP to get R s MAC address for 111111111110A creates link-layer frame with Rs MAC address as dest frame contains A-to-B IP datagram This is a really importantArsquos NIC sends frame Rrsquos NIC receives frame R r m v s IP d t r m fr m Eth rn t fr m s s its
This is a really importantexample ndash make sure youunderstand
R removes IP datagram from Ethernet frame sees its destined to BR uses ARP to get Brsquos MAC address gR creates frame containing A-to-B IP datagram sends to B
A74-29-9C-E8-FF-55 88-B2-2F-54-1A-0F
1A-23-F9-CD-06-9BE6-E9-00-17-BB-4B
111111111111
A222222222221
R
222222222220111111111110
111111111112
B222222222222
5 DataLink Layer 5-44
RCC-49-DE-D0-AB-7D
49-BD-D2-C7-56-2A
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-45
Ethernetldquodominantrdquo wired LAN technology
cheap $20 for NICfirst widely used LAN technologyy gysimpler cheaper than token LANs and ATMkept up with speed race 10 Mbps ndash 10 Gbps p p p p p
Metcalfersquos Ethernetsketch
5 DataLink Layer 5-46
Star topologyp gybus topology popular through mid 90s
all nodes in same collision domain (can collide with each all nodes in same collision domain (can collide with each other)
today star topology prevails h active switch in center
each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with each other)
switch
b l bl
5 DataLink Layer 5-47
bus coaxial cable star
Ethernet Frame StructuremSending adapter encapsulates IP datagram (or other g p p g (
network layer protocol packet) in Ethernet frame
Preamble7 bytes with pattern 10101010 followed by one y p ybyte with pattern 10101011used to synchronize receiver sender clock rates
5 DataLink Layer 5-48
Ethernet Frame Structure (more)Ethernet Frame Structure (more)Addresses 6 bytesy
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocolpasses data in frame to network layer protocolotherwise adapter discards frame
Type indicates higher layer protocol (mostly IP Type indicates higher layer protocol (mostly IP but others possible eg Novell IPX AppleTalk)CRC checked at receiver if error is detected frame is dropped
5 DataLink Layer 5-49
Ethernet Unreliable connectionlessEthernet Unreliable connectionless
i l N h d h ki b di d connectionless No handshaking between sending and receiving NICs
li bl i i NIC d s rsquot s d ks ks unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC
stream of datagrams passed to network layer can have gaps stream of datagrams passed to network layer can have gaps (missing datagrams)gaps will be filled if app is using TCPotherwise app will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
5 DataLink Layer 5-50
Ethernet CSMACD algorithmg1 NIC receives datagram 4 If NIC detects another
from network layer creates frame
2 f N C h l dl
transmission while transmitting aborts and sends jam signal2 If NIC senses channel idle
starts frame transmission If NIC senses channel
sends jam signal5 After aborting NIC
enters exponential If NIC senses channel busy waits until channel idle then transmits
enters exponential backoff after mth collision NIC chooses K at
3 If NIC transmits entire frame without detecting
random from 012hellip2m-1 NIC waits K 512 bi i
ganother transmission NIC is done with frame
K512 bit times returns to Step 2
5 DataLink Layer 5-51
Ethernetrsquos CSMACD (more)Ethernet s CSMACD (more)Jam Signal make sure all Exponential Backoffg
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10
pGoal adapt retransmission attempts to estimated current loadBit time 1 microsec for 10
Mbps Ethernet for K=1023 wait time is about 50 msec
current loadheavy load random wait will be longer
about 50 msec first collision choose K from 01 delay is K 512 bit transmission timestransm ss on t m safter second collision choose K from 0123hellipft t lli i h K
Seeinteract with Javaapplet on AWL Web site
after ten collisions choose K from 01234hellip1023
pphighly recommended
5 DataLink Layer 5-52
CSMACD efficiencyCSMACD efficiency
T d l b 2 d i L NTprop = max prop delay between 2 nodes in LANttrans = time to transmit max-size frame
efficiency 1
=
efficiency goes to 1
transprop ttff y
51+
efficiency goes to 1 as tprop goes to 0as ttrans goes to infinitytrans g y
better performance than ALOHA and simple cheap decentralized
5 DataLink Layer 5-53
p
8023 Ethernet Standards Link amp Physical Layersy y
many different Ethernet standardsycommon MAC protocol and frame formatdifferent speeds 2 Mbps 10 Mbps 100 Mbps 1Gb 10G b1Gbps 10G bpsdifferent physical layer media fiber cable
MAC protocolapplicationtransportnetwork
li k
MAC protocoland frame format
100BASE-TX 100BASE-FX100BASE-T2link
physical100BASE-T4 100BASE-SX 100BASE-BX
5 DataLink Layer 5-54
fiber physical layercopper (twisterpair) physical layer
Manchester encodingManchester encoding
used in 10BaseTeach bit has a transitionallows clocks in sending and receiving nodes to g gsynchronize to each other
no need for a centralized global clock among nodes
5 DataLink Layer 5-55
Hey this is physical-layer stuff
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3 Multiple access
58 Link Virtualization ATM MPLS
53 Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-56
Hubshellip physical-layer (ldquodumbrdquo) repeaters
bits coming in one link go out all other links at bits coming in one link go out all other links at same rateall nodes connected to hub can collide with one anotherno frame bufferinggno CSMACD at hub host NICs detect collisions
twisted pair
hub
5 DataLink Layer 5-57
Switchlink-layer device smarter than hubs take yactive role
store forward Ethernet framesexamine incoming framersquos MAC address selectively forward frame to one-or-more
l k h f f d d outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
transparenthosts are unaware of presence of switches
plug-and-play self-learningswitches do not need to be configured
5 DataLink Layer 5-58
g
Switch allows multiple simultaneous ptransmissions
A
hosts have dedicated direct connection to switch
BCrsquo
switches buffer packetsEthernet protocol used on each incoming link but no
1 2 345
6
each incoming link but no collisions full duplex
each link is its own collision C
45
domainswitching A-to-Arsquo and B-to-Brsquo simultaneously
ArsquoBrsquo
to-B simultaneously without collisions
not possible with dumb hub
switch with six interfaces(123456)
5 DataLink Layer 5-59
Switch TableSwitch Table
Q h d s s it h k th t A
Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5
BCrsquo
B reachable via interface 5A each switch has a switch table each entry
1 2 345
6ta ach ntry
(MAC address of host interface to reach host time stamp) C
45
looks like a routing tableQ how are entries created
i t i d i it h t bl
ArsquoBrsquo
maintained in switch table something like a routing protocol
switch with six interfaces(123456)
5 DataLink Layer 5-60
protocol
Switch self-learning Source ASwitch self-learning
s it h l s hi h h sts A A Arsquo
Dest Arsquo
switch learns which hosts can be reached through which interfaces
BCrsquo
which interfaceswhen frame received switch ldquolearnsrdquo location of
d i i LAN
1 2 345
6
sender incoming LAN segmentrecords senderlocation
C
45
pair in switch tableArsquoBrsquo
MAC addr interface TTLMAC addr interface TTLSwitch table
(initially empty)A 1 60
5 DataLink Layer 5-61
Switch frame filteringforwardingWhen frame received
1 record link associated with sending host2 ind x s itch t bl usin MAC d st dd ss2 index switch table using MAC dest address3 if entry found for destination
then then if dest on segment from which frame arrived
then drop the framethen drop the frameelse forward the frame on interface indicated
else flood forward on all but the interface
on which the frame arrived5 DataLink Layer 5-62
on which the frame arrived
Self-learning Source ASelf learning forwarding
lA A Arsquo
Dest Arsquo
exampleBCrsquo
frame destinati n 1 2 345
6A ArsquoA ArsquoA ArsquoA ArsquoA Arsquoframe destination unknown floodd ti ti A
C
45
Arsquo A
destination A location knownselective send
ArsquoBrsquo
MAC addr interface TTL
selective send
MAC addr interface TTLSwitch table
(initially empty)A 1 60Arsquo 4 60
5 DataLink Layer 5-63
Interconnecting switchesg
switches can be connected togetherg
S
S4
A
B
S1
C DF
S2S3
IB C D
E HI
G
Q sending from A to G - how does S1 know to forward frame destined to F via S and S forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)
5 DataLink Layer 5-64
single switch case)
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-45
Ethernetldquodominantrdquo wired LAN technology
cheap $20 for NICfirst widely used LAN technologyy gysimpler cheaper than token LANs and ATMkept up with speed race 10 Mbps ndash 10 Gbps p p p p p
Metcalfersquos Ethernetsketch
5 DataLink Layer 5-46
Star topologyp gybus topology popular through mid 90s
all nodes in same collision domain (can collide with each all nodes in same collision domain (can collide with each other)
today star topology prevails h active switch in center
each ldquospokerdquo runs a (separate) Ethernet protocol (nodes do not collide with each other)
switch
b l bl
5 DataLink Layer 5-47
bus coaxial cable star
Ethernet Frame StructuremSending adapter encapsulates IP datagram (or other g p p g (
network layer protocol packet) in Ethernet frame
Preamble7 bytes with pattern 10101010 followed by one y p ybyte with pattern 10101011used to synchronize receiver sender clock rates
5 DataLink Layer 5-48
Ethernet Frame Structure (more)Ethernet Frame Structure (more)Addresses 6 bytesy
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocolpasses data in frame to network layer protocolotherwise adapter discards frame
Type indicates higher layer protocol (mostly IP Type indicates higher layer protocol (mostly IP but others possible eg Novell IPX AppleTalk)CRC checked at receiver if error is detected frame is dropped
5 DataLink Layer 5-49
Ethernet Unreliable connectionlessEthernet Unreliable connectionless
i l N h d h ki b di d connectionless No handshaking between sending and receiving NICs
li bl i i NIC d s rsquot s d ks ks unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC
stream of datagrams passed to network layer can have gaps stream of datagrams passed to network layer can have gaps (missing datagrams)gaps will be filled if app is using TCPotherwise app will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
5 DataLink Layer 5-50
Ethernet CSMACD algorithmg1 NIC receives datagram 4 If NIC detects another
from network layer creates frame
2 f N C h l dl
transmission while transmitting aborts and sends jam signal2 If NIC senses channel idle
starts frame transmission If NIC senses channel
sends jam signal5 After aborting NIC
enters exponential If NIC senses channel busy waits until channel idle then transmits
enters exponential backoff after mth collision NIC chooses K at
3 If NIC transmits entire frame without detecting
random from 012hellip2m-1 NIC waits K 512 bi i
ganother transmission NIC is done with frame
K512 bit times returns to Step 2
5 DataLink Layer 5-51
Ethernetrsquos CSMACD (more)Ethernet s CSMACD (more)Jam Signal make sure all Exponential Backoffg
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10
pGoal adapt retransmission attempts to estimated current loadBit time 1 microsec for 10
Mbps Ethernet for K=1023 wait time is about 50 msec
current loadheavy load random wait will be longer
about 50 msec first collision choose K from 01 delay is K 512 bit transmission timestransm ss on t m safter second collision choose K from 0123hellipft t lli i h K
Seeinteract with Javaapplet on AWL Web site
after ten collisions choose K from 01234hellip1023
pphighly recommended
5 DataLink Layer 5-52
CSMACD efficiencyCSMACD efficiency
T d l b 2 d i L NTprop = max prop delay between 2 nodes in LANttrans = time to transmit max-size frame
efficiency 1
=
efficiency goes to 1
transprop ttff y
51+
efficiency goes to 1 as tprop goes to 0as ttrans goes to infinitytrans g y
better performance than ALOHA and simple cheap decentralized
5 DataLink Layer 5-53
p
8023 Ethernet Standards Link amp Physical Layersy y
many different Ethernet standardsycommon MAC protocol and frame formatdifferent speeds 2 Mbps 10 Mbps 100 Mbps 1Gb 10G b1Gbps 10G bpsdifferent physical layer media fiber cable
MAC protocolapplicationtransportnetwork
li k
MAC protocoland frame format
100BASE-TX 100BASE-FX100BASE-T2link
physical100BASE-T4 100BASE-SX 100BASE-BX
5 DataLink Layer 5-54
fiber physical layercopper (twisterpair) physical layer
Manchester encodingManchester encoding
used in 10BaseTeach bit has a transitionallows clocks in sending and receiving nodes to g gsynchronize to each other
no need for a centralized global clock among nodes
5 DataLink Layer 5-55
Hey this is physical-layer stuff
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3 Multiple access
58 Link Virtualization ATM MPLS
53 Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-56
Hubshellip physical-layer (ldquodumbrdquo) repeaters
bits coming in one link go out all other links at bits coming in one link go out all other links at same rateall nodes connected to hub can collide with one anotherno frame bufferinggno CSMACD at hub host NICs detect collisions
twisted pair
hub
5 DataLink Layer 5-57
Switchlink-layer device smarter than hubs take yactive role
store forward Ethernet framesexamine incoming framersquos MAC address selectively forward frame to one-or-more
l k h f f d d outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
transparenthosts are unaware of presence of switches
plug-and-play self-learningswitches do not need to be configured
5 DataLink Layer 5-58
g
Switch allows multiple simultaneous ptransmissions
A
hosts have dedicated direct connection to switch
BCrsquo
switches buffer packetsEthernet protocol used on each incoming link but no
1 2 345
6
each incoming link but no collisions full duplex
each link is its own collision C
45
domainswitching A-to-Arsquo and B-to-Brsquo simultaneously
ArsquoBrsquo
to-B simultaneously without collisions
not possible with dumb hub
switch with six interfaces(123456)
5 DataLink Layer 5-59
Switch TableSwitch Table
Q h d s s it h k th t A
Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5
BCrsquo
B reachable via interface 5A each switch has a switch table each entry
1 2 345
6ta ach ntry
(MAC address of host interface to reach host time stamp) C
45
looks like a routing tableQ how are entries created
i t i d i it h t bl
ArsquoBrsquo
maintained in switch table something like a routing protocol
switch with six interfaces(123456)
5 DataLink Layer 5-60
protocol
Switch self-learning Source ASwitch self-learning
s it h l s hi h h sts A A Arsquo
Dest Arsquo
switch learns which hosts can be reached through which interfaces
BCrsquo
which interfaceswhen frame received switch ldquolearnsrdquo location of
d i i LAN
1 2 345
6
sender incoming LAN segmentrecords senderlocation
C
45
pair in switch tableArsquoBrsquo
MAC addr interface TTLMAC addr interface TTLSwitch table
(initially empty)A 1 60
5 DataLink Layer 5-61
Switch frame filteringforwardingWhen frame received
1 record link associated with sending host2 ind x s itch t bl usin MAC d st dd ss2 index switch table using MAC dest address3 if entry found for destination
then then if dest on segment from which frame arrived
then drop the framethen drop the frameelse forward the frame on interface indicated
else flood forward on all but the interface
on which the frame arrived5 DataLink Layer 5-62
on which the frame arrived
Self-learning Source ASelf learning forwarding
lA A Arsquo
Dest Arsquo
exampleBCrsquo
frame destinati n 1 2 345
6A ArsquoA ArsquoA ArsquoA ArsquoA Arsquoframe destination unknown floodd ti ti A
C
45
Arsquo A
destination A location knownselective send
ArsquoBrsquo
MAC addr interface TTL
selective send
MAC addr interface TTLSwitch table
(initially empty)A 1 60Arsquo 4 60
5 DataLink Layer 5-63
Interconnecting switchesg
switches can be connected togetherg
S
S4
A
B
S1
C DF
S2S3
IB C D
E HI
G
Q sending from A to G - how does S1 know to forward frame destined to F via S and S forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)
5 DataLink Layer 5-64
single switch case)
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
Ethernet Frame Structure (more)Ethernet Frame Structure (more)Addresses 6 bytesy
if adapter receives frame with matching destination address or with broadcast address (eg ARP packet) it passes data in frame to network layer protocolpasses data in frame to network layer protocolotherwise adapter discards frame
Type indicates higher layer protocol (mostly IP Type indicates higher layer protocol (mostly IP but others possible eg Novell IPX AppleTalk)CRC checked at receiver if error is detected frame is dropped
5 DataLink Layer 5-49
Ethernet Unreliable connectionlessEthernet Unreliable connectionless
i l N h d h ki b di d connectionless No handshaking between sending and receiving NICs
li bl i i NIC d s rsquot s d ks ks unreliable receiving NIC doesnrsquot send acks or nacks to sending NIC
stream of datagrams passed to network layer can have gaps stream of datagrams passed to network layer can have gaps (missing datagrams)gaps will be filled if app is using TCPotherwise app will see gaps
Ethernetrsquos MAC protocol unslotted CSMACD
5 DataLink Layer 5-50
Ethernet CSMACD algorithmg1 NIC receives datagram 4 If NIC detects another
from network layer creates frame
2 f N C h l dl
transmission while transmitting aborts and sends jam signal2 If NIC senses channel idle
starts frame transmission If NIC senses channel
sends jam signal5 After aborting NIC
enters exponential If NIC senses channel busy waits until channel idle then transmits
enters exponential backoff after mth collision NIC chooses K at
3 If NIC transmits entire frame without detecting
random from 012hellip2m-1 NIC waits K 512 bi i
ganother transmission NIC is done with frame
K512 bit times returns to Step 2
5 DataLink Layer 5-51
Ethernetrsquos CSMACD (more)Ethernet s CSMACD (more)Jam Signal make sure all Exponential Backoffg
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10
pGoal adapt retransmission attempts to estimated current loadBit time 1 microsec for 10
Mbps Ethernet for K=1023 wait time is about 50 msec
current loadheavy load random wait will be longer
about 50 msec first collision choose K from 01 delay is K 512 bit transmission timestransm ss on t m safter second collision choose K from 0123hellipft t lli i h K
Seeinteract with Javaapplet on AWL Web site
after ten collisions choose K from 01234hellip1023
pphighly recommended
5 DataLink Layer 5-52
CSMACD efficiencyCSMACD efficiency
T d l b 2 d i L NTprop = max prop delay between 2 nodes in LANttrans = time to transmit max-size frame
efficiency 1
=
efficiency goes to 1
transprop ttff y
51+
efficiency goes to 1 as tprop goes to 0as ttrans goes to infinitytrans g y
better performance than ALOHA and simple cheap decentralized
5 DataLink Layer 5-53
p
8023 Ethernet Standards Link amp Physical Layersy y
many different Ethernet standardsycommon MAC protocol and frame formatdifferent speeds 2 Mbps 10 Mbps 100 Mbps 1Gb 10G b1Gbps 10G bpsdifferent physical layer media fiber cable
MAC protocolapplicationtransportnetwork
li k
MAC protocoland frame format
100BASE-TX 100BASE-FX100BASE-T2link
physical100BASE-T4 100BASE-SX 100BASE-BX
5 DataLink Layer 5-54
fiber physical layercopper (twisterpair) physical layer
Manchester encodingManchester encoding
used in 10BaseTeach bit has a transitionallows clocks in sending and receiving nodes to g gsynchronize to each other
no need for a centralized global clock among nodes
5 DataLink Layer 5-55
Hey this is physical-layer stuff
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3 Multiple access
58 Link Virtualization ATM MPLS
53 Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-56
Hubshellip physical-layer (ldquodumbrdquo) repeaters
bits coming in one link go out all other links at bits coming in one link go out all other links at same rateall nodes connected to hub can collide with one anotherno frame bufferinggno CSMACD at hub host NICs detect collisions
twisted pair
hub
5 DataLink Layer 5-57
Switchlink-layer device smarter than hubs take yactive role
store forward Ethernet framesexamine incoming framersquos MAC address selectively forward frame to one-or-more
l k h f f d d outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
transparenthosts are unaware of presence of switches
plug-and-play self-learningswitches do not need to be configured
5 DataLink Layer 5-58
g
Switch allows multiple simultaneous ptransmissions
A
hosts have dedicated direct connection to switch
BCrsquo
switches buffer packetsEthernet protocol used on each incoming link but no
1 2 345
6
each incoming link but no collisions full duplex
each link is its own collision C
45
domainswitching A-to-Arsquo and B-to-Brsquo simultaneously
ArsquoBrsquo
to-B simultaneously without collisions
not possible with dumb hub
switch with six interfaces(123456)
5 DataLink Layer 5-59
Switch TableSwitch Table
Q h d s s it h k th t A
Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5
BCrsquo
B reachable via interface 5A each switch has a switch table each entry
1 2 345
6ta ach ntry
(MAC address of host interface to reach host time stamp) C
45
looks like a routing tableQ how are entries created
i t i d i it h t bl
ArsquoBrsquo
maintained in switch table something like a routing protocol
switch with six interfaces(123456)
5 DataLink Layer 5-60
protocol
Switch self-learning Source ASwitch self-learning
s it h l s hi h h sts A A Arsquo
Dest Arsquo
switch learns which hosts can be reached through which interfaces
BCrsquo
which interfaceswhen frame received switch ldquolearnsrdquo location of
d i i LAN
1 2 345
6
sender incoming LAN segmentrecords senderlocation
C
45
pair in switch tableArsquoBrsquo
MAC addr interface TTLMAC addr interface TTLSwitch table
(initially empty)A 1 60
5 DataLink Layer 5-61
Switch frame filteringforwardingWhen frame received
1 record link associated with sending host2 ind x s itch t bl usin MAC d st dd ss2 index switch table using MAC dest address3 if entry found for destination
then then if dest on segment from which frame arrived
then drop the framethen drop the frameelse forward the frame on interface indicated
else flood forward on all but the interface
on which the frame arrived5 DataLink Layer 5-62
on which the frame arrived
Self-learning Source ASelf learning forwarding
lA A Arsquo
Dest Arsquo
exampleBCrsquo
frame destinati n 1 2 345
6A ArsquoA ArsquoA ArsquoA ArsquoA Arsquoframe destination unknown floodd ti ti A
C
45
Arsquo A
destination A location knownselective send
ArsquoBrsquo
MAC addr interface TTL
selective send
MAC addr interface TTLSwitch table
(initially empty)A 1 60Arsquo 4 60
5 DataLink Layer 5-63
Interconnecting switchesg
switches can be connected togetherg
S
S4
A
B
S1
C DF
S2S3
IB C D
E HI
G
Q sending from A to G - how does S1 know to forward frame destined to F via S and S forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)
5 DataLink Layer 5-64
single switch case)
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
CSMACD efficiencyCSMACD efficiency
T d l b 2 d i L NTprop = max prop delay between 2 nodes in LANttrans = time to transmit max-size frame
efficiency 1
=
efficiency goes to 1
transprop ttff y
51+
efficiency goes to 1 as tprop goes to 0as ttrans goes to infinitytrans g y
better performance than ALOHA and simple cheap decentralized
5 DataLink Layer 5-53
p
8023 Ethernet Standards Link amp Physical Layersy y
many different Ethernet standardsycommon MAC protocol and frame formatdifferent speeds 2 Mbps 10 Mbps 100 Mbps 1Gb 10G b1Gbps 10G bpsdifferent physical layer media fiber cable
MAC protocolapplicationtransportnetwork
li k
MAC protocoland frame format
100BASE-TX 100BASE-FX100BASE-T2link
physical100BASE-T4 100BASE-SX 100BASE-BX
5 DataLink Layer 5-54
fiber physical layercopper (twisterpair) physical layer
Manchester encodingManchester encoding
used in 10BaseTeach bit has a transitionallows clocks in sending and receiving nodes to g gsynchronize to each other
no need for a centralized global clock among nodes
5 DataLink Layer 5-55
Hey this is physical-layer stuff
Link LayerLink Layer
5 1 I d i d 5 6 Li k l i h51 Introduction and services5 2 E d t ti
56 Link-layer switches57 PPP
52 Error detection and correction 5 3 Multiple access
58 Link Virtualization ATM MPLS
53 Multiple access protocols5 4 Link-layer 54 Link layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-56
Hubshellip physical-layer (ldquodumbrdquo) repeaters
bits coming in one link go out all other links at bits coming in one link go out all other links at same rateall nodes connected to hub can collide with one anotherno frame bufferinggno CSMACD at hub host NICs detect collisions
twisted pair
hub
5 DataLink Layer 5-57
Switchlink-layer device smarter than hubs take yactive role
store forward Ethernet framesexamine incoming framersquos MAC address selectively forward frame to one-or-more
l k h f f d d outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
transparenthosts are unaware of presence of switches
plug-and-play self-learningswitches do not need to be configured
5 DataLink Layer 5-58
g
Switch allows multiple simultaneous ptransmissions
A
hosts have dedicated direct connection to switch
BCrsquo
switches buffer packetsEthernet protocol used on each incoming link but no
1 2 345
6
each incoming link but no collisions full duplex
each link is its own collision C
45
domainswitching A-to-Arsquo and B-to-Brsquo simultaneously
ArsquoBrsquo
to-B simultaneously without collisions
not possible with dumb hub
switch with six interfaces(123456)
5 DataLink Layer 5-59
Switch TableSwitch Table
Q h d s s it h k th t A
Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5
BCrsquo
B reachable via interface 5A each switch has a switch table each entry
1 2 345
6ta ach ntry
(MAC address of host interface to reach host time stamp) C
45
looks like a routing tableQ how are entries created
i t i d i it h t bl
ArsquoBrsquo
maintained in switch table something like a routing protocol
switch with six interfaces(123456)
5 DataLink Layer 5-60
protocol
Switch self-learning Source ASwitch self-learning
s it h l s hi h h sts A A Arsquo
Dest Arsquo
switch learns which hosts can be reached through which interfaces
BCrsquo
which interfaceswhen frame received switch ldquolearnsrdquo location of
d i i LAN
1 2 345
6
sender incoming LAN segmentrecords senderlocation
C
45
pair in switch tableArsquoBrsquo
MAC addr interface TTLMAC addr interface TTLSwitch table
(initially empty)A 1 60
5 DataLink Layer 5-61
Switch frame filteringforwardingWhen frame received
1 record link associated with sending host2 ind x s itch t bl usin MAC d st dd ss2 index switch table using MAC dest address3 if entry found for destination
then then if dest on segment from which frame arrived
then drop the framethen drop the frameelse forward the frame on interface indicated
else flood forward on all but the interface
on which the frame arrived5 DataLink Layer 5-62
on which the frame arrived
Self-learning Source ASelf learning forwarding
lA A Arsquo
Dest Arsquo
exampleBCrsquo
frame destinati n 1 2 345
6A ArsquoA ArsquoA ArsquoA ArsquoA Arsquoframe destination unknown floodd ti ti A
C
45
Arsquo A
destination A location knownselective send
ArsquoBrsquo
MAC addr interface TTL
selective send
MAC addr interface TTLSwitch table
(initially empty)A 1 60Arsquo 4 60
5 DataLink Layer 5-63
Interconnecting switchesg
switches can be connected togetherg
S
S4
A
B
S1
C DF
S2S3
IB C D
E HI
G
Q sending from A to G - how does S1 know to forward frame destined to F via S and S forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)
5 DataLink Layer 5-64
single switch case)
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
Hubshellip physical-layer (ldquodumbrdquo) repeaters
bits coming in one link go out all other links at bits coming in one link go out all other links at same rateall nodes connected to hub can collide with one anotherno frame bufferinggno CSMACD at hub host NICs detect collisions
twisted pair
hub
5 DataLink Layer 5-57
Switchlink-layer device smarter than hubs take yactive role
store forward Ethernet framesexamine incoming framersquos MAC address selectively forward frame to one-or-more
l k h f f d d outgoing links when frame is to be forwarded on segment uses CSMACD to access segment
transparenthosts are unaware of presence of switches
plug-and-play self-learningswitches do not need to be configured
5 DataLink Layer 5-58
g
Switch allows multiple simultaneous ptransmissions
A
hosts have dedicated direct connection to switch
BCrsquo
switches buffer packetsEthernet protocol used on each incoming link but no
1 2 345
6
each incoming link but no collisions full duplex
each link is its own collision C
45
domainswitching A-to-Arsquo and B-to-Brsquo simultaneously
ArsquoBrsquo
to-B simultaneously without collisions
not possible with dumb hub
switch with six interfaces(123456)
5 DataLink Layer 5-59
Switch TableSwitch Table
Q h d s s it h k th t A
Q how does switch know that Arsquo reachable via interface 4 Brsquo reachable via interface 5
BCrsquo
B reachable via interface 5A each switch has a switch table each entry
1 2 345
6ta ach ntry
(MAC address of host interface to reach host time stamp) C
45
looks like a routing tableQ how are entries created
i t i d i it h t bl
ArsquoBrsquo
maintained in switch table something like a routing protocol
switch with six interfaces(123456)
5 DataLink Layer 5-60
protocol
Switch self-learning Source ASwitch self-learning
s it h l s hi h h sts A A Arsquo
Dest Arsquo
switch learns which hosts can be reached through which interfaces
BCrsquo
which interfaceswhen frame received switch ldquolearnsrdquo location of
d i i LAN
1 2 345
6
sender incoming LAN segmentrecords senderlocation
C
45
pair in switch tableArsquoBrsquo
MAC addr interface TTLMAC addr interface TTLSwitch table
(initially empty)A 1 60
5 DataLink Layer 5-61
Switch frame filteringforwardingWhen frame received
1 record link associated with sending host2 ind x s itch t bl usin MAC d st dd ss2 index switch table using MAC dest address3 if entry found for destination
then then if dest on segment from which frame arrived
then drop the framethen drop the frameelse forward the frame on interface indicated
else flood forward on all but the interface
on which the frame arrived5 DataLink Layer 5-62
on which the frame arrived
Self-learning Source ASelf learning forwarding
lA A Arsquo
Dest Arsquo
exampleBCrsquo
frame destinati n 1 2 345
6A ArsquoA ArsquoA ArsquoA ArsquoA Arsquoframe destination unknown floodd ti ti A
C
45
Arsquo A
destination A location knownselective send
ArsquoBrsquo
MAC addr interface TTL
selective send
MAC addr interface TTLSwitch table
(initially empty)A 1 60Arsquo 4 60
5 DataLink Layer 5-63
Interconnecting switchesg
switches can be connected togetherg
S
S4
A
B
S1
C DF
S2S3
IB C D
E HI
G
Q sending from A to G - how does S1 know to forward frame destined to F via S and S forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)
5 DataLink Layer 5-64
single switch case)
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
Switch self-learning Source ASwitch self-learning
s it h l s hi h h sts A A Arsquo
Dest Arsquo
switch learns which hosts can be reached through which interfaces
BCrsquo
which interfaceswhen frame received switch ldquolearnsrdquo location of
d i i LAN
1 2 345
6
sender incoming LAN segmentrecords senderlocation
C
45
pair in switch tableArsquoBrsquo
MAC addr interface TTLMAC addr interface TTLSwitch table
(initially empty)A 1 60
5 DataLink Layer 5-61
Switch frame filteringforwardingWhen frame received
1 record link associated with sending host2 ind x s itch t bl usin MAC d st dd ss2 index switch table using MAC dest address3 if entry found for destination
then then if dest on segment from which frame arrived
then drop the framethen drop the frameelse forward the frame on interface indicated
else flood forward on all but the interface
on which the frame arrived5 DataLink Layer 5-62
on which the frame arrived
Self-learning Source ASelf learning forwarding
lA A Arsquo
Dest Arsquo
exampleBCrsquo
frame destinati n 1 2 345
6A ArsquoA ArsquoA ArsquoA ArsquoA Arsquoframe destination unknown floodd ti ti A
C
45
Arsquo A
destination A location knownselective send
ArsquoBrsquo
MAC addr interface TTL
selective send
MAC addr interface TTLSwitch table
(initially empty)A 1 60Arsquo 4 60
5 DataLink Layer 5-63
Interconnecting switchesg
switches can be connected togetherg
S
S4
A
B
S1
C DF
S2S3
IB C D
E HI
G
Q sending from A to G - how does S1 know to forward frame destined to F via S and S forward frame destined to F via S4 and S3A self learning (works exactly the same as in single-switch case)
5 DataLink Layer 5-64
single switch case)
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
Self-learning multi-switch exampleSuppose C sends frame to I I responds to C
S
S412
A
B
S1
C DF
S2S3
I
2
B C D
E HI
G
Q show switch tables and packet forwarding in S1 S2 S3 S4
5 DataLink Layer 5-65
Institutional networkInstitutional network
to externalnetwork
mail server
networkrouter web server
IP subnet
5 DataLink Layer 5-66
Switches vs RoutersSwitches vs Routersboth store-and-forward devices
routers network layer devices (examine network layer headers)switches are link layer devicesswitches are link layer devices
routers maintain routing tables implement routing algorithmsgswitches maintain switch tables implement filtering learning algorithmsf g g g
5 DataLink Layer 5-67
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-68
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
Point to Point Data Link ControlPoint to Point Data Link Controlone sender one receiver one link easier than one sender one receiver one link easier than broadcast link
no Media Access Controlno Media Access Controlno need for explicit MAC addressinge g dialup link ISDN lineeg dialup link ISDN line
popular point-to-point DLC protocolsPPP (point-to-point protocol)PPP (point to point protocol)HDLC High level data link control (Data link used to be considered ldquohigh layerrdquo in protocol used to be considered high layer in protocol stack
5 DataLink Layer 5-69
PPP Design Requirements [RFC 1557]
packet framing encapsulation of network-layer p f m g p u f w ydatagram in data link frame
carry network layer data of any network layer y y y yprotocol (not just IP) at same timeability to demultiplex upwards
bit transparency must carry any bit pattern in the data fielderror detection (no correction)connection liveness detect signal link failure to
k lnetwork layernetwork layer address negotiation endpoint can l fi h th rsquos t k dd ss
5 DataLink Layer 5-70
learnconfigure each otherrsquos network address
PPP non-requirementsPPP non requirements
ti no error correctionrecoveryno flow control
f d d l K out of order delivery OK no need to support multipoint links (eg polling)
E l l Error recovery flow control data re-ordering all relegated to higher layers
5 DataLink Layer 5-71
PPP Data FramePPP Data Frame
Fl d li i (f i )Flag delimiter (framing)Address does nothing (only one option)Control does nothing in the future possible multiple control fieldsP t l l t l t hi h f Protocol upper layer protocol to which frame delivered (eg PPP-LCP IP IPCP etc)
5 DataLink Layer 5-72
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
PPP Data FramePPP Data Frame
i f l d b i i dinfo upper layer data being carriedcheck cyclic redundancy check for error d t tidetection
5 DataLink Layer 5-73
Byte StuffingByte Stuffingldquodata transparencyrdquo requirement data field must
be allowed to include flag pattern lt01111110gtQ is received lt01111110gt data or flag
Sender adds (ldquostuffsrdquo) extra lt 01111110gt byte after each lt 01111110gt data byteReceiver
two 01111110 bytes in a row discard first byte d continue data reception
single 01111110 flag byte
5 DataLink Layer 5-74
Byte StuffingByte Stuffing
flag bytepatterni din datato send
flag byte pattern plusstuffed byte in transmitted data
5 DataLink Layer 5-75
transmitted data
PPP Data Control ProtocolPPP Data Control ProtocolBefore exchanging network-g g
layer data data link peers mustconfigure PPP link (max frame length authentication)authentication)learnconfigure networklayer informationlayer information
for IP carry IP Control Protocol (IPCP) msgs Protocol (IPCP) msgs (protocol field 8021) to configurelearn IP
5 DataLink Layer 5-76
gaddress
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
Link LayerLink Layer
5 1 I d i d 5 6 H b d i h51 Introduction and services5 2 E d t ti
56 Hubs and switches57 PPP
52 Error detection and correction 5 3Multiple access
58 Link Virtualization ATM and MPLS
53Multiple access protocols5 4 Link-Layer 54 Link Layer Addressing55 Ethernet55 Ethernet
5 DataLink Layer 5-77
Virtualization of networksVirtualization of networks
Vi li i f f l b i i Virtualization of resources powerful abstraction in systems engineering
ti l s i t l i t l computing examples virtual memory virtual devices
Virtual machines e g javaVirtual machines eg javaIBM VM os from 1960rsquos70rsquos
layering of abstractions donrsquot sweat the details of layering of abstractions don t sweat the details of the lower layer only deal with lower layers abstractlyabstractly
5 DataLink Layer 5-78
The Internet virtualizing networksThe Internet virtualizing networks
1974 multiple unconnected differing in1974 multiple unconnected nets
ARPAnet
hellip differing inaddressing conventionspacket formats
data-over-cable networkspacket satellite network (Aloha)
k d k
perror recoveryrouting
packet radio network
ARPAnet satellite net
5 DataLink Layer 5-79
ARPAnet satell te netA Protocol for Packet Network Intercommunication V Cerf R Kahn IEEE Transactions on CommunicationsMay 1974 pp 637-648
The Internet virtualizing networksThe Internet virtualizing networksInternetwork layer (IP)
addressing internetwork Gateway
ldquoembed internetwork packets in l l k f
addressing internetwork appears as single uniform entity despite underlying local network heterogeneitynetwork of networks
plocal packet format or extract themrdquoroute (at internetwork level) to next gatewaynetwork of networks next gateway
gateway
ARPAnet satellite net
5 DataLink Layer 5-80
ARPAnet satell te net
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
Cerf amp Kahnrsquos Internetwork ArchitectureCerf amp Kahn s Internetwork ArchitectureWhat is virtualized
two layers of addressing internetwork and local networknew layer (IP) makes everything homogeneous at internetwork layerunderlying local network technology
cablesatellite56K telephone modemtoday ATM MPLS
hellip ldquoinvisiblerdquo at internetwork layer Looks like a link
5 DataLink Layer 5-81
ylayer technology to IP
ATM and MPLSATM and MPLS
P k h ATM MPLS separate networks in their own right
different service models addressing routing from Internet
viewed by Internet as logical link connecting IP routers
just like dialup link is really part of separate network (telephone network)
ATM MPLS of technical interest in their own right
5 DataLink Layer 5-82
Asynchronous Transfer Mode ATMAsynchronous Transfer Mode ATM1990rsquos00 standard for high-speed (155Mbps to g p ( p622 Mbps and higher) Broadband Integrated Service Digital Network architectureGoal integrated end-end transport of carry voice video data
i i i Q i f i id meeting timingQoS requirements of voice video (versus Internet best-effort model)ldquo t ti rdquo t l h t h i l ts i ldquonext generationrdquo telephony technical roots in telephone worldpacket switching (fixed length packets called packet-switching (fixed length packets called ldquocellsrdquo) using virtual circuits
5 DataLink Layer 5-83
ATM architecture ATM architecture AAL AAL
ATM ATMATM ATM
physical physicalphysical physical
d d ti h it h
adaptation layer only at edge of ATM network
end system end systemswitch switch
data segmentationreassemblyroughly analagous to Internet transport layer
ATM layer ldquonetworkrdquo layercell switching routing
5 DataLink Layer 5-84
physical layer
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
ATM network or link layerATM network or link layerVision end-to-end
t t ldquoATM f transport ldquoATM from desktop to desktoprdquo
ATM is a network ATM
IPnetwork
ATM is a network technology
Reality used to connect
ATMnetwork
Reality used to connect IP backbone routers
ldquoIP over ATMrdquoIP over ATMATM as switched link layer y connecting IP routers
5 DataLink Layer 5-85
ATM Adaptation Layer (AAL)ATM Adaptation Layer (AAL)
TM d i L ( L) ldquo d rdquo ATM Adaptation Layer (AAL) ldquoadaptsrdquo upper layers (IP or native ATM applications) to ATM layer belowlayer belowAAL present only in end systems not in switchesAAL layer segment (headertrailer fields data) AAL layer segment (headertrailer fields data) fragmented across multiple ATM cells
analogy TCP segment in many IP packetsanalogy TCP segment in many IP packets
AAL AAL
physical
ATM
physical
ATM
physical
ATM
physical
ATM
5 DataLink Layer 5-86
physical physicalp y p y
end system end systemswitch switch
ATM Adaptation Layer (AAL) [more]
Different versions of AAL layers depending on ATM y p gservice classAAL1 for CBR (Constant Bit Rate) services eg circuit emulationAAL2 for VBR (Variable Bit Rate) services eg MPEG videoAAL5 for data (eg IP datagrams)
User data
AAL PDU
ATM cell
5 DataLink Layer 5-87
ATM LayeryService transport cells across ATM network
analogous to IP network layeranalogous to IP network layervery different services than IP network layer
Guarantees NetworkArchitecture
ServiceModel Bandwidth Loss Order Timing
Congestionfeedback
Guarantees
Internet
ATM
best effort
CBR
none
constant
no
yes
no
yes
no
yes
no (inferredvia loss)noATM
ATM
CBR
VBR
constantrateguaranteedrate
yes
yes
yes
yes
yes
yes
nocongestionnocongestion
ATM
ATM
ABR
UBR
rateguaranteed minimum
no yes nocongestionyes
5 DataLink Layer 5-88
ATM UBR none no yes no no
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
ATM Layer Virtual CircuitsATM Layer Virtual CircuitsVC transport cells carried on VC from source to destp
call setup teardown for each call before data can floweach packet carries VC identifier (not destination ID)
it h d t th i t i ldquo t t rdquo f h every switch on source-dest path maintain ldquostaterdquo for each passing connectionlinkswitch resources (bandwidth buffers) may be allocated to ( ff ) m yVC to get circuit-like perf
Permanent VCs (PVCs)long lasting connectionstypically ldquopermanentrdquo route between to IP routers
Switched VCs (SVC)dynamically set up on per-call basis
5 DataLink Layer 5-89
ATM VCsATM VCsAdvantages of ATM VC approachAdvantages of ATM VC approach
QoS performance guarantee for connection mapped to VC (bandwidth delay delay jitter)mapped to VC (bandwidth delay delay jitter)
Drawbacks of ATM VC approachInefficient support of datagram trafficInefficient support of datagram trafficone PVC between each sourcedest pair) does not scale (N2 connections needed) not scale (N 2 connections needed) SVC introduces call setup latency processing overhead for short lived connectionsoverhead for short lived connections
5 DataLink Layer 5-90
ATM Layer ATM cellATM Layer ATM cell5-byte ATM cell headery48-byte payload
Why small payload -gt short cell-creation delay W y m p y yfor digitized voicehalfway between 32 and 64 (compromise)y p
Cell headerCell header
Cell format
5 DataLink Layer 5-91
ATM cell headerATM cell headerVCI virtual channel IDVCI virtual channel ID
will change from link to link thru netPT P l d t p ( RM ll s s d t ll) PT Payload type (eg RM cell versus data cell) CLP Cell Loss Priority bit
CLP 1 i li l i it ll b CLP = 1 implies low priority cell can be discarded if congestion
HEC Header Error ChecksumHEC Header Error Checksumcyclic redundancy check
5 DataLink Layer 5-92
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
ATM Physical Layer (more)ATM Physical Layer (more)
T i ( bl ) f h i l lTwo pieces (sublayers) of physical layerTransmission Convergence Sublayer (TCS) adapts ATM l b t PMD s bl b lATM layer above to PMD sublayer belowPhysical Medium Dependent depends on physical medium being usedmedium being used
TCS FunctionsTCS FunctionsHeader checksum generation 8 bits CRC C ll d lin ti nCell delineationWith ldquounstructuredrdquo PMD sublayer transmission of idle cells when no data cells to send
5 DataLink Layer 5-93
of idle cells when no data cells to send
ATM Physical LayerATM Physical Layer
Ph l d D d (P D) blPhysical Medium Dependent (PMD) sublayerSONETSDH transmission frame structure (like a
b ) container carrying bits) bit synchronization bandwidth partitions (TDM) several speeds OC3 = 15552 Mbps OC12 = 62208 Mb OC48 2 45 Gb OC192 9 6 GbMbps OC48 = 245 Gbps OC192 = 96 Gbps
TIT3 transmission frame structure (old telephone hierarchy) 1 5 Mbps 45 Mbpstelephone hierarchy) 15 Mbps 45 Mbpsunstructured just cells (busyidle)
5 DataLink Layer 5-94
IP-Over-ATMIP over ATM
Classic IP only3 ldquonetworksrdquo (e g
IP over ATMreplace ldquonetworkrdquo (e g LAN segment) 3 networks (eg
LAN segments)MAC (802 3) and IP
(eg LAN segment) with ATM networkATM addresses IP MAC (8023) and IP
addressesATM addresses IP addresses
ATMATMnetwork
Ethernet Ethernet
5 DataLink Layer 5-95
EthernetLANs
EthernetLANs
IP-Over-ATMapp
transportapp
AALEthIP
transportIP
AALATM
apptransport
IPEth ATM
phyphyEth
ATM
ATMphy
ATMphy
Ethphy
ATMphy
p y
5 DataLink Layer 5-96
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
Datagram Journey in IP-over-ATM NetworkDatagram Journey in IP-over-ATM Network
at Source HostIP layer maps between IP ATM dest address (using ARP)passes datagram to AAL5AAL5 encapsulates data segments cells passes to ATM layer
ATM network moves cell along VC to destinationat Destination Host
AAL5 reassembles cells into original datagramif CRC OK datagram is passed to IP
5 DataLink Layer 5-97
IP-Over-ATMIP-Over-ATM
IssuesIP datagrams into
ATMnetwork
ATM AAL5 PDUsfrom IP addresses
TM ddto ATM addressesjust like IP dd ss s t addresses to
8023 MAC addresses
EthernetLANs
addresses
5 DataLink Layer 5-98
Multiprotocol label switching (MPLS)Multiprotocol label switching (MPLS)
i i i l l d IP f di b i fi d initial goal speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding forwarding
borrowing ideas from Virtual Circuit (VC) approachbut IP datagram still keeps IP addressg p
PPP or EthernetPPP or Ethernet header
IP header remainder of link-layer frameMPLS header
label Exp S TTL
5 DataLink Layer 5-9920 3 1 5
MPLS capable routersMPLS capable routers
k l b l it h d taka label-switched routerforwards packets to outgoing interface based
l l b l l (d rsquot i t IP dd )only on label value (donrsquot inspect IP address)MPLS forwarding table distinct from IP forwarding tablestables
signaling protocol needed to set up forwardingRSVP TERSVP-TEforwarding possible along paths that IP alone would not allow (eg source-specific routing) not allow (eg source spec f c rout ng) use MPLS for traffic engineering
must co-exist with IP-only routers5 DataLink Layer 5-100
must co exist with IP only routers
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103
MPLS forwarding tablesi t t
MPLS forwarding tables
in out outlabel label dest interface
in out outlabel label dest interface
10 A 012 D 0 label label dest interface
10 6 A 112 9 D 0
12 D 08 A 1
D1
00R6
R3R4R5
0
1
A
1
0
R1R2A
in out outlabel label dest interface
6 A 0in out out
label label dest interface
5 DataLink Layer 5-101
6 - A 0label label dest interface
8 6 A 0
Chapter 5 SummaryChapter 5 Summaryprinciples behind data link layer servicespr nc p s h n ata n ay r s r c s
error detection correctionsharing a broadcast channel multiple accesslink layer addressing
instantiation and implementation of various link l t h l ilayer technologies
Ethernetit h d LANSswitched LANS
PPPi li d k li k l TM MPLvirtualized networks as a link layer ATM MPLS
5 DataLink Layer 5-102
Chapter 5 letrsquos take a breathChapter 5 let s take a breathjourney down protocol stack completejourney down protocol stack complete(except PHY)solid understanding of networking principles solid understanding of networking principles practice
ld t h b t l t f i t ti hellip could stop here hellip but lots of interesting topics
lwirelessmultimediasecurity network management
5 DataLink Layer 5-103