How to configure HDLC on Cisco IOS Router

There is not much to tell you about HDLC. It’s a point-to-point protocol and it’s the default for serial interfaces on Cisco routers. HDLC is a standard but running HDLC between routers from different vendors is not going to work. Keep this in mind. Every vendor has a proprietary field in their HDLC implementation which is what makes it incompatible between vendors. Let me show you how to configure it:

wan two routers serial link

I’m using two routers connected to each other with a serial link. First we will configure the clock rate on the router that has the DCE side of the cable:

R2(config)#interface serial 0/0
R2(config-if)#clock rate 64000

The clock rate will set the speed. For my example it doesn’t matter much what clock speed we use. We can use a command to verify that the DTE router has received the clock rate:

R1#show controllers serial 0/0
Hardware is PowerQUICC MPC860
DTE V.35 TX and RX clocks detected
Idb at 0x81081AC4, driver data structure at 0x 81084AC0

In the example above R1 is the DTE side and it has received a clock rate. Show controllers is a useful command when you don’t have physical access to your hardware so you don’t know which side of the cable is DTE or DCE.

Let’s configure the IP addresses:

R1(config)#interface serial 0/0
R1(config-if)#no shutdown
R1(config-if)#ip address 192.168.12.1 255.255.255.0
R2(config)#interface serial 0/0
R2(config-if)#no shutdown
R2(config-if)#ip address 192.168.12.2 255.255.255.0

Nothing special so far, just two serial interfaces in the same subnet.

We can verify that it’s using HDLC:

R1#show interfaces serial 0/0
Serial0/0 is up, line protocol is up 
  Hardware is M4T
  Internet address is 192.168.12.1/24
  MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, 
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation HDLC, crc 16, loopback not set
R2#show interfaces serial 0/0
Serial0/0 is up, line protocol is up 
  Hardware is M4T
  Internet address is 192.168.12.2/24
  MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, 
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation HDLC, crc 16, loopback not set

Use the show interfaces command to check the encapsulation type. You can see it says HDLC on both sides. Let’s test connectivity with a quick ping:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 651 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

540 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Forum Replies

  1. H Rene

    I set up similar set up in my GNS3 lab, R1 and R2. Set R2 with a clock rate for the serial interface but R1 is not showing as a DTE. I assigned the IP address and I can ping the interfaces but DTE is not showing on R1. Any reason can you think of? How can I troubleshoot this issue?

    R1#sh controllers s0/0
    Interface Serial0/0
    Hardware is PowerQUICC MPC860
    DCE 530, no clock
    
    R2#sh controllers s0/0
    Interface Serial0/0
    Hardware is PowerQUICC MPC860
    DCE 530, clock rate 64000
    

    Thanks
    Palani

  2. Hi Palani,

    Setting the clock rate is for the physical interface. In GNS3, there’s no need to set the clock rate since they emulate everything. If you want to test this, you will have to use real hardware.

    Rene

  3. Hi Rene,

    Is HDLC encapsulation only for serial interfaces ? I have seen it on Ethernet interface as well

  4. Hello Aniket

    HDLC is an encapsulation method that provides layer 2 functionality almost exclusively for point to point connections. Point to multipoint connections are also possible but are rarely used. Ethernet on the other hand is a layer 2 technology based on a multiple access philosophy. These are two very different and incompatible technologies, both of which operate at layer 2, so HDLC cannot operate on an Ethernet interface.

    Do you have an example of what you have seen concerning HDLC and Ethernet? Maybe that will help to clarify the confusion. If y

    ... Continue reading in our forum

Ask a question or join the discussion by visiting our Community Forum