HDLC, or High-Level Data Link Control, is a networking protocol that governs how data is packaged into frames and transmitted between two devices over a communication link. It operates at the data link layer (Layer 2) of the OSI model, sitting just above the physical hardware. HDLC is one of the oldest and most widely adopted data link protocols, and its design has influenced many of the protocols still in use today, including PPP (Point-to-Point Protocol) and the framing used in Ethernet.
What HDLC Actually Does
HDLC is a bit-oriented protocol, meaning it works at the level of individual bits rather than whole characters. Its core jobs are to define how data frames are structured, manage the flow of data between devices so one side doesn’t overwhelm the other, and detect transmission errors. It supports both half-duplex communication (devices take turns sending) and full-duplex communication (both devices send simultaneously).
The protocol was developed by the International Organization for Standardization (ISO) as a standardized version of IBM’s earlier Synchronous Data Link Control (SDLC) protocol. Over the years, several variants emerged for different use cases: LAPB for X.25 packet-switched networks, LAPD for ISDN digital phone lines, and LAPM for modem connections. PPP, the protocol commonly used for point-to-point serial links, is itself a variant of LAPB.
How an HDLC Frame Is Structured
Every piece of data sent using HDLC is wrapped in a frame with a specific structure. The frame begins and ends with a flag, a special bit pattern (01111110) that marks the boundaries. Between those flags, the frame contains several fields:
- Address field: Identifies which device the frame is intended for. This matters most on multipoint links where multiple devices share the same connection.
- Control field: Indicates the type of frame (data, acknowledgment, or management) and carries sequence numbers used for flow control. In the standard format this field is 8 bits; an extended format uses 16 bits to support larger sequence numbers.
- Information field: Carries the actual data payload. This field is only present in frames that transport user data, not in purely supervisory frames.
- Frame Check Sequence (FCS): A 16-bit or 32-bit value used for error detection. The sender runs the frame contents through a mathematical formula called a cyclic redundancy check (CRC) and appends the result. The receiver performs the same calculation; if the numbers don’t match, the frame arrived corrupted.
The standard error-checking method uses a 16-bit CRC polynomial (CRC-16). For links that need stronger error detection, a 32-bit version is available.
Bit Stuffing: Preventing False Flags
Because the flag pattern (01111110, or six ones in a row between two zeros) marks where frames start and end, there’s an obvious problem: what if the actual data being transmitted happens to contain that same pattern? The receiver would mistakenly think the frame ended early.
HDLC solves this with a technique called bit stuffing. Whenever the sending device encounters five consecutive 1-bits in the data stream, it automatically inserts a 0-bit after them. This guarantees the flag pattern can never accidentally appear inside the frame’s data. On the receiving end, the process reverses: whenever the receiver sees five 1-bits followed by a 0, it strips out the inserted 0 before passing the data up. The whole process is transparent to the higher layers of the network stack.
Station Types and Communication Modes
HDLC defines three types of stations that can participate in a link, each with a different level of control.
A primary station acts as the master. It issues commands to other stations on the link, manages connections, handles error recovery, and controls data flow. A secondary station operates as a slave, only transmitting when the primary station requests a response. Secondary stations have no ability to control the data link on their own and are typically terminals connected to a mainframe. Communication between a primary and one or more secondary stations is called unbalanced mode.
A combined station acts as both primary and secondary. It can issue commands and send responses, establishes and tears down its own connections, and doesn’t rely on any other station for control. Communication between two combined stations is called balanced mode. This is the configuration you’ll find on point-to-point serial links between routers, which is the most common scenario in modern networking.
Cisco’s Proprietary Version
If you’ve worked with Cisco routers, you may have encountered cHDLC (Cisco HDLC). Standard HDLC was designed before multi-protocol networking became the norm, so it has no built-in way to identify which network protocol a frame carries. Cisco’s version adds a Protocol Code field to the frame that specifies the encapsulated protocol type (for example, 0x0800 for IP traffic). This makes it possible to run multiple protocols over the same serial link.
The catch is that cHDLC is proprietary. It works between two Cisco devices without any configuration, since it’s the default encapsulation on Cisco serial interfaces. But if you’re connecting a Cisco router to equipment from another manufacturer, you’ll typically need to switch to PPP instead, which provides the same multi-protocol support in a vendor-neutral way.
Where HDLC Fits Today
HDLC itself is rarely deployed as a standalone protocol in new network designs. Most modern wide-area links use PPP or Ethernet-based technologies that offer richer feature sets, including authentication and dynamic address assignment. However, HDLC’s influence is everywhere. The IEEE 802.2 Logical Link Control (LLC) sublayer, which sits at the top of Layer 2 in Ethernet and Wi-Fi networks, is based directly on HDLC. The framing concepts, error detection methods, and flow control mechanisms that HDLC pioneered became the foundation for an entire generation of data link protocols.
On Cisco serial interfaces, HDLC remains the default encapsulation and still shows up regularly in lab environments, legacy WAN links, and networking certification exams. Understanding its frame structure and operating modes gives you a solid grounding in how Layer 2 protocols work in general, not just HDLC specifically.

