This tutorial explains how to configure, verify and troubleshoot HDLC protocol step by step with example. Learn fundamental and basic concepts of HDLC encapsulation, how HDLC protocol works, HDLC frame and types of HDLC protocol (ISO HDLC & Cisco HDLC) in detail.
Basic of HDLC
HDLC is a layer two protocol that provides encapsulation method for serial link. Serial link and Ethernet link both use different encapsulation methods for data transmission. Serial link cannot carry the frame formatted with Ethernet encapsulation and vice versa Ethernet link cannot carry the frame formatted through the Serial encapsulation. Ethernet encapsulation method and protocols are basically specified in LAN technology. Serial protocols and encapsulation methods are primarly descirbed in WAN technology. Router is used to connect two different technologies. HDLC is an encapsulation method for serial link.
How HDLC Protocol works
Let’s understand this process with a simple example
- Suppose PC0 has some data for PC1. So it generated a data packet.
- Since PC1 is not connected with LAN segment, network layer of PC0 will encapsulate data packet with default gateway’s IP address.
- Data link layer of PC0 will warp this IP packet in 802.3 header and trailer. Once wrapped, it becomes frame.
- Physical layer of PC0 will put this frame in wire.
- Through switch this frame will be received in Router R0.
- Router will de-encapsulate the frame in packet to find out the Layer 3 destination address.
- Since destination address is connected with serial link, router will forward this frame in serial interface.
- Serial interface will re–encapsulate the frame with serial encapsulation protocol. In our example it is HDLC.
- After re-encapsulation this frame will be forwarded from serial interface.
- This frame will be received in serial interface of Router R1.
- R1 will de-encapsulate the frame in packet to find the Layer 3 destination address.
- Since destination address is connected via FastEthernet, it will forward this packet in FastEthernet interface.
- FastEthernet Interface will re-encapsulate the packet in Ethernet frame.
- After re-encapsulation this frame will be forwarded from FastEthernet interface
- Through switch this frame will be received at PC1.
- PC1 will receive this frame in exactly same format as it was packed by PC0 without knowing how it makes it way to him.
Following figure illustrate above process
This tutorial is the second part of our article \”WAN Terminology Explained with Encapsulation Protocols and Methods \”. You can read other parts of this article here.
This tutorial is the first part of article. This part explains basic wan concepts including terminology, encapsulation methods, switching concepts and encapsulation protocols in detail with example.
This tutorial is the third part of the article. This part explains PPP (Point to Point) protocol and encapsulation method in detail with examples including step by step configuration guide.
This tutorial is the fourth part of the article. This part explains basic concepts of Frame Relay such as LMI Types, DLCI, Access Rate, CIR rate, PVC, SVC and network type in easy language.
This tutorial is the last part of the article. This part provide step by step guide on how to configure Frame Relay in Cisco routers.
Types of HDLC Protocol
HDLC protocol was developed by ISO (International Organization for Standardization), which is same organization that also developed OSI model. It specifies data encapsulation method for serial link using frame characters and checksums.
Basically it was developed for point to point leased line where only the two points exist; one sending and another receiving. Once a HDLC frame exits from sending point it has only one place to go; the other end of link (receiving point).
When we have only point to point connection between source and destination, there is no need to attach network layer information in frame header every time. Frames will go where they should go. By this way network can save a lot of time and resources. HDLC was built on this concept. It has no field for network layer information in its header.
Since it has no separate field for network layer protocol information it cannot carry multiple network layer protocols information across the link. It can carry only single network layer protocol information. So basically you can use IOS’s HDLC in point to point link where only a single network layer protocol is used to transport the data.
Type filed is used to carry multiple network layer information. If we need to carry multiple network layer protocols information, we have to insert the type filed in frame header. For this reason every vendor who wants to use HDLC in multiple network layer protocols environment had to insert type field in frame header. Due to this modification HDLC became vendor proprietary protocol that means one vendor’s HDLC will not work with others. Going with the same concept Cisco’s HDLC will not work with other vendor’s HDLC. So if you want to use Cisco’s HDLC, buy all devices from Cisco or use other open standard encapsulation method such as PPP.
Configure HDLC in Cisco Router
HDLC is the default encapsulation method on Cisco routers. Unless we have changed it with other encapsulation method, there is no need to configure it. It’s already configured. Suppose we have changed default encapsulation method with other methods such as PPP. Now we are looking for a way to use HDLC again then we have to go through the following two steps
Access serial interface
Protocols and encapsulation methods are Interface specific. We can use different protocol and encapsulation method in different interfaces. For example if we have two serial interfaces, we can use HDLC in one and PPP in another. So our first logical step is to access the correct serial interface.
Suppose we want to change the encapsulation method of serial interface Serial 0/0/0 then we will use following commands to access the serial interface
Router>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface serial 0/0/0 Router(config-if)#
Now we are in serial interface mode, use following command to configure encapsulation method to HDLC
Router(config-if)#encapsulation hdlc Router(config-if)#exit Router(config)#
That’s all we need to do. Now HDLC encapsulation is enabled in serial interface Serial 0/0/0.
How to verify HDLC encapsulation
Since HDLC is the default encapsulation method for serial interfaces in Cisco Router,
it will not be listed in running configuration. It means we cannot use show running-config command
to verify the HDLC encapsulation. We have to use show interfaces [Interface] command to view encapsulation
type in interface.
Router#show interfaces serial 0/0/0 Serial0/0/0 is administratively down, line protocol is down (disabled) Hardware is HD64570 MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec) Last input never, output never, output hang never Last clearing of \"show interface\" counters never
As output indicates encapsulation type is HDLC.
Troubleshooting HDLC encapsulation
We can use show ip interface brief and show interfaces
[interface] commands to view the status of serial interface.
If there is some issue with HDLC implementation, protocol status will be down. There are three possible reasons:-
- Remote side router is a Non-Cisco router.
- Remote side is using other protocol such as PPP.
- DCE device is not providing clock rate to DTE device.
- HDLC does not provide any kind of authentication.
- HDLC is a byte oriented protocol. In byte oriented protocols control information is encoded used entire bytes.
- HDLC protocol was developed by ISO for point to point link where single network layer protocol is used to transport the data.
- ISO’s HDLC does not have type field in its header.
- ISO’s HDLC supports only single network layer protocol.
- Type filed is used to carry multiple network layer protocols information.
- Vendors need to insert type filed in HDLC frame header.
- Once type filed is inserted, HDLC becomes proprietary protocol.
- A proprietary HDLC protocol will not work with other vendor’s HDLC.
- HDLC is the default encapsulation method in Cisco routers.
That’s all for this part. In next part I will explain PPP protocol and encapsulation method in detail with example.
Prerequisites for 200-301
200-301 is a single exam, consisting of about 120 questions. It covers a wide range of topics, such as routing and switching, security, wireless networking, and even some programming concepts. As with other Cisco certifications, you can take it at any of the Pearson VUE certification centers.
The recommended training program that can be taken at a Cisco academy is called Implementing and Administering Cisco Solutions (CCNA). The successful completion of a training course will get you a training badge.
Full Version 200-301 Dumps