Chapter6-2021
Chapter6-2021
… built on ...
Physical transfer of bits
Source: Scott Shenker (UC Berkeley): slide 7 at The Future of Networking, and the
Past of Protocols
https://www.youtube.com/watch?v=YHeyuD89n1Y&t=111s
Goals
Transport
Network
Software
Link
Firmware Physical
/hardware
Where is the link layer
implemented?
in each and every host
link layer implemented
in “adaptor” (aka
network interface card
NIC) or on a chip application
• Ethernet card, transport
network cpu memory
802.11 card; link
firmware
Link Layer and LANs 6-10
Adaptors communicating
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
can continuously slots
transmit at full rate idle slots
of channel nodes may be able
highly decentralized:
to detect collision in
only slots in nodes
need to be in sync less than time to
simple transmit packet
clock
Link Layer and LANs 6-30
Slotted ALOHA: efficiency
!
probability p
prob that given node channel
has success in a slot used for useful
= p(1-p)N-1 transmissions
prob that any node 37%
has a success = of time!
Np(1-p)N-1 Link Layer and LANs 6-31
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!
1
efficiency
1 5t prop /ttrans
efficiency goes to 1
• as tprop goes to 0
• as ttrans goes to infinity
better performance than ALOHA: and simple,
cheap, decentralized!
data
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 and LANs 6-60
Ethernet frame structure
sending adapter encapsulates IP
datagram (or other network layer
protocol packet)type
in Ethernet frame
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
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’
frame destination,
B
A’, location flood C’
unknown:
destination 1
A 6 2
locationselectively
known: A A’
5 4 3
send
B’ C
on just one link
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
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
switch port
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
dest. source
preamble
address address
data (payload) CRC 802.1Q frame
Tier-1 switches
B
A C Tier-2 switches
TOR switches
Server racks
1 2 3 4 5 6 7 8
Link Layer and LANs 6-83
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 and LANs 6-84
Link layer, LANs: outline
6.1 introduction, 6.5 link virtualization:
services MPLS
6.2 error detection, 6.6 data center
correction networking
6.3 multiple access 6.7 a day in the life
protocols of a web request
64 LANs
• addressing, ARP
• Ethernet
• switches
• VLANS
school network
68.80.2.0/24
web page
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 and LANs 6-91
of www.google.com
A day in the life…TCP connection
carrying HTTP
HTTP
HTTP
SYNACK
SYN TCP
SYNACK
SYN IP
SYNACK
SYN Eth
Phy