HDLC协议帧之IP over HDLC
IP over HDLC帧是指使用HDLC(High-level data link control)帧承载IP报文。IP over HDLC 帧格式与PPP in HDLC-like帧结构相同,只是部分字段取值不一样。
一、IP over HDLC帧格式
+----------------------------------------------------------------+
| Flag | Address | Control | Protocol | Information | FCS |Flag |
| 0x7E |0x0F/0x8F| 0x00 | 16bits | |16bits|0x7E |
+----------------------------------------------------------------+
字段 |
长度 |
含义 |
|
Flag |
1字节 |
标志字段,为01111110(0x7e)的比特模式,用以标识帧的开始与结束,也可以作为帧与帧之间的填充字符。通常,在不进行帧传送的时刻,信道仍处于激活状态,在这种状态下,发送方不断地发送标志字段,而接收方则检测每一个收到的标志字段,一旦发现某个标志字段后面不再是一个标志字段,便可认为新的帧传动已经开始。采用“0比特插入法”可以实现数据的透明传输。 |
|
Address |
1字节 |
地址字段,IP over HDLC帧中,Address字段取值如下: · 0x0F:表示单播报文; · 0x8F:表示组播报文。 |
|
Control |
1字节 |
控制字段。IP over HDLC帧中,控制字段固定设置为0x0。 |
|
Protocol |
2字节 |
协议字段。表示Information域中的数据封装的协议类型。在使用VRP®(Versatile Routing Platform)软件的华为设备上,该字段与Ethernet II帧中的协议字段含义类似: · 0x0800: IP · 0x8035: SLARP · 0x8847: MPLS · 0xFEFE: IS-IS · 0x86DD: IPv6 · 0x88CC: LLDP |
|
Information |
0~N字节 |
信息字段。可以是任意的二进制比特串,长度未作限定。其上限由FCS字段或通信节点的缓冲容量来决定,目前国际上用得较多的是1000~2000比特,而下限可以是0,即无信息字段。 |
|
FCS |
2字节 |
FCS (Frame Check Sequence):帧检验序列字段,可以使用16位CRC,对两个标志字段之间的整个帧的内容进行校验。FCS的生成多项式是CCITT V.41建议的X'16+X'12+X'5+1。 |
二、IP over HDLC帧示例
Frame 1: 88 bytes on wire (704 bits), 64 bytes captured (512 bits)
Arrival Time: Apr 3, 2013 08:29:59.811402000
Epoch Time: 1364948999.811402000 seconds
[Time delta from previous captured frame: 0.000000000 seconds]
[Time delta from previous displayed frame: 0.000000000 seconds]
[Time since reference or first frame: 0.000000000 seconds]
Frame Number: 1
Frame Length: 88 bytes (704 bits)
Capture Length: 64 bytes (512 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: chdlc:ip:icmp:data]
[Coloring Rule Name: ICMP]
[Coloring Rule String: icmp || icmpv6]
HDLC
Address: Unicast (0x0f)
Protocol: IP (0x0800)
Internet Protocol Version 4, Src: 10.1.1.1 (10.1.1.1), Dst: 10.1.1.2 (10.1.1.2)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)
Total Length: 84
Identification: 0x0843 (2115)
Flags: 0x00
0... .... = Reserved bit: Not set
.0.. .... = Don't fragment: Not set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 255
Protocol: ICMP (1)
Header checksum: 0x2160 [correct]
[Good: True]
[Bad: False]
Source: 10.1.1.1 (10.1.1.1)
Destination: 10.1.1.2 (10.1.1.2)
Internet Control Message Protocol
Type: 8 (Echo (ping) request)
Code: 0
Checksum: 0xf1bc
Identifier (BE): 1536 (0x0600)
Identifier (LE): 6 (0x0006)
Sequence number (BE): 67 (0x0043)
Sequence number (LE): 17152 (0x4300)
Data (32 bytes)
0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Data: 000000000000000000000000000000000000000000000000...
[Length: 32]
三、IP over HDLC参考标准
标准 |
描述 |
ISO/IEC 13239:2002 |
Information technology -- Telecommunications and information exchange between systems -- High-level data link control (HDLC) procedures |
发表评论