Introducing HDLC EncapsulationIn 1974, IBM developed one of the first bit-oriented synchronous protocols, known as Synchronous Data Link Control (SDLC). After IBM submitted the protocol to the ISO for international standardization, the ISO adapted the protocol and renamed it HDLC. HDLC is covered under the ISO standards ISO 3309 and ISO 4335. During the same period, the Consultative Committee for Telegraph and Telephone (CCITT), now known as International Telecommunication Union (ITU-T), adopted HDLC for the X.25 Link Access Procedure when developing standards for X.25 Data Transmission.The frame formats between the ISO and ITU-T versions of HDLC share many similarities and have also served as the basis for future protocols such as Frame Relay and PPP.HDLC was defined to operate in the following three modes:Normal Response Mode (NRM) Employs a master/slave relationship, whereby secondary (slave) station(s) can transmit only when the primary (master) station permits.Asynchronous Response Mode (ARM) Is similar to NRM mode, but it differs in that the secondary station(s) does not have to wait for permission from the primary station to send data. The primary station is responsible for link initialization, link teardown, and error recovery.Asynchronous Balanced Mode (ABM) All stations have equal status and do not require instruction from their peers to perform a task. Chapter 8, "WAN Protocols over MPLS Case Studies," and Chapter 12, "WAN Protocols over L2TPv3 Case Studies" highlight, both L2TPv3 and AToM interaction with HDLC are limited to HDLC frame transport when dealing with Layer 2 pseudowire emulation. As such, this HDLC section focuses on the HDLC frame format. Figure 5-1 illustrates the HDLC frame structure. Figure 5-1. HDLC Frame Format![]() NoteOn asynchronous links, HDLC uses byte stuffing (sometimes referred to as character stuffing or escaping) to transform illegal byte values into a set of legal characters. The receiving end reverses this mechanism to obtain the original values.Address The Address field uniquely identifies each of the stations on the HDLC link. Depending on the operational mode (NRM, ARM, or ABM), the Address field could contain the primary or secondary station's address when sending command and response messages. ISO standard 3309 can be referenced for more detail on the use of the Address field.In Cisco HDLC encapsulation, instead of uniquely identifying a station, the Address field indicates the frame type.Valid values include these:0x0F for unicast frame0x80 for broadcast frame0x20 for compressed frame0x40 for padded frameControl The Control field contains sequence number information and command or response messages depending on the frame type. Three control frame types are defined in HDLC as follows:Information frame Figure 5-2 lays out the Control field octet for an information frame. The first bit of the control octet set to 0 indicates that the frame is an information frame. The N(S) and N(R) are 3-bit fields containing the transmitter's send and receive sequence numbers respectively. The P/F bit indicates whether this is a command request or response. Figure 5-2. Control Field FormatInformation Frame![]() Figure 5-3. Control Field FormatSupervisory Frame![]() Figure 5-4. Control Field FormatUnnumbered Frame![]()
Information The Information field contains data that is to be transmitted and only appears when the Control field is set to be an information frame. The length of this field is variable and depends on the Layer 3 protocol to be carried.Frame check sequence (FCS) The FCS value contains a 2- or 4-octet cyclic redundancy check (CRC). If the receiver's CRC calculation differs from the value in the frame, the frame is flagged in error. NoteThe Cisco version of HDLC can optionally utilize a simple keepalive mechanism that tracks the sequence numbers of messages that the two endpoints generate locally. Although this control/management protocol exists, neither Layer 2 Tunnel Protocol Version 3 (L2TPv3) nor Any Transport over MPLS (AToM) interact with this keepalive mechanism; instead, they carry these messages across transparently. |