一、HDLC原理
HDLC是由国际标准化组织( ISO)制定的面向比特的同步数据链路层协议,主要用于封装同步串行链路上的数据。HDLC是在数据链路层中被广泛使用的协议之一。
二、HDLC配置
AR1:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR1
[AR1]int s2/0/0
[AR1-Serial2/0/0]link-
[AR1-Serial2/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
Dec 31 2022 10:45:13-08:00 AR1 %%01IFNET/4/CHANGE_ENCAP(l)[0]:The user performed
the configuration that will change the encapsulation protocol of the link and t
hen selected Y.
[AR1-Serial2/0/0]ip add 10.1.41.1 24
[AR1-Serial2/0/0]q
[AR1]q
<AR1>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait.......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
<AR1>
AR2:
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR2
[AR2]int s2/0/0
[AR2-Serial2/0/0]link
[AR2-Serial2/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
Dec 31 2022 10:46:02-08:00 AR2 %%01IFNET/4/CHANGE_ENCAP(l)[0]:The user performed
the configuration that will change the encapsulation protocol of the link and t
hen selected Y.
[AR2-Serial2/0/0]ip add 10.1.41.2 24
[AR2-Serial2/0/0]q
[AR2]q
<AR2>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait.......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
<AR2>
抓包测试,选择HDLC