Documente Academic
Documente Profesional
Documente Cultură
Link Layer
implements link,
physical layer host
bus
controller
attaches into host’s link
(e.g., PCI)
datagram datagram
controller controller
frame
otherwise
0 0
sender: receiver:
treat segment compute checksum of
contents as received segment
sequence of 16-bit check if computed
integers checksum equals
checksum: addition checksum field value:
(1’s complement
sum) of segment NO - error detected
contents YES - no error
sender puts detected. But
checksum value into maybe errors
UDP checksum field nonetheless?
6-slot 6-slot
frame frame
1 3 4 1 3 4
FDM cable
node 2 2 2 2
node 3 3 3 3
C E C S E C E S S
Pros: Cons:
single active node collisions, wasting
can continuously slots
transmit at full rate idle slots
of channel nodes may be able to
highly decentralized: detect collision in less
only slots in nodes than time to transmit
need to be in sync packet
simple clock synchronization
Link Layer 5-25
Slotted ALOHA: efficiency
!
has success in a slot = channel
p(1-p)N-1
used for useful
prob that any node has transmissions
a success = Np(1-p)N-1 37%
of time!
Link Layer 5-26
Pure (unslotted) ALOHA
unslotted Aloha: simpler, no synchronization
when frame first arrives
transmit immediately
collision probability increases:
frame sent at t0 collides with other frames sent
in [t0-1,t0+1]
= p . (1-p)N-1 . (1-p)N-1
= p . (1-p)2(N-1)
= 1/(2e) = .18
even worse than slotted Aloha!
efficiency goes to 1
as tprop goes to 0
as ttrans goes to infinity
better performance than ALOHA: and simple, cheap, decentralized ! 1
efficiency
1 5t prop /ttrans
data
Link Layer 5-37
Cable access network
Internet frames,TV channels, control transmitted
downstream at different frequencies
cable headend
CMTS
…
splitter cable
cable modem … modem
termination system
Downstream channel i
CMTS
Upstream channel j
1A-2F-BB-76-09-AD
LAN
(wired or adapter
wireless)
71-65-F7-2B-08-53
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
A B
R
111.111.111.111
222.222.222.222
74-29-9C-E8-FF-55
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B
IP
Eth
Phy
A B
R
111.111.111.111
222.222.222.222
74-29-9C-E8-FF-55
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B
IP IP
Eth Eth
Phy Phy
A B
R
111.111.111.111
222.222.222.222
74-29-9C-E8-FF-55
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B
A B
R
111.111.111.111
222.222.222.222
74-29-9C-E8-FF-55
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B
A B
R
111.111.111.111
222.222.222.222
74-29-9C-E8-FF-55
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B
IP
Eth
Phy
A B
R
111.111.111.111
222.222.222.222
74-29-9C-E8-FF-55
49-BD-D2-C7-56-2A
222.222.222.220
1A-23-F9-CD-06-9B
switch
star
bus: coaxial cable
Link Layer 5-55
Ethernet frame structure
sending adapter encapsulates IP datagram
(or other network layer protocol packet)
in Ethernet frametype
dest. source
preamble address address data CRC
(payload)
preamble:
7 bytes with pattern 10101010 followed
by one byte with pattern 10101011
used to synchronize receiver, sender
clock rates
type
dest. source
preamble address address data CRC
(payload)
MAC protocol
application and frame format
transport
network 100BASE-TX 100BASE-T2 100BASE-FX
link 100BASE-T4 100BASE-SX 100BASE-BX
physical
A A A’
switch learns which
hosts can be reached
C’ B
through which
interfaces
6 1 2
when frame
received, switch 4
5 3
“learns” location of
sender: incoming B’ C
LAN segment
records
sender/location pair A’
in switch table
MAC addr interface TTL
A 1 60 Switch table
(initially empty)
A A A’
frame destination, A’,
locaton unknown:flood C’ B
1
destination A 6 2
location
on just one link known:
selectively send A A’
5 4 3
B’ C
A’ A
A’
S1
S3
A S2
F
D I
B C
G H
E
S4
S1
S3
A S2
F
D I
B C
G H
E
IP subnet
20 3 1 5
Link Layer 5-71
MPLS capable routers
a.k.a. label-switched router
forward packets to outgoing interface based
only on label value (don’t inspect IP address)
MPLS forwarding table distinct from IP forwarding
tables
flexibility: MPLS forwarding decisions can
differ from those of IP
use destination and source addresses to route
flows to same destination differently (traffic
engineering)
re-route flows quickly if link fails: pre-computed
backup paths (useful for VoIP)
R6
D
R4 R3
R5
A
R2
address
MPLS alone
routing: path to destination can MPLS and
be based on source and dest. address IP router
fast reroute: precompute backup routes in
case of link failure
Link Layer 5-74
MPLS signaling
modify OSPF, IS-IS link-state flooding protocols to
carry info used by MPLS routing,
e.g., link bandwidth, amount of “reserved” link
bandwidth
entry MPLS router uses RSVP-TE signaling
protocol to set up MPLS forwarding at
downstream routers
RSVP-TE
R6
D
R4
R5 modified
link state A
flooding
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
Link Layer 5-76