Lecture 6 Data Link Layer

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

Data Link Layer

Transfers datagram from one node


to other node over a link

links
• wired , wireless
• LANs

layer-2 packet: frame


Link Layer: Multiple Access Protocols

Single shared broadcast channel and


collisions
Mutiplie Access protocols:
Determines how nodes share channel, i.e.,
determine when node can transmit

 channel partitioning
 random access
 “taking turns”
Link Layer: Channel Partitioning protocol

CTDMA: time division multiple 6-slot 6-slot


access frame frame

 access to channel in “rounds” 1 3 4 1 3 4

 each station gets fixed length


6-station LAN, 1,3,4 have packets to
slot (length = packet send, slots 2,5,6 idle
transmission time) in each
round
 unused slots go idle
Link Layer: Channel partitioning protocol

FDMA: frequency division


multiple access
 channel spectrum divided into
frequency bands
 each station assigned fixed
frequency band
 unused transmission time in 6-station LAN, 1,3,4 have packet to
send, frequency bands 2,5,6 idle
frequency bands go idle
Link Layer:
Random Access protocol: Slotted ALOHA

when node has packet to send


• transmit at full channel data rate R
• no a priori coordination among
nodes
two or more transmitting nodes:
“collision”
Random Access protocol: Slotted ALOHA

Pros:
 single active node can continuously
transmit at full rate of channel
 highly decentralized: only slots in
nodes need to be in sync
 simple
Cons:
 collisions, wasting slots
 idle slots
 nodes may be able to detect collision
in less than time to transmit packet
 clock synchronization
Random Access Protocol: Pure ALOHA

Unslotted Aloha: simpler, no


synchronization
• when frame first arrives:
transmit immediately
collision probability increases
with no synchronization:
• frame sent at t0 collides
with other frames sent in
[t0-1,t0+1]
Random Access Protocols: CSMA

simple CSMA: listen before transmit:


• if channel sensed idle: transmit entire
frame
• if channel sensed busy: defer
transmission
 human analogy: don’t interrupt others!
CSMA/CD: CSMA with collision detection
• collisions detected within short time
• colliding transmissions aborted,
reducing channel wastage
• collision detection easy in wired,
difficult with wireless
 human analogy: the polite
conversationalist
Random Access Protocols: CSMA

simple CSMA: listen before transmit:


• if channel sensed idle: transmit entire frame
• if channel sensed busy: defer transmission
 human analogy: don’t interrupt others!
Random Access Protocols: CSMA

Vulnerable Time in CSMA


Random Access Protocols: CSMA

Behavior of three methods of CSMA


Random Access Protocols: CSMA/CD

Collision of first bit of CSMA/CD


Random Access Protocols: CSMA/CD

Collision and Abortion in CSMA/CD


Random Access Protocols: CSMA

Energy Level during transmission, idleness and


collision
Random Access Protocols: CSMA/CA

 CSMA/CA uses IFS, CW, and ACK


 In CSMA/CA, IFS can also be used to define priority of a
station or a frame.
 In CSMA/CA, if the station finds the channel busy, it does
not restart the timer of the contention window from
zero; it just stops the timer where it is and restarts when
the channel becomes idle.

You might also like