2013 Session 1: TELE3118: Network Technologies Week 2: Data Link Layer
2013 Session 1: TELE3118: Network Technologies Week 2: Data Link Layer
2013 Session 1: TELE3118: Network Technologies Week 2: Data Link Layer
Jim Kurose, Keith Ross. Addison-Wesley, July 2004. All material copyright 19962004. J.F Kurose and K.W. Ross, All Rights Reserved.
Computer Networks, 4th edition. Andrew S. Tanenbaum. Prentice-Hall, 2003.
DataLink Layer
2-1
link
wired links
wireless links
LANs
encapsulates datagram
2-2
Error control
Addressing and Multiple-access control
Flow control
Reliable transfer
DataLink Layer
2-3
Framing
2-4
Framing (2)
2-5
Framing (3)
Bit stuffing
(a) The original data.
(b) The data as they appear on the line.
(c) The data as they are stored in receivers memory after destuffing.
DataLink Layer
2-6
DataLink Layer
2-7
correction?
2-8
DataLink Layer
2-9
DataLink Layer
2-10
CRC Example
Want:
D.2r XOR R = nG
equivalently:
D.2r = nG XOR R
equivalently:
if we divide D.2r by
G, want remainder R
R = remainder[
D.2r
G
DataLink Layer
2-11
DataLink Layer
2-12
interference
DataLink Layer
2-13
4. Simple
DataLink Layer
2-14
Random Access
channel not divided, allow collisions
recover from collisions
Taking turns
Nodes take turns, but nodes with more to send can take
longer turns
DataLink Layer
2-15
2-16
Slotted ALOHA
Assumptions
all frames same size
time is divided into
equal size slots, time to
transmit 1 frame
nodes start to transmit
frames only at
beginning of slots
nodes are synchronized
if 2 or more nodes
transmit in slot, all
nodes detect collision
Operation
when node obtains fresh
frame, it transmits in next
slot
no collision, node can send
new frame in next slot
if collision, node
retransmits frame in each
subsequent slot with prob.
p until success
DataLink Layer
2-17
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
DataLink Layer
2-18
At best: channel
2-19
DataLink Layer
2-20
Even worse !
= 1/(2e) = .18
DataLink Layer
2-21
DataLink Layer
2-22
CSMA collisions
collision:
note:
DataLink Layer
2-23
collision detection:
easy in wired LANs: measure signal strengths,
compare transmitted, received signals
difficult in wireless LANs: receiver shut off while
transmitting
human analogy: the polite conversationalist
DataLink Layer
2-24
DataLink Layer
2-25
2-26
latency
single point of
failure (master)
token overhead
latency
single point of failure (token)
DataLink Layer
2-27
Taking Turns
polling from a central site, token passing
DataLink Layer
2-28