Beruflich Dokumente
Kultur Dokumente
Link Layer
implements link,
host
physical layer bus
controller (e.g., PCI)
attaches into hosts link
physical
system buses physical
transmission
combination of
hardware, software, network adapter
firmware card
datagram datagram
controller controller
frame
otherwise
0 0
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 slots
can continuously idle slots
transmit at full rate nodes may be able to
of channel detect collision in less
highly decentralized: than time to transmit
only slots in nodes packet
need to be in sync clock synchronization
simple
Link Layer 5-25
Slotted ALOHA: efficiency
!
prob that given node at best:
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 /t trans
data
Link Layer 5-37
Cable access
network Internet frames,TV channels, control transmitted
downstream at different frequencies
cable headend
CMTS
cable
cable modem
splitter
modem
termination system
ISP
upstream Internet frames, TV control, transmitted
upstream at different frequencies in time slots
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 5 4 3
learns location
of sender: incoming B C
LAN segment
records A
sender/location
pair in switch table
MAC addr interface TTL
A 1 60 Switch table
(initially empty)
example Dest: A
A A A
frame destination,
B
flood
A, locaton unknown: C
1
destination A 6 2
locationselectively
known: A A
5 4 3
send
B C
on just one link 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
switch(es) supporting
VLAN capabilities can
be configured to Electrical Engineering Computer Science
define multiple virtual (VLAN ports 1-8) (VLAN ports 9-15)
2 8 10 16
dynamic membership:
ports can be
dynamically assigned Electrical Engineering Computer Science
among VLANs (VLAN ports 1-8) (VLAN ports 9-15)
2 8 10 16 2 4 6 8
type
20 3 1 5
Link Layer 5-77
MPLS capable routers
a.k.a. label-switched router
forward packets to outgoing interface based
only on label value (dont 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
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-82
Link layer, LANs: outline
5.1 introduction, 5.5 link virtualization:
services MPLS
5.2 error detection, 5.6 data center
correction networking
5.3 multiple access 5.7 a day in the life
protocols of a web request
5.4 LANs
addressing, ARP
Ethernet
switches
VLANS
challenges:
multiple applications,
each serving massive
numbers of clients
managing/balancing
load, avoiding
processing, networking,
data bottlenecks Inside a 40-ft Microsoft container,
Chicago data center
Link Layer 5-84
Data center networks
load balancer: application-layer
routing
receives external client requests
directs workload within data center
Internet returns results to external client
(hiding data center internals from
client)
Border router
Load Load
balancer Access router
balancer
Tier-1 switches
B
A C Tier-2 switches
TOR
switches
Server racks
1 2 3 4 5 6 7 8
Link Layer 5-85
Data center networks
rich interconnection among switches, racks:
increased throughput between racks (multiple
routing paths possible)
increased reliability via redundancy
Tier-1 switches
Tier-2 switches
TOR
switches
Server racks
1 2 3 4 5 6 7 8
Link layer, LANs: outline
5.1 introduction, 5.5 link virtualization:
services MPLS
5.2 error detection, 5.6 data center
correction networking
5.3 multiple access 5.7 a day in the life
protocols of a web request
5.4 LANs
addressing, ARP
Ethernet
switches
VLANS
school network
68.80.2.0/24
web page
DHCP request
DHCP
encapsulated in UDP,
DHCP
DHCP UDP encapsulated in IP,
DHCP IP encapsulated in 802.3
DHCP Eth router Ethernet
Phy (runs DHCP) Ethernet frame
broadcast (dest:
FFFFFFFFFFFF) on LAN,
received at router
running DHCP
Ethernet server
demuxed to
IP demuxed, UDP
demuxed to DHCP
Link Layer 5-90
A day in the life connecting to the
Internet
DHCP DHCP DHCP server formulates
DHCP UDP DHCP ACK containing
DHCP IP clients IP address, IP
DHCP Eth address of first-hop
Phy router for client, name &
IP address of DNS server
encapsulation at
DHCP DHCP DHCP server, frame
DHCP UDP forwarded (switch
DHCP IP learning) through LAN,
DHCP Eth router demultiplexing at
Phy (runs DHCP)
DHCP client client receives
DHCP
DHCP ACK reply
router
IP datagram forwarded
(runs DHCP) from campus network into
IP datagram containing comcast network, routed
DNS query forwarded (tables created by RIP,
via LAN switch from OSPF, IS-IS and/or BGP
client to 1st hop router routing protocols)
demuxed to DNS to DNS
server
server
DNS server replies to
client with IP address
Link Layer 5-93
A day in the lifeTCP connection
carrying HTTP
HTTP
HTTP
SYNACK
SYN TCP
SYNACK
SYN IP
SYNACK
SYN Eth
Phy
HTTP
router IP datagram containing
HTTP (runs DHCP)
HTTP TCP HTTP request routed to
HTTP IP www.google.com
HTTP Eth web server responds
Phy
with HTTP reply
(containing web page)
web server
64.233.169.105
IP datagram containing
HTTP reply routed back to
client
Link Layer 5-95
Chapter 5: Summary
principles behind data link layer services:
error detection, correction
sharing a broadcast channel: multiple access
link layer addressing
instantiation and implementation of
various link layer technologies
Ethernet
switched LANS, VLANs
virtualized networks as a link layer: MPLS
synthesis: a day in the life of a web
request