> Cisco > CCNA
> HDLC Overview
HDLC Protocol Overview
HDLC (High-level Data Link Control) is a group of
protocols documented in ISO 3309 for transmitting synchronous data between
serial links (Point-to-Point nodes). HDLC organizes data into a frame before
transmission. HDLC protocol operates within Layer 2 (data link layer) of the OSI
HDLC Frame Structure:
The HDLC frame consists of Flag, Address, Control, Data, and CRC
fields as shown. The bit length of each field is given below:
Flag (both opening and closing flags): 8 bits (01111110
or 7E hex)
Address: It is normally 8 or 16 bits in length. A leading 'zero' bit (MSB)
indicates a unicast message; the remaining bits provide the destination node
address. A leading 'one' bit (MSB) location indicates multicast message, the
remaining bits provide the group address.
Control: The field is 8 bits, or 16 bits wide and indicates whether the
frame is a Control or Data frame. The field contains sequence number (hdlc
frames are numbered to ensure delivery), poll (you need to reply) and
final (indicating that this is the last frame) bits.
Data (Payload): This is the information that is carried from node to
node. This is a variable field. Sometimes padded with extra bits to provide
FCS (Frame Check Sequence) or CRC (Cyclic Redundancy Code): It is
16 bits wide. Frame Check Sequence is used to verify the data
integrity. If the FCS fails, the frame is discarded.
The polynomial used for 16 bit
FCS [16 bits] = X16 + X12 + X5 + 1
Closing Flag: It is same as Opening Flag.
If no prior care is taken, it is possible that flag character
(01111110) is present in data field. If present, then it will wrongly be
interpreted as end of frame. To avoid this ambiguity, a transmitter will force a '0' bit after
encountering 5 continuous 1s. At the receiving end, the receiver drops the '0'
bit when encountered with 5 continuous 1s, and continues with the next bit. This
way, the flag pattern (01111110) is avoided in the data field.
Normally, synchronous links transmit all the time. But, useful
information may not be present at all times. Idle flags  may be sent
to fill the gap between useful frames. Alternatively, a series of flags
 may be transmitted to fill gaps between frames instead of
transmitting idle flags . Continuous transmission of signals is
required to keep both the transmitting and receiving nodes synchronized.
PPP and SLIP use a subnet of HDLC protocol. ISDN's D channel
uses a modified version of HDLC. Also, note that Cisco routers' uses HDLC as
default serial link encapsulation protocol.
HDLC Frame Types
The control field in HDLC is also used to indicate the frame type. There are
three types of frames supported by HDLC. These are:
I Frames: These are information frames, and contain user data
S Frames: These are supervisory frames, and contain contain commands and
U Frames: These are un-numbered frames, and typically contain commands and
I Frames are sequentially numbered, carry user data, poll and final bits, and
S Frames performs any retransmission requests, and other supervisory
U Frames can be used to initialize