Cisco HDLC

转自:http://en.wikipedia.org/wiki/Cisco_HDLC

Cisco HDLC (also known as cHDLC) is an extension to the High-Level Data Link Control protocol created by Cisco Systems, Inc. HDLC is a bit-oriented synchronous data link layer protocol that was originally developed by the International Organization for Standardization (ISO). Often described as being a 'proprietary' extension, the workings of cHDLC have in fact been openly and widely distributed, and the protocol has been implemented by many different network equipment vendors.

Contents

[hide]

Framing

Cisco HDLC frames make use of an alternative framing structure to the standard ISO HDLC. One of the primary reasons for the creation of cHDLC was to address the HDLC protocol's inability to provide multiprotocol support. Thus, cHDLC frames contain a field for identifying the network protocol being encapsulated.

SLARP

The Cisco HDLC extensions also include the definition of SLARP or the Serial Line Address Resolution Protocol (ARP). SLARP is used to provide dynamic address assignment between two endpoints across a serial line, a keep-alive mechanism for ensuring the availability of a given link, and finally a method for determining link health.

The keep-alive mechanism works in a request/response fashion between the two serial line endpoints. Sequence numbers carried inside the SLARP frames are incremented for each keep-alive sent, and as such the health of the link can be determined by each endpoint by keeping track of the sequence. If a certain count of sequence numbers is missed, the keep-alive frames are deemed to be lost, and an alert is pushed up through higher layer protocols to say that the frame has most likely been lost.

Structure

cHDLC Frame Structure

The following table describes the make up of a cHDLC frame on the wire.

AddressControlProtocol CodeInformationFrame Check Sequence (FCS)Flag
8 bits8 bits16 bitsVariable length, 0 or more bits, in multiples of 816 bits8 bits
  • The Address field is used to specify the type of packet contained in the cHDLC frame; 0x0F for Unicast and 0x8F for Broadcast packets.
  • The Control field is always set to zero (0x00).
  • The Protocol Code field is used to specify the protocol type encapsulated within the cHDLC frame (e.g. 0x0800 for Internet Protocol).

SLARP Address Request/Response Frame Structure

A SLARP frame is designated by a specific cHDLC Protocol Code field value of 0x8035.

Currently only 3 types of SLARP frame are defined; address requests (0x00), address replies (0x01), and keep-alive frames (0x02).

The following table shows the makeup of a SLARP cHDLC address request/response frame.

AddressControlProtocol CodeSLARP Op-CodeAddressMaskReservedFrame Check Sequence (FCS)Flag
8 bits8 bits16 bits (0x8035)32 bits32 bits32 bits8 bits16 bits8 bits
  • The Op-Code will be 0x00 for address requests and 0x01 for address responses.
  • The Address and Mask fields are used to contain a 4-octet IP address and mask.
  • The 1-byte Reserved field is currently unused and is always set to 0xFF.

SLARP Keep-Alive Frame Structure

The following table shows the makeup of a SLARP cHDLC keep-alive frame.

AddressControlProtocol CodeSLARP Op-CodeSequence Number (Sender)Sequence Number (Last Received)ReservedFrame Check Sequence (FCS)Flag
8 bits8 bits16 bits (0x8035)32 bits32 bits32 bits8 bits16 bits8 bits

<think>好的,用户需要关于思科路由器上配置HDLC协议的教程和示例。首先,我需要回忆一下HDLC的基本知识。HDLC是一种数据链路层协议,常用于点对点的串行连接。虽然思科设备默认使用HDLC,但有时候可能需要手动配置,特别是与不同厂商设备互通时。 接下来,我得确认用户的需求。用户提到思科设备,所以需要针对Cisco IOS的命令。需要参考现有的资料,但用户提供的引用是关于华为设备的,所以可能需要依靠自己的知识库。同时,用户可能希望看到具体的配置步骤和示例,类似华为的示例。 接下来,HDLC在思科上的配置步骤应该包括进入接口模式、设置封装类型为HDLC,分配IP地址,激活接口等。另外,用户可能需要注意与华为配置的不同之处,比如思科默认已经是HDLC,所以如果需要重置或者与其他设备互通时的注意事项。 还需要考虑可能的验证命令,比如show interfaces来检查封装类型。此外,用户可能关心HDLC与其他协议(如PPP)的区别,或者配置中的常见问题,比如IP地址借用,但根据引用3,华为设备需要路由学习,但思科是否有类似问题呢?可能需要提到这点,但不确定,需要确认。 另外,用户可能需要示例配置,类似于华为的示例,所以给出一个思科路由器的配置实例,包括接口配置、封装命令、IP地址设置等。同时,注意是否需要配置其他参数,如时钟速率(如果接口是DCE端)等。 最后,生成相关问题,可能需要包括HDLC与PPP的对比、验证配置的命令、故障排除步骤等。</think>### 思科路由器HDLC协议配置方法 HDLC(高级数据链路控制协议)是思科路由器串行接口的默认封装协议[^1]。当需要与其他厂商设备(如华为)互通时,可能需要显式配置HDLC。以下是详细步骤和示例: #### 配置步骤 1. **进入接口配置模式** ```cisco Router> enable Router# configure terminal Router(config)# interface serial 0/1/0 //假设使用Serial0/1/0接口 ``` 2. **显式配置HDLC封装** (思科默认已启用HDLC,此步骤仅在协议被修改后需要) ```cisco Router(config-if)# encapsulation hdlc ``` 3. **配置IP地址** ```cisco Router(config-if)# ip address 192.168.1.1 255.255.255.252 ``` 4. **设置时钟速率(仅DCE端需要)** ```cisco Router(config-if)# clock rate 64000 //设置时钟频率为64kHz ``` 5. **激活接口** ```cisco Router(config-if)# no shutdown Router(config-if)# end ``` #### 配置示例 ```cisco ! 主路由器配置 interface Serial0/1/0 encapsulation hdlc ip address 192.168.1.1 255.255.255.252 clock rate 64000 //若为DCE端必须配置 no shutdown ``` ```cisco ! 对端路由器配置 interface Serial0/1/0 encapsulation hdlc ip address 192.168.1.2 255.255.255.252 no shutdown ``` #### 关键验证命令 1. 检查接口状态: ```cisco Router# show interfaces serial 0/1/0 ``` 输出应包含`Encapsulation HDLC`和`line protocol is up` 2. 查看邻居连通性: ```cisco Router# ping 192.168.1.2 ``` #### 特殊场景处理 - **IP地址借用**:若需借用地址(如配置NAT或DHCP中继),需确保路由可达性[^3] - **多厂商互通**:与华为设备对接时,需在华为侧显式配置`link-protocol hdlc`
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值