Chapter_5
Chapter_5
Link Layer
Computer
Networking: A
Top Down
Approach
6th edition
Jim Kurose, Keith
Ross
Addison-Wesley
March 2012
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
21.5
ARP operation
21.6
ARP packet
21.7
An ARP request is broadcast;
an ARP reply is unicast.
21.8
Example
Solution
Figure 21.5 shows the ARP request and reply packets. Note
that the ARP data field in this case is 28 bytes, and that the
individual addresses do not fit in the 4-byte boundary. That
is why we do not show the regular 4-byte boundaries for
these
21.9
addresses.
an ARP request and reply
21.10
Addressing: routing to another
LAN
walkthrough: send datagram from A to B via R
focus on addressing – at IP (datagram) and MAC layer (frame)
assume A knows B’s IP address
assume A knows IP address of first hop router, R (how?)
assume A knows R’s MAC address (how?)
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
collision domain
switching: A-to-A’ and B- A’
to-B’ can transmit switch with six interfaces
simultaneously, without (1,2,3,4,5,6)
collisions
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
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
selectively send
location
on just one link known:
A A’
5 4 3
B’ C
A’ A
A’
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 4 6 8
… …
20 3 1 5
Link Layer 5-26
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)
Link Layer 5-27
MPLS versus IP paths
entry router (R4) can use different MPLS
routes to A based, e.g., on source address
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-28
MPLS forwarding tables
in out out
label label dest
interface
10 A 0 in out out
12 D 0 label label dest
interface
8 A 1 10 6 A 1
12 9 D 0
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 15 A 0
interface
8 6 A 0
Link Layer 5-29
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
router
ARP query broadcast,
(runs DHCP) received by router, which
replies with ARP reply
giving MAC address of
router interface
client now knows MAC
address of first hop router,
so can now send frame
containing DNS query
Link Layer 5-34
A day in the life… using DNSDNS
DNS UDP DNS server
DNS IP
DNS DNS DNS Eth
DNS UDP DNS Phy
DNS IP
DNS Eth
Phy
DNS
Comcast network
68.80.0.0/13
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)
demux’ed to DNS
to DNS server
server
DNS server replies to
client with IP address of
www.google.com
Link Layer 5-35
A day in the life…TCP connection
carrying HTTP
HTTP
HTTP
SYNACK
SYN TCP
SYNACK
SYN IP
SYNACK
SYN Eth
Phy