HDLC
(High-level data link control) is a standard published
by ISO that has achieved wide usage throughout the world.
The standard provides for many functions and covers
a wide range of application.
It fits our definition of a Continuous ARQ (sliding-window)
protocol. HDLC has several options which make certain
parts of the protocol more of a hybrid between the pure
primary/secondary and peer/peer schemes, because they
diminish the use of polling commands and eliminate select
commands. Further explanation of these option follows.
This section addresses the main functions of the superset
HDLC. It also covers some of the more important subsets,
such as SDLC, LAP, LAPB, LAPD, LAPX, LAPM, and LLC.
LAPD and LAPX. The reader is encouraged to check with
specific vendors for their actual implementation of
the HDLC structure. Most vendors use HDLC, but they
may not implement their products in exact accordance
with the HDLC specification.
This material provides considerable detail on bit-oriented
protocols. Those readers wishing an overview can skip
to the section entitled "The HDLC Transmission Process."
Structure of
a HDLC encapsulated packet
HDLC OPTIONS:
HDLC provides for a number
of options in its implementation. It supports half-duplex
and full-duplex transmission, point-to-point and multipoint
configuration, as well as switched or non-switched channels.
An HDLC station is classified as one of three types:
The primary station is in control of the data link
(channel). This station transmits command frames to
the secondary station on the channel. In turn, it
receives response frames from those stations. If the
link is multipoint, the primary station is responsible
for maintaining a separate session with each station
attached to the link.
The secondary station acts as a slave to the primary
station. It responds to the commands from the primary
station in the form of responses. It maintains only
one session, that being with the primary station.
It has no responsibility for control of the link.
The combined station transmits both commands and
responses and receives both commands and responses
from another combined station. It maintains a session
with one other combined station.
Stations communicate with each other through one
of three logical states:
The logically disconnected state (LDS)
prohibits a station from transmitting or receiving
information. If the secondary station is under a normal
disconnected mode, it can transmit a frame only
after receiving explicit permission from the primary
station to do so. If the station is under an asynchronous
disconnected mode, the secondary station may
initiate a transmission without receiving explicit
permission to do so, but the frame must be a single
frame, indicating the secondary station status.
The initialization state (IS) is defined by specific
vendors and is outside the standards of HDLC.
Asynchronous response mode (ARM) (hybrid
classification) allows a secondary station to initiate
transmission without receiving explicit permission
from the primary station (usually when the channel
is idle.) The transmission may contain control information
reflecting status changes of the secondary station.
ARM can decrease overhead because the secondary station
does not need a pool sequence in order to send data.
An unbalanced configuration provides for
one primary station and one or more secondary stations
to operate as point-to-point or multipoint, half duplex
or full-duplex, or switched or non-switched. The configuration
is called unbalanced because the primary station is
responsible for controlling each secondary station
and for establishing the mode - setting commands.
A balanced configuration
consists of two combined stations connected point to
- point only, half-duplex or full duplex, switched or
non-switched. The combined stations have equal status
on the channel and may send unsolicited traffic to each
other. Each station has equal responsibility for link
control.
HDLC Control Field
The actual format of the control field
(information, supervisory, or unnumbered) determines
how the field is coded and used. The simplest format
is the information format. The actual contents of the
control field for this format are shown in above illustration
The information frame control field contains two sequence
number. The N(S) (send sequence) number indicates the
sequence number associated with transmitted frame. The
N(R) (receive sequence) number indicates the next sequence
number that sequence number that is expected at the
receiving site. The N(R) serves as an acknowledgment
of the previous frames. For example, if the N(R) field
was set to 4, the station, upon receiving N(R) = 4,
would understand that its transmissions of frames 0,
1, 2, and 3 had been received correctly, and that the
station with which it is communicating is expecting
the next frame to have a send sequence number of 4 in
it. The N(R) field provides for inclusive acknowledgment;
that is, the N(R) of 4 could inclusively acknowledge
more than one message that had preceded it. The concept
of send [V(S)] and receive state [V(R)] variable are
used with the HDLC N(S) and N(R) fields. HDLC also uses
the continuous ARQ(sliding-window) protocols.
The fifth bit position, the P/F or poll/final bit, is
recognized only when set to 1 and is used by the primary
and secondary stations to provide the following functions:
The primary station uses the P bit to solicit a
status response from a secondary station. The P bit
also can signify a poll.
The secondary station responds to a P bit with data
or a status frame and an F bit. The F bit also can
signify the end of transmission from the secondary
station under normal response mode (NRM)
HDLC Commands and Responses
The P/F bit is termed the P bit when
used by the primary station and an F bit when used by
the secondary. Only one P bit (awaiting an F bit response)
should be outstanding at any time on the link. A P bit
set to 1 can be used as a checkpoint. That is P = 1
says, "Respond to me, because I want to know your status."
Checkpoints are quite important in all forms of automation.