Chapter - 6 - Datalink Layer
Chapter - 6 - Datalink Layer
Computer
Networking: A Top
Down Approach
6th edition
Jim Kurose, Keith Ross
Addison-Wesley
March 2012
5-4
Link layer services
❖ Reliable delivery. When a link-layer protocol provides
reliable delivery services, it guarantees to move each
network-layer datagram across the link without error.
▪ Similar to a transport-layer reliable delivery service, a link-
layer reliable delivery service can be achieved with
acknowledgments and retransmissions.
▪ A link-layer reliable delivery service is often used for links
prone to high error rates, such as a wireless link to correct an
error locally – on the link where the error occurs.
❖ Error detection & correction. The link-layer hardware in
a receiving node can incorrectly interchange bits due to
signal attenuation and electromagnetic noise.
▪ Link-layer protocols detect such bit errors by having the
transmitting node include error-detection bits in the frame, and
having the receiving node perform an error check.
5-5
Link layer services
Link layer services
MAC Sublayer
Data encapsulation
❖ Frame assembly before transmission and frame
disassembly upon reception of a frame.
❖ MAC layer adds a header and trailer to the packet
❖ Provides three primary functions:
▪ Frame delimiting – Identifies a group of bits that comprise a
frame, synchronization
▪ Addressing –adds a physical address (MAC address) that
enables a frame to be delivered to a destination node.
▪ Error detection –adds a trailer with a cyclic redundancy
check (CRC) of the frame contents.
Framing
Link layer services
❖ flow control:
▪ nodes on each side of a link have a limited amount of packet
buffering capacity
▪ pacing between adjacent sending and receiving nodes
❖ error detection:
▪ errors caused by signal attenuation, noise.
▪ receiver detects presence of errors:
• signals sender for retransmission or drops frame
❖ error correction:
▪ receiver identifies and corrects bit error(s) without resorting to
retransmission
❖ half-duplex and full-duplex
▪ with half duplex, nodes at both ends of link can transmit, but not at
same time
layer host
bus
❖ attaches into host’s system link
controller (e.g., PCI)
buses physical
physical
❖ combination of hardware, transmission
software, firmware
network adapter
card
11
Types of Errors
Single bit
An error occurs
Error
when a bit is altered
between
transmission and Burst Error – 2 or more bits changed
reception
• Binary 1 is
transmitted and
binary 0 is received
• Binary 0 is
transmitted and
binary 1 is received
5-12
Error Detection Process
5-16
MAC Protocols
5-19
CONTENTION
Bursty traffic is characterized by short, sporadic
transmissions; interactive terminal-host traffic.
For bursty traffic, contention techniques are usually
appropriate. With these techniques, no control is
exercised to determine whose turn it is;
All stations contend for time in a way that can be rough
and tumble. These techniques are distributed in nature.
Their principal advantage is that they are simple to
implement and, under light to moderate load, efficient.
For some of these techniques, however, performance
tends to collapse under heavy load.
Although both centralized and distributed reservation
techniques have been implemented in some LANs, R-R
and contention techniques are more common.
5-20
Channel partitioning MAC protocols
TDMA: Time Division Multiple Access
❖ each station gets fixed length slot
❖ unused slots go idle
6-slot 6-slot
frame frame
1 3 4 1 3 4
3G Cellular
Networks
data
Link Layer 5-28
Link layer, LANs: outline
5.1 introduction, services 5.5 link virtualization:
5.2 error detection, MPLS
correction 5.6 data center networking
5.3 multiple access 5.7 a day in the life of a
protocols web request
5.4 LANs
▪ addressing, ARP
▪ Ethernet
▪ switches
▪ VLANS
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
0C-C4-11-6F-E3-98
137.196.7.8
8
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
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
5-51
Link layer, LANs: outline
5.1 introduction, services 5.7 a day in the life of a
5.2 error detection, web request
correction
5.3 multiple access
protocols
5.4 LANs
▪ addressing, ARP
▪ Ethernet
▪ switches
▪ VLANS
A A A’
❖ A switch learns which
hosts can be reached B
C’
through which interfaces
▪ when frame received, 6 1 2
switch “learns”
location of sender: 5 4 3
incoming LAN segment
▪ records sender/location B’ C
pair in switch table
A’
A A A’
❖ frame destination, A’,
B
location unknown: flood C’
1
❖ destination A location 6 2
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
5-63
VLANs: motivation
❖ Managing users. If CS user
moves office to SE, but
wants to connect to CS
switch, the physical
cabling must be changed to
connect the user to a
different switch.
❖ Fortunately, each of these
Computer
Computer difficulties can be handled
Science Software
Engineering
Engineering by a switch that supports
VLANs
switch(es) supporting
VLAN capabilities can … …
be configured to Software Engineering Computer
define multiple virtual (VLAN ports 1-8) Science
(VLAN ports 9-15)
LANS over single … operates as multiple virtual switches
physical LAN
infrastructure. 1 7 9 15
2 8 10 16
… …
2 8 10 16
1 7 9 15 1 3 5 7
2 8 10 16 2 4 6 8
… …
5-68
802.1Q VLAN frame format
type
type
dest. source
preamble
address address
data (payload) CRC 802.1Q frame
school network
68.80.2.0/24
web
page