Share this page : facebooktwitterlinkedinmailfacebooktwitterlinkedinmail

The current standard for HDLC is ISO 13239. HDLC was developed from the Synchronous Data Link Control (SDLC) standard proposed in the 1970s. HDLC provides both connection-oriented and connectionless service.

  • HDLC uses synchronous serial transmission to provide error-free communication between two points. HDLC defines a Layer 2 framing structure that allows for flow control and error control through the use of acknowledgments. Each frame has the same format, whether it is a data frame or a control frame.
  • HDLC uses a frame delimiter, or flag, to mark the beginning and the end of each frame.
  • Although Cisco HLDC (also referred to as cHDLC) is proprietary, Cisco has allowed many other network equipment vendors to implement it. Cisco HDLC frames contain a field for identifying the network protocol being encapsulated. The figure compares standard HLDC to Cisco HLDC.
    HLDC FrameFormat
HDLC frames


HDLC defines three types of frames, each with a different control field format.

HLDC FrameTypes

1, Flag

The flag field initiates and terminates error checking. The frame always starts and ends with an 8-bit flag field. The bit pattern is 01111110. Because there is a likelihood that this pattern occurs in the actual data, the sending HDLC system always inserts a 0 bit after every five consecutive 1s in the data field, so in practice the flag sequence can only occur at the frame ends. The receiving system strips out the inserted bits.

When frames are transmitted consecutively, the end flag of the first frame is used as the start flag of the next frame.

2, Address

The address field contains the HDLC address of the secondary station. This address can contain a specific address, a group address, or a broadcast address. A primary address is either a communication source or a destination, which eliminates the need to include the address of the primary.

3, Control

The control field uses three different formats, depending on the type of HDLC frame used:

  • Information (I) Frame – I-frames carry upper layer information and some control information. This frame sends and receives sequence numbers, and the poll final (P/F) bit performs flow and error control. The send sequence number refers to the number of the frame to be sent next. The receive sequence number provides the number of the frame to be received next. Both sender and receiver maintain send and receive sequence numbers. A primary station uses the P/F bit to tell the secondary whether it requires an immediate response. A secondary station uses the P/F bit to tell the primary whether the current frame is the last in its current response.
  • Supervisory (S) Frame – S-frames provide control information. An S-frame can request and suspend transmission, report on status, and acknowledge receipt of I-frames. S-frames do not have an information field.
  • Unnumbered (U) Frame – U-frames support control purposes and are not sequenced. Depending on the function of the U-frame, its control field is 1 or 2 bytes. Some U-frames have an information field.

4, Protocol

Only used in Cisco HDLC. This field specifies the protocol type encapsulated within the frame (e.g. 0x0800 for IP).

5, Data

The data field contains a Path Information Unit (PIU) or Exchange Identification (XID) information.

6, Frame Check Sequence (FCS)

The FCS precedes the ending flag delimiter and is usually a Cyclic Redundancy Check (CRC) calculation remainder. The CRC calculation is redone in the receiver. If the result differs from the value in the original frame, an error is assumed.

Configure HDLC

Cisco HDLC is the default encapsulation method used by Cisco devices on synchronous serial lines.

Use Cisco HDLC as a point-to-point protocol on leased lines between two Cisco devices. If connecting non-Cisco devices, use synchronous PPP.

If the default encapsulation method has been changed, use the encapsulation hdlc command in privileged EXEC mode to re-enable HDLC.

As shown in the figure, there are two steps to re-enable HDLC encapsulation:

Step 1. Enter the interface configuration mode of the serial interface.

Step 2. Enter the encapsulation hdlc command to specify the encapsulation protocol on the interface.

Trouble shooting HDLC

The output of the show interfaces serial command displays information specific to serial interfaces. When HDLC is configured, encapsulation HDLC should be reflected in the output.

The show interfaces serial command returns one of six possible states:

  • Serial x is up, line protocol is up
  • Serial x is down, line protocol is down
  • Serial x is up, line protocol is down
  • Serial x is up, line protocol is up (looped)
  • Serial x is up, line protocol is down (disabled)
  • Serial x is administratively down, line protocol is down

Of the six possible states, there are five problem states. Table bellow lists the five problem states, the issues associated with that state, and how to troubleshoot the issue.

This table shows the interface status conditions, possible problems associated with the conditions, and solutions to those problems.

Status Line Condition Possible Problem Solution
Serial x is up, line protocol is up This is the proper status line condition. No action required.
Serial x is down, line protocol is down (DTE mode)
  • Typically indicates that the router is not sensing a CD signal (that is, CD is not active).
  • Telephone company problem-Line is down or line is not connected to CSU/DSU
  • Faulty or incorrect cabling
  • Hardware failure (CSU/DSU)
  1. Check the LEDs on the CSU/DSU to see if CD is active, or insert a breakout box on the line to check for the CD signal.
  2. Verify that you are using the proper cable and interface (see your hardware installation documentation).
  3. Insert a breakout box and check all control leads.
  4. Contact your leased-line or other carrier service to see if there is a problem.
  5. Swap faulty parts.
  6. If you suspect faulty router hardware, change the serial line to another port. If the connection comes up, the previously connected interface has a problem.
Serial x is up, line protocol is down (DTE mode)
  • Local or remote router is misconfigured
  • Keepalives are not being sent by remote router
  • Leased-line or other carrier service problem-Noisy line, or misconfigured or failed switch
  • Timing problem on cable (SCTE not set on CSU/DSU) Failed local or remote CSU/DSU
  • Failed local or remote CSU/DSU
  • Router hardware failure (local or remote)
  1. Put the modem, CSU, or DSU in local loopback mode and use the show interfaces serial command to see if the line protocol comes up. If the line protocol comes up, a telephone company problem or a failed remote router is the likely problem.
  2. If the problem appears to be on the remote end, repeat Step 1 on the remote modem, CSU, or DSU.
  3. Verify all cabling. Make sure that the cable is attached to the correct interface, the correct CSU/DSU, and the correct telephone company network termination point. Use the show controllers EXEC command to determine which cable is attached to which interface.
  4. Enable the debug serial interface EXEC command.cautionCaution: Because debugging output is assigned a high priority in the CPU process, it can render the system unusable. For this reason, use debug commands only to troubleshoot specific problems or during troubleshooting sessions with Cisco technical support staff. Moreover, it is best to use debug commands during periods of low network traffic and fewer users. Debugging during these periods decreases the likelihood that increased debug command processing overhead will affect system use.
  5. If the line protocol does not come up in local loopback mode and if the output of the debug serial interface EXEC command shows that the keepalive counter is not incrementing, a router hardware problem is likely. Swap router interface hardware.
  6. If the line protocol comes up and the keepalive counter increments, the problem is not in the local router. Troubleshoot the serial line as described in the sections “Troubleshooting Clocking Problems” and “CSU and DSU Loopback Tests,” later in this chapter.
  7. If you suspect faulty router hardware, change the serial line to an unused port. If the connection comes up, the previously connected interface has a problem.
Serial x is up, line protocol is down (DCE mode)
  • Missing clockrate interface configuration command
  • DTE device does not support or is not set up for SCTE mode
  • Failed remote CSU or DSU
  • Failed or incorrect cable
  • Router hardware failure
  1. Add the clockrate interface configuration command on the serial interface. Syntax:clock rate bps Syntax Description:
    • bps-Desired clock rate in bits per second: 1200, 2400, 4800, 9600, 19200, 38400, 56000, 64000, 72000, 125000, 148000, 250000, 500000, 800000, 1000000, 1300000, 2000000, 4000000, or 8000000.
  2. Set the DTE device to SCTE mode if possible. If your CSU/DSU does not support SCTE, you may have to disable SCTE on the Cisco router interface. See the section “Inverting the Transmit Clock,” later in this chapter.
  3. Verify that the correct cable is being used.
  4. If the line protocol is still down, there is a possible hardware failure or cabling problem. Insert a breakout box and observe leads.
  5. Replace faulty parts as necessary.
Serial x is up, line protocol is up (looped) A loop exists in the circuit. The sequence number in the keepalive packet changes to a random number when a loop is initially detected. If the same random number is returned over the link, a loop exists.
  1. Use the show running-config privileged EXEC command to look for any loopback interface configuration command entries.
  2. If you find a loopback interface configuration command entry, use the no loopback interface configuration command to remove the loop.
  3. If you do not find the loopback interface configuration command, examine the CSU/DSU to see if they are configured in manual loopback mode. If they are, disable manual loopback.
  4. Reset the CSU or DSU, and inspect the line status. If the line protocol comes up, no other action is needed.
  5. If the CSU or DSU is not configured in manual loopback mode, contact the leased-line or other carrier service for line troubleshooting assistance.
Serial x is up, line protocol is down (disabled)
  • High error rate due to telephone company service problem
  • CSU or DSU hardware problem
  • Bad router hardware (interface)
  1. Troubleshoot the line with a serial analyzer and breakout box. Look for toggling CTS and DSR signals.
  2. Loop CSU/DSU (DTE loop). If the problem continues, it is likely that there is a hardware problem. If the problem does not continue, it is likely that there is a telephone company problem.
  3. Swap-out bad hardware as required (CSU, DSU, switch, local or remote router).
Serial x is administratively down, line protocol is down
  • Router configuration includes the shutdown interface configuration command
  • Duplicate IP address
  1. Check the router configuration for the shutdown command.
  2. Use the no shutdown interface configuration command to remove the shutdown command.
  3. Verify that there are no identical IP addresses using the show running-config privileged EXEC command or the show interfaces EXEC command.
  4. If there are duplicate addresses, resolve the conflict by changing one of the IP addresses.

The show controllers command is another important diagnostic tool when troubleshooting serial lines. The output indicates the state of the interface channels and whether a cable is attached to the interface. In the figure, interface serial 0/0/0 has a V.35 DCE cable attached. The command syntax varies, depending on the platform. Cisco 7000 series routers use a cBus controller card for connecting serial links. With these routers, use the show controllers cbus command.

If the electrical interface output displays as UNKNOWN instead of V.35, EIA/TIA-449, or some other electrical interface type, the likely problem is an improperly connected cable. A problem with the internal wiring of the card is also possible. If the electrical interface is unknown, the corresponding display for the show interfaces serial command shows that the interface and line protocol are down.