High-Level Data Link Control (HDLC) is a bit-oriented, code-transparent protocol operating at the data link layer of the OSI model, designed for synchronous or start/stop data transmission between network nodes in point-to-point or multipoint configurations.[1] It provides reliable communication through frame structuring, error detection, and flow control mechanisms, supporting simplex, half-duplex, or full-duplex operations across various circuit types, including switched and non-switched networks.[2] Standardized by the International Organization for Standardization (ISO) and International Electrotechnical Commission (IEC) as ISO/IEC 13239, HDLC ensures independent frame numbering and bit pattern independence to facilitate code-transparent transmission.[1]Developed in the 1970s as an evolution of IBM's Synchronous Data Link Control (SDLC), HDLC was formalized to address the need for a universal data link protocol in open systems interconnection.[2] It serves as the foundational basis for several derivative protocols, including the Link Access Procedure, Balanced (LAPB) used in X.25 networks, the Point-to-Point Protocol (PPP) for Internet connections, and vendor-specific variants like Cisco HDLC.[2] The protocol's flexibility has made it a cornerstone in wide area networks (WANs), mainframe communications, and legacy systems, though it has been largely supplanted in modern Ethernet-dominated environments by protocols like PPP and Frame Relay.[2]Key elements of HDLC include its frame formats—divided into information (I-frames) for data transfer, supervisory (S-frames) for control and acknowledgment, and unnumbered (U-frames) for link management—and procedural classes, including the unbalanced class with normal response mode (NRM) and asynchronous response mode (ARM), the balanced class with asynchronous balanced mode (ABM), and the connectionless class.[2] Frames incorporate flag sequences (0x7E) for delimiting, address and control fields for routing and sequencing, optional information payloads, and frame checking sequences (FCS) using 16-bit CRC-CCITT or 32-bit CRC-32 for error detection.[2] Additionally, exchange identification (XID) frames allow negotiation of operational parameters, such as FCS types and window sizes, enhancing adaptability in diverse network topologies.[1]
Overview
Definition and Purpose
High-Level Data Link Control (HDLC) is a bit-oriented protocol operating at Layer 2 of the OSI model, designed for data transfer between devices on a communication link in point-to-point or multipoint configurations.[3] It enables code-transparent transmission, allowing any bit pattern in the data field without interpretation as control sequences, and supports both synchronous and start/stop modes.[4]The primary purposes of HDLC include framing data into discrete units for reliable transmission, error detection using a cyclic redundancy check (CRC) in the Frame Check Sequence (FCS) field, flow control through sequence numbering and supervisory commands, and link management for establishing, maintaining, and terminating connections.[4] These functions ensure efficient and error-free delivery of frames between data stations, with acknowledgments confirming receipt.[1]Unlike character-oriented protocols such as Binary Synchronous Communication (BISYNC), which rely on byte boundaries and special control characters, HDLC uses a bit-oriented approach. In synchronous mode, it employs bit stuffing to achieve transparency—inserting a zero bit after any five consecutive ones in the data to prevent accidental flagemulation—while asynchronous mode uses byte stuffing.[5] This method allows HDLC to operate in point-to-point or multipoint topologies over switched or nonswitched facilities, providing reliable delivery in diverse network configurations.[6]
Key Features
High-Level Data Link Control (HDLC) is characterized by its bit-oriented design, which enables the transmission of arbitrary binary data patterns without restrictions imposed by byte boundaries or specific code sets. This design facilitates code transparency, allowing HDLC to handle any information field content by employing bit stuffing, where a zero bit is inserted by the sender after every sequence of five consecutive one bits, and removed by the receiver upon detection. This mechanism ensures that the flag sequence (01111110), used for frame delimitation, does not appear erroneously within the data, thereby maintaining frame integrity across synchronous links.[7]HDLC provides versatility in operation modes, supporting both connection-oriented services for reliable, sequenced data transfer in unbalanced or balanced configurations and connectionless services for unacknowledged datagram transmission. Its flow control and multiplexing capabilities are implemented through a sliding window protocol, which uses modular sequence numbering (typically modulo 8 or 128) to permit the outstanding transmission of multiple frames before requiring acknowledgments, thus optimizing throughput and resource utilization on point-to-point or multipoint links.[7]For error detection, HDLC incorporates a Frame Check Sequence (FCS) field, standardly 16 bits long and computed using the cyclic redundancy check polynomial x^{16} + x^{12} + x^5 + 1, with an optional 32-bit variant for higher reliability in noisy environments; the FCS covers the address, control, and information fields to detect transmission errors. Additionally, the protocol supports both half-duplex and full-duplex operations, enabling simplex, half-duplex, or full-duplex communication depending on the physical layer and network requirements, as defined in ISO/IEC 13239.[8][7]
History and Standardization
Development Timeline
The origins of High-Level Data Link Control (HDLC) trace back to IBM's development of Synchronous Data Link Control (SDLC) as a proprietary protocol in the early 1970s, specifically released in 1975 to support efficient data transmission within IBM's Systems Network Architecture (SNA). SDLC introduced bit-oriented framing and synchronous operations to replace earlier protocols like Binary Synchronous Communications (BSC), enabling reliable communication over wide-area links in IBM environments.[9]In parallel, the American National Standards Institute (ANSI) developed the Advanced Data Communication Control Procedure (ADCCP) in the mid-1970s, also based on SDLC principles, which provided a similar bit-oriented approach and influenced the broader standardization efforts by offering an open alternative for non-IBM systems.[10] This convergence of proprietary and standards-based protocols set the stage for international harmonization.The International Organization for Standardization (ISO) began adopting and generalizing SDLC concepts into HDLC around 1973, with formal proposals emerging by 1974 as part of efforts to create a unified data linkprotocol for open systems interconnection.[11] ISO's Subcommittee 6 (SC 6) had initiated related work on data link controls as early as 1969, leading to the first international HDLC standards published in 1979: ISO 3309 for frame structure and ISO 4335 for elements of procedure.[12][13]During the 1980s, HDLC evolved further through adaptations for specific networks, notably the Link Access Procedure, Balanced (LAPB) introduced in the 1980 edition of the ITU-T X.25 recommendation for packet-switched public data networks.[14] LAPB streamlined HDLC for balanced, point-to-point operations in X.25 environments, aligning with ISO's ongoing refinements to support emerging telecommunications standards.
ISO and ITU Standards
The High-Level Data Link Control (HDLC) protocol is formally defined by the International Organization for Standardization (ISO) and the International Electrotechnical Commission (IEC) through ISO/IEC 13239, which specifies the frame structures, elements of procedures, classes of procedures, and general purpose information field format for HDLC.[1] This standard was first published in 1997 as a consolidation of prior fragmented ISO documents, including ISO 3309:1993 for HDLC frame structure and ISO 4335:1993 for elements of HDLC procedures.[15][16][17] These earlier standards, dating back to initial publications in 1979, provided the foundational elements for bit-oriented data transmission, but ISO/IEC 13239 unified them into a comprehensive framework supporting synchronous and start/stop modes.[15]The 2002 edition of ISO/IEC 13239 represented a significant revision, incorporating extensions such as support for larger sequence number moduli (up to 31 bits) and additional procedure classes while technically updating the core specifications.[1] This update led to the withdrawal of the superseded documents, including ISO 3309, ISO 4335, and earlier editions of ISO/IEC 13239 (1997 and 2000), establishing ISO/IEC 13239:2002 as the definitive ISO reference for HDLC procedures.[1] The standard emphasizes code-transparent data transmission and compatibility across diverse network environments.[1]Equivalent specifications are provided by the International Telecommunication Union Telecommunication Standardization Sector (ITU-T), which adopts HDLC-based procedures in its recommendations. The Link Access Procedure, Balanced (LAPB), defined in ITU-T Recommendation X.25 (latest edition 1996), uses a subset of HDLC for reliable frame delivery in packet-switched networks, focusing on balanced mode operations between peer stations. Similarly, the Link Access Procedure on the D-channel (LAPD), specified in ITU-T Recommendation Q.921 (1997 edition), extends HDLC for Integrated Services Digital Network (ISDN) user-network interfaces, adding service access point identifiers for multiplexing multiple logical links.[18] These ITU-T adaptations ensure interoperability in telecommunication systems while aligning closely with ISO/IEC 13239.[18]National variants, such as the American National Standards Institute (ANSI) Advanced Data Communication Control Procedures (ADCCP) under ANSI X3.66-1979 (reaffirmed 1995), mirror HDLC but introduce differences in frame handling, notably in the unnumbered format for extended sequence numbering and optional 32-bit frame check sequences. ADCCP prioritizes compatibility with U.S. data communication systems, yet it remains functionally equivalent to ISO HDLC in core operations like error detection and flow control.
Frame Structure
Flag Delimitation
In High-Level Data Link Control (HDLC), frames are delimited by a specific flagsequence to identify the boundaries of datatransmission units. The flagsequence is defined as the 8-bit pattern 01111110 (hexadecimal 0x7E), which marks both the start and end of each frame. This bit-oriented approach ensures synchronization on synchronous links by providing a unique delimiter that is unlikely to occur naturally in the data stream.[19]To maintain the integrity of the flag as a delimiter and prevent false frame detection, HDLC employs bit stuffing in the frame content between the opening and closing flags. Whenever five consecutive 1 bits appear in the transmitted data (address, control, information, or frame check sequence fields), the transmitter automatically inserts a 0 bit immediately after them. This rule ensures that no sequence of six or more consecutive 1 bits occurs in the payload, avoiding accidental emulation of the flag pattern (which requires six 1 bits). At the receiver, the reverse process occurs: any 0 bit following five consecutive 1 bits is discarded, restoring the original data without altering its meaning since the operation is transparent to higher layers.[19][20]Efficiency in continuous transmission is achieved by allowing the closing flag of one frame to serve as the opening flag for the immediately following frame, eliminating redundant flags between adjacent frames. This shared flag optimization reduces overhead on busy links while preserving clear boundaries.[19]Frame transmission can be intentionally aborted using a specific sequence to signal incompletion or error, such as 01111111 (a 0 followed by seven 1 bits), which differs from the standard flag by its final bit. Sequences of seven or more consecutive 1 bits at the end of a frame are treated as invalid and discarded by the receiver, providing a mechanism to ignore corrupted or aborted frames.[20]
Address and Control Fields
The address field in an HDLC frame is an 8-bit octet that identifies the destination data station for command frames or the originating station for response frames.[20] In multipoint configurations, it specifies secondary stations, with the all-stations address encoded as 0xFF (11111111 in binary) to broadcast to all stations on the link.[20] The field supports extension through additional octets when more than 256 addresses are required; the least significant bit of each octet is set to 0 to indicate further extension octets, and to 1 in the final octet, allowing recursive expansion by prior agreement among stations, though this restricts single-octet addressing to 128 unique values.[19] In extended formats for multipoint operation, the all-stations address may use 0x03 in the first octet followed by extension bits to maintain compatibility.[20]The control field conveys commands to initiate operations or responses to previously received commands, with its format determining the frame type and associated parameters.[19] The control field is 8 bits long in basic mode for all frame types. In extended mode supporting modulo-128 sequence numbering, it extends to 16 bits for information (I) frames and supervisory (S) frames to accommodate larger sequence numbers, while unnumbered (U) frames remain 8 bits.[20][19] The frame type is determined by the control field format. For S-frames, the two least significant bits are 01 followed by a 2-bit supervisory function code (e.g., 00 for receive ready). For U-frames, they are 11 followed by 5-bit modifier codes supporting up to 32 unnumbered operations (e.g., set normal response mode). For I-frames, the format includes 3-bit send and receive sequence numbers (N(S) and N(R)) in basic mode, with the poll/final (P/F) bit in bit position 5, without a fixed type code in the least significant bits.[20]Both fields support optional extension mechanisms to enhance capacity in advanced modes; for the address field, additional octets follow the initial one if the extension bit is set, while the control field extends to 16 bits by adding a second octet with a 0 in bit 8 to indicate further expansion if needed, enabling support for larger sequence spaces in numbered formats.[19] The poll/final (P/F) bit, located in bit 4 of the 8-bit control field (or bit 8 in extended formats), is used in commands to solicit a response (P=1) or in responses to indicate the final frame (F=1).[20] These structures ensure efficient routing and control in bit-oriented synchronous transmission as defined in ISO/IEC 3309.[16]
Information and FCS Fields
The Information field in an HDLC frame carries the user datapayload and is exclusively used in Information (I-) frames for data transfer, as well as in certain unnumbered frames like UI-frames where applicable. This field follows the Control field and precedes the FCS, consisting of a variable-length sequence of bits that is typically organized into octets for compatibility with higher-layer protocols. Per ISO/IEC 3309, the Information field can be of any length, with no upper bound specified in the core standard, though practical limits are imposed by buffer sizes and link parameters; in extended modes as defined in ISO/IEC 13239, the information field remains of variable length with no upper bound specified in the standard, though practical limits apply based on implementation.[16][1]Transparency within the Information field is ensured through bit stuffing, a technique where the transmitter inserts a 0-bit after any sequence of five consecutive 1-bits to avoid mimicking the flag sequence (01111110), and the receiver removes these inserted bits during desuffing. Padding octets may be optionally added to the Information field in some implementations to meet a minimum frame size requirement, particularly in asynchronous or byte-oriented variants, ensuring the frame remains valid even for short payloads; however, HDLC procedures do not enforce a strict minimum beyond the header and FCS overhead.[16][1]The Frame Check Sequence (FCS) field, positioned immediately before the closing flag, enables error detection across the frame's protected portions. It defaults to 16 bits, generated using the CRC-16 polynomial x^{16} + x^{12} + x^5 + 1, or may extend to 32 bits via the CRC-32 polynomial x^{32} + x^{26} + x^{23} + x^{22} + x^{16} + x^{12} + x^{11} + x^{10} + x^8 + x^7 + x^5 + x^4 + x^2 + x + 1 by prior agreement between stations. The FCS is computed modulo-2 over the Address, Control, and Information fields (excluding flags, bit stuffing, and any padding not part of the user data), with the transmitter presetting the CRC register to all 1s, appending the one's complement of the resulting remainder, and the receiver validating against expected non-zero remainders (e.g., 0xF0B8 for 16-bit).[16][1]If the recomputed FCS does not match the received value, the frame is deemed erroneous and silently discarded by the receiver without generating an acknowledgment, preventing propagation of corrupted data and triggering retransmission via supervisory frames or timeout mechanisms in the data link procedures. This discard policy applies uniformly to all frame types utilizing the Information field, ensuring reliable operation over potentially noisy links.[1][21]
Framing Techniques
Bit-Oriented Synchronous Framing
High-Level Data Link Control (HDLC) employs bit-oriented synchronous framing as its primary method for delineating frames over synchronous links, enabling efficient, code-transparent transmission of data bits without regard to their content. This approach uses a unique flag sequence, 01111110 in binary, to mark the beginning and end of each frame, ensuring precise frame boundaries in a continuous bit stream.[20][22]In synchronous operation, HDLC relies on NRZI (Non-Return-to-Zero Inverted) encoding to facilitate bit synchronization, where a binary 0 is represented by a transition in the signal level and a binary 1 by no transition, providing sufficient signal changes for clock recovery even in long sequences of 1s. The clock is typically supplied externally via a dedicated line or recovered from the incoming data transitions by the receiver, supporting full-duplex or half-duplex modes over point-to-point or multipoint links. This encoding and clocking mechanism ensures reliable bit-level alignment without the need for embedded clock signals in the data itself.[2][23]Transparency in bit-oriented framing is achieved through bit stuffing, a process where the transmitter inserts a 0 bit immediately after any sequence of five consecutive 1s in the frame content (excluding the flags), preventing the accidental creation of a flag sequence within the data. The receiver, upon detecting five consecutive 1s followed by a 0, removes the stuffed 0 to restore the original data, maintaining code independence and allowing arbitrary bit patterns to be transmitted without interpretation issues. This technique applies to all fields except the opening and closing flags, with frames required to be at least 32 bits long between flags to avoid invalid delineation.[20][22]The advantages of bit-oriented synchronous framing include high efficiency for continuous data streams, as the overhead from bit stuffing is minimal—typically less than 2% in random data—and it supports variable-length information fields up to buffer limits without fixed character boundaries. This results in low latency and maximal throughput on high-speed links, making it suitable for applications requiring reliable, uninterrupted transmission.[22][20]Implementation of this framing is common in dedicated telecommunications circuits, such as leased lines or packet over SONET/SDH interfaces, where synchronous operation over nonswitched facilities ensures stable clocking and high bandwidth utilization in enterprise and carrier networks.[20][1]
Byte-Oriented Asynchronous Framing
Byte-oriented asynchronous framing adapts the HDLC protocol for start-stop (asynchronous) transmission over character-oriented serial links, where each octet is delimited by start and stop bits to ensure proper synchronization without a continuous clock signal. In this mode, HDLC operates in an octet-synchronous manner, treating data as bytes rather than individual bits, which facilitates compatibility with asynchronous hardware like UARTs. This adaptation maintains the core HDLC framestructure but modifies the transparencymechanism to handle byte boundaries explicitly.[1]Frames in byte-oriented asynchronous HDLC are delimited by the flag octet 0x7E at both the beginning and end, serving as the start and end markers similar to the bit pattern in synchronous modes. To achieve data transparency and prevent false flags, byte stuffing is employed using the control escape octet 0x7D: any occurrence of 0x7E or 0x7D within the frame payload or fields is replaced by the transmitter with 0x7D followed by the original octet XORed with 0x20 (bit 6 complemented). The receiver reverses this process by removing the escape octet and restoring the complemented byte upon detecting 0x7D. This method ensures that control octets do not mimic delimiters, allowing reliable frame delineation even in asynchronous environments.[24][23]This framing variant is particularly suited for low-speed modems and UART-based serial ports, where intermittent connections and simple hardware preclude synchronous operation. It incurs higher overhead compared to bit-oriented synchronous framing due to the per-octet start and stop bits (typically adding 20-25% inefficiency at common baud rates) and the fixed byte alignment, which limits flexibility in bit-level encoding.[25][1]The specifications for byte-oriented asynchronous framing in HDLC are outlined in ISO/IEC 13239:2002, which encompasses procedures for both synchronous and start/stop modes, building on earlier definitions in ISO 3309:1984/PDAD1 (Addendum 1: Start/Stop Transmission). These standards ensure code-transparent transmission over asynchronous links while preserving HDLC's error detection and control capabilities.[1][24]
Station Types and Operating Modes
Primary, Secondary, and Combined Stations
In High-Level Data Link Control (HDLC), the primary station is responsible for organizing data flow, performing link-level error recovery, and controlling the overall operation of the data link. It initiates communication by transmitting command frames, such as information, supervisory, and unnumbered frames, to secondary stations using select or poll commands, and it verifies the integrity of received frames.[20]The secondary station operates under the direction of the primary station, transmitting only response frames in reply to received commands. It cannot initiate unsolicited transmissions without explicit permission from the primary, such as through a poll in Normal Response Mode (NRM), though it may respond independently in Asynchronous Response Mode (ARM); its primary functions include frame verification and sending supervisory or unnumbered responses.[20]A combined station functions as both a primary and a secondary station within the protocol, capable of sending and receiving both command and response frames while sharing responsibility for error recovery and link management. This role enables peer-to-peer communication in balanced modes, where two combined stations interact equally without a strict hierarchy.[20]In multi-station networks, the address field in HDLC frames facilitates the selection of specific secondary stations by the primary, using unique individual addresses for targeted commands or group addresses for broadcasting to multiple secondaries, while the global address (all ones) instructs all stations to act on a frame.[20]
Unbalanced and Balanced Modes
High-Level Data Link Control (HDLC) operates in two primary configurations: unbalanced and balanced modes, which define the control dynamics between stations on the link. In unbalanced modes, a primary station exerts centralized control, polling secondary stations to elicit responses, while balanced modes enable peer-like interaction between combined stations without a dominant controller. These modes ensure reliable data exchange while accommodating various link topologies, such as point-to-point or multipoint. HDLC procedures apply to both synchronous and start/stop transmissions.[26]The Normal Response Mode (NRM) represents the standard unbalanced operation, where the primary station initiates all transmissions and explicitly polls secondary stations for responses using supervisory commands. Secondary stations remain passive, transmitting data only upon receiving permission from the primary, which prevents contention on multipoint links and maintains orderly polling sequences. This mode is particularly suited for hierarchical environments, such as master-slave configurations in legacy systems.[26]The Asynchronous Response Mode (ARM) is an unbalanced mode similar to NRM but allowing secondary stations to initiate transmissions without explicit polling from the primary. Secondaries can send information or supervisory frames independently, though they still operate under primary control for link management. This mode supports more flexible responses in multipoint setups while maintaining overall hierarchy.[1]In contrast, the Asynchronous Balanced Mode (ABM) provides a balanced configuration, allowing both combined stations to independently initiate transmissions, supervise the link, and recover from errors without awaiting permission from the other. This peer-to-peer symmetry supports efficient bidirectional communication, as seen in the Link Access Procedure, Balanced (LAPB) subset of HDLC used in ITU-T X.25 networks for packet-switched data links. ABM eliminates the need for polling, reducing latency in point-to-point setups.[26][14]Transitions between modes occur through unnumbered (U-) frames, which carry mode-setting commands to reconfigure the linkstate. The Set Normal Response Mode (SNRM) command establishes NRM in unbalanced setups, prompting a secondary or combined station to enter the mode and confirm with an unnumbered acknowledgment (UA) response. The Set Asynchronous Response Mode (SARM) command initiates ARM, enabling secondary-initiated transmissions upon UA confirmation. Similarly, the Set Asynchronous Balanced Mode (SABM) command initiates ABM, enabling balanced operation upon UA confirmation, while a disconnect (DISC) command can revert or terminate the link. These commands facilitate dynamic adaptation without disrupting ongoing sessions.[26]
Frame Types and Operations
Information Frames
Information frames (I-frames) in High-Level Data Link Control (HDLC) serve the primary purpose of transferring user data across the link while providing a mechanism for piggybacked acknowledgments of previously received frames. Each I-frame carries an information field containing the actual data payload, which can vary in length depending on the implementation, and includes sequence numbers to ensure reliable ordered delivery. This design allows efficient data transmission by combining data transfer with flow and error control functions, reducing the need for separate acknowledgment frames in many cases.[27]The structure of the control field in an I-frame supports both basic and extended formats to accommodate different sequence numbering moduli. In the basic 8-bit control field format (modulo 8), the send sequence number N(S) occupies bits 1 through 3 (with the low-order bit at bit 1), the poll/final (P/F) bit is at bit 4, and the receive sequence number N(R) occupies bits 5 through 7 (with the low-order bit at bit 5), with bit 8 set to 0. For the extended 16-bit control field format (modulo 128), N(S) uses bits 1 through 7 (low-order bit at bit 1), the P/F bit is at bit 8, and N(R) uses bits 9 through 15 (low-order bit at bit 9), with bit 16 set to 0. These formats ensure that I-frames can indicate the sequence position of the current data frame and acknowledge prior frames via N(R).[27]Sequence numbering in I-frames operates using either modulo 8 or modulo 128 arithmetic, enabling the tracking of frame order and detection of lost or duplicated frames. The N(S) value represents the sequence number of the transmitted I-frame, incremented sequentially for each new frame sent by the transmitter. The N(R) value indicates the sequence number of the next I-frame the receiver expects, thereby acknowledging all frames up to N(R)-1 as correctly received. The maximum window size, which defines the number of unacknowledged I-frames a sender may have outstanding, is limited to 7 in modulo 8 mode and up to 127 in modulo 128 (extended) mode, preventing buffer overflow and maintaining link efficiency.[27]Transmission of I-frames follows strict rules to ensure reliability and prevent sequence violations. A sender may only transmit an I-frame if its N(S) falls within the current receive window of the peer, meaning it must wait for acknowledgment of earlier frames before exceeding the window limit. The N(R) in an I-frame provides piggybacked acknowledgment, but if no such opportunity arises, supervisory frames can be used for explicit acknowledgments. Upon receiving a reject (REJ) supervisory frame, the sender must retransmit all I-frames starting from the N(R) indicated in the REJ, discarding any intervening unacknowledged frames to recover from errors. This go-back-N retransmission strategy ensures error recovery while minimizing overhead in normal operation.[27]
Supervisory Frames
Supervisory frames (S-frames) in High-Level Data Link Control (HDLC) serve as non-data-carrying control mechanisms for managing flow and supervising errors on the link, enabling stations to acknowledge receipts, signal readiness or busyness, and request retransmissions without embedding user information. Defined in the ISO HDLC standards, these frames are essential for maintaining reliable communication in both unbalanced and balanced modes, particularly when acknowledgments cannot be piggybacked onto information frames.[20] They operate using a compact 8-bit controlfield in the unextended format, which encodes the frame type, supervisory function, and relevant sequence information to coordinate operations between primary and secondary stations.[28]The control field of an S-frame begins with bit 8 (MSB) set to 0 and bit 7 set to 1, followed by two bits (bits 6 and 5) that encode the supervisory type: 00 for Receive Ready (RR), 01 for Reject (REJ), 10 for Receive Not Ready (RNR), and 11 for Selective Reject (SREJ). The poll/final (P/F) bit is at bit 4, and the receive sequence number N(R) occupies bits 1 through 3 (with the low-order bit at bit 1). In extended mode, the control field expands to 16 bits, with the supervisory type in bits 14-13, P/F at bit 12, and N(R) in bits 11-5 (low-order at bit 5).[20][28]The four S-frame types address specific supervisory needs. The RR frame (code 00) signals that the receiving station is prepared to accept additional information frames and confirms successful receipt of all frames numbered up to N(R)-1, facilitating ongoing flow control. In contrast, the RNR frame (code 10) acknowledges frames up to N(R)-1 but notifies the sender of a temporary inability to receive more data due to busyness, effectively pausing transmissions until a subsequent RR resumes them. For error handling, the REJ frame (code 01) indicates detection of an error or out-of-sequence frame, prompting the sender to retransmit all information frames starting from N(R) in a go-back-N recovery process; only one REJ condition can be active at a time, and it clears upon receipt of the requested frame. The SREJ frame (code 11) provides more efficient selective recovery by targeting retransmission solely of the erroneous frame at N(R), allowing subsequent correct frames to be accepted while the error is resolved, though only one SREJ can be pending until cleared.[20][28]In practice, RR and RNR frames primarily support window-based flow control by adjusting the sender's transmission window, often limited to size 1 in basic HDLC procedures but extensible for higher throughput. REJ and SREJ frames enable robust error recovery, integrating with sequence numbering to ensure ordered delivery; N(R) directly references the expected sequence from information frames, allowing precise acknowledgment and retransmission requests. The P/F bit enhances supervisory efficiency by structuring command-response exchanges, where a primary station sets P=1 in an S-frame to poll for status, and the secondary responds with F=1 in its S-frame to conclude the interaction. These mechanisms, as specified in ISO 4335, ensure HDLC's adaptability to various link conditions while minimizing overhead.[20]
Unnumbered Frames
Unnumbered frames (U-frames) in High-Level Data Link Control (HDLC) serve primarily for link management tasks and unacknowledged information transfer, without incorporating sequence numbers for flow control or error recovery. These frames enable station mode setting, disconnection procedures, and the transmission of unsequenced data, making them essential for initial link establishment and auxiliary operations in both unbalanced normal response mode (NRM) and balanced asynchronous balanced mode (ABM). Unlike information or supervisory frames, U-frames do not rely on numbered acknowledgments, allowing their use in scenarios requiring simple, non-sequenced exchanges.[29]The control field of a U-frame is an 8-bit structure beginning with the binary prefix "11" (bits 8 and 7 set to 1), followed by modifier bits in positions 6, 5, 3, 2, and 1 that encode specific command or response functions, with the poll/final (P/F) bit positioned at bit 4. This format ensures code transparency and supports synchronous bit-oriented transmission as defined in the HDLC procedure elements.[29]Key U-frame commands for mode setting include SNRM (Set Normal Response Mode, control code 0x83) and SNRME (Set Normal Response Mode Extended, 0x8F), which initiate unbalanced operations in NRM by configuring the secondary station to accept commands from the primary. For balanced modes, SABM (Set Asynchronous Balanced Mode, 0x2F) and SABME (Set Asynchronous Balanced Mode Extended, 0x3F) establish ABM, allowing peer-to-peer communication between combined stations. These commands transition the link from an inactive state to the specified operating mode, with the P/F bit set to poll (1) in the command frame.[29]The DISC (Disconnect, 0x43) command terminates the current mode, prompting the receiving station to return to a disconnected state, typically issued by the primary in NRM or either peer in ABM. For information transfer, the UI (Unnumbered Information, 0x03) frame conveys data without acknowledgments or sequencing, suitable for low-priority or broadcast messages where reliability is handled at higher layers. These frames carry user data in the information field but do not trigger supervisory responses.[29]Responses to U-frame commands include UA (Unnumbered Acknowledgment, 0x63), which confirms receipt of mode-setting commands like SNRM or SABM, with the P/F bit set to final (1) to indicate acceptance and mode activation. The UA frame contains no information field, serving solely as a positive acknowledgment to complete the mode transition process.[29]
Command/Response
Hex Code
Modifier Bits (M1-M5)
Purpose
SNRM
0x83
00011
Set Normal Response Mode (unbalanced)
SNRME
0x8F
00111
Set Normal Response Mode Extended
SABM
0x2F
01011
Set Asynchronous Balanced Mode
SABME
0x3F
01111
Set Asynchronous Balanced Mode Extended
DISC
0x43
10001
Disconnect link
UI
0x03
00001
Unnumbered Information transfer
UA
0x63
11001
Unnumbered Acknowledgment
This table summarizes the primary U-frame types, highlighting their roles in HDLC link management.[29]
Control Field Mechanics
Sequence Numbering
In High-Level Data Link Control (HDLC), sequence numbering ensures the orderly transfer of information frames (I-frames) across the data link by assigning unique identifiers that track the sequence of transmitted and received frames. This mechanism relies on modulo arithmetic, where sequence numbers cycle through a finite range to prevent ambiguity and support efficient flow control. The standard supports two moduli: 8 (using 3-bit sequence numbers, ranging from 0 to 7) or 128 (using 7-bit sequence numbers, ranging from 0 to 127), allowing for up to 7 or 127 unacknowledged I-frames in transit, respectively.[29]The sender's sequence number, denoted N(S), is included in each I-frame and represents the sequence number of the frame being transmitted; it is set to the current value of the sender's state variable V(S) before transmission and increments by one (modulo 8 or 128) for each subsequent I-frame.[29] The receiver's sequence number, N(R), appears in both I-frames and supervisory frames (S-frames); it indicates the sequence number of the next expected in-sequence I-frame and implicitly acknowledges the correct receipt of all prior I-frames up to N(R) - 1.[29] The receiver maintains a state variable V(R), which advances by one upon successful receipt of an error-free I-frame where N(S) matches V(R), enabling the receiver to detect out-of-sequence frames and request corrections.[29]The window mechanism governs the number of outstanding unacknowledged I-frames, with the sender's window size limited to one less than the modulus (e.g., 7 for modulo 8) to avoid overlap in sequence number interpretation.[29] The sender may not transmit a new I-frame if doing so would exceed the window, as determined by comparing V(S) against the acknowledged N(R) from the receiver. Upon receiving a valid N(R), the sender slides its window forward, resuming transmission of subsequent frames. This sliding window promotes efficient utilization of the link, particularly in scenarios with high latency.[29]Retransmission is initiated by the sender upon detecting a timeout or receiving a reject (REJ) supervisory frame, where the REJ specifies retransmission starting from the I-frame numbered N(R).[29] In such cases, the sender resets N(S) to the value of the received N(R) for the first retransmitted frame and increments thereafter, ensuring continuity in the sequence while recovering from errors or losses. This procedure, combined with the modulo-based numbering, maintains reliability without requiring frame-by-frame acknowledgments.[29]
Poll/Final Bit Functionality
In the High-Level Data Link Control (HDLC) protocol, the Poll/Final (P/F) bit serves as a critical mechanism for synchronizing request-response interactions between stations. Positioned as the fourth bit (bit 4, zero-based from the least significant bit) in the 8-bit control field of both unextended and extended formats, the P/F bit is encoded as 1 when functioning as the Poll (P) bit in command frames or as the Final (F) bit in response frames, and 0 otherwise.[20][30]The Poll function occurs when the primary station sets the P bit to 1 in a command frame to solicit an immediate response from one or more secondary stations. This bit prompts the secondary station(s) to transmit a response frame at the earliest opportunity, ensuring orderly dialogue on the link; only one such poll frame may be outstanding at a time, requiring acknowledgment before issuing another.[20] In contrast, the Final function is employed by the responding station, which sets the F bit to 1 in its response frame to indicate that it is the concluding frame in the current transmission sequence or directly acknowledges a prior poll. This pairing of P and F bits maintains synchronization, with the F bit taking precedence over other pending responses except for mode-setting commands.[20][30]In Asynchronous Balanced Mode (ABM), where combined stations operate with equal control over a point-to-point link, the P/F bit facilitates turn-taking during half-duplex operations. Here, a station sets P=1 to request control transfer, and the peer responds with F=1 to yield the channel, enforcing two-way alternate transmission while preventing simultaneous sends on shared media.[20]For error handling, an unanswered poll—detected via expiration of a system-defined response timer—triggers timeout procedures, initiating link-level recovery such as retransmission requests or mode resets to restore normal operation. In ABM, each station independently monitors for no-reply conditions, with unequal timer values resolving potential contention during recovery.[20]
Command and Response Repertoire
The High-Level Data Link Control (HDLC) protocol defines a minimal set of commands and responses that enable primary and secondary stations to establish, maintain, and terminate data links, while supporting reliable information transfer and error supervision.[7] These elements are encoded in the control field of HDLC frames and form the core repertoire for basic operations, including mode setting, data transfer, error supervision, and disconnection.[20]
Commands
HDLC commands are issued by primary stations (or combined stations acting as primary) to control link operations. Information (I) frames serve as the primary command for data transfer, carrying user information in the frame's information field while including sequence numbers N(S) for the transmitted frame and N(R) for acknowledgment of received frames.[7] Supervisory commands, used for flow control and error recovery without carrying user data, include Receive Ready (RR), which acknowledges frames up to N(R)-1 and indicates readiness to receive more; Receive Not Ready (RNR), which acknowledges frames but signals a temporary inability to accept further I-frames; Reject (REJ), which requests retransmission of frames starting from N(R) due to detected errors; and Selective Reject (SREJ), which targets a single erroneous frame at N(R) for retransmission while allowing others to proceed.[20] Unnumbered commands, which do not use sequence numbering, encompass Set Normal Response Mode (SNRM) to initialize a secondary station in normal response mode; Set Asynchronous Balanced Mode (SABM) for balanced operation in asynchronous mode; Disconnect (DISC) to terminate the link and return stations to a disconnected state; and Unnumbered Information (UI) to send data without sequence control or required acknowledgment.[7]
Responses
Responses in HDLC are generated by secondary stations (or combined stations acting as secondary) to acknowledge or react to commands. Supervisory responses mirror the supervisory commands (RR, RNR, REJ, SREJ) but are used in the response context to confirm receipt or report conditions.[20] Unnumbered responses include the supervisory set plus Unnumbered Acknowledgment (UA), which positively confirms receipt of mode-setting commands like SNRM, SABM, or DISC, thereby establishing or terminating the link mode.[7] The Frame Reject (FRMR) response addresses protocol violations, such as invalid sequence numbers N(S) or N(R), invalid control field contents, or buffer overflows, and includes an information field copying the rejected frame along with a control field indicating the specific error reason.[20]
This table summarizes the core repertoire as defined in the HDLC procedures.[7]
Link Configurations and Extensions
Point-to-Point and Multipoint Links
High-Level Data Link Control (HDLC) supports both point-to-point and multipoint link configurations, allowing it to adapt to various network topologies while maintaining reliable synchronous datatransmission. In point-to-point links, HDLC establishes a direct connection between two stations, typically operating in Asynchronous Balanced Mode (ABM) where both stations function as combined stations capable of issuing commands and responses independently. The address field in HDLC frames, which normally identifies the destination station, is often ignored or set to a fixed value (such as all ones for broadcast) in point-to-point setups since only two devices are involved, simplifying frameprocessing and eliminating the need for unique addressing. This configuration ensures efficient, bidirectional communication without the overhead of station selection.[29]In contrast, multipoint links in HDLC employ an unbalanced configuration with one primary station and multiple secondary stations connected to a shared medium, enabling efficient resource sharing in multi-drop environments. The primary station controls access by sequentially polling secondary stations using the address field to specify the target, with the poll (P) bit set to 1 in command frames to solicit responses. Secondary stations respond only when addressed, setting the final (F) bit to 1 to indicate the end of their transmission sequence, which prevents collisions and maintains orderly data flow. This polling mechanism is central to Normal Response Mode (NRM) or Asynchronous Response Mode (ARM) in unbalanced operation, where the primary organizes all data exchange.[29]HDLC's link configurations are categorized as balanced or unbalanced to reflect station roles and interaction patterns. Balanced configurations involve exactly two combined stations, each acting as both primary and secondary, supporting peer-to-peer communication without a designated controller. Unbalanced configurations feature a single primary station that issues commands and interprets responses, alongside one or more secondary stations that execute commands and provide responses, making it suitable for hierarchical topologies like multipoint links. In multipoint scenarios, the primary station's polling sequence via the address field effectively allocates bandwidth by granting transmission opportunities to specific secondaries in a controlled manner, ensuring fair access without built-in contention or token mechanisms. Primary stations organize overall data flow, secondaries handle responses under direction, and combined stations blend both roles in balanced links.[29]
Optional Functional Extensions
High-Level Data Link Control (HDLC) supports several optional functional extensions that can be negotiated between stations to enhance reliability, efficiency, and adaptability beyond the basic frame structures and procedures. These extensions are primarily enabled through the exchange identification (XID) command/response unnumbered (U) frame, which allows stations to propose and agree on capabilities such as error detection enhancements and advanced recovery mechanisms during link setup or renegotiation. The XID frameformat, defined in ISO/IEC 8885, uses parameter identifiers (PIs) to specify optional functions, ensuring compatibility while permitting tailored configurations for specific applications.[31][32]One key extension is the use of a 32-bit frame check sequence (FCS) instead of the standard 16-bit version, providing stronger error detection for longer frames or noisier links. This option is negotiated via the XID frame, where stations indicate support for both FCS lengths, allowing the selection of 32-bit FCS for subsequent information interchange to reduce undetected error rates in high-throughput environments. ISO/IEC 13239 specifies the procedures for this negotiation, ensuring that the FCS polynomial (typically CRC-32) is applied consistently across compatible devices.[1][7]Extended sequence numbering represents another negotiable feature, supporting moduli beyond the basic mod 8 or mod 128, up to mod 2^{31}-1 (31-bit numbering) for applications requiring very large window sizes and minimal sequence space exhaustion. This extension, introduced in amendments to ISO/IEC 8885 and incorporated into ISO/IEC 13239, uses additional bits in the control field to accommodate the larger sequence values, enabling efficient flow control over long-delay or high-bandwidth links without frequent acknowledgments. Stations negotiate the modulus size during XID exchange to align on the extended scheme, which can also include 15-bit options (mod 2^{15}-1) as an intermediate step.[33][1]Selective retransmit support, via the selective reject (SREJ) supervisory frame, allows a receiver to request retransmission of a single erroneous information frame without affecting others in the sequence, improving efficiency over basic reject (REJ) mechanisms that discard all subsequent frames until recovery. This optional function is negotiated in the XID frame and operates within the asynchronous balanced mode (ABM), where the SREJ frame carries the receive sequence number (N(R)) of the specific frame needing retransmission. ISO 4335 defines the SREJ as a mod 128-compatible option, but it requires explicit agreement to avoid conflicts with simpler recovery procedures. Relatedly, one-way sequence numbering can be selected as an extension for unidirectional data flows, eliminating the need for bidirectional numbering in certain simplex or broadcast scenarios, though two-way numbering remains the default for balanced operations.[20][1]Earlier HDLC specifications included extensions like basic disconnect mode, which used a dedicated disconnected mode (DM) response for simplified link termination in secondary stations.[1][20]
Applications and Related Protocols
Usage in Networking Standards
High-Level Data Link Control (HDLC) serves as the foundational protocol for several key networking standards, providing bit-oriented framing, error detection, and flow control mechanisms that have been adapted for specific environments.The Link Access Procedure Balanced (LAPB), defined in ITU-T Recommendation X.25, is a subset of HDLC tailored for reliable data interchange in packet-switched networks, particularly over the link between Data Terminal Equipment (DTE) and Data Circuit-terminating Equipment (DCE) in X.25 systems. LAPB employs HDLC's balanced mode for peer-to-peer communication, ensuring error-free transmission through acknowledgments and retransmissions in a full-duplex environment.In Integrated Services Digital Network (ISDN), the Link Access Procedure on the D-channel (LAPD), specified in ITU-T Recommendation Q.921, extends HDLC principles to support signaling and packet data on the D-channel. LAPD introduces service access point identifiers (SAPI) in the address field to multiplex multiple logical links over a single physical channel, while retaining HDLC's frame structure for supervisory, unnumbered, and information frames.The Point-to-Point Protocol (PPP), as detailed in RFC 1662, utilizes HDLC-like framing to encapsulate multi-protocol datagrams over synchronous and asynchronous point-to-point links, enabling IP and other network-layer protocols to operate over serial connections.[23] PPP adopts HDLC's flag sequence, address and control fields (simplified to broadcast), and frame check sequence, but adds protocol field compression and asynchronous character stuffing for flexibility.[23]Frame Relay, built on the Link Access Procedure for Frame-mode Bearer Services (LAPF) in ITU-T Recommendation Q.922, leverages HDLC's core framing while introducing Data Link Connection Identifier (DLCI) addressing for virtual circuit multiplexing over wide-area networks. The DLCI, encoded in the address field, supports up to 1024 connections per link, with HDLC's cyclic redundancy check ensuring integrity in this simplified, connection-oriented protocol.Among other variants, IBM's Synchronous Data LinkControl (SDLC) predates and influenced HDLC, serving as a legacyprotocol in Systems Network Architecture (SNA) environments with similar bit-synchronous framing and control procedures. The ANSI Advanced Data Communication Control Procedures (ADCCP), standardized as X3.66, represents a compatible variant of HDLC, emphasizing open systems interoperability with nearly identical frame formats and procedures.[34]
Modern Implementations and Limitations
In contemporary networking, HDLC continues to find niche applications in embedded systems and specialized environments where reliable serial communication is required. For instance, it is employed in wireless sensor networks to provide efficient bit-oriented framing for low-power devices, enhancing throughput through pipelined register modules.[35] In industrial automation, HDLC serves as the data link layer for Modbus Plus, a proprietary high-speed protocol developed by Schneider Electric that supports up to 1 Mbps transmission over RS-485 cabling, enabling peer-to-peer communication among up to 64 nodes per network in large-scale systems like HVAC and energy management.[36][37][38]Satellite and space communications represent another key area of HDLC deployment, leveraging its simple framing for Internet Protocol data delivery over RF links. Current Space IP missions utilize HDLC framing to provide standard serial interfaces, with integration proposed into CCSDS recommendations to accommodate variable-length frames in space systems.[39] It has been implemented on over 70 spacecraft, including the UoSAT-12 satellite, where it supports downlinks at rates like 38.4 Kb/s, offering compatibility with commercial off-the-shelf routers and minimal overhead from bit-stuffing (typically 1-3%).[40]Despite these uses, HDLC faces significant limitations in high-speed modern networks. Its bit-stuffing mechanism introduces overhead, ranging from 1-3% under normal conditions but up to 20% in worst-case scenarios, which becomes inefficient at data rates exceeding 45 Mb/s compared to alternatives like Packet over SONET.[40] HDLC lacks built-in encryption, relying on higher-layer protocols for security, and does not support data link layer fragmentation, requiring packets to fit within fixed frame sizes or risk higher-layer handling.[41] These constraints, combined with its synchronous orientation and absence of dynamic addressing, make it less adaptable than protocols like PPP.[42]An important update to HDLC's framework is provided by RFC 1662, which defines HDLC-like framing for the Point-to-Point Protocol (PPP), adapting the ISO HDLC structure (Flag 0x7E, Address 0xFF, Control 0x03) to support multi-protocol datagrams over synchronous and asynchronous links.[23] This extension enables PPP's use in broader scenarios, such as IP over serial connections, but HDLC itself remains rare in new designs post-2000s, primarily relegated to legacy support in equipment like Cisco routers where it serves as the default encapsulation for serial interfaces.[43]In place of HDLC, modern networks favor Ethernet framing for its scalability in LANs and MPLS for WAN label switching, which encapsulate diverse protocols with lower overhead and better support for high-speed, multiprotocol environments.[44] HDLC's role is thus confined to maintaining interoperability with older TDM-based systems.[45]