Professional Documents
Culture Documents
Chapter5 4th Ed November 2007
Chapter5 4th Ed November 2007
Chapter5 4th Ed November 2007
datagram datagram
controller controller
frame
otherwise
0 0
Sender: Receiver:
compute checksum of
treat segment contents as
received segment
sequence of 16-bit
integers check if computed checksum
checksum: addition (1’s equals checksum field value:
NO - error detected
complement sum) of
segment contents YES - no error detected.
sender puts checksum But maybe errors
value into UDP checksum nonetheless?
field
D.2r
R = remainder[ ]
G
humans at a
shared wire (e.g., shared RF shared RF cocktail party
cabled Ethernet) (e.g., 802.11 WiFi) (satellite) (shared air, acoustical)
5: DataLink Layer 5-17
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 nodes
share channel, i.e., determine when node can transmit
communication about channel sharing must use channel
itself!
no out-of-band channel for coordination
“Taking turns”
nodes take turns, but nodes with more to send can take
longer turns
FDM cable
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 need than time to transmit
to be in sync packet
clock synchronization
simple
5: DataLink Layer 5-25
Slotted Aloha efficiency
Efficiency : long-run max efficiency: find
fraction of successful slots p* that maximizes
Np(1-p)N-1
(many nodes, all with many for many nodes, take
frames to send) limit of Np*(1-p*)N-1 as
suppose: N nodes with many N goes to infinity,
frames to send, each transmits
in slot with probability p gives:
prob that given node has Max efficiency = 1/e = .37
success in a slot = p(1-p)N-1
prob that any node has a
At best: channel
!
success = Np(1-p)N-1
used for useful
transmissions 37%
of time!
= 1/(2e) = .18
collision:
entire packet transmission
time wasted
note:
role of distance & propagation
delay in determining collision
probability
data
5: DataLink Layer 5-35
Summary of MAC protocols
channel partitioning, by time, frequency or code
Time Division, Frequency Division
random access (dynamic),
ALOHA, S-ALOHA, CSMA, CSMA/CD
carrier sensing: easy in some technologies (wire), hard in
others (wireless)
CSMA/CD used in Ethernet
CSMA/CA used in 802.11
taking turns
polling from central site, token passing
Bluetooth, FDDI, IBM Token Ring
LAN
(wired or = adapter
wireless)
71-65-F7-2B-08-53
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
0C-C4-11-6F-E3-98
137.196.7.88
A E6-E9-00-17-BB-4B
222.222.222.221
1A-23-F9-CD-06-9B
111.111.111.111
222.222.222.220 222.222.222.222
111.111.111.110
B
111.111.111.112
R 49-BD-D2-C7-56-2A
CC-49-DE-D0-AB-7D
A
E6-E9-00-17-BB-4B
222.222.222.221
1A-23-F9-CD-06-9B
111.111.111.111
222.222.222.220 222.222.222.222
111.111.111.110 B
111.111.111.112
R 49-BD-D2-C7-56-2A
CC-49-DE-D0-AB-7D
5: DataLink Layer 5-44
Link Layer
5.1 Introduction and 5.6 Link-layer switches
services 5.7 PPP
5.2 Error detection 5.8 Link Virtualization:
and correction ATM and MPLS
5.3Multiple access
protocols
5.4 Link-Layer
Addressing
5.5 Ethernet
Metcalfe’s Ethernet
sketch
switch
Preamble:
7 bytes with pattern 10101010 followed by one
byte with pattern 10101011
used to synchronize receiver, sender clock rates
efficiency goes to 1
as tprop goes to 0
as ttrans goes to infinity
1
MAC protocol
application and frame format
transport
network 100BASE-TX 100BASE-T2 100BASE-FX
link 100BASE-T4 100BASE-SX 100BASE-BX
physical
used in 10BaseT
each bit has a transition
allows clocks in sending and receiving nodes to synchronize to
each other
no need for a centralized, global clock among nodes!
Hey, this is physical-layer stuff!
twisted pair
hub
A A A’
switch learns which hosts
C’ B
can be reached through
which interfaces
1 2
when frame received, 6 3
switch “learns” location of 4
5
sender: incoming LAN
segment
C
records sender/location
pair in switch table B’ A’
forwarding: A A A’
example C’ B
frame destination
1 2
unknown: flood A6A’ 3
5 4
destination A
location known: C
A’ A
selective send
B’ A’
S4
S1
S3
A S2
F
D I
B C
G H
E
1 S4
S1 2 S3
A S2
F
D I
B C
G H
E
mail server
to external
network
router web server
IP subnet
flag byte
pattern
in data
to send
gateway
AAL AAL
User data
AAL PDU
ATM cell
Cell header
Cell format
TCS Functions:
Header checksum generation: 8 bits CRC
Cell delineation
With “unstructured” PMD sublayer, transmission of
idle cells when no data cells to send
5: DataLink Layer 5-93
ATM Physical Layer
Physical Medium Dependent (PMD) sublayer
SONET/SDH: transmission frame structure (like
a container carrying bits);
bit synchronization;
bandwidth partitions (TDM);
several speeds: OC3 = 155.52 Mbps; OC12 = 622.08
Mbps; OC48 = 2.45 Gbps, OC192 = 9.6 Gbps
TI/T3: transmission frame structure (old
telephone hierarchy): 1.5 Mbps/ 45 Mbps
unstructured: just cells (busy/idle)
Ethernet Ethernet
LANs LANs
5: DataLink Layer 5-95
IP-Over-ATM
app
app transport
transport IP IP
IP AAL AAL
Eth Eth ATM
ATM
phy phy phy ATM phy
phy
ATM
phy
Issues: ATM
IP datagrams into network
ATM AAL5 PDUs
from IP addresses to
ATM addresses
just like IP
addresses to
802.3 MAC Ethernet
LANs
addresses!
PPP or Ethernet
MPLS header IP header remainder of link-layer frame
header
20 3 1 5
5: DataLink Layer 5-99
MPLS capable routers
a.k.a. label-switched router
forwards packets to outgoing interface based
only on label value (don’t inspect IP address)
MPLS forwarding table distinct from IP forwarding
tables
signaling protocol needed to set up forwarding
RSVP-TE
forwarding possible along paths that IP alone would
not allow (e.g., source-specific routing) !!
use MPLS for traffic engineering
R6
0 0
D
1 1
R4 R3
R5
0 0
A
R2 in outR1 out
label label dest
in out out
interface
label label dest 6 - A 0
interface
8 6 A 0
5: DataLink Layer 5-101
Chapter 5: Summary
principles behind data link layer services:
error detection, correction
sharing a broadcast channel: multiple access
link layer addressing