You are on page 1of 20

DATA PRO Data Networking 2780 1

Standards

.'
\' ~

ISO
High-Level Data
Link Control (HDLC)

In this ..port: Oatapro Summary

Modes of Operation .............. 2 The International Organization for Standardization (ISO) Technical Committee 97 (TC 97,
Computers and Information Processing) developed the High-Level Data Link Control
Frame Structure ....•........•..... 2 (HOLC) protocol. HOLC addresses the physical connection standards for layer two of the
International Organization for Standardization's (ISO's) Open Systems Interconnection
Control Field (OSI) model. It permits synchronous, bit-oriented, independent data transmission. It pro-
Procedures .................•.....•... 4 vides simplex, half-duplex, or full-duplex communication. Network configurations may be
point-to-point or multipoint over switched or nonswitched facilities. HOLC is approved as
Additional CommandsJ an international standard.
Responses .................•......... 4

Note: The subject of this


report is a mature stan-
dard. No significant de- HDLC covers a wide array of applications. It station through select commands. The second
velopments are antici- permits simplex, half-duplex, or full-duplex case is when the primary station controls the sec-
pated, but Datapro will transmission, configured point-to-point or multi- ondary station through poll commands.
provide a new report point, over switched or nonswitched facilities. It 1\vo terms are used to describe the data flow.
when the topic warrants does not define a single system and should not The data source is the station currently transmit-
it. be regarded as a specification for a data commu- ting information; the data sink is the station ac-
nications system. It is intended to provide a high cepting the information. Information always
degree of compatibility between data terminal flows from the data source to the data sink; ac-
equipment (DTE). knowledgments flow in the opposite direction.
Several protocols, such as Unisys' Burroughs
Data Link Control (BDLC), IBM's Synchrpnous
Data Link Control (SDLC), and Unisys' Sperry
Classes of Procedures!
(Univac) Universal Data Link Control (UDLC), Configurations
are based on the HDLC concept. HDLC's capa- A class of procedures is the basic repertoire of
bility of transmitting up to 127 frames before an steps to which a station conforms in order to
acknowledgment is required makes it possible to communicate. HDLC defines two classes of pro-
transmit information via satellite, as well as via cedures and associated station configurations:
terrestrial facilities. balanced and unbalanced. Table 1 outlines the
basic repertoire of commands and responses for
Stations each mode.
In the unbalanced class of procedures, the
HDLC defines two types of stations on the data configuration consists of one primary station and
link. The station assuming the responsibility for one or more secondary stations. The primary sta-
the organization of data flow and for link-level tion's responsibilities include setting up and dis-
error recovery functions is the primary station. connecting the link; sending information frames,
All other stations on the link are secondary sta- supervisory, and unnumbered commands; and
tions. The primary station transmits command checking received frames. The secondary station
frames, and the secondary stations transmit re- checks received frames and sends supervisory
sponse frames. information, as well as unnumbered responses.
For data transfer, HDLC considers two cases The communications link may be half or full du-
of data link control. The first case is when the plex, switched or nons witched. Control proce-
primary station performs the primary data link dures operate in either normal or asynchronous
control functions by controlling the secondary

@ 1993 McGraw-Hili, Incorporated. Reproduction Prohibited. JULY 1993


Datapro Information Services Group. Delran NJ 08075 USA
2 2780 ISO Data Networking
Hlgh....vel Data
Standards Link Control (HDLCI

are sent with the local station address. The combined station at
Table 1. Basic Repertoire of Commands either end may initiate link connection or disconnection.
and Responses* Under either type of procedure, the data link exists in one of
two channel states. The active condition occurs when the primary
or the secondary station is actively transmitting a frame, abort
sequence, or interframe time flIl. In this state, the right to continue
Balanced Mode
transmission is reserved. In the idle state, the station has termi-
nated transmission. The idle state is characterized by the trans-
Commands Responses
mission of at least 15 consecutive one bits.
I
RR RR Modes of Operation
RNR RNR 1\\'0 primary modes of operation are defined in HDLC. In the
SABM** CMDR normal response mode (NRM), the secondary station may ini-
DISC UA tiate transmission only after receiving permission from the pri-
mary station; upon receiving permission, the secondary station
DM issues a response transmission. The last frame of this transmis-
sion is indicated explicitly by the secondary station. After com-
pleting its transmission, the secondary station must wait until it
Unbalanced Normal Mode
again receives permission to transmit from the primary station.
Primary Station Commands Secondary Station
In asynchronous response mode (ARM), the secondary sta-
Responses tion may initiate transmission without permission from the pri-
mary station. The frames transmitted by the secondary station
I I during ARM may be used to transfer information and/or to indi-
cate status changes.
RR RR Three secondary modes of operation are also defined in
RNR RNR HDLC. These include two disconnected modes, which are pro-
SNRM DMDR vided to prevent a secondary station from appearing operational
DISC UA during unusual situations or exception conditions. Normal dis-
connected mode (NDM) logically disconnects the station from
DM the link; while in NOM, the secondary station remains ready to
respond in normal response mode. The same situation exists dur-
Unbalanced Asynchronous Mode ing asynchronous disconnected mode (ADM), except that the
secondary station remains ready in asynchronous response mode.
Primary Station Commands Secondary Station The third secondary mode is the initialization mode (1M).
Responses During 1M, the link control of the secondary station is initialized
or regenerated, or other parameters may be exchanged. 1M is in-
I voked when the primary station detects that the secondary station
is not operating normally or that the link control program needs to
RR RR be upgraded at the remote station. 1M may also be requested by
RNR RNR the secondary station for the same reasons.
SARM CMDR
DISC UA Frame Structure
DM
The HDLC frame structure consists of FLAG-ADDRESS-
'See text for explanation of mnemonics. CONTROL-INFORMATION (Optional)-FRAME CHECK
"Set Asynchronous Balanced Mode-used to set up the SEQUENCE-FLAG.
connection. All frames must start and end with a Flag that consists of the
bit sequence 01111110. All stations attached to the data link con-
response mode. Only one secondary station at a time can be
tinuously search for this sequence. In this manner, the flag is used
placed in asynchronous response mode.
for frame synchronization. (A single flag may be used as the clos-
In the balanced class of procedure, the link consists of two
ing flag for one frame, as well as the opening flag for the next
combined stations and operates in the asynchronous balanced
frame.)
m~e. A combined stat~on acts as both a primary and a secondary
Frames that do not begin and end with a flag, or frames that
statlon, .sends and recelves both commands and responses, and is
are too short (shorter than 32 bits between flags) are invalid and
responslble for error recovery. This type of operation provides for
therefore, ignored. Any frame that ends with an all "I" bit se:
equal control by both stations on the link; both stations share link
quence that is equal to or greater than seven bits in length will
management. The HDLC balanced class of procedure applies to
also be ignored. Therefore, one method to abort a frame would be
point-to-point configurations over switched or leased facilities.
to transmit eight contiguous "I " bits.
Commands are sent with the remote station address; responses

Flag Address Control Information FCS Flag

01111110 8 bits 8 bits An unspecified 16 bits 01111110


length; usually a
multiple of eight bits

JULY 1993 @ 1993 McGraw-Hill, Incorporated. Reproduction PrOhibited.


Datapro fnfom1ation SaMcea GrdUp. Delran NJ 08076 USA
Data Networking ISO 2780 3
High-Level Data
Unk Control (HDLC) Standards

station address which in a command may be used for testing


Table 2. Control Field Extensions purposes, such as testing line loop fault.
One or more stations may be assigned a group address, as well
Operational Mode NRM ARM as an individual address. This address may be used to broadcast to
the assigned group of stations. Any address combination, except
Communication Mode TWA TWS TWA TWS the global and the no-station address, may be assigned as a group
P/F Bit In Commandl address.
Response P F P F P F P F The Information field is an unspecified number of bits that
need not follow any particular character structure. In most cases,
Functions however, a convenient structure, such as an octet, is used. Theo-
Solicit information X X retically, there is no limit to the length of the information field;
however, certain factors, like buffer size, may impose limitations.
Last frame indication X X X
The Frame Check Sequence (FCS) is a 16-bit field which
Solicit supervisory or appears prior to the closing flag. It detects errors in the frame and
unnumbered response X X X X is the ones complement (modulo 2) of the sum of:
Check pOinting X X X X X X X X • The remainder of Xk (XIS + Xl4 + X l3 + ... + x + x + 1)
X-Indicates that the function is applicable. divided (modulo 2) by the generator polynomial
NRM-NORMAL RESPONSE MODE. X l6 + Xl2 + XS + 1, where k is the number of bits in the
ARM-Asynchronous response mode. frame existing between, but not including, the final bit of
TWA-Two-way alternate.
TWS-Two-way simultaneous.
the opening flag and the first bit of the FeS, excluding
bits inserted for transparency; and
• The remainder after multiplication by x 16 and then the division
(modulo 2) by the generator polynomial X 16 + X 12 + X S + I of
Interframe time fill is accomplished by transmitting either the content of the frame, existing between, but not including,
consecutive flags, a minimum of seven contiguous "1 " bits; or a the final bit of the opening flag and the first bit of the FCS,
combination of both. Selection of interframe time fill methods excluding bits inserted for transparency.
depends on system requirements.
Since it is possible for six or more binary "I s" to be contigu- As a typical implementation (at the transmitter), the initial re-
ous elsewhere in the frame, HDLC provides a mechanism that mainder of the division is preset to all ones and is then modified
achieves transparency for these nonflag-related sequences using by division by the generator polynomial (as described above) on
the process of zero insertion. The transmitter examines the frame the Address, Control, and Information fields. The ones comple-
content including the address, control, and FeS fields and inserts ment of the resulting remainder is transmitted as the 16-bit FCS
a zero after all sequences of five contiguous "1" bits. This en- sequence.
sures that a flag sequence is not simulated. At the receiving end, HDLC permits the FCS field to increase by multiples of eight
the incoming frames are examined and any "0" bit directly fol- bits (octets) if further protection against errors is needed. Such a
lowing five "1" bits is discarded. suggestion also has been drafted into the revision of the ANSI
The flag is followed by the Address field. In command Advanced Data Communications Control Procedures (ADCCP).
frames, the address must identify the station(s) for which the It calls for a 32-bit FCS which, although it would increase over-
command is intended. In response frames, the address must iden- head by 16 bits, would eliminate errors that may pass undetected
tify the station sending the response. using the 16-bit FCS. An example of such an error would be a
Normally, a single octet (eight-bit) address would be used, scrambled single flag between frames when only a single flag
making a total of 256 combinations available. The address range between frames is used.
can be extended, however, by reserving the first transmitted bit The Control field contains either commands or responses and
(low order) of each address octet, which is set to binary zero. This sequence numbers. The control field functions to convey a com-
indicates that the following octet is an extension of the basic ad- mand to the addressed station for the performance of a particular
dress. The format of the extended octet(s) must be the same as operation or to convey a response to such a command from the
that of the basic octet, and, in this way, the address field may be addressed station.
recursively extended. Three formats are defined for the control field, each perform-
When extensions are used, the presence of a binary "I" in the ing a different function. In the information transfer format, or
first transmitted bit of the basic address octet indicates that only I format, the transfer of information is permitted. Only frames
one address octet is used. Thus, the use of address extension re- using the I control field format may contain an information field.
stricts the range of single octet addresses to 128. Each I frame contains three elements: a send variable (S), a re-
HDLC outlines three conventions for addressing frames, aside ceive variable (R), and a polVfinal bit set to either 1 or O. A dis-
from assigning each station its own address. cussion of frame variables (numbering) and the poll/final bit ap-
The global address is a single address field combination that pears later in this report.
instructs all stations to accept and take action on the associated In the supervisory formal, or S format, link supervisory con-
frame. When the command is intended for more than one station, trol functions are transmitted. Examples of supervisory functions
the acknowledging stations must not respond simultaneously. The include the acknowledgment of I frames and the request for re-
global address is also used for global polling. A response with the transmission of I frames.
assigned station address may be given to a command with a glo- The unnumbered format, or U format, provides additional link
bal address when there is only one station for which the command control functions. The control format's U format contains no se-
is intended. This convention may be used to receive an unknown quence numbers; as a result, five modifier bits allow the defini-
station's identification, as in switched or reconfigured situations. tion of up to 32 additional command functions and 32 additional
The combination 11111111 is reserved as the global address. response functions. See Table 2 for an illustration of the extended
The address combination OOOOOOOO in the first octet of the control field.
address field is never assigned to a station. This is the reserved no

@ 1993 McGraw-Hili, Incorporated. Reproduction Prohibited. JULY 1993


Datapro Information Services Group. Delran NJ 08075 USA
4 2780 ISO Data Networking
Hlgh.Level Data
Standards Link Control (HDLC)

Table 3. Summary of Poll/Final Bit Set Normal Response Mode Extended (SNRME) is a command
that places the secondary station in the extended nonnal response
Function mode (NRME). In this mode, all control fields are two octets
long. .
Set Asynchronous Response Mode Extended (SARME) is a
Operational Mode NRM ARM command placing the secondary station in the extended asynchro-
Communication Mode TWA TWS TWA TWS nous response mode (ARME), where all control fields are two
P/F Bit In Commandl octets long.
Response P F P F P F P F In addition to the unnumbered commands, two unnumbered
responses are defmed:
Functions The Unnumbered Acknowledgement (UA) response, used by
Solicit information X X the secondary station, acknowledges that it has received and ac-
cepted one of the unnumbered fonnat commands. It is the re-
Last frame indication X X X sponse to SNRM, SARM, DISC, SNRME, and SARME. No in-
Solicit supervisory or fonnation field is pennitted with the UA response.
unnumbered response X X X X The Command Reject (CMDR) response, also used by the sec-
Check pointing X X X X X X X X ondary station, reports one of the following conditions: an invalid
or not implemented command has been received, an infonnation
X-Indicates that the function is applicable. frame has been received which exceeds the size of the buffer
NRM-NORMAL RESPONSE MODE.
ARM-Asynchronous response mode.
available, or a frame with an invalid N(R) has been received from
TWA-Two-wayaltemate. the primary station. The response includes an infonnation field to
TWS-Two-way simultaneous. provide the reason for the CMDR.

Frame Numbering
Control Field Procedures Every infonnation frame is numbered sequentially. In the unex-
tended control field I fonnat, the numbering modulo is eight; up
Four supervisory commands and responses perfonn functions to seven messages may be outstanding before an acknowledg-
such as acknowledgment, polling, and temporary suspension of ment is required. The message numbers continually cycle through
infonnation transfer (see Figure 2 for bit encoding). the entire seven-combination range of the three-bit field available
Receive Ready (RR), used by the primary and secondary sta- for numbering.
tions, indicates readiness to receive an infonnation frame or to In the extended control field fonnat, seven bits are available
acknowledge previously received infonnation frames numbered for message numbering (see Table 2). This is an important char-
up to N(R)-l. The primary station may also use RR with the poll acteristic of HDLC, since it increases the numbering modulo to
bit set to "1" to solicit responses from a secondary station. 128. Modulo 128 pennits up to 127 messages to be outstanding
Reject (REJ) requests retransmission of infonnation frames, before an acknowledgment is required, and it is an effective coun-
beginning with the frame numbered N(R). Only one REI condi- teraction against propagation delay. The modulo can be set to
tion from a given station may be established at one time. The REJ ensure a steady flow of infonnation, even on facilities with long
is cleared when the infonnation frame that has an N(S) equal to propagation delays, such as satellites.
the N(R) of the REI command/response is received. Four tenns are associated with the frame numbering function
Receive Not Ready (RNR) indicates a busy condition or the of the control field. Each data station maintains independent send
inability to accept any additional infonnation frames. A second- and receive sequence numbers on the infonnation frames it sends
ary station that receives an RNR while in the process of transmit- and receives. The send state variable V(S) denotes the receive
ting must stop transmitting infonnation frames at the earliest pos- sequence number N(R) of the next in-sequence infonnation frame
sible time. received. The value ofV(R) and the corresponding N(R) is incre-
Selective Reject (SREJ) is used to request retransmission of an mented by one when an error-free in-sequence equals the receive
infonnation frame numbered N(R). It is cleared when an infonna- state variable. All infonnation and supervisory frames contain the
tion frame is received that has an N(S) count equal to the N(R) of N(R), the expected sequence number of the incoming infonnation
the received SREJ command/response. Until the first SREI error frame.
condition is cleared, no other sequence error commands can be
transmitted.
Unnumbered commands and responses extend the number Additional CommandS/Responses
of link control functions. The transmission of frames in the un- Four commands and five responses are defined for the secondary
numbered fonnat, or U fonnat, does not increment the sequence operational modes.
counts at either the primary or secondary station. Although this The Set Initialization Mode (SIM) command causes the ad-
pennits the addition of up to 32 additional functions, only 5 func- dressed secondary station to initiate procedures that initialize its
tions are defined; all others are reserved. The five unnumbered link-level control functions. No infonnation field is pennitted.
commands are briefly described below. The Unnumbered Poll (UP) command solicits response
Set Normal Response Mode (SNRM) is a command that places frames from either a group of secondary stations (group poll) or
the secondary station in NRM. No infonnation field is pennitted. an individual secondary station (individual poll). No infonnation
Set Asynchronous Response Mode (SARM) is a command that field is pennitted. The response frame to the UP contains the
places the addressed secondary station in ARM. No infonnation station address, plus the N(S) and N(R) numbers as required. If
field is pennitted. the primary station detects an idle state (15 ones), or no response
The Disconnect (DISC) command tenninates a previously set is given to the UP command within a given period of time, it is
operational mode. It infonns the secondary stations that the pri- assumed that the secondary station has either completed or will
mary station is suspending its operation and that the secondary not initiate transmission.
stations should place themselves in disconnected mode. No infor-
mation field is pennitted.

JULY 1993 @ 1993 McGraw-HiII, Incorporated. Reproduction ProhibHed.


Oatapro Infonnalion Services Group. Delran NJ 08075 USA
Data Networking ISO 2780 5
Hlgh.Level Data
Link Control (HDLCJ Standards

The Unnumbered Information (UI) command is used to trans-


mit information to a secondary station or group of secondary sta- Time-Outs
tions without changing the V(S) or V(R) variables. No response is TIme-out procedures are dermed for both the unbalanced and bal-
required. anced classes of procedure. For the unbalanced class, time-out is
The Exchange Identification (XID) command causes the ad- used to detect a no-reply or lost-reply condition. In ARM, each
dressed secondary station to identify itself. It may also be used to secondary station provides a command time-out function. The
provide primary station identification and/or characteristics to the expiration of a specified time initiates error recovery proce?ures.
addressed secondary station. An information field is optional. The duration of a time-out is system dependent and subject to
The Disconnect Mode (DM) response reports the status of a agreement by communicating stations. To resolve possible con-
secondary station that is disconnected from the link. Such a sta- tention situations, the secondary station's timer interval is lon~er
tion is in NDM or ADM. No information field is permitted. On a than that of the primary station. In NRM, the secondary station
switched network where the call is initiated by the secondary waits for the primary station to initiate error recovery.
station, the OM is sent as a request for a mode-setting command. For the balanced class, each combined station provides a re-
The Request Disconnect (RD) response indicates to the pri- sponse time-out to detect a no-reply condition. The. expiration of
mary station that the secondary station wishes to be placed in one the time initiates error recovery procedures. The tIme-out dura-
of the disconnected modes, ADM or NDM. tion is system dependent and subject to agreement by both sta-
The Request Initialization Mode (RIM) response is used by the tions. The interval of the timer in each station is unequal in order
secondary station to report a need for initialization. After the RIM to resolve possible contention situations that might occur, espe-
response, no further transmissions are accepted or transmitted u~­ cially in a two-way alternate operation. The timer starts when a
til a SIM or DISC command is received. No information field IS station transmits a frame to which a reply is required. When the
permitted. expected reply is received, the timer stops .•
The Unnumbered Information (UI) response is used by the
secondary station to transmit information to the primary station
without impacting the V(S) and V(R) variables at either end.
The Exchange Identification (XID) response is transmitted in
reply to an XID command. An information field, which contains
the secondary station's identification and/or characteristics, is op-
tional.

(
"'-.

@ 1993 McGraw-Hili. Incorporated. Reproduction Prohibited. JULY 1993


Oatapro Information Services Group. Delran NJ 08075 USA
DATAPRO Data Networking 2780 1
Standards

ISO
High-Level Data
Link Control (HDLC)

Synopsis
In this report:
Analysis
Modes of Operation ............ 2 HDLC, a protocol that addresses the physi-
cal connection standards for layer two of
Frame Structure .................. 2 the International Organization for Stan-
dardization's (ISO's) Open Systems Inter-
Control Field connection (OSI) model, permits synchro- Stations
Procedures .......................... 3 nous, bit-oriented, independent data HOLC defines two types of stations on the
transmission. It provides simplex, half- data link. The station assuming the respon-
Additional Commands/ duplex, or full-duplex communication. sibility for the organization of data flow
Responses .......................... 4 Network configurations may be point to and for link-level error recovery functions
point or multipoint over switched or non- is the primary station. All other stations on
Note: The subject of switched facilities. the link are secondary stations. The primary
this report is consid- station transmits commandframes, and the
ered as a mature stan- Report Highlights secondary stations transmit response
dard. No significant The International Organization for Stan- frames.
developments are an- dardization (ISO) Technical Committee 97 For data transfer, HDLC considers two
ticipated, but because (TC 97, Computers and Information Pro- cases of data link control. The first case is
of its importance in the cessing) developed the High-Level Data when the primary station performs the pri-
industry, coverage is Link Control (HOLC) protocol. Upon mary data link control functions by control-
being continued. adoption by TC 97, the draft document was ling the secondary station through select
circulated to member bodies of the ISO for commands. The second case is when the
approval. HOLC has been approved as an primary station controls the secondary sta-
international standard by member bodies tion through poll commands.
from 23 countries; no member body ex- Two terms are used to describe the data
pressed disapproval. flow. The data source is the station cur-
HDLC covers a wide array of applica- rently transmitting information; the data
tions. It permits simplex, half-duplex, or sink is the station accepting the informa-
full-duplex transmission, configured point- tion. Information always flows from the
to-point or multipoint, over switched or data source to the data sink; acknowledg-
nonswitched facilities. It does not define a ments flow in the opposite direction.
single system and should not be regarded as
a specification for a data communications
system. It is intended to provide a high de- Classes of
gree of compatibility between data terminal Procedures/Configurations
equipment (OTE).
A class of procedures is the basic repertoire
Several protocols, such as Unisys' Bur-
roughs Data Link Control (BDLC), IBM's of steps to which a station conforms in or-
Synchronous Data Link Control (SOLC), der to communicate. HDLC defines two
classes of procedures and associated station
and Unisys' Sperry (Univac) Universal
Data Link Control (UOLC), are based on configurations: balanced and unbalanced.
the HDLC concept. HOLC's capability of In the unbalanced class of procedures,
the configuration consists of one primary
transmitting up to 127 frames before an ac-
knowledgment is required makes it possible station and one or more secondary stations.
The primary station's responsibilities in-
to transmit information via satellite, as well
,.('.'
I'
as via terrestrial facilities.
clude setting up and disconnecting the link;
sending information frames, supervisory,
and unnumbered commands; and checking
received frames. The secondary station

@ 1991 McGraw-Hili, Incorporated. Reproduction Prohibited. DECEMBER 1991


Datapro Information Services Group. Delran NJ 08075 USA
2 2780 ISO Data Networking
High-Level Data
Standards Link Control (HDLC)

checks received frames and sends supervisory informa- Frame Structure


tion, as well as unnumbered responses. The communica-
tions link may be half- or full-duplex, switched or nons- The HOLC frame structure consists of FLAG-
witched. Control procedures operate in either normal or AOORESS-CONTROL-INFORMATION
asynchronous response mode. Only one secondary station (Optional)-FRAME CHECK SEQUENCE-FLAG.
at a time can be placed in asynchronous response mode. All frames must start and end with a Flag that consists
In the balanced class of procedure, the link consists of of the bit sequence 01111110. All stations attached to the
two combined stations and operates in the asynchronous data link continuously search for this sequence. In this
balanced mode. A combined station acts as both a primary manner, the flag is used for frame synchronization. (A sin-
and a secondary station, sends and receives both com- gle flag may be used as the closing flag for one frame, as
mands and responses, and is responsible for error recov- well as the opening flag for the next frame.)
ery. This type of operation provides for equal control by Frames that do not begin and end with a flag or frames
both stations on the link; both stations share link manage- that are too short (shorter than 32 bits between flags) are
ment. The HOLC balanced class of procedure applies to invalid and, therefore, ignored. Any frame that ends with
point-to-point configurations over switched or leased facil- an all "1" bit sequence that is equal to or greater than
ities. Commands are sent with the remote station address; seven bits in length will also be ignored. Therefore, one
responses are sent with the local station address. The com- method to abort a frame would be to transmit eight contig-
bined station at either end may initiate link connection or uous "1" bits.
disconnection. Interframe time jill is accomplished by transmitting ei-
Under either type of procedure, the data link exists in ther consecutive flags, a minimum of seven contiguous
one of two channel states. The active condition occurs "1" bits, or a combination of both. Selection of interframe
when the primary or the secondary station is actively time fill methods depends on system requirements.
transmitting a frame, abort sequence, or interframe time Since it is possible for six or more binary "Is" to be
fill. In this state, the right to continue transmission is re- contiguous elsewhere in the frame, HOLC provides a
served. In the idle state, the station has terminated trans- mechanism that achieves transparency for these nonflag-
mission. The idle state is characterized by the transmission related sequences using the process of zero insertion. The
of at least 15 consecutive one bits. transmitter examines the frame content including the ad-
dress, control, and FCS fields and inserts a zero after all
sequences of five contiguous" 1" bits. This ensures that a
Modes of Operation flag sequence is not simulated. At the receiving end, the
Two primary modes of operation are defined in HOLe. In incoming frames are examined and any "0" bit directly
the normal response mode (NRM), the secondary station following five" 1" bits is discarded.
may initiate transmission only after receiving permission The flag is followed by the Address field. In command
from the primary station; upon receiving permission, the frames, the address must identify the station(s) for which
secondary station issues a response transmission. The last the command is intended. In response frames, the address
frame of this transmission is indicated explicitly by the must identify the station sending the response.
secondary station. After completing its transmission, the Normally, a single octet (eight-bit) address would be
secondary station must wait until it again receives permis- used, making a total of 256 combinations available. The
sion to transmit from the primary station. address range can be extended, however, by reserving the
In asynchronous response mode (ARM), the secondary first transmitted bit (low order) of each address octet,
station may initiate transmission without permission from which is set to binary zero. This indicates that the follow-
the primary station. The frames transmitted by the second- ing octet is an extension of the basic address. The format of
ary station during ARM may be used to transfer informa- the extended octet(s) must be the same as that of the basic
tion and/or to indicate status changes. octet, and, in this way, the address field may be recursively
Three secondary modes of operation are also defined in extended.
HOLe. These include two disconnected modes, which are When extensions are used, the presence of a binary" 1"
provided to prevent a secondary station from appearing in the first transmitted bit of the basic address octet indi-
operational during unusual situations or exception condi- cates that only one address octet is used. Thus, the use of
tions. Normal disconnected mode (NDM) logically discon- address extension restricts the range of single octet ad-
nects the station from the link; while in NOM, the second- dresses to 128.
ary station remains ready to respond in normal response HOLC outlines three conventions for addressing
mode. The same situation exists during asynchronous dis- frames, aside from assigning each station its own address.
connected mode (ADM), except that the secondary station The global address is a single address field combination
remains ready in asynchronous response mode. that instructs all stations to accept and take action on the
The third secondary mode is the initialization mode associated frame. When the command is intended for
(1M). During 1M, the link control of the secondary station more than one station, the acknowledging stations must
is initialized or regenerated, or other parameters may be not respond simultaneously. The global address is also
exchanged. 1M is invoked when the primary station detects used for global polling. A response with the assigned sta-
that the secondary station is not operating normally or that tion address may be given to a command with a global
the link control program needs to be upgraded at the re- address when there is only one station for which the com-
mote station. 1M may also be requested by the secondary mand is intended. This convention may be used to receive
station for the same reasons. an unknown station's identification, as in switched or re-
configured situations. The combination 11111111 is re-
served as the global address.
The address combination 00000000 in the first octet of
the address field is never assigned to a station. This is the

DECEMBER 1991 © 1991 MCGraw-Hili, Incorporated. Reproduction Prohibited.


Datapro Information Services Group. Delran NJ 08075 USA
Data Networking ISO 2780 3
High-Level Data
Link Control (HDLC) Standards

reserved no station address which in a command may be The unnumbered format, or U format, provides addi-
used for testing purposes, such as testing line loop fault. tional link control functions. The control format's U for-
One or more stations may be assigned a group address, mat contains no sequence numbers; as a result, five modi-
as well as an individual address. This address may be used fier bits allow the definition of up to 32 additional
to broadcast to the assigned group of stations. Any address command functions and 32 additional response functions.
combination, except the global and the no station address,
may be assigned as a group address.
The Information field is an unspecified number of bits Control Field Procedures
that need not follow any particular character structure. In Four supervisory commands and responses perform func-
most cases, however, a convenient structure, such as an tions such as acknowledgment, polling, and temporary sus-
octet, is used. Theoretically, there is no limit to the length pension of information transfer.
of the information field; however, certain factors, like Receive Ready (RR), used by the primary and secondary
buffer size, may impose limitations. stations, indicates readiness to receive an information
The Frame Check Sequence (FCS) is a 16-bit field frame or to acknowledge previously received information
which appears prior to the closing flag. It detects errors in frames numbered up to N(R) -1. The primary station may
the frame and is the ones complement (modulo 2) of the also use RR with the poll bit set to "1" to solicit responses
sum of: from a secondary station.
• The remainder ofx k (X 15 + Xl4 + X l3 + ... + x + x + Reject (REJ) requests retransmission of information
q divided (modulo 2) by the generator polynomial frames, beginning with the frame numbered N(R). Only
one REJ condition from a given station may be established
x 6 + X 12 + x 5 + 1, where k is the number of bits in
the frame existing between, but not including, the at one time. The REJ is cleared when the information
final bit of the opening flag and the first bit of the frame that has an N(S) equal to the N(R) of the REJ com-
FCS, excluding bits inserted for transparency; and mand/response is received.
Receive Not Ready (RNR) indicates a busy condition or
• The remainder after multiplication by X 16 and then the the inability to accept any additional information frames.
division (modulo 2) by the generator polynomial X 16 + A secondary station that receives a RNR while in the pro-
X 12 + x 5 + 1 of the content of the frame, existing be- cess of transmitting must stop transmitting information
tween, but not including, the final bit of the opening flag frames at the earliest possible time.
and the first bit of the FCS, excluding bits inserted for Selective Reject (SREJ) is used to request retransmis-
transparency. sion of an information frame numbered N(R). It is cleared
when an information frame is received that has an N(S)
As a typical implementation (at the transmitter), the initial count equal to the N(R) of the received SREJ command/
remainder of the division is preset to all ones and is then response. Until the first SREJ error condition is cleared,
modified by division by the generator polynomial (as de- no other sequence error commands can be transmitted.
scribed above) on the Address, Control, and Information Unnumbered commands and responses extend the num-
fields. The ones complement of the resulting remainder is ber of link control functions. The transmission of frames
transmitted as the 16-bit FCS sequence. in the unnumbered format, or U format, does not incre-
HDLC permits the FCS field to increase by multiples of ment the sequence counts at either the primary or second-
eight bits (octets) if further protection against errors is ary station. Five modifier bits are defined. Although this
needed. Such a suggestion also has been drafted into the permits the addition of up to 32 additional functions, only
revision of the ANSI Advanced Data Communications 5 functions are defined; all others are reserved. The five
Control Procedures (ADCCP). It calls for a 32-bit FCS unnumbered commands are briefly described below.
which, although it would increase overhead by 16 bits, Set Normal Response Mode (SNRM) is a command that
would eliminate errors that may pass undetected using the places the secondary station in NRM. No information
16-bit FCS. An example of such an error would be a scram- field is permitted.
bled single flag between frames when only a single flag be- Set Asynchronous Response Mode (SARM) is a com-
tween frames is used. mand that places the addressed secondary station in ARM.
The Control field contains either commands or re- No information field is permitted.
sponses and sequence numbers. The control field func- The Disconnect (DISC) command terminates a previ-
tions to convey a command to the addressed station for the ously set operational mode. It informs the secondary sta-
performance of a particular operation or to convey a re- tions that the primary station is suspending its operation
sponse to such a command from the addressed station. and that the secondary stations should place themselves in
Three formats are defined for the control field, each disconnected mode. No information field is permitted.
performing a different function. In the information trans- Set Normal Response Mode Extended (SNRME) is a
fer format, or I format, the transfer of information is per- command that places the secondary station in the ex-
mitted. Only frames using the I control field format may tended normal response mode (NRME). In this mode, all
contain an information field. Each I frame contains three control fields are two octets long.
elements: a send variable (S), a receive variable (R), and a Set Asynchronous Response Mode Extended (SARME)
polllfinal bit set to either 1 or O. A discussion of frame is a command placing the secondary station in the ex-
variables (numbering) and the poll/final bit appears later tended asynchronous response mode (ARME), where all
in this report. control fields are two octets long.
In the supervisory format, or S format, link supervisory In addition to the unnumbered commands, two un-
control functions are transmitted. Examples of supervi- numbered responses are defined:
sory functions include the acknowledgment of I frames The Unnumbered Acknowledgement (UA) response,
and the request for retransmission of I frames. used by the secondary station, acknowledges that it has

© 1991 McGraw-Hili. Incorporated. Reproduction Prohibited. DECEMBER 1991


Datapro Information Services Group. Delran NJ 08075 USA
4 2780 ISO Data Networking
High-Level Data
Standards Link Control (HDLC)

received and accepted one of the unnumbered format The Unnumbered Information (UI) command is used to
commands. It is the response to SNRM, SARM, DISC, transmit information to a secondary station or group of
SNRME, and SARME. No information field is permitted secondary stations without changing the V(S) or V(R) vari-
with the UA response. ables. No response is required.
The Command Reject (CMDR) response, also used by The Exchange Identification (XID) command causes
the secondary station, reports one of the following condi- the addressed secondary station to identify itself. It may
tions: an invalid or not implemented command has been also be used to provide primary station identification
received, an information frame has been received which and/or characteristics to the addressed secondary station.
exceeds the size of the buffer available, or a frame with an An information field is optional.
invalid N(R) has been received from the primary station. The Disconnect Mode (DM) response reports the status
The response includes an information field to provide the of a secondary station that is disconnected from the link.
reason for the CMDR. Such a station is in NDM or ADM. No information field is
permitted. On a switched network where the call is initi-
Frame Numbering ated by the secondary station, the DM is sent as a request
Every information frame is numbered sequentially. In the for a mode-setting command.
unextended control field I format, the numbering modulo The Request Disconnect (RD) response indicates to the
is eight; up to seven messages may be outstanding before primary station that the secondary station wishes to be
an acknowledgment is required. The message numbers placed in one of the disconnected modes, ADM or NDM.
continually cycle through the entire seven-combination The Request Initialization Mode (RIM) response is used
range of the three-bit field available for numbering. by the secondary station to report a need for initialization.
In the extended control field format, seven bits are After the RIM response, no further transmissions are ac-
available for message numbering. This is an important cepted or transmitted until a SIM or DISC command is
characteristic of HDLC, since it increases the numbering received. No information field is permitted.
modulo to 128. Modulo 128 permits up to 127 messages to The Unnumbered Information (UI) response is used by
be outstanding before an acknowledgment is required, and the secondary station to transmit information to the pri-
it is an effective counteraction against propagation delay. mary station without impacting the V(S) and V(R) vari-
The modulo can be set to ensure a steady flow of informa- ables at either end.
tion, even on facilities with long propagation delays, such The Exchange Identification (XID) response is trans-
as satellites. mitted in reply to an XID command. An information field,
Four terms are associated with the frame numbering which contains the secondary station's identification
function of the control field. Each data station maintains and/or characteristics, is optional.
independent send and receive sequence numbers on the
information frames it sends and receives. The send state
variable V(S) denotes the receive sequence number N(R) of Time-Outs
the next in-sequence information frame received. The Time-out procedures are defined for both the unbalanced
value of V(R) and the corresponding N(R) is incremented and balanced classes of procedure. For the unbalanced
by one when an error-free in-sequence equals the receive class, time-out is used to detect a no-reply or lost-reply
state variable. All information and supervisory frames condition. In ARM, each secondary station provides a
contain the N(R), the expected sequence number of the command time-out function. The expiration of a specified
incoming information frame. time initiates error recovery procedures.
The duration of a time-out is system dependent and
Additional Commands/Responses subject to agreement by communicating stations. To re-
solve possible contention situations, the secondary sta-
Four commands and five responses are defined for the sec- tion's timer interval is longer than that of the primary sta-
ondary operational modes. tion. In NRM, the secondary station waits for the primary
The Set Initialization Mode (SIM) command causes the station to initiate error recovery.
addressed secondary station to initiate procedures that ini- For the balanced class, each combined station provides
tialize its link level control functions. No information field a response time-out to detect a no-reply condition. The
is permitted. expiration of the time initiates error recovery procedures.
The Unnumbered Poll (UP) command solicits response The time-out duration is system dependent and subject to
frames from either a group of secondary stations (group agreement by both stations. The interval of the timer in
poll) or an individual secondary station (individual poll). each station is unequal in order to resolve possible conten-
No information field is permitted. The response frame to tion situations that might occur, especially in a two-way
the UP contains the station address, plus the N(S) and alternate operation. The timer starts when a station trans-
N(R) numbers as required. If the primary station detects mits a frame to which a reply is required. When the ex-
an idle state ( 15 ones), or no response is given to the UP pected reply is received, the timer stops.•
command within a given period of time, it is assumed that
the secondary station has either completed or will not ini-
tiate transmission.

DECEMBER 1991 © 1991 McGraw-Hili, Incorporated. Reproduction Prohibited.


Datapro Information Services Group. Delran NJ 08075 USA
DATAPRO Data Networking 2780 1
Standards

ISO
High-Level Data
Link Control (HDLC)

In this report: Synopsis

Classes of Proceduresl Editor's Note HDLC covers a wide array of appli-


Configurations .......... 2 HDLC, a protocol that addresses the cations. It permits simplex, half-
physical connection standards for duplex, or full-duplex transmission,
Modes of Operation .. 3 layer two of the International Orga- configured point-to-point or mul-
nization for Standardization's tipoint, over switched or nons-
Frame Structure ........ 3 (ISO's) Open Systems Interconnec- witched facilities. It does not define
tion (OSI) model, permits synchro- a single system, and should not be
Control Field nous, bit-oriented, independent data regarded as a specification for a data
Procedures ............... 7 transmission. It provides simplex, communications system. It is in-
half-duplex, or full-duplex communi- tended to provide a high degree of
Additional Commandsl cation. Network configurations may compatibility between data terminal
Responses ................ 8 be point-to-point or multipoint over equipment (DTE).
switched or nonswitched facilities.
Several protocols, such as Unisys'
Report Highlights Burroughs Data Link Control
The International Organization for (BDLC), IBM's Synchronous Data
Standardization (ISO) Technical Link Control (SDLC), and Unisys'
Committee 97 (TC 97, Computers Sperry (Univac) Universal Data Link
and Information Processing) devel- Control (UDLC) are based on the
oped the High-Level Data Link Con- HDLC concept. HDLC's capability
trol (HDLC) protocol. Upon of transmitting up to 127 frames be-
adoption by TC 97, the draft docu- fore an acknowledgment is required
ment was circulated to member bod- makes it possible to transmit infor-
ies of the ISO for approval. HDLC mation via satellite, as well as via
has been approved as an interna- terrestrial facilities.
tional standard by member bodies
from 23 countries; no member body
expressed disapproval.

@ 1991 McGraw-Hili, Incorporated. Reproduction Prohibited. APRIL t990


Datapro Information Services Group. Delran NJ 08075 USA
2 2780 ISO Data Networking
Hlgh-Leve' Data
Standards Link Control (HDLC,

commands and responses for each mode; Table 3


depicts the optional commands and responses to
supplement the basic repertoire.
Analysis In the unbalanced class of procedures, the
configuration consists of one primary station and
one or more secondary stations. The primary sta-
tion's responsibilities include setting up and dis-
connecting the link; sending information frames,
supervisory, and unnumbered commands; and
checking received frames. The secondary station
Stations checks received frames and sends supervisory in-
HDLC defines two types of stations on the data formation, as well as unnumbered responses. The
link. The station assuming the responsibility for communications link may be half- or full-duplex,
the organization of data flow and for link level er- switched or nonswitched. Control procedures oper-
ror recovery functions is the primary station. All ate in either normal or asynchronous response
other stations on the link are secondary stations. mode. Only one secondary station at a time can be
The primary station transmits command frames, placed in asynchronous response mode.
and the secondary stations transmit response In the balanced class of procedure, the link
frames. consists of two combined stations and operates in
For data transfer, HDLC considers two cases the asynchronous balanced mode. A combined sta-
of data link control. The first case is when the pri- tion acts as both a primary and a secondary sta-
mary station performs the primary data link con- tion, sends and receives both commands and
trol functions by controlling the secondary station responses, and is responsible for error recovery.
through select commands. The second case is when This type of operation provides for equal control
the primary station controls the secondary station by both stations on the link; both stations share
through poll commands. link management. The HDLC balanced class of
Two terms are used to describe the data flow. procedure applies to point-to-point configurations
The data source is the station currently transmit- over switched or leased facilities. Commands are
ting information; the data sink is the station ac- sent with the remote station address; responses are
cepting the information. Information always flows sent with the local station address. The combined
from the data source to the data sink; acknowledg- station at either end may initiate link connection
ments flow in the opposite direction. or disconnection.
Under either type of procedure, the data link
exists in one of two channel states. The active con-
Classes of Procedures/Configurations dition occurs when the primary or the secondary
station is actively transmitting a frame, abort se-
A class of procedures is the basic repertoire of steps
quence, or interframe time fill. In this state, the
to which a station conforms in order to communi-
right to continue transmission is reserved. In the
cate. HDLC defines two classes of procedures and
idle state, the station has terminated transmission.
associated station configurations: balanced and
The idle state is characterized by the transmission
unbalanced. Table 1 outlines the basic repertoire of
of at least 15 consecutive one bits.

Figure 1.
The HDLC Frame Structure

Flag Address Control Information FeS Flag


01111110 8 bits 8 bits An unspecified 16 bits 01111110
length; usually a
multiple of eight bits

APRIL 1990 @ 1991 McGraw-HIli. Incorporated. Reproduction Prohibited.


Datapro Information Services Group. Delran NJ 08075 USA
Data Networking ISO
2780
High-Level Data 3
Link Control (HDLC) Standards

Modes of Operation as the closing flag for one frame, as well as the
Two primary modes of operation are defined in opening flag for the next frame.)
HDLC. In the normal response mode (NRM), the Frames that do not begin and end with a flag
secondary station may initiate transmission only or frames that are too short (shorter than 32 bits
after receiving permission from the primary sta- between flags) are invalid and, therefore, ignored.
tion; upon receiving permission, the secondary sta- Any frame that ends with an all "1" bit sequence
tion issues a response transmission. The last frame that is equal to or greater than seven bits in length
of this transmission is indicated explicitly by the will also be ignored. Therefore, one method to
secondary station. After completing its transmis- abort a frame would be to transmit eight contigu-
sion, the secondary station must wait until it again ous "1" bits.
receives permission to transmit from the primary Interframe time fill is accomplished by trans-
station. mitting either consecutive flags, a minimum of
In asynchronous response mode (ARM), the seven contiguous" 1" bits, or a combination of
secondary station may initiate transmission with- both. Selection of interframe time fill methods de-
out permission from the primary station. The pends on system requirements.
frames transmitted by the secondary station during Since it is possible for six or more binary" 1s"
ARM may be used to transfer information and/or to be contiguous elsewhere in the frame, HDLC
to indicate status changes. provides a mechanism that achieves transparency
Three secondary modes of operation are also for these nonflag-related sequences using the pro-
defined in HDLC. These include two disconnected cess of zero insertion. The transmitter examines the
modes, which are provided to prevent a secondary frame content including the address, control, and
station from appearing operational during unusual FCS fields and inserts a zero after all sequences of
situations or exception conditions. Normal discon- five contiguous" 1" bits. This insures that a flag
nected mode (NDM) logically disconnects the sta- sequence is not simulated. At the receiving end, the
tion from the link; while in NDM, the secondary incoming frames are examined and any "0" bit
station remains ready to respond in normal re- directly following fi ve "1" bits is discarded.
sponse mode. The same situation exists during The flag is followed by the Address field. In
asynchronous disconnected mode (ADM), except command frames, the address must identify the
that the secondary station remains ready in asyn- station(s) for which the command is intended. In
chronous response mode. response frames, the address must identify the sta-
The third secondary mode is the initialization tion sending the response.
mode (1M). During 1M, the link control of the sec- Normally, a single octet (eight-bit) address
ondary station is initialized or regenerated, or would be used, making a total of 256 combinations
other parameters may be exchanged. 1M is invoked available. The address range can be extended, how-
when the primary station detects that the second- ever, by reserving the first transmitted bit (low or-
ary station is not operating normally or that the der) of each address octet, which is set to binary
link control program needs to be upgraded at the zero. This indicates that the following octet is an
remote station. 1M may also be requested by the extension of the basic address. The format of the
secondary station for the same reasons. extended octet(s) must be the same as that of the
basic octet, and, in this way, the address field may
be recursively extended.
Frame Structure When extensions are used, the presence of a
binary" 1" in the first transmitted bit of the basic
The HDLC frame structure consists of FLAG-
address octet indicates that only one address octet
ADDRESS-CONTROL-INFORMATION
is used. Thus, the use of address extension restricts
(Optional)-FRAME CHECK SEQUENCE-
the range of single octet addresses to 128.
FLAG (see Figure 1). HDLC outlines three conventions for ad-
All frames must start and end with a Flag that dressing frames, aside from assigning each station
(- consists of the bit sequence 01111110. All stations
attached to the data link continuously search for
its own address.
The global address is a single address field
this sequence. In this manner, the flag is used for
combination that instructs all stations to accept
frame synchronization. (A single flag may be used

@ 1991 McGraw-HIli, Incorporated. Reproduction Prohibited. APRIL 1990


Datepro Information Services Group. Delran NJ 08075 USA
4 2780 ISO Data Networking
High-Level Data
Standards Link Control (HDLC)

Figure 2. and take action on the associated frame. When the


Encoding ofHDLC Control Field Commandsl command is intended for more than one station,
Responses the acknowledging stations must not respond si- .
Supervisory Control Field multaneously. The globaladdress is also used for
Control field bits - - - -....
_ global polling. A response with the assigned station
address may be given to a command with a global
2 3 4 5 6 7 8 address when there is only one station for which
o S P/F N(R)
the command is intended. This convention may be
T i
T
used to receive an unknown station's identifica-
Supervisory Receive tion, as in switched or reconfigured situations. The
format sequence
number
combination 11111111 is reserved as the global
Command (0-7) address.
poll The address combination 00000000 in the
Response
final
first octet of the address field is never assigned to a
station. This is the reserved no station address
Commands
which in a command may be used for testing pur-
Responses
poses, such as testing line loop fault.
RR - Receive 00 RR -Receive One or more stations may be assigned a group
ready ready
address, as well as an individual address. This ad-
REJ -Reject 01 REJ - Reject dress may be used to broadcast to the assigned
RNR - Receive 10 RNR - Receive group of stations. Any address combination, except
not ready not ready the global and the no station address, may be as-
SREJ - Selective 11 SREJ - Selective signed as a group address.
reject reject The Information field is an unspecified num-
ber of bits that need not follow any particular char-
Unnumbered Control Field acter structure. In most cases, however, a
.._ - - - - - - Control field bits -----11
._. convenient structure, such as an octet, is used .
2 3 4 5 6 7 8 Theoretically, there is no limit to the length of the
1M M M M
information field; however, certain factors, like

j
MI

r
buffer size, may impose limitations.
The Frame Check Sequence (FCS) is a 16-bit
field which appears prior to the closing flag. It de-
tects errors in the frame and is the ones comple-
Unnumbered Command 5 "modifier" bits
format poll
ment (modulo 2) of the sum of:
Response • The remainder ofxk (X 15 + X14 + X l3 + ... + x
final
+ x + 1) divided (modulo 2) by the generator
polynomial X l6 + Xl2 + x 5 + 1, where k is the

.. Information Control Field

Control field bits


-
number of bits in the frame existing between,
but not including, the final bit of the opening
flag and the first bit of the FCS, excluding bits

,
1 2 3 4 5 6 7 8 inserted for transparency; and
0 N(S) P/F N(R) • The remainder after multiplication by X l6 and
I

I-T T
then the division (modulo 2) by the generator
polynomial X l6 + Xl2 + x 5 + 1 of the content of
Receive
the frame, existing between, but not including,
transfer sequence the final bit of the opening flag and the first bit
format number
Send Command (0-7)
of the FCS, excluding bits inserted for transpar-
sequence poll ency.
number
Response
(0-7)
final As a typical implementation (at the transmitter),
the initial remainder of the division is preset to all

APRIL 1990 @ 1991 McGraw·HIII, Incorporated. Reproduction Prohibited;


Datapro Information Services Group. Delran NJ 08075 USA
Data Networking ISO 2780 5
High-Level Data
Link Control (HDLC) Standards

scrambled single flag between frames when only a


Table 1. Basic Repertoire of
single flag between frames is used.
Commands and Responses*
The Control field contains either commands
or responses and sequence numbers. The control
Balanced Mode field functions to convey a command to the ad-
dressed station for the performance of a particular
Commands Responses
operation or to convey a response to such a com-
I
mand from the addressed station.
RR RR
Three formats are defined for the control
RNR RNR
field, each performing a different function (see
SABM"" CMDR
Figure 2). In the information transfer format, or
DISC UA
I format, the transfer of information is permitted.
OM
Only frames using the I control field format may
Unbalanced Normal Mode contain an information field. Each I frame con-
Primary Station Commands Secondary Station tains three elements: a send variable (S), a receive
Responses variable (R), and a polllfinal bit set to either 1 or O.
I I A discussion of frame variables (numbering) and
RR RR the polllfinal bit appears later in this report.
RNR RNR In the supervisory format, or S format, link
SNRM OM DR supervisory control functions are transmitted. Ex-
DISC UA amples of supervisory functions include the ac-
OM knowledgment of I frames and the request for
Unbalanced Asynchronous Mode retransmission of I frames.
Primary Station Commands Secondary Station
The unnumbered format, or U format, pro-
Responses vides additional link control functions. The control
I format's U format contains no sequence numbers;
RR RR as a result, five modifier bits allow the definition of
RNR RNR up to 32 additional command functions and 32
SARM CMDR additional response functions. See Table 2 for an
DISC UA illustration of the extended control field.
OM
"See text for explanation of mnemonics.
• "Set Asynchronous Balanced Mode-used to set up the Table 2. Control Field Extensions
connection.
Control Field Bita
Control Field
Fonnat tor 1st Octet 2nd Octet
ones and is then modified by division by the gener- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
ator polynomial (as described above) on the Ad- Information
dress, Control, and Information fields. The ones transfer
command!
complement of the resulting remainder is transmit- response
ted as the 16-bit FCS sequence. (I frame) 0 N(S) P/F N(R)
Supervisory
HDLC permits the FCS field to increase by commands!
multiples of eight bits (octets) if further protection responses
(S frame) 1 o S S X X X X P!F N(R)
against errors is needed. Such a suggestion also has Unnumbered
been drafted into the revision of the ANSI Ad- commands!
responses
vanced Data Communications Control Procedures (U frame) 11M M U M M M P!F X X X X X X X
(ADCCP). It calls for a 32-bit FCS which, although
Note: X bits are reserved and set to zero and the value of U is unspecified.
it would increase overhead by 16 bits, would elimi- Bit 2 and bit 10 are the low-order bits of the sequence numbers.

( nate errors that may pass undetected using the 16-


bit FCS. An example of such an error would be a

@ 1991 McGraw-Hili, Incorporated. Reproduction Prohibited. APRIL 1990


Datapro Information Services Group. Delran NJ 08075 USA
8 2780 ISO Data Networking
High-Level Data
Standards Link Control (HDLC)

Table 3. Optional Functions for the Unbalanced/Balanced Classes of


Procedures

Operation Mode- Option Number Functional Description Required Change--


U/B 1A Provides the ability to:
-exchange identification Add command: XID, Add re-
and/or characteristics of sponse: XID
stations
-request logical disconnection Add response: RD
U/B 2 Provides the ability for more Add command: REJ, Add re-
timely reporting of I frame se- sponse: REJ
quence errors
U/B 3 Provides the ability for more Add command: SREJ, Add re-
efficient recovery from I frame sponse: SREJ
sequence errors by requesting
retransmission of a single
frame
U/B 4 Provides the ability to ex- Add command: UI, Add re-
change information fields with- sponse: UI
out impacting the I frame
sequence numbers
B 5 Provides primary ability to ini- Add command: SIM, Add re-
tialize remote stations and sec- sponse: RIM
ondary ability to request
initialization
U 5 Provides primary ability to ini- Add command: SIM, Add re-
tialize remote stations and sec- sponse: RIM
ondary ability to request
initialization
B 6 Provides the ability to perform Add command: UP
unnumbered group polling as
well as individual polling
U 6 Provides. primary ability to per- Add command: UP
form unnumbered group polling
as well as individual polling
U/B 7 Provides addressing for great- Use extended addressing for-
er than single octet addressing mat in lieu of basic addressing
format
B 8 Limits the procedure to allow I Delete response: I
frame to be commands only
U 8 Limits the procedure to one- Delete response: I
way I frame transfer using
commands
B 9 Limits the procedure to allow I Delete command: I
frame to be responses only
U 9 Limits the proCEldure to one- Delete command: I
way I frame transfer using
responses
B 10 Provides the ability to use ex- Use extended control field for-
tended sequence numbering mat in lieu of basic control field
(Modulo 128) format. Use SABME (set Asyn-
chronous Balanced Mode Ex-
tended)' in lieu of SABM
U 10 Provides the ability to use ex- Use extended control field for-
tended sequence numbering mat in lieu of basic control field
(Modulo 128) format. Use SXRME in lieu of
SXRM.***
U 11 Provides the ability to reset the Add command: RSET
state variable associated with
only one direction of informa-
tion flow
U-Unbalanced.
B-Balanced.
··Changes to the basic repertoire of commands/responses (see Table 1) to modify the fundamental classes of procedures.
• - ·SXRM equals SARM in unbalanced asynchronous mode, SNRM In unbalanced normal mode.

APRIL 1990 @ 1991 McGraw-Hili, Incorporatecl~ Reproduction Prohibited.


Datapro Information Services Group. Delran NJ 08075 USA
Data Networking ISO 2780 7
High-Level Data
Link ControIIHDLC) Standards

Control Field Procedures Table 4. Summary of Poll/Final Bit


Four supervisory commands and responses perform Function
functions such as acknowledgment, polling, and
temporary suspension of information transfer (see ()peretIcIMI Mode NRM ARM
Figure 2 for bit encoding). Communlcdon Mode TWA TWS TWA TWS
Receive Ready (RR), used by the primary and
secondary stations, indicates readiness to receive
'IF BIt In Commsncl/
Ruponae , F P F P F , F

an information frame or to acknowledge previously Funcllona


Solicit information X ·X
received information frames numbered up to
Last frame indication X X X
N(R)-l. The primary station may also use RR
Solicit supervisory or
with the poll bit set to "I" to solicit responses from unnumbered response X X X X
a secondary station. Check pointing X X X X X X X X
Reject (REJ) requests retransmission of infor-
X-Indicates that the function is appiicable.
mation frames, beginning with the frame num- NRM-Normai response mode.
ARM-Asynchronous response mode.
bered N(R). Only one REJ condition from a given TWA-Two-way altarnate.
station may be established at one time. The REJ is TWS-Two-way simultaneous.
cleared when the information frame that has an
N(S) equal to the N(R) of the REJ command/
response is received. secondary stations that the primary station is sus-
Receive Not Ready (RNR) indicates a busy pending its operation and that the secondary sta-
condition or the inability to accept any additional tions should place themselves in disconnected
information frames. A secondary station that re- mode. No information field is permitted.
ceives a RNR while in the process of transmitting Set Normal Response Mode Extended (SN-
must stop transmitting information frames at the RME) is a command that places the secondary sta-
earliest possible time. tion in the extended normal response mode
Selective Reject (SREJ) is used to request re- (NRME). In this mode, all control fields are two
transmission of an information frame numbered octets long.
N(R). It is cleared when an information frame is Set Asynchronous Response Mode Extended
received that has an N(S} count equal to the N(R) (SARME) is a command placing the secondary sta-
of the received SREJ command/response. Until the tion in the extended asynchronous response mode
first SREJ error condition is cleared, no other se- (ARME), where all control fields are two octets
quence error commands can be transmitted. long.
Unnumbered commands and responses extend In addition to the unnumbered commands,
the number of link control functions. The trans- two unnumbered responses are defined:
mission of frames in the unnumbered format, or The Unnumbered Acknowledgement (UA) re-
U format, does not increment the sequence counts sponse, used by the secondary station, acknowl-
at either the primary or secondary station. Five edges that it has received and accepted one of the
modifier bits are defined (see Figure 2). Although unnumbered format commands. It is the response
this permits the addition of up to 32 additional to SNRM, SARM, DISC, SNRME, and SARME.
functions, only 5 functions are defined; all others No information field is permitted with the UA re-
are reserved. The five unnumbered commands are sponse.
briefly described below. The Command Reject (CMDR) response, also
Set Normal Response Mode (SNRM) is a com- used by the secondary station, reports one of the
mand that places the secondary station in NRM. following conditions: an invalid or not imple-
No information field is permitted. mented command has been received, an informa-
Set Asynchronous Response Mode (SARM) is a tion frame has been received which exceeds the
command that places the addressed secondary sta- size of the buffer available, or a frame with an in-
tion in ARM. No information field is permitted. valid N(R) has been received from the primary sta-
The Disconnect (DISC) command terminates tion. The response includes an information field to
a previously set operational mode. It informs the provide the reason for the CMDR.

o 1991 McGraw-HIli, Incorporated. Reproduction Prohibited. APRIL 1990


Datapro Information Services Group. Dalran NJ 08075 USA
2780 ISO Data Networking
8 High-Level Data
Standards Link Control (HDLC)

Frame Numbering asynchronous basis. The secondary station trans-


Every information frame is numbered sequentially. mits an F response only in response to a command
In the unextended control field I format, the num- frame with the P bit set to "1". Unlike in NRM,
bering modulo is eight; up to seven messages may transmission of an F frame in ARM does not re-
be outstanding before an acknowledgment is re- quire the secondary station to stop transmitting.
quired. The message numbers continually cycle Additional response frames may be transmitted.
through the entire seven-combination range of the Thus, in ARM, the F frame bit should not be inter-
three-bit field available for numbering. preted as the end of transmission, but only as a re-
In the extended control field format, seven sponse to the previous command frame.
bits are available for message numbering (see The P/F bit can also assist in error recovery.
Table 2). This is an important characteristic of It is possible to detect sequence errors in informa-
HDLe, since it increases the numbering modulo to tion frames by matching each P bit with an F bit,
128. Modulo 128 permits up to 127 messages to be since these bits are always exchanged as a pair.
outstanding before an acknowledgment is required, This method, called checkpointing, prescribes that
and it is an effective counteraction against propa- a P bit cannot be issued until the previous P bit has
gation delay. The modulo can be set to ensure a been matched with an F bit. While checkpointing
steady flow of information, even on facilities with in ARM, a contention situation may occur. In this
long propagation delays, such as satellites. case, contention during two-way alternate trans-
Four terms are associated with the frame mission is solved by creating a longer interval for
numbering function of the control field. Each data the secondary station than for the primary station,
station maintains independent send and receive so that contention is resolved in favor of the pri-
sequence numbers on the information frames it mary station.
sends and receives. The send state variable V(S)
denotes the receive sequence number N(R) of the
next in-sequence information frame received. The Additional Commands/Responses
value ofV(R) and the corresponding N(R) is incre- Four commands and five responses are defined for
mented by one when an error-free in-sequence the secondary operational modes.
equals the receive state variable. All information The Set Initialization Mode (SIM) command
and supervisory frames contain the N(R), the ex- causes the addressed secondary station to initiate
pected sequence number of the incoming informa- procedures that initialize its link level control func-
tion frame. tions. No information field is permitted.
The Unnumbered Poll (UP) command solicits
Poll/Final Bit response frames from either a group of secondary
The polllfinal (P/F) bit is located in the fifth bit stations (group poll) or an individual secondary
position of the unextended control field and in the station (individual poll). No information field is
ninth bit position of the extended control field. It permitted. The response frame to the UP contains
serves a function in both command and response the station address, plus the N(S) and N(R) num-
frames (see Table 4). In command frames, the P/F bers as required. If the primary station detects an
bit is called the P bit; in response frames, the F bit. idle state (15 ones), or no response is given to the
The P bit solicits a response from a secondary UP command within a given period·oftime, it is
station. Since only one frame with the P bit set to assumed that the secondary station has either com-
" 1" may be outstanding at one time, the primary pleted or will not initiate transmission.
station must receive a response from a secondary The Unnumbered Information (UI) command
station with the F bit set to "1" before transmitting is used to transmit information to a secondary sta-
another poll frame. tion or group of secondary stations without chang-
In normal response mode, the P bit is set to ing the V(S) or V(R) variables. No response is
" 1" to solicit a response from a secondary station. required.
In this mode, the secondary station cannot trans- The Exchange Identification (XID) command
mit until it receives a poll command. causes the addressed secondary station to identify
In asynchronous response mode, the second-
ary station can transmit information frames on an

APRIL 1990 @ 1991 McGraw-Hili, Incorporated. Reproduction Prohibited.


Datapro Information Services Group. Delran NJ 08075 USA
Data Networking ISO 2780 9
High-Level Data
Unk Control (HDLCJ Standards

itself. It may also be used to provide primary sta- Timeouts


tion identification and/or characteristics to the ad- Timeout procedures are defined for both the un-
dressed secondary station. An information field is balanced and balanced classes of procedure. For
optional. the unbalanced class, timeout is used to detect a
The Disconnect Mode (DM) response reports no-reply or lost-reply condition. In ARM, each sec-
the status of a secondary station that is discon- ondary station provides a command timeout func-
nected from the link. Such a station is in NDM or tion. The expiration of a specified time initiates
ADM. No information field is permitted. On a error recovery procedures.
switched network where the call is initiated by the The duration of a timeout is system depen-
secondary station, the DM is sent as a request for a dent and subject to agreement by communicating
mode-setting command. stations. To resolve possible contention situations,
The Request Disconnect (RD) response indi- the secondary station'S timer interval is longer than
cates to the primary station that the secondary sta- that of the primary station. In NRM, the secondary
tion wishes to be placed in one of the disconnected station waits for the primary station to initiate er-
modes, ADM or NDM. ror recovery.
The Request Initialization Mode (RIM) re- For the balanced class, each combined station
sponse is used by the secondary station to report a provides a response timeout to detect a no-reply
need for initialization. After the RIM response, no condition. The expiration of the time initiates er-
further transmissions are accepted or transmitted ror recovery procedures. The timeout duration is
until a SIM or DISC command is received. No in- system dependent and subject to agreement by
formation field is permitted. both stations. The interval of the timer in each sta-
The Unnumbered Information (UI) response tion is unequal in order to resolve possible conten-
is used by the secondary station to transmit infor- tion situations that might occur, especially in a
mation to the primary station without impacting two-way alternate operation. The timer starts when
the V(S) and V(R) variables at either end. a station transmits a frame to which a reply is re-
The Exchange Identification (XID) response quired. When the expected reply is received, the
is transmitted in reply to an XID command. An timer stops .•
information field, which contains the secondary
station's identification and/or characteristics, is
optional.

@ 1991 McGraw-Hili, Incorporated. Reproduction Prohibited. APRIL 1990


Datepro Information Services Group. Delran NJ 08075 USA
./

You might also like