3rdedition Chapter5
3rdedition Chapter5
0 0
Sender: Receiver:
compute checksum of
treat segment contents
received 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.
segment contents But maybe errors
sender puts checksum nonetheless? 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
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-24
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 Np(1-p)N-1
send For many nodes, take
Suppose N nodes with many
limit of Np*(1-p*)N-1
frames to send, each
transmits in slot with as N goes to infinity,
probability p gives 1/e = .37
prob that node 1 has 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!
LAN
(wired or = adapter
wireless)
71-65-F7-2B-08-53
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
A
Two ARP tables in router R, one for each IP network (LAN)
R
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
Metcalfe’s Ethernet
sketch
hub or
switch
Preamble:
7 bytes with pattern 10101010 followed by one
byte with pattern 10101011
used to synchronize receiver, sender clock
rates
1
efficiency
=
1+ 5tprop / ttrans
twisted pair
hub
twisted pair
hub
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!
hub
hub
hu hub
b
hub
hu hub
b
address interface
switch
A 1
B 1
E 2
hu hub hub G 3
A
b I C 1
D F
B C G H
E
switch
collision
domain
hub
hub hub
connection to switch
No collisions; full duplex switch
mail server
to external
network
router web server
switch
IP subnet
hub
hu hub
b
optimal no yes no
routing
cut yes no yes
through
5: DataLink Layer 5-71
Link Layer
5.1 Introduction and 5.6 Hubs and switches
services 5.7 PPP
5.2 Error detection 5.8 Link Virtualization:
and correction ATM
5.3Multiple access
protocols
5.4 Link-Layer
Addressing
5.5 Ethernet
flag byte
pattern
in data
to send
gateway
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-97
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-99
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
Ethernet
802.3 MAC LANs
addresses!
PPP or Ethernet
MPLS header IP header remainder of link-layer frame
header
20 3 1 5
5: DataLink Layer 5-103
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-105
Chapter 5: Summary
principles behind data link layer services:
error detection, correction
sharing a broadcast channel: multiple access
link layer addressing