ch_5_link_layer_LAN
ch_5_link_layer_LAN
Chapter 5
our goals:
Link Layer v understand principles behind link layer
services:
§ error detection, correction
§ sharing a broadcast channel: multiple access
A note on the use of these ppt slides:
We’re making these slides freely available to all (faculty, students, readers). Computer § link layer addressing
They’re in PowerPoint form so you see the animations; and can add, modify,
and delete slides (including this one) and slide content to suit your needs. Networking: A Top § local area networks: Ethernet, VLANs
They obviously represent a lot of work on our part. In return for use, we only
ask the following: Down Approach v instantiation, implementation of various link
v If you use these slides (e.g., in a class) that you mention their source
6th edition
(after all, we’d like people to use our book!)
v If you post any slides on a www site, that you note that they are adapted Jim Kurose, Keith Ross layer technologies
from (or perhaps identical to) our slides, and note our copyright of this Addison-Wesley
material.
March 2012
Thanks and enjoy! JFK/KWR
otherwise
0 0
Channel partitioning MAC protocols: TDMA Channel partitioning MAC protocols: FDMA
TDMA: time division multiple access FDMA: frequency division multiple access
v access to channel in "rounds" v channel spectrum divided into frequency bands
v each station gets fixed length slot (length = pkt v each station assigned fixed frequency band
trans time) in each round v unused transmission time in frequency bands go idle
v unused slots go idle v example: 6-station LAN, 1,3,4 have pkt, frequency bands 2,5,6
v example: 6-station LAN, 1,3,4 have pkt, slots idle
2,5,6 idle
time
frequency bands
6-slot 6-slot
frame frame
1 3 4 1 3 4
FDM cable
!
v nodes may be able to v prob that given node has at best: channel
v highly decentralized: only detect collision in less success in a slot = p(1- used for useful
slots in nodes need to be p)N-1 transmissions 37%
in sync than time to transmit
packet v prob that any node has a of time!
v simple success = Np(1-p)N-1
v clock synchronization
Link Layer 5-25 Link Layer 5-26
CSMA (carrier sense multiple access) CSMA collisions spatial layout of nodes
Downstream channel i
v channel partitioning, by time, frequency or code
CMTS
§ Time Division, Frequency Division
Upstream channel j
v random access (dynamic),
§ ALOHA, S-ALOHA, CSMA, CSMA/CD
t1 t2 Residences with cable modems
§ carrier sensing: easy in some technologies (wire), hard
Minislots containing Assigned minislots containing cable modem in others (wireless)
minislots request frames upstream data frames
§ CSMA/CD used in Ethernet
DOCSIS: data over cable service interface spec § CSMA/CA used in 802.11 (Collision Avoidance)
v FDM over upstream, downstream frequency channels v taking turns
v TDM upstream: some slots assigned, some have contention § polling from central site, token passing
§ downstream MAP (bandwidth allocation map) frame: § bluetooth, FDDI, token ring
assigns upstream slots
§ request for upstream slots (and data) transmitted
random access (binary backoff) in selected slotsLink Layer 5-39 Link Layer 5-40
IP
Eth
Phy
A B A B
R R
111.111.111.111 111.111.111.111
222.222.222.222 222.222.222.222
74-29-9C-E8-FF-55 74-29-9C-E8-FF-55
49-BD-D2-C7-56-2A 49-BD-D2-C7-56-2A
222.222.222.220 222.222.222.220
1A-23-F9-CD-06-9B 1A-23-F9-CD-06-9B
A B A B
R R
111.111.111.111 111.111.111.111
222.222.222.222 222.222.222.222
74-29-9C-E8-FF-55 74-29-9C-E8-FF-55
49-BD-D2-C7-56-2A 49-BD-D2-C7-56-2A
222.222.222.220 222.222.222.220
1A-23-F9-CD-06-9B 1A-23-F9-CD-06-9B
A B A B
R R
111.111.111.111 111.111.111.111
222.222.222.222 222.222.222.222
74-29-9C-E8-FF-55 74-29-9C-E8-FF-55
49-BD-D2-C7-56-2A 49-BD-D2-C7-56-2A
222.222.222.220 222.222.222.220
1A-23-F9-CD-06-9B 1A-23-F9-CD-06-9B
correction 5.6 data center v simpler, cheaper than token LANs and ATM
5.3 multiple access networking v kept up with speed race: 10 Mbps – 10 Gbps
switch
star
bus: coaxial cable
Link Layer 5-55 Link Layer 5-56
802.3 Ethernet standards: link & physical layers Link layer, LANs: outline
v many different Ethernet standards
§ common MAC protocol and frame format 5.1 introduction, services 5.5 link virtualization:
§ different speeds: 2 Mbps, 10 Mbps, 100 Mbps, 1Gbps, 5.2 error detection, MPLS
10G bps correction 5.6 data center
§ different physical layer media: fiber, cable 5.3 multiple access networking
protocols 5.7 a day in the life of a
5.4 LANs web request
MAC protocol § addressing, ARP
application and frame format
transport § Ethernet
network 100BASE-TX 100BASE-T2 100BASE-FX
link § switches
100BASE-T4 100BASE-SX 100BASE-BX
physical § VLANS
A A A’
Q: how does switch know A’ A v switch learns which hosts
can be reached through
reachable via interface 4, B’ B which interfaces C’ B
C’
reachable via interface 5? § when frame received, 6 1 2
v A: each switch has a switch 6 1 2 switch “learns”
table, each entry: location of sender: 5 4 3
5 4 3 incoming LAN segment
§ (MAC address of host, interface to B’ C
B’ C § records sender/location
reach host, time stamp)
pair in switch table
§ looks like a routing table!
A’
A’
Q: how are entries created, switch with six interfaces MAC addr interface TTL
maintained in switch table? (1,2,3,4,5,6) A 1 60 Switch table
(initially empty)
§ something like a routing protocol?
A A A’
when frame received at switch: v frame destination, A’,
C’ B
location unknown: flood
1. record incoming link, MAC address of sending host
1 2
2. index switch table using MAC destination address v destination A location 6
S1 S1
S3 S3
A S2 A S2
F F
B C D I
B C D I
G H G H
E E
Q: sending from A to G - how does S1 know to v Q: show switch tables and packet forwarding in S1, S2, S3, S4
forward frame destined to F via S4 and S3?
v A: self learning! (works exactly the same as in
single-switch case!)
Link Layer 5-67 Link Layer 5-68
8
9
10
15
16
entire LAN
2 8 10 16
§ security/privacy, … …
efficiency issues
Electrical Engineering Computer Science
(VLAN ports 1-8) (VLAN ports 9-16)
1-8 2 8 10 16 2 4 6 8
2 8 10 16
Electrical Engineering Computer Science Ports 2,3,5 belong to EE VLAN
v dynamic membership: ports (VLAN ports 1-8) (VLAN ports 9-15) Ports 4,6,7,8 belong to CS VLAN
preamble dest.
address
source
address
data (payload) CRC
802.1 frame
5.1 introduction, services 5.5 link virtualization:
5.2 error detection, MPLS
type
correction 5.6 data center
preamble dest. source data (payload) CRC 802.1Q frame 5.3 multiple access networking
address address
protocols 5.7 a day in the life of a
5.4 LANs web request
2-byte Tag Protocol Identifier
(value: 81-00)
Recomputed § addressing, ARP
CRC
§ Ethernet
§ switches
Tag Control Information (12 bit VLAN ID field,
3 bit priority field like IP TOS)
§ VLANS
20 3 1 5
QoS priority (experimental) and Explicit Congestion Notification bottom of stack flag Link Layer 5-77 Link Layer 5-78
MPLS versus IP paths MPLS versus IP paths
entry router (R4) can use different MPLS
routes to A based, e.g., on source address
R6 R6
D D
R4 R3 R4 R3
R5 R5
A A
R2 R2
R6
0 0
D
RSVP-TE 1 1
R6 R4 R3
D R5
R4 0 0
A
R5 R2 in outR1 out
modified
link state label label dest
A in out out
interface
flooding label label dest 6 - A 0
interface
8 6 A 0
Link Layer 5-81 Link Layer 5-82
Tier-1 switches
B
Tier-2 switches
A C Tier-2 switches
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
Link layer, LANs: outline Synthesis: a day in the life of a web request
v journey down protocol stack complete!
5.1 introduction, services 5.5 link virtualization: § application, transport, network, link
5.2 error detection, MPLS
v putting-it-all-together: synthesis!
correction 5.6 data center § goal: identify, review, understand protocols (at all
5.3 multiple access networking layers) involved in seemingly simple scenario:
protocols 5.7 a day in the life of a requesting www page
5.4 LANs web request § scenario: student attaches laptop to campus network,
requests/receives www.google.com
§ addressing, ARP
§ Ethernet
§ switches
§ VLANS
A day in the life: scenario A day in the life… connecting to the Internet
DHCP DHCP v connecting laptop needs to
DNS server UDP
browser DHCP
DHCP IP
get its own IP address, addr
Comcast network DHCP Eth of first-hop router, addr of
68.80.0.0/13 Phy DNS server: use DHCP
DHCP
A day in the life… using DNS DNS A day in the life…TCP connection carrying HTTP
DNS UDP DNS server
DNS IP
DNS DNS DNS Eth
HTTP
HTTP
DNS UDP DNS Phy
SYNACK
SYN TCP
DNS IP SYNACK
SYN IP
DNS Eth SYNACK
SYN Eth
Phy Phy
DNS
Comcast network
68.80.0.0/13
v to send HTTP request,
client first opens TCP socket
to web server
router v IP datagram forwarded from router v TCP SYN segment (step 1 in 3-
(runs DHCP) campus network into comcast (runs DHCP)
way handshake) inter-domain
SYNACK
SYN TCP
v IP datagram containing DNS network, routed (tables created routed to web server
SYNACK
SYN IP
query forwarded via LAN by RIP, OSPF, IS-IS and/or BGP SYNACK
SYN Eth
switch from client to 1st hop routing protocols) to DNS server Phy v web server responds with TCP
router SYNACK (step 2 in 3-way
v demux’ed to DNS server
web server handshake)
v DNS server replies to client 64.233.169.105
with IP address of v TCP connection established!
www.google.com Link Layer 5-93 Link Layer 5-94