9_Data_Link_Layer
9_Data_Link_Layer
5-1
Link Layer
Introduction and Hubs and switches
services
Error detection and
correction
Multiple access
protocols
Link-Layer
Addressing
Ethernet
Error Detection:
errors caused by signal attenuation, noise.
receiver detects presence of errors:
DataLink Layer 10
CRC - Sender
Steps
T(x) = M(x) by xk (zero extending)
Find remainder, R(x), from T(x)/C(x)
P(x) = T(x) – R(x) M(x) followed by R(x)
Example
M(x) = 10011010 = x7 x4 x3 x
C(x) = 1101 = x3 x2 1
T(x) = 10011010000
R(x) = 101
P(x) = 10011010101
CRC - Receiver
Receive Polynomial P(x) + E(x)
E(x) represents errors
E(x) = 0, implies no errors
m mod c 0
CRC – Example Decoding –
with Errors
C(x) = x3 x2 1 = 1101 Generator
P(x) = x10 x7 x5 x4 x2 1 = 10010110101 Received Messa
Remainder
m mod c
Link Layer
Introduction and
services
Error detection and
correction
Multiple access
protocols
Link-Layer
Addressing
“Taking turns”
Nodes take turns, but nodes with more to send can
take longer turns
time
frequency bands
TDM (Time Division Multiplexing): channel divided into N time slots, one
per user; inefficient with low duty cycle users and at light load.
FDM (Frequency Division Multiplexing): frequency subdivided.
Pros Cons
single active node can collisions, wasting
continuously transmit slots
idle slots
at full rate of channel
highly decentralized: nodes may be able to
detect collision in less
only slots in nodes
than time to transmit
need to be in sync packet
simple clock synchronization
5: DataLink Layer 5-23
CSMA (Carrier Sense Multiple
Access)
CSMA: listen before transmit:
If channel sensed idle: transmit entire frame
If channel sensed busy, defer transmission
ARP (7)ARP IP
TCP
ARP OPERATION
LAN
(wired or = adapter
wireless)
71-65-F7-2B-08-53
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
R
Two ARP tables in router R, one for each IP network (LAN)
B
In routing table at source Host, find router 111.111.111.110
In ARP table at source, find MAC address E6-E9-00-17-BB-4B, etc
R
B