Hurry! Try our new Interactive Courses for FREE. 🥳   🚀

HDLC Protocol

In this tutorial, we will be covering the HDLC protocol in the data link layer of the OSI Model.

HDLC (High-Level Data Link Control) is a bit-oriented protocol that is used for communication over the point-to-point and multipoint links. This protocol implements the mechanism of ARQ(Automatic Repeat Request). With the help of the HDLC protocol,full-duplex communication is possible.

HDLC is the most widely used protocol and offers reliability, efficiency, and a high level of Flexibility.

In order to make the HDLC protocol applicable for various network configurations, there are three types of stations and these are as follows:

  • Primary Station
    This station mainly looks after data like management. In the case of the communication between the primary and secondary station; it is the responsibility of the primary station to connect and disconnect the data link. The frames issued by the primary station are commonly known as commands.

  • Secondary Station
    The secondary station operates under the control of the primary station. The Frames issued by the secondary stations are commonly known as responses.

  • Combined Station
    The combined station acts as both Primary stations as well as Secondary stations. The combined station issues both commands as well as responses.

Transfer Modes in HDLC

The HDLC protocol offers two modes of transfer that mainly can be used in different configurations. These are as follows:

  • Normal Response Mode(NRM)

  • Asynchronous Balance Mode(ABM)

Let us now discuss both these modes one by one:

1. Normal Response Mode(NRM)

In this mode, the configuration of the station is unbalanced. There are one primary station and multiple secondary stations. Where the primary station can send the commands and the secondary station can only respond.

This mode is used for both point-to-point as well as multiple-point links.

2. Asynchronous Balance Mode(ABM)

In this mode, the configuration of the station is balanced. In this mode, the link is point-to-point, and each station can function as a primary and as secondary.

Asynchronous Balance mode(ABM) is a commonly used mode today.

HDLC Frames

In order to provide the flexibility that is necessary to support all the options possible in the modes and Configurations that are just described above. There are three types of frames defined in the HDLC:

  • Information Frames(I-frames)
    These frames are used to transport the user data and the control information that is related to the user data. If the first bit of the control field is 0 then it is identified as I-frame.

  • Supervisory Frames(S-frames)
    These frames are only used to transport the control information. If the first two bits of the control field are 1 and 0 then the frame is identified as S-frame

  • Unnumbered Frames(U-Frames)
    These frames are mainly reserved for system management. These frames are used for exchanging control information between the communicating devices.

Each type of frame mainly serves as an envelope for the transmission of a different type of message.

Frame Format

There are up to six fields in each HDLC frame. There is a beginning flag field, the address field then, a control field, an information field, a frame check sequence field(FCS), and an ending field.

In the case of the multiple-frame transmission, the ending flag of the one frame acts as the beginning flag of the next frame.

Let us take a look at different HDLC frames:

Now its time to discuss the fields and the use of fields in different frame types:

1. Flag Field

This field of the HDLC frame is mainly a sequence of 8-bit having the bit pattern 01111110 and it is used to identify the beginning and end of the frame. The flag field mainly serves as a synchronization pattern for the receiver.

2. Address Field

It is the second field of the HDLC frame and it mainly contains the address of the secondary station. This field can be 1 byte or several bytes long which mainly depends upon the need of the network. In case if the frame is sent by the primary station, then this field contains the address(es) of the secondary stations. If the frame is sent by the secondary station, then this field contains the address of the primary station.

3. Control Field

This is the third field of the HDLC frame and it is a 1 or 2-byte segment of the frame and is mainly used for flow control and error control. Bits interpretation in this field mainly depends upon the type of the frame.

4. Information Field

This field of the HDLC frame contains the user's data from the network layer or the management information. The length of this field varies from one network to another.

5. FCS Field

FCS means Frame check sequence and it is the error detection field in the HDLC protocol. There is a 16 bit CRC code for error detection.

Features of HDLC Protocol

Given below are some of the features of the HDLC protocol:

1.This protocol uses bits to stuff flags occurring in the data.

2.This protocol is used for point-to-point as well as multipoint link access.

3.HDLC is one of the most common protocols of the data link layer.

4.HDLC is a bit-oriented protocol.

5.This protocol implements error control as well as flow control.