2. INTRODUCTION:
HDLC is a bit oriented code transparent Synchronous data
link layer protocol.
It is developed by International Standard Organization
(ISO).
Current standard for HDLC is ISO 13239.
It provides both connection-oriented and connectionless
service .
In HDLC, data is organized into a unit (called a frame) and
sent across a network to a destination that verifies its
successful arrival.
3. contd.
The HDLC protocol embeds information in a data frame that allows devices
to control data flow and correct errors.
HDLC supports both half-duplex and full-duplex communication over
point to point & multipoint link.
4. HDLC FRAME STRUCTURE
Flag Address Control Information FCS Flag
8 bits 8 or more bits 8 or 16 bits
Variable length, n
* 8 bits
16 or 32 bits 8 bits
Flag Address Control Information FCS Flag
8 bits 8 or more bits 8 or 16 bits
Variable length, n
* 8 bits
16 or 32 bits 8 bits
Flag Address Control Information FCS Flag
8 bits 8 or more bits 8 or 16 bits
Variable length, n
* 8 bits
16 or 32 bits 8 bits
5. HDLC FRAME FORMAT
Flag : 01111110 -indicates start and ending of frames.
FCS (Frame Check Sequence) : 16-bit CRC using generating polynomial
G(x) =x 16 + x 12+ x 5 + 1
Address Field:
➢ When a primary station is sending a frame, the field contains the
receiver identity.
➢ If a secondary station is sending the frame, the address field contains
the sender identity.
➢ In some cases, it contains a group or broadcast address.
6. Frame Types
● There are three different classes of frames used in HDLC
➢ Unnumbered frames, used in link setup and
disconnection, and hence do not contain ACK.
➢ Information frames, which carry actual information.
Such frames can piggyback ACK in case of ABM.
➢ Supervisory frames, which are used for error and flow
control purposes and hence contain send and receive
sequence numbers.
8. CONTROL FIELDS
In I-frames, N(s) is the sequence number of the frame being sent.
N(r) is the sequence number of the frame being expected.
The P/F bit, known as the poll/final bit, is used with
different meaning in different contexts.
➢ It is used to indicate polling, to indicate the final I- frame,
etc
9. 3 DIFFERENT CLASSES OF
FRAMES
Information frames, or I-frames, transport user data from the network
layer. In addition they can also include flow and error control
information piggybacked on data.
Unnumbered frames, or U-frames, are used for various miscellaneous
purposes, including link management. Some U-frames contain an
information field, depending on the type.
Supervisory Frames, or S-frames, are used for flow and error control
whenever piggybacking is impossible or inappropriate, such as when
a station does not have data to send. S-frames do not have
information fields.
10. contd.
There are four different supervisory frames
➢ SS=00, Receiver Ready (RR), N(R),ACKs all frames received up to and including the one
with sequence number N(R) - 1.
➢ SS=10, Receiver Not Ready (RNR), and N(R) has the same meaning as above
➢ SS=01, Reject; all frames with sequence number N(R) or higher are rejected, which
in turns ACKs frames with sequence number N(R) -1 or lower.
➢ SS=11, Selective Reject; the receive rejects the frame with sequence number N(R)
11. contd.
The unnumbered frames can be grouped into the following categories:
➢ Mode-setting commands and responses
➢ Recovery commands and responses
➢ Miscellaneous commands and responses