High –Level Data Link Protocol (HDLC)
It is a data link layer protocol used for half duplex and full duplex transmission mode and
communicates both over point-to-point and multipoint links.
Basic Characteristics
To be used for a variety of applications HDLC defines:
• Stations
• Link Configuration or arrangement of links
• Transfer Mode
STATIONS
HDLC define 3 types of station
1. Primary Station or Computer
Control operations of the link such as initiating (starting) data transfer,
transmission of user and control data and termination of link
Frames issued by primary are called commands
2. Secondary Station or Computer
Works under primary station or computer
Frames issued by secondary are called responses
3. Combined Station
Combines the features of primary and secondary
A combined station may issue both commands and responses
LINK CONFIGURATIONS
The twp link configurations are:
1. Unbalanced Configuration
Consists of one primary station and one or more secondary station
Supports both half and full duplex transmission mode
2. Balanced Configuration
Consists of two combined stations
Supports both half and full duplex transmission mode
TRANSFER MODE
The three data transfer modes are:
1. Normal Response Model (NRM)
If arrangement of links is unbalanced then NRM is used
Primary station starts data transfer to a secondary but a secondary
station may only transmit data in response to a command from a primary
station or computer
Supports point-to-point, multipoint, half and full duplex transmission mode
2. Asynchronous Balanced Mode (ABM)
Used with a balanced configuration
Any combined station may initiate (start) data transfer without receiving
permission from other combined station
Supports point-to-point, half and full duplex transmission mode
HDLC FRAME FORMAT
HDLC frame consists of 6 fields starting flag filed, address, control, information, FCS
(frame check sequence) and ending flag field
Flag
Used to identify the beginning and end of a frame.
It uses bit pattern of 01111110
Address
If primary station created a frame, the address field will contain address of
secondary station
If secondary station created a frame it will contain primary station address
Information Field
Contains user data from network layer
Length of this field can vary from network to network
Control Field
Used for flow control and error control
Data Flow: enables a receiver to adjust the flow of data from a sender so that
receiver’s buffer don not overflow
Error Control: achieved by retransmission of damaged frames that have not been
acknowledged or the other side requests for retransmission
Frame Check Sequence
It contains error detecting code by applying CRC on all the bits of the frame
except flag field that is flag field bits are not used when generating an error
detection code.
HDLC FRAME TYPES
It defines 3 different types of frames
Supervisory Frames (S-Frames):
Unnumbered Frames (U-Frames): used for connection established, connection
termination
Information Frames or I-Frames
used for transporting user data
first two bits of control filed is 00
N(S): next 3 bits define sequence number of the frame to be sent. It must start
with 0 i.e. 000
P/F Bit (Poll/Final):
o single bit with two purposes
o Poll: when frame is sent by primary station to secondary
o Final: when frame is sent by secondary to primary
o It is always in the set state that is 1
N(R): next 3 bits contains acknowledgement value that frames of particular
sequence have been received undamaged. And that frame of next sequence
number should be send as receiver’s buffer have free space
Supervisory Frames or S-Frames
used for acknowledgement, negative acknowledgement and flow control
first two bits of control field is10
contains no user data
next 2 bits called code define the type of S-frame to be used
P/F: same as that of I-frame
N(R): last 3 bits are used for acknowledgement (ACK) and negative
acknowledgement (NAK)
S-Frames have 4 different types of frames
1. Receive Ready (RR S - frame)
Value of code subfield is 00
Acknowledges receipt of a frame or group of frames
Also called acknowledgement frame
2. Receive Not Ready (RNR S - Frame )
Value of code subfield is 10
Acknowledges receipt of frame just as RR and
Announces that receiver is busy and can not receive any more
frames
3. Reject (REJ S-Frame)
Value of code subfield is 01
Indicates that lat I-frame received has been rejected as data was
corrupt and request re-transmission of all I-frames beginning with
N(R) that is those frames whose acknowledgement has already
been sent
Value of N (R) = negative acknowledgement
4. Selective Reject (SREJ S-Frame)
Value of code subfield is 11
Request retransmission of a single I-frame only
Value of N(R)= negative acknowledgement
Unnumbered Frames or U-Frames
first two bits of control field is11
used for connection establishment
connection termination
which transfer mode to use i.e. NRM or ABM
other link control information
EXAMPLE