HDLC协议帧之PPP in HDLC-Like
PPP in HDLC-Like帧是RFC 1549定义的,用于在HDLC(High-level data link control)帧封装PPP报文。
一、PPP in HDLC-like帧格式
+----------------------------------------------------------------+
| Flag | Address | Control | Protocol | Information | FCS |Flag |
| 0x7E | 0xFF | 0x03 | 16bits | |16bits|0x7E |
+----------------------------------------------------------------+
字段 |
长度 |
含义 |
Flag |
1字节 |
标志字段,为01111110(0x7e)的比特模式,用以标识帧的开始与结束,也可以作为帧与帧之间的填充字符。通常,在不进行帧传送的时刻,信道仍处于激活状态,在这种状态下,发送方不断地发送标志字段,而接收方则检测每一个收到的标志字段,一旦发现某个标志字段后面不再是一个标志字段,便可认为新的帧传动已经开始。采用“0比特插入法”可以实现数据的透明传输。 |
Address |
1字节 |
地址字段,内容取决于所采用的操作方式,有主节点、从节点、组合节点之分。每个从节点与组合节点都被分配一个唯一的地址,命令帧中的地址字段携带的是对方节点的地址,而响应帧中的地址字段所携带的地址是本节点的地址。某一地址也可分配给不止一个节点,这种地址称为组地址,利用一个组地址传输的帧能被组内所有拥有该地址的节点接收。但当一个节点或组合节点发送响应时,它仍应当用它唯一的地址。还可以另外还规定全0的地址为无节点地址,不分配给任何节点,仅作为测试用。地址字段,设置为二进制11111111(即十六进制0xff),即用全“1”地址来表示包含所有节点的地址,称为广播地址,含有广播地址的帧传送给链路上所有的节点。 |
Control |
1字节 |
控制字段,设置为二进制00000011(十六进制0x03)。如果控制字段设置为其他值,该帧将被悄悄丢弃。 |
Protocol |
2字节 |
协议字段。表示Information域中的数据封装的协议类型。与PPP帧中的协议字段相同: · 0x0021: Internet Protocol · 0x002b: Novell IPX · 0x002d: Van Jacobson Compressed TCP/IP · 0x002f: Van Jacobson Uncompressed TCP/IP · 0x0057: Internet Protocol Version 6 · 0x8021: Internet Protocol Control Protocol · 0x802b: Novell IPX Control Protocol · 0x8031: Bridging NC · 0x8057: IPv6 Control Protocol · 0xC021: Link Control Protocol · 0xC023: Password Authentication Protocol · 0xC223: Challenge Handshake Authentication Protocol |
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。 |
二、PPP in HDLC-Like帧示例
Frame 4183: 74 bytes on wire (592 bits), 74 bytes captured (592 bits)
Arrival Time: Feb 25, 2014 02:33:42.077657000
Epoch Time: 1393266822.077657000 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: 1144.114491000 seconds]
Frame Number: 4183
Frame Length: 74 bytes (592 bits)
Capture Length: 74 bytes (592 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ip:gre:ppp:ipcp]
Ethernet II, Src: 00:e1:fc:45:2b:f3 (00:e1:fc:45:2b:f3), Dst: HuaweiTe_06:5f:38 (00:e0:fc:06:5f:38)
Destination: HuaweiTe_06:5f:38 (00:e0:fc:06:5f:38)
Address: HuaweiTe_06:5f:38 (00:e0:fc:06:5f:38)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: 00:e1:fc:45:2b:f3 (00:e1:fc:45:2b:f3)
Address: 00:e1:fc:45:2b:f3 (00:e1:fc:45:2b:f3)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 10.26.244.130 (10.26.244.130), Dst: 10.26.241.164 (10.26.241.164)
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: 60
Identification: 0x33e0 (13280)
Flags: 0x00
0... .... = Reserved bit: Not set
.0.. .... = Don't fragment: Not set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 61
Protocol: GRE (47)
Header checksum: 0x0b57 [correct]
[Good: True]
[Bad: False]
Source: 10.26.244.130 (10.26.244.130)
Destination: 10.26.241.164 (10.26.241.164)
Generic Routing Encapsulation (CDMA2000 A10 Unstructured byte stream)
Flags and Version: 0x3000
0... .... .... .... = Checksum Bit: No
.0.. .... .... .... = Routing Bit: No
..1. .... .... .... = Key Bit: Yes
...1 .... .... .... = Sequence Number Bit: Yes
.... 0... .... .... = Strict Source Route Bit: No
.... .000 .... .... = Recursion control: 0
.... .... 0... .... = Acknowledgment: No
.... .... .000 0... = Flags (Reserved): 0
.... .... .... .000 = Version: GRE (0)
Protocol Type: CDMA2000 A10 Unstructured byte stream (0x8881)
Key: 0x10330c63
Sequence Number: 7
PPP In HDLC-Like Framing
PPP Data
PPP Fragment
Point-to-Point Protocol
Protocol: IP Control Protocol (0x8021)
PPP IP Control Protocol
Code: Configuration Request (0x01)
Identifier: 0x07
Length: 22
Options: (18 bytes)
IP address: 10.45.76.66
Primary DNS server IP address: 10.30.19.50
Secondary DNS server IP address: 10.134.1.5
三、PPP in HDLC-Like参考标准
标准 |
描述 |
RFC 1549 |
PPP in HDLC Framing |
ISO/IEC 13239:2002 |
Information technology -- Telecommunications and information exchange between systems -- High-level data link control (HDLC) procedures |
发表评论