Download The Data Link Layer-Data Communication Systems-Lecture Slides and more Slides Digital Systems Design in PDF only on Docsity!
5: DataLink Layer
5-
Chapter 5: The Data Link LayerOur goals: ^
understand principles behind data link layerservices:^
error detection, correction sharing a broadcast channel: multiple access link layer addressing reliable data transfer, flow control:
done!
^
instantiation and implementation of various linklayer technologies
5: DataLink Layer
5-
Link Layer ^
5.1 Introduction andservices
^
5.2 Error detectionand correction
^
5.3Multiple accessprotocols
^
5.4 Link-LayerAddressing
^
5.5 Ethernet
^
5.6 Hubs and switches
^
5.7 PPP
^
5.8 Link Virtualization:ATM and MPLS
5: DataLink Layer
5-
Link layer: context ^ Datagram transferred bydifferent link protocolsover different links:
^
e.g., Ethernet on first link,frame relay onintermediate links, 802.11on last link ^
Each
link protocol
provides differentservices^
e.g., may or may notprovide rdt over link
transportation analogy ^
trip from Princeton toLausanne^
limo: Princeton to JFK plane: JFK to Geneva train: Geneva to Lausanne ^
tourist = datagram
^
transport segment =communication link
^
transportation mode =link layer protocol
^
travel agent = routingalgorithm
5: DataLink Layer
5-
Link Layer Services ^
Framing, link access:^
encapsulate datagram into frame, adding header, trailer channel access if shared medium “MAC” addresses used in frame headers to identifysource, dest
- different from IP address!
^
Reliable delivery between adjacent nodes^
we learned how to do this already (chapter 3)! seldom used on low bit error link (fiber, some twistedpair) wireless links: high error rates
- Q: why both link-level and end-end reliability?
5: DataLink Layer
5-
Adaptors Communicating ^ link layer implemented in“adaptor” (aka NIC)
^
Ethernet card, PCMCIcard, 802.11 card ^
sending side:^
encapsulates datagram ina frame adds error checking bits,rdt, flow control, etc.
^
receiving side^
looks for errors, rdt, flowcontrol, etc extracts datagram, passesto rcving node ^
adapter is semi-autonomous
^
link & physical layers
sendingnode
frame
rcvingnode
datagram
frame
adapter
adapter
link layer protocol
5: DataLink Layer
5-
Link Layer ^
5.1 Introduction andservices
^
5.2 Error detectionand correction
^
5.3Multiple accessprotocols
^
5.4 Link-LayerAddressing
^
5.5 Ethernet
^
5.6 Hubs and switches
^
5.7 PPP
^
5.8 Link Virtualization:ATM
5: DataLink Layer
5-
Parity Checking^ Single Bit Parity:^ Detect single bit errors
Two Dimensional Bit Parity
Detect
and correct single bit errors 0
5: DataLink Layer
5-
Internet checksumSender:^
treat segment contentsas sequence of 16-bitintegers checksum: addition (1’scomplement sum) ofsegment contents sender puts checksumvalue into UDP checksumfield
Receiver: ^
compute checksum of receivedsegment ^
check if computed checksumequals checksum field value:^
NO - error detected YES - no error detected.
But
maybe errors nonetheless?More later ….
Goal: detect “errors” (e.g., flipped bits) in transmitted
segment (note: used at transport layer
only)
5: DataLink Layer
5-
CRC ExampleWant:
.D
r 2
XOR R = nG
equivalently:
.D
r 2
= nG XOR R
equivalently:
if we divide D
r. 2
by
G, want remainder R
R^
= remainder[
]
.D
r 2 G
5: DataLink Layer
5-
Link Layer ^
5.1 Introduction andservices
^
5.2 Error detectionand correction
^
5.3Multiple accessprotocols
^
5.4 Link-LayerAddressing
^
5.5 Ethernet
^
5.6 Hubs and switches
^
5.7 PPP
^
5.8 Link Virtualization:ATM
5: DataLink Layer
5-
Multiple Access protocols ^
single shared broadcast channel
^
two or more simultaneous transmissions by nodes:interference^
collision if node receives two or more signals at the same time multiple access protocol ^
distributed algorithm that determines how nodesshare channel, i.e., determine when node can transmit
^
communication about channel sharing must use channelitself!^
no out-of-band channel for coordination
5: DataLink Layer
5-
Ideal Mulitple Access ProtocolBroadcast channel of rate R bps1. When one node wants to transmit, it can send at
rate R.
2. When M nodes want to transmit, each can send at
average rate R/M
3. Fully decentralized:
^
no special node to coordinate transmissions ^
no synchronization of clocks, slots
4. Simple
5: DataLink Layer
5-
Channel Partitioning MAC protocols: TDMA
TDMA: time division multiple access ^
access to channel in "rounds"
^
each station gets fixed length slot (length = pkttrans time) in each round
^
unused slots go idle
^
example: 6-station LAN, 1,3,4 have pkt, slots 2,5,6idle
5: DataLink Layer
5-
Channel Partitioning MAC protocols: FDMA
FDMA: frequency division multiple access ^
channel spectrum divided into frequency bands
^
each station assigned fixed frequency band
^
unused transmission time in frequency bands go idle
^
example: 6-station LAN, 1,3,4 have pkt, frequencybands 2,5,6 idle
frequency bands