PIM Graft/Graft-Ack报文格式
在PIM-DM网络中,路由器上出现组成员时,如果本身不在SPT上,则从对应的(S,G)表项的上游接口发送Graft消息。上游邻居立即恢复下游接口的转发,同时从该下游接口发出Graft-Ack消息,表示已经接受嫁接请求。如果上游邻居不在SPT上,则继续向上游发送Graft消息。
Graft消息格式与Join/Prune消息相同,仅部分字段取值存在差异。Graft-Ack消息与Graft消息格式相同,并复制了Graft消息的内容。其中不同的是,Upstream Neighbor Address字段,在Graft-Ack消息中填为Graft消息的发出者地址。
一、Graft/Graft-Ack消息报文格式
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 |
+-------+-------+---------------+-------------------------------+
| Upstream Neighbor Address (Encoded-Unicast format) |
+---------------+---------------+-------------------------------+
| Reserved | Num groups | Holdtime |
+---------------+---------------+-------------------------------+
| Multicast Group Address 1 (Encoded-Group format) |
+-------------------------------+-------------------------------+
| Number of Joined Sources | Number of Pruned Sources |
+-------------------------------+-------------------------------+
| Joined Source Address 1 (Encoded-Source format) |
+---------------------------------------------------------------+
| . |
| . |
+---------------------------------------------------------------+
| Joined Source Address n (Encoded-Source format) |
+---------------------------------------------------------------+
| Pruned Source Address 1 (Encoded-Source format) |
+---------------------------------------------------------------+
| . |
| . |
+---------------------------------------------------------------+
| Pruned Source Address n (Encoded-Source format) |
+---------------------------------------------------------------+
| . |
| . |
+---------------------------------------------------------------+
| Multicast Group Address m (Encoded-Group format) |
+-------------------------------+-------------------------------+
| Number of Joined Sources | Number of Pruned Sources |
+-------------------------------+-------------------------------+
| Joined Source Address 1 (Encoded-Source format) |
+---------------------------------------------------------------+
| . |
| . |
+---------------------------------------------------------------+
| Joined Source Address n (Encoded-Source format) |
+---------------------------------------------------------------+
| Pruned Source Address 1 (Encoded-Source format) |
+---------------------------------------------------------------+
| . |
| . |
+---------------------------------------------------------------+
| Pruned Source Address n (Encoded-Source format) |
+---------------------------------------------------------------+
二、Graft/Graft-Ack消息报文格式释义
字段 | 长度 | 说明 |
---|---|---|
PIM Ver | 4比特 | PIM版本,值为2。 |
Type | 4比特 | 消息类型,Graft值为6,Graft-Ack值为7。 |
Reserved | 8比特 | 保留。发送者将其设置为0,接收者忽略此字段。 |
Checksum | 16比特 | 校验和。 |
Upstream Neighbor Address | 32比特 |
在Graft消息中填上游邻居地址。也就是收到嫁接消息的路由器上,进行嫁接操作的下游接口地址。 在Graft-Ack消息中填为Graft消息的发出者地址。 |
Num groups | 8比特 | 消息中包含的组播组数目。 |
Holdtime | 16比特 | 该字段为0。 |
Multicast Group Address | 32比特 | 组播组地址。 |
Number of Joined Sources | 16比特 | 针对该组播组,请求加入的组播源总数。 |
Number of Pruned Sources | 16比特 | 该字段为0。 |
Joined Source Address | 32比特 | 待嫁接的(S,G)的源地址。 |
三、PIM Graft消息报文示例
Frame 1: 76 bytes on wire (608 bits), 76 bytes captured (608 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Apr 7, 2010 11:30:51.114387160
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1270611051.114387160 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: 76 bytes (608 bits)
Capture Length: 76 bytes (608 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:vlan:ethertype:ip:pim]
Ethernet II, Src: 00:e1:00:fc:29:de (00:e1:00:fc:29:de), Dst: 00:e0:fc:00:29:d8 (00:e0:fc:00:29:d8)
Destination: 00:e0:fc:00:29:d8 (00:e0:fc:00:29:d8)
Address: 00:e0:fc:00:29:d8 (00:e0:fc:00:29:d8)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Source: 00:e1:00:fc:29:de (00:e1:00:fc:29:de)
Address: 00:e1:00:fc:29:de (00:e1:00:fc:29:de)
.... ..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: 18
110. .... .... .... = Priority: Voice, < 10ms latency and jitter (6)
...0 .... .... .... = CFI: Canonical (0)
.... 0000 0001 0010 = ID: 18
Type: IP (0x0800)
Trailer: 1a3d146b
Internet Protocol Version 4, Src: 10.107.110.110 (10.107.110.110), Dst: 10.107.110.107 (10.107.110.107)
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: 54
Identification: 0x1702 (5890)
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: 0xc1f0 [validation disabled]
[Good: False]
[Bad: False]
Source: 10.107.110.110 (10.107.110.110)
Destination: 10.107.110.107 (10.107.110.107)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Protocol Independent Multicast
0010 .... = Version: 2
.... 0110 = Type: Graft (6)
Reserved byte(s): 00
Checksum: 0x78dd [correct]
PIM options
Upstream-neighbor: 10.107.110.107 (10.107.110.107)
Reserved byte(s): 00
Num Groups: 1
Holdtime: 0s
Group 0: 228.1.1.1/32
Num Joins: 1
IP address: 10.1.1.6/32
Num Prunes: 0
四、PIM Graft-Ack消息报文示例
Frame 1: 68 bytes on wire (544 bits), 68 bytes captured (544 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Jan 29, 2016 10:19:52.181792000
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1454033992.181792000 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: 68 bytes (544 bits)
Capture Length: 68 bytes (544 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ip:pim]
[Coloring Rule Name: Broadcast]
[Coloring Rule String: eth[0] & 1]
Ethernet II, Src: 00:00:01:01:01:01 (00:00:01:01:01:01), Dst: IPv4mcast_39:68:01 (01:00:5e:39:68:01)
Destination: IPv4mcast_39:68:01 (01:00:5e:39:68:01)
Address: IPv4mcast_39:68:01 (01:00:5e:39:68:01)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
Source: 00:00:01:01:01:01 (00:00:01:01:01:01)
Address: 00:00:01:01:01:01 (00:00:01:01:01:01)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 10.0.3.3 (10.0.3.3), Dst: 10.0.3.1 (10.0.3.1)
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: 54
Identification: 0x0000 (0)
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: 0x8b5e [validation disabled]
[Good: False]
[Bad: False]
Source: 10.0.3.3 (10.0.3.3)
Destination: 10.0.3.1 (10.0.3.1)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Protocol Independent Multicast
0010 .... = Version: 2
.... 0111 = Type: Graft-Ack (7)
Reserved byte(s): 00
Checksum: 0xc283 [correct]
PIM options
Upstream-neighbor: 10.0.3.1 (10.0.3.1)
Reserved byte(s): 00
Num Groups: 1
Holdtime: 210s
Group 0: 225.1.1.1/32
Num Joins: 1
IP address: 10.0.5.100/32
Num Prunes: 0
发表评论