0% found this document useful (0 votes)
65 views4 pages

HDLC 1

HDLC is a bit-oriented protocol used for point-to-point and multipoint communication links that implements error control. It provides two transfer modes - normal response mode for unbalanced configurations and asynchronous balanced mode for balanced peer-to-peer configurations. HDLC frames contain flags, addresses, control fields, payload, and frame check sequences. The control field determines frame type and functionality, with different codes for information, supervisory, and unnumbered frames.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views4 pages

HDLC 1

HDLC is a bit-oriented protocol used for point-to-point and multipoint communication links that implements error control. It provides two transfer modes - normal response mode for unbalanced configurations and asynchronous balanced mode for balanced peer-to-peer configurations. HDLC frames contain flags, addresses, control fields, payload, and frame check sequences. The control field determines frame type and functionality, with different codes for information, supervisory, and unnumbered frames.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

HDLC (Bit Oriented Protocol)

High-level Data Link Control (HDLC) is a bit-oriented protocol for communication over
point-to-point and multipoint links. It implements the ARQ mechanisms.
Configurations and Transfer Modes: - HDLC provides two common transfer modes that
can be used in different configurations: normal response mode (NRM) and asynchronous
balanced mode (ABM).

• Normal Response Mode: - In normal response mode (NRM), the station


configuration is unbalanced. We have one primary station and multiple secondary
stations. A primary station can send commands; a secondary station can only
respond. The NRM is used for both point-to-point and multiple-point links.

• Asynchronous Response Mode (ARM): - ARM is a type of Unbalanced


Configuration in which primary station may initiate or start a data transfer as well
as secondary station can also start or initiate data transfer without any explicit
permission or command from primary station to transfer data. We usually have on
only one primary station and multiple secondary stations.

• Asynchronous balanced mode: - In asynchronous balanced mode (ABM), the


configuration is balanced. The link is point-to-point, and each station can function
as a primary and a secondary (acting as peers)
HDLC Frames: - Each frame in HDLC may contain up to six fields, a beginning flag field,
an address field, a control field, an information field, a frame check sequence (FCS) field,
and an ending flag field. In multiple-frame transmissions, the ending flag of one frame
can serve as the beginning flag of the next frame.
To provide the flexibility necessary to support all the options possible in the modes and
configurations, HDLC defines three types of frames:
• 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 serves as an envelope for the transmission of a different type of
message.

Fields of HDLC Frame are:

• Flag: - The flag is an 8-bit sequence that indicates the start and end of a frame.
The flag's bit pattern is 01111110.

• Address: - The second field of an HDLC frame contains the address of the secondary
station. If a primary station created the frame, it contains a to address. If a
secondary creates the frame, it contains a from address. An address field can be 1
byte or several bytes long, depending on the needs of the network. One byte can
identify up to 128 stations (l bit is used for another purpose). Larger networks
require multiple-byte address fields. If the address field is only 1 byte, the last bit is
always a 1. If the address is more than 1 byte, all bytes but the last one will end
with 0; only the last will end with 1. Ending each intermediate byte with 0 indicates
to the receiver that there are more address bytes to come.

• Control: - It consists of one or two bytes that carry flow and error control
information.

• Payload: - The data from the network layer is carried by the payload. Its length
varies depending on the network.
• FCS (Frame check sequence): - For error detection and error control, it's a 2-byte
or 4-byte frame check sequence. CRC is the standard code (cyclic redundancy code)
and is used for error detection and error control.

Control Fields of HDLC Frames


The control field determines the type of frame and defines its functionality.

Control Field for I-Frames: - I-frames are designed to carry user data from the network
layer. In addition, they can include flow and error control information (piggybacking). The
subfields in the control field are used to define these functions.

• The first bit defines the type. If the first bit of the control field is 0, this means the
frame is an I-frame.

• The next 3 bits, called N(S), define the sequence number of the frame. Note that with
3 bits, we can define a sequence number between 0 and 7; but in the extension
format, in which the control field is 2 bytes, this field is larger.

• The last 3 bits, called N(R), correspond to the acknowledgment number when
piggybacking is used.

• The single bit between N(S) and N(R) is called the P/F bit. The P/F field is a single
bit with a dual purpose. It has meaning only when it is set (bit = 1) and can mean
poll or final. It means poll when the frame is sent by a primary station to a secondary
(when the address field contains the address of the receiver). It means final when
the frame is sent by a secondary to a primary (when the address field contains the
address of the sender).

Control Field for S-Frames: - Supervisory frames are used for flow and error control
whenever piggybacking is either impossible or inappropriate (e.g., when the station either
has no data of its own to send or needs to send a command or response other than an
acknowledgment). S-frames do not have information fields.
• If the first 2 bits of the control field is 10, this means the frame is an S-frame.

• The last 3 bits, called N(R), corresponds to the acknowledgment number (ACK) or
negative acknowledgment number (NAK) depending on the type of S-frame.
• The 2 bits called code is used to define the type of S-frame itself. With 2 bits, we can
have four types of S-frames, as described below:

(i) Receive ready (RR): - If the value of the code subfield is 00, it is an RR
S-frame. This kind of frame acknowledges the receipt of a safe and
sound frame or group of frames. In this case, the value N(R) field defines
the acknowledgment number.

(ii) Receive not ready (RNR): - If the value of the code subfield is 10, it is
an RNR S-frame. This kind of frame is an RR frame with additional
functions. It acknowledges the receipt of a frame or group of frames,
and it announces that the receiver is busy and cannot receive more
frames. It acts as a kind of congestion control mechanism by asking the
sender to slow down. The value of N(R)is the acknowledgment number.

(iii) Reject (REJ): -If the value of the code subfield is 01, it is a REJ
S-frame. This is a NAK frame, but not like the one used for Selective
Repeat ARQ. It is a NAK that can be used in Go-Back-N ARQ to improve
the efficiency of the process by informing the sender, before the sender
time expires, that the last frame is lost or damaged. The value of N(R)
is the negative acknowledgment number.

(iv) Selective reject (SREJ): - If the value of the code subfield is 11,
it is an SREJ S-frame. This is a NAK frame used in Selective Repeat
ARQ. Note that the HDLC Protocol uses the term selective reject instead
of selective repeat. The value of N(R) is the negative acknowledgment
number.

Control Field for U-Frames: - Unnumbered frames are used to exchange session
management and control information between connected devices. Unlike S-frames, U-
frames contain an information field, but one used for system management information,
not user data. As with S-frames, however, much of the information carried by U-frames is
contained in codes included in the control field.
U-frame codes are divided into two sections:

• a 2-bit prefix before the P/F bit and a 3-bit suffix after the P/F bit. Together, these
two segments (5 bits) can be used to create up to 32 different types of U-frames.
Some of the more common types are shown in the following table.

Features of HDLC Protocol

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


• This protocol is used for point-to-point as well as multipoint link access.
• HDLC is one of the most common protocols of the data link layer.
• HDLC is a bit-oriented protocol.
• This protocol implements error control as well as flow control.

You might also like