Professional Documents
Culture Documents
Our goals:
understand principles behind data link layer
services:
error detection, correction
sharing a broadcast channel: multiple access
link layer addressing
reliable data transfer, flow control: done!
instantiation and implementation of various link
layer technologies
0 0
Sender: Receiver:
compute checksum of received
treat segment contents
segment
as sequence of 16-bit
check if computed checksum
integers equals checksum field value:
checksum: addition (1’s NO - error detected
complement sum) of YES - no error detected. But
segment contents maybe errors nonetheless?
sender puts checksum More later ….
value into UDP checksum
field
D.2r
R = remainder[ ]
G
“Taking turns”
Nodes take turns, but nodes with more to send can take
longer turns
Pros Cons
single active node can collisions, wasting slots
continuously transmit idle slots
at full rate of channel nodes may be able to
highly decentralized: detect collision in less
only slots in nodes than time to transmit
packet
need to be in sync
clock synchronization
simple
5: DataLink Layer 5-23
Slotted Aloha efficiency
Efficiency is the long-run For max efficiency
fraction of successful slots with N nodes, find p*
when there are many nodes, that maximizes
each with many frames to send Np(1-p)N-1
For many nodes, take
Suppose N nodes with limit of Np*(1-p*)N-1
many frames to send, as N goes to infinity,
each transmits in slot gives 1/e = .37
with probability p
prob that node 1 has At best: channel
success in a slot used for useful
= p(1-p)N-1 transmissions 37%
prob that any node has of time!
a success = Np(1-p)N-1
5: DataLink Layer 5-24
Pure (unslotted) ALOHA
unslotted Aloha: simpler, no synchronization
when frame first arrives
transmit immediately
= 1/(2e) = .18
Even worse !
collision:
entire packet transmission
time wasted
note:
role of distance & propagation
delay in determining collision
probability