HDLC is 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 will not 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:
I’m using two routers connected 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
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:
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?
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.
Is HDLC encapsulation only for serial interfaces ? I have seen it on Ethernet interface as well
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
Is there a criteria for setting the clock rate to 64? Most of the examples are 64. Why??