高级数据链路控制协议-HDLC
一、HDLC简介High-level Data Link Control,高级数据链路控制,简称HDLC,是一种面向比特的链路层协议。使用点到点链路连接,P2P 链路。如下图://upload-images.jianshu.io/upload_images/24325874-91ab2eab67324361
HDLC 支持点到点连接,在这个网络中不是我,就是你,我通过这个链路把包发出来 就算不指定任何地址信息,也一定是我对端的接口去接收,我发送帧肯定是你接收,你发送肯定是我接收。中间没有任何第三个节点,所以在封装 HDLC 帧的时候,不要封装 SD 地址。下面我们来看看HDLC 帧结构:
//upload-images.jianshu.io/upload_images/24325874-52008c95a98b9239
HDLC有三种帧:信息帧、监控帧、无编号帧。Flag :第一字节和最后一个字节是用来同步字段 Address:地址字段,只有一个地址。0X0FControl:控制字段, I:信息帧 发送一些正常数据的,最高位为 0 S:监控帧 流控和差错控制 最高位为 1 0 U:无编号帧 建立 维护 拆除链路的 最高位为 1 1Information:数据字段 Cisco 压缩只支持 compress stac 压缩数据从而增加带宽,增加网络可用性。二、HDLC的基础配置:
//upload-images.jianshu.io/upload_images/24325874-7aded0d79a3658fa
华为默认连接 serial 线缆是启用的 PPP 协议,Cisco 连接 serial 线缆,默认是 HDLC,encapsulation hdlc 可以敲命令开启,添加一个地址就可以了。三、HDLC接口地址借用
//upload-images.jianshu.io/upload_images/24325874-a4275f1b3aed7935
可以在 router 起一个环回口,在环回口起一个地址,通过 serial 和环回口拥有相同的 IP 地址。如果接口是借用的,那么这个 serial 接口是没有直连理由的。需要写静态,一般不使用这个配置。 四、配置实验思科实验
//upload-images.jianshu.io/upload_images/24325874-359c1bc7001e507c
进入接口配置同网段 IP no shutdown 开启接口,因为 Cisco 默认是 HDLC,
//upload-images.jianshu.io/upload_images/24325874-336faf8d6cf2369d
//upload-images.jianshu.io/upload_images/24325874-1f52b30c1a29e920
可以使用进入接口 encapsulation hdlc 去修改
//upload-images.jianshu.io/upload_images/24325874-656136ba7a99403e
可以看到 R1 的一端为 DCE。
2.华为实验
//upload-images.jianshu.io/upload_images/24325874-98f7efdef0f3a184
Huawei 默认是 PPP 协议 配置 IP 地址 启用 HDLC 可以平通 模拟器默认两端都是 DTE
//upload-images.jianshu.io/upload_images/24325874-acbfa38abac07351
//upload-images.jianshu.io/upload_images/24325874-e9304f5686180c8f
int s1/0/0 link-protocol hdlc Warning: The encapsulation protocol of the link will be changed. Continue? :y int s1/0/0 link-protocol hdlc Warning: The encapsulation protocol of the link will be changed. Continue? :y 修改为 HDLC
//upload-images.jianshu.io/upload_images/24325874-6c95e19f831d7e22
现在使用的协议的是 HDLC 报头和 Cisco 是一模一样。好啦,今天的干货内容就到这里,如果你觉得小老虎的内容还不错,那请大家动动手分享给身边的小伙伴!
页:
[1]