Lecture 7 - 8
Lecture 7 - 8
4: Link Layer
1. Introduction
• Framing
• Error detection
• Error control
• Flow control
• Link Management
• Addressing
1
2. Link Layer Functions
Framing
1. Character count
2. Starting and ending characters.
3. Starting and ending flags, with bit stuffing. Each
frame begins and ends with a special bit pattern,
namely 0 111111 0.
Data to send:
00101010110111100000111011001010
After Framing:
011111100010101011011110000011101100101001111110
2
However, this bit pattern may appear inside the frames (in
the data).
How?
Bit Stuffing
Data to send:
00101010110111111000111011001010
Frame sent:
0111111000101010110111110100011101100101001111110
3
Examples:
4
Link Configuration
When there are only two stations à the link is called point-
to-point.
Error Detection
As seen in Chapter 3.
Flow Control
As seen in Chapter 3.
Error Control
As seen in Chapter 3.
5
3. HDLC (High-level Data Link Control )
HDLC is developed by ISO as the protocol of Layer 2.
Command
Primary
Response
Secondary Secondary
Commands
Combined Combined
Responses
6
3.2 Characteristics of HDLC
7
3.3 Frame Format
Flag: Flag field delimits the frame at both ends with the
unique pattern 01111110.
8
The contents of the control field for these three kinds of
frames are shown below:
9
3.4 Operations
Information Frames
The I-frame also contains a Poll/final (P/F) bit. A Poll bit for
commands and a Final bit (from secondary) for response.
Supervisory Frames
10
the sender to send again, this RNR should be cleared
and this is done when the receiver sends RR after
RNR.
Unnumbered Frames
11
Examples of Operations
12
More seen in class …
13
3.5 HDLC Commands and Responses
Supervisory (S)
Receive Ready (RR) C/R Positive Acknowledgment;
ready to receive I-frame
Receiver Not Ready (RNR) C/R Positive Acknowledgment; not ready to
receive I-frame
Reject (REJ) C/R Negative Acknowledgment; Go-Back N
Selective Reject (SREJ) C/R Negative Acknowledgment;
Selective-Repeat
Unnumbered (U)
Set Normal Response/ C Set mode; extended = 2 octet control
Extended mode (SNRM/SNRME) field
Set Asynchronous Response/ C Set mode; extended = 2 octet control
Extended mode (SARM/SARME) field
Set Asynchronous Balanced/ C Set mode; extended = 2 octet control
Extended mode (SABM/SABME) field
14
4. Other Link layer protocols
Link Access Procedure, Balanced (LAPB)
• Part of X.25 (ITU-T)
• Subset of HDLC - ABM
• Point to point link between system and packet switching
network node
Frame Relay
• Streamlined capability over high-speed packet switched
networks
• Used in place of X.25
• Uses Link Access Procedure for Frame-Mode Bearer
Services (LAPF)
• Two protocols: Control - similar to HDLC and Core -
subset of control
• ABM
• 7-bit sequence numbers
• 16-bit CRC
• 2, 3 or 4 octet address field
o Data link connection identifier (DLCI)
o Identifies logical connection
15