High-Level Data Link Control (HDLC)
Vicente González Ruiz
September 12, 2016
Contents
First data link protocol for WAN (1979).
HDLC is a synchronous Data Link layer bit-oriented protocol developed by the
International Organization for Standardization (ISO). The current standard for
HDLC is ISO 13239. HDLC was developed from the Synchronous Data Link Control
(SDLC) standard proposed in the 1970s. HDLC provides both connection-oriented
and connectionless service.
HDLC uses synchronous serial transmission to provide error-free communication
between two points. HDLC defines a Layer 2 framing structure that allows for flow
control and error control through the use of acknowledgments. Each frame has the
same format, whether it is a data frame or a control frame.
When you want to transmit frames over synchronous or asynchronous links, you
must remember that those links have no mechanism to mark the beginnings or ends
of frames. HDLC uses a frame delimiter, or flag, to mark the beginning and the end
of each frame.
HDLC-Frame {
01111110 /* Frame delimiter (mark the beginnings or ends
or frames). */
HDLC-Header {
Address (1-2B) /* a specific address, a group address,
or a broadcast address. */
Control (1B) /* Type of frame (control information or data). */
Protocol (1B) /* Only used in Cisco HDLC. Identify the network
layer protocol (IP, IPX, etc.) of the
encapsulated data. */
}
Data
FCS (2-4B) /* Frame Check Sequence (a CRC). */
01111110
}
Because there is a likelihood that this pattern occurs in the actual data, the
sending HDLC system always inserts a 0 bit after every five 1s in the data field, so in
practice the flag sequence can only occur at the frame ends. The receiving system
strips out the inserted bits.
The control field uses three different formats, depending on the type of HDLC
frame used:
- Information (I) frame: I-frames carry upper layer information and some
control information. This frame sends and receives sequence numbers, and
the poll final (P/F) bit performs flow and error control. The send sequence
number refers to the number of the frame to be sent next. The receive
sequence number provides the number of the frame to be received next.
Both sender and receiver maintain send and receive sequence numbers. A
primary station uses the P/F bit to tell the secondary whether it requires
an immediate response. A secondary station uses the P/F bit to tell the
primary whether the current frame is the last in its current response.
- Supervisory (S) frame: S-frames provide control information. An
S-frame can request and suspend transmission, report on status, and
acknowledge receipt of I-frames. S-frames do not have an information field.
- Unnumbered (U) frame: U-frames support control purposes and are
not sequenced. A U-frame can be used to initialize secondaries. Depending
on the function of the U-frame, its control field is 1 or 2 bytes. Some
U-frames have an information field.