Chapter_6_The Data Link Layer_2
Chapter_6_The Data Link Layer_2
DATA Link
Layer
Computer
Networking: A
Top Down
Approach
6th edition
Jim Kurose, Keith
Ross
Addison-Wesley
March 2012
A parity bit is
added to every
data unit so that
the total number
of 1s is even (or
odd for odd-
parity).
5-15
MAC Protocols
6-slot 6-slot
frame frame
1 3 4 1 3 4
3G Cellular
Networks
data
Link Layer 5-24
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
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.22
74-29-9C-E8-FF-
29-BD-D2-C7-56-
4
55
222.222.222.22 2A
1A-23-F9-CD-06-
0
9B
111.111.111.112 111.111.111.110 222.222.222.22
CC-49-DE-D0-AB- E6-E9-00-17-BB- 88-B2-2F-54-1A-
1
7D 4B 0F
A B
R
111.111.111.111
222.222.222.22
74-29-9C-E8-FF-
29-BD-D2-C7-56-
4
55
222.222.222.22 2A
1A-23-F9-CD-06-
0
9B
111.111.111.112 111.111.111.110 222.222.222.22
CC-49-DE-D0-AB- E6-E9-00-17-BB- 88-B2-2F-54-1A-
1
7D 4B 0F
A B
R
111.111.111.111
222.222.222.22
74-29-9C-E8-FF-
29-BD-D2-C7-56-
4
55
222.222.222.22 2A
1A-23-F9-CD-06-
0
9B
111.111.111.112 111.111.111.110 222.222.222.22
CC-49-DE-D0-AB- E6-E9-00-17-BB- 88-B2-2F-54-1A-
1
7D 4B 0F
A B
R
111.111.111.111
222.222.222.22
74-29-9C-E8-FF-
29-BD-D2-C7-56-
4
55
222.222.222.22 2A
1A-23-F9-CD-06-
0
9B
111.111.111.112 111.111.111.110 222.222.222.22
CC-49-DE-D0-AB- E6-E9-00-17-BB- 88-B2-2F-54-1A-
1
7D 4B 0F
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 B
C’
through which
interfaces 1
6 2
▪ when frame
received, switch 5 4 3
“learns” location
of sender: B’ C
incoming LAN
segment
A’
▪ records
sender/locationMAC addr interface TTL
pair in switch table Switch table
A 1 60
(initially empty)
A A A’
❖ frame destination,
B
A’, locaton flo C’
unknown:
❖ destination A od 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 Computer
define multiple virtual Engineering
(VLAN ports 1-8)
Science
(VLAN ports 9-15)
LANS over single … operates as multiple virtual
physical LAN switches
infrastructure. 1 7 9 15
2 8 10 16
… …
Electrical Computer
Engineering Science
(VLAN ports 1-8) (VLAN ports 9-16)
Link Layer 5-59
Port-based VLAN
router
❖ traffic isolation: frames
to/from ports 1-8 can
only reach ports 1-8
▪ can also define VLAN based
on MAC addresses of
endpoints, rather than 1 7 9 15
switch port 2 8 10 16
❖ dynamic membership:
ports can be … …
dynamically assigned Electrical Computer
among VLANs Engineering
(VLAN ports 1-8)
Science
(VLAN ports 9-15)
❖ forwarding between VLANS:
done via routing (just as with
separate switches)
▪ in practice vendors sell
combined switches plus routers
2 8 10 16 2 4 6 8
… …
type
dest. source
preamble
address address
data (payload) CRC 802.1Q frame
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)
❖ demux’ed to DNS to DNS
server
server
❖ DNS server replies to
client with IP address
Link Layer 5-69
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