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:
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: