PIM Bootstrap报文格式
Bootstrap消息只在PIM-SM中使用。当PIM-SM网络中使用动态RP时,配置了C-BSR的路由器从所有PIM接口周期性的发送Bootstrap消息,参与BSR竞选。竞选获胜者,继续发送PIM Bootstrap消息,向域内所有PIM路由器发布RP-Set信息。
一、Bootstrap消息格式
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-------+-------+---------------+-------------------------------+
|PIM Ver| Type | Reserved | Checksum |
+-------+-------+---------------+---------------+---------------+
| Fragment Tag | Hash Mask Len | BSR-priority |
+-------------------------------+---------------+---------------+
| BSR-Address |
+-------------------------------+-------------------------------+
| Group Address 1 (Encoded-Group format) |
+---------------+---------------+-------------------------------+
| RP-Count |Frag RP-Cnt(M) | Reserved |
+---------------+---------------+-------------------------------+
| RP-address [1] |
+-------------------------------+---------------+---------------+
| RP-holdtime [1] |RP-Priority [1]| Reserved |
+-------------------------------+---------------+---------------+
| . |
| . |
+---------------------------------------------------------------+
| RP-address [M] |
+-------------------------------+---------------+---------------+
| RP-holdtime [M] |RP-Priority [M]| Reserved |
+-------------------------------+---------------+---------------+
| . |
| . |
| . |
| . |
| Group Address K (Encoded-Group format) |
+---------------+---------------+-------------------------------+
| RP-Count |Frag RP-Cnt(M) | Reserved |
+---------------+---------------+-------------------------------+
| RP-address [1] |
+-------------------------------+---------------+---------------+
| RP-holdtime [1] |RP-Priority [1]| Reserved |
+-------------------------------+---------------+---------------+
| . |
| . |
+---------------------------------------------------------------+
| RP-address [N] |
+-------------------------------+---------------+---------------+
| RP-holdtime [N] |RP-Priority [N]| Reserved |
+-------------------------------+---------------+---------------+
二、Bootstrap消息格式解释
字段 | 长度 | 说明 |
---|---|---|
PIM Ver | 4比特 | PIM版本,值为2。 |
Type | 4比特 | 消息类型,值为4。 |
Reserved | 8比特 | 保留。发送者将其设置为0,接收者忽略此字段。 |
Checksum | 16比特 | 校验和。 |
Fragment Tag | 16比特 | 随机数,用来区分Bootstrap消息。 |
Hash Mask length | 8比特 | C-BSR的Hash掩码长度。 |
BSR-priority | 8比特 | C-BSR优先级。 |
BSR-Address | 32比特 | C-BSR地址。 |
Group Address | 32比特 | 组播组地址。 |
RP-Count | 8比特 | 希望为该组服务的C-RP的总数。 |
Frag RP-Cnt | 8比特 | 在本段内包含的C-RP地址的个数。对于一个给定的组来说,如果Bootstrap消息分片,Frag RP-Cnt字段便于将RP-Set分片。 |
RP-address | 32比特 | C-RP的地址。 |
RP-holdtime | 16比特 | C-RP发出的advertisement消息的老化时间,表示C-RP的有效时间。 |
RP-Priority | 8比特 | C-RP的优先级。 |
三、PIM Bootstrap消息报文示例
Frame 1: 78 bytes on wire (624 bits), 78 bytes captured (624 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Jan 1, 1970 08:00:00.047486000
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 0.047486000 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: 78 bytes (624 bits)
Capture Length: 78 bytes (624 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:vlan:ethertype:ip:pim]
[Coloring Rule Name: Broadcast]
[Coloring Rule String: eth[0] & 1]
Ethernet II, Src: 54:89:98:f6:45:64 (54:89:98:f6:45:64), Dst: IPv4mcast_0d (01:00:5e:00:00:0d)
Destination: IPv4mcast_0d (01:00:5e:00:00:0d)
Address: IPv4mcast_0d (01:00:5e:00:00:0d)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
Source: 54:89:98:f6:45:64 (54:89:98:f6:45:64)
Address: 54:89:98:f6:45:64 (54:89:98:f6:45:64)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: 802.1Q Virtual LAN (0x8100)
802.1Q Virtual LAN, PRI: 6, CFI: 0, ID: 423
110. .... .... .... = Priority: Voice, < 10ms latency and jitter (6)
...0 .... .... .... = CFI: Canonical (0)
.... 0001 1010 0111 = ID: 423
Type: IP (0x0800)
Trailer: 5d6bf445
Internet Protocol Version 4, Src: 10.8.23.3 (10.8.23.3), Dst: 224.0.0.13 (224.0.0.13)
Version: 4
Header Length: 20 bytes
Differentiated Services Field: 0xc0 (DSCP 0x30: Class Selector 6; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
1100 00.. = Differentiated Services Codepoint: Class Selector 6 (0x30)
.... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)
Total Length: 56
Identification: 0x09ce (2510)
Flags: 0x00
0... .... = Reserved bit: Not set
.0.. .... = Don't fragment: Not set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 1
Protocol: PIM (103)
Header checksum: 0xb0b9 [validation disabled]
[Good: False]
[Bad: False]
Source: 10.8.23.3 (10.8.23.3)
Destination: 10.0.0.13 (10.0.0.13)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Protocol Independent Multicast
0010 .... = Version: 2
.... 0100 = Type: Bootstrap (4)
Reserved byte(s): 00
Checksum: 0x05ff [correct]
PIM options
Fragment tag: 0x7d0d
Hash mask len: 30
BSR priority: 0
BSR: 10.0.0.43 (10.0.0.43)
Group 0: 224.0.0.0/4
RP count: 1
FRP count: 1
RP 0: 10.0.0.43
Holdtime: 150s
Priority: 0
发表评论