Академический Документы
Профессиональный Документы
Культура Документы
Computer
They obviously represent a lot of work on our part. In return for use, we only
ask the following:
If you use these slides (e.g., in a class) that you mention their source
(after all, we’d like people to use our book!)
Networking: A Top
If you post any slides on a www site, that you note that they are adapted
from (or perhaps identical to) our slides, and note our copyright of this Down Approach
material.
7th edition
Thanks and enjoy! JFK/KWR
Jim Kurose, Keith Ross
All material copyright 1996-2016 Pearson/Addison Wesley
J.F Kurose and K.W. Ross, All Rights Reserved April 2016
Link Layer and LANs 6-1
Chapter 6: Link layer and
LANs
our goals:
understand principles behind link
layer services:
• error detection, correction
• sharing a broadcast channel: multiple
access
• link layer addressing
• local area networks: Ethernet, VLANs
instantiation, implementation of
various link layer technologies
combination of
hardware, software, Link Layer and LANs 6-8
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
less than time to
only slots in nodes transmit packet
need to be in sync
clock
simple Link Layer and LANs 6-25
Slotted ALOHA: efficiency
!
=at.37
best:
probability p channel
prob that given node used for useful
has success in a slot transmissions
= p(1-p)N-1 37%
of time!
prob that any node Link Layer and LANs 6-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
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!
Link Layer and LANs 6-34
“Taking turns” MAC
protocols
channel partitioning MAC protocols:
share channel efficiently and fairly at high
load
inefficient at low load: delay in channel
access, 1/N bandwidth allocated even if only
1 active node!
random access MAC protocols
efficient at low load: single node can fully
utilize channel
high load: collision overhead
“taking turns” protocols
look for best of both worlds!
Link Layer and LANs 6-35
“Taking turns” MAC
protocols
polling:
master node
“invites” slave data
poll
nodes to transmit
in turn master
typically used with data
“dumb” slave
devices
concerns: slaves
• polling
overhead
• latency
• single point of Link Layer and LANs 6-36
“Taking turns” MAC
protocols
token passing: T
control token
passed from one
node to next
sequentially. (nothing
token message to send)
concerns: T
token overhead
latency
single point of
failure (token)
data
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 and LANs 6-55
Ethernet frame structure
preamble:
7 bytes with pattern 10101010 followed
by one byte with pattern 10101011
used to synchronize receiver, sender
clock rates
Link Layer and LANs 6-56
Ethernet frame structure
(more)
addresses: 6 byte source, destination MAC
addresses
• if adapter receives frame with matching
destination address, or with broadcast address
(e.g. ARP packet), it passes data in frame to
network layer protocol
• otherwise, adapter discards frame
type: indicates higher layer protocol
(mostly IP but others possible, e.g., Novell
IPX, AppleTalk) type
dest. source data
CRC: cyclic
preamble addressredundancy
address check atCRC
(payload) receiver
• error detected: frame is dropped
Link Layer and LANs 6-57
Ethernet: unreliable,
connectionless
connectionless: no handshaking between
sending and receiving NICs
unreliable: receiving NIC doesn't send acks
or nacks to sending NIC
• data in dropped frames recovered only if
initial sender uses higher layer rdt (e.g.,
TCP), otherwise dropped data lost
Ethernet’s MAC protocol: unslotted
CSMA/CD with binary backoff
MAC protocol
application and frame format
transport
network 100BASE-TX 100BASE-T2 100BASE-FX
link 100BASE-T4 100BASE-SX 100BASE-BX
physical
Q:how
looksare
likeentries created,
a routing table! switch with six interfaces
(1,2,3,4,5,6)
maintained in switch
table?
something like a routing
protocol? Link Layer and LANs 6-63
Switch: self-learning Source: A
Dest: A’
A A A’
switch learns which
hosts can be reached C’ B
through which
interfaces 6 1 2
• when frame 4
5 3
received, switch
“learns” location of B’ C
sender: incoming
LAN segment A’
• records
MAC addr interface TTL
sender/location pair Switch table
A 1 60
in switch table (initially empty)
A A A’
frame destination,
B
A’, location flood C’
unknown: A
destination 6 1 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
2 8 10 16 2 4 6 8
… …
type
dest. source
preamble
address address
data (payload) CRC 802.1Q frame
20 3 1 5
Link Layer and LANs 6-77
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
Link Layer and LANs 6-78
MPLS versus IP paths
R6
D
R4 R3
R5
A
R2
R6 RSVP-TE
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 and LANs 6-82
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
6.4 LANs
• addressing, ARP
• Ethernet
• switches
• VLANS
Link Layer and LANs 6-83
Data center networks
10’s to 100’s of thousands of hosts, often
closely coupled, in close proximity:
• e-business (e.g. Amazon)
• content-servers (e.g., YouTube, Akamai, Apple,
Microsoft)
challenges:
• search engines, data mining (e.g., Google)
multiple applications,
each serving massive
numbers of clients
managing/balancing
load, avoiding
processing, networking, Inside a 40-ft Microsoft container,
data bottlenecks Chicago data center
Link Layer and LANs 6-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 and LANs 6-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 and LANs 6-86
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
Link Layer and LANs 6-87
Synthesis: a day in the life of a web
request
journey down protocol stack complete!
• application, transport, network, link
putting-it-all-together: synthesis!
• goal: identify, review, understand protocols
(at all layers) involved in seemingly simple
scenario: requesting www page
• scenario: student attaches laptop to campus
network, requests/receives www.google.com
school network
68.80.2.0/24
web page