IGMPv3成员报告消息
IGMPv3包含成员查询消息和成员报告消息两种不同格式的消息报文。成员报告消息是主机向组播路由器发送的报告消息,用报告加入某组播组并只接收由指定组播源发往该组的数据。
一、 IGMPv3成员报告消息报文格式
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Reserved | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved | Number of Group Records (M) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| Group Record (1) |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| Group Record (2) |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| . |
+ . +
| . |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| Group Record (M) |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
二、Group Record字段报文格式
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Record Type | Aux Data Len | Number of Sources(N) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Multicast Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Address (1) |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| Source Address (2) |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| . |
+ . +
| . |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Address (M) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Auxiliary Data |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
三、IGMPv3成员报告消息、Group Record字段报文格式解释
字段 | 长度 | 描述 |
---|---|---|
Type | 8比特 |
Type = 0x22表示成员关系报告 |
Reserved | 8比特 | 保留字段,在发送的时候是以0填充,在接收的时候是不作任何处理的。 |
Checksum | 16比特 | 校验和是对整个IGMP消息以16位为一段进行取反求和。为了计算校验和,校验和字段首先必须被置0。当收到一个数据,在处理之前,必须先对校验和进行验证。 |
Reserved | 16比特 | T保留字段,在发送的时候是以0填充,在接收的时候是不作任何处理的。 |
Number of Group Records (M) | 16比特 | 该字段表示该报告报文中包含有几个组记录。 |
Group Record | 变长 |
一个主机可能需要点播多个组播地址的组播业务,每个记录包含了对应于其中一个组播地址的源地址列表等信息,它受到Number_of_Group_Records的大小的影响。 每一个组记录字段是一整块数据,其含有的信息是关于发送者在报告发送接口上的某一个多播组的成员关系。 |
Record Type | 8比特 | Group Record消息的类型。
|
Aux Data Len | 8比特 | 辅助数据长度含有在组记录中的辅助数据的实际长度,其单位是32bit字。它有可能是0,这就表示辅助数据不存在。 |
Number of Sources (N) | 16比特 | 源数量(N)字段标明在组记录中存在多少源地址。 |
Multicast Address | 32比特 | 多播地址字段标明该组记录从属的多播IP地址。 |
Source Address [i] | 32比特 | 源地址[i]字段是一个数组,含有n个单播地址。n就是该记录的源数量(N)字段的值。 |
Auxiliary Data | 变长 | 附加数据。如果收到的报告中的IP首部的数据报长度字段标明在最后一个组记录后面有附加的数据存在。IGMPv3的实现必须在计算和验证校验和的时候包含这些附加数据,但是同时必须忽略这些附加数据。当发送一个报告时,一个IGMPv3的实现在最后一个组记录后面不能包含附加数据。 |
四、IGMPv3 Membership Report (CHANGE_TO_INCLUDE_MODE)报文示例
Frame 1: 64 bytes on wire (512 bits), 64 bytes captured (512 bits)
Arrival Time: Feb 21, 2010 10:46:04.812508520
Epoch Time: 1266720364.812508520 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: 64 bytes (512 bits)
Capture Length: 64 bytes (512 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ip:igmp]
[Coloring Rule Name: Routing]
[Coloring Rule String: hsrp || eigrp || ospf || bgp || cdp || vrrp || gvrp || igmp || ismp]
Ethernet II (VLAN tagged), Src: Performa_00:00:01 (00:10:94:00:00:01), Dst: IPv4mcast_00:00:16 (01:00:5e:00:00:16)
Destination: IPv4mcast_00:00:16 (01:00:5e:00:00:16)
Address: IPv4mcast_00:00:16 (01:00:5e:00:00:16)
.... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: Performa_00:00:01 (00:10:94:00:00:01)
Address: Performa_00:00:01 (00:10:94:00:00:01)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
VLAN tag: VLAN=20, Priority=Best Effort (default)
Identifier: 802.1Q Virtual LAN (0x8100)
000. .... .... .... = Priority: Best Effort (default) (0)
...0 .... .... .... = CFI: Canonical (0)
.... 0000 0001 0100 = VLAN: 20
Type: IP (0x0800)
Trailer: 000000000000
Internet Protocol Version 4, Src: 192.85.1.3 (192.85.1.3), Dst: 224.0.0.22 (224.0.0.22)
Version: 4
Header length: 24 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: 40
Identification: 0xf001 (61441)
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: IGMP (2)
Header checksum: 0x929f [correct]
[Good: True]
[Bad: False]
Source: 192.85.1.3 (192.85.1.3)
Destination: 224.0.0.22 (224.0.0.22)
Options: (4 bytes)
Router Alert: Every router examines packet
Internet Group Management Protocol
[IGMP Version: 3]
Type: Membership Report (0x22)
Header checksum: 0xf9fc [correct]
Num Group Records: 1
Group Record : 225.0.0.1 Change To Include Mode
Record Type: Change To Include Mode (3)
Aux Data Len: 0
Num Src: 0
Multicast Address: 225.0.0.1 (225.0.0.1)
五、IGMPv3 Membership Report (CHANGE_TO_EXCLUDE_MODE)报文示例
Frame 8: 68 bytes on wire (544 bits), 68 bytes captured (544 bits)
Arrival Time: Feb 21, 2010 10:42:55.770634390
Epoch Time: 1266720175.770634390 seconds
[Time delta from previous captured frame: 6.770500540 seconds]
[Time delta from previous displayed frame: 6.770500540 seconds]
[Time since reference or first frame: 66.770634390 seconds]
Frame Number: 8
Frame Length: 68 bytes (544 bits)
Capture Length: 68 bytes (544 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ip:igmp]
[Coloring Rule Name: Routing]
[Coloring Rule String: hsrp || eigrp || ospf || bgp || cdp || vrrp || gvrp || igmp || ismp]
Ethernet II (VLAN tagged), Src: Performa_00:00:01 (00:10:94:00:00:01), Dst: IPv4mcast_00:00:16 (01:00:5e:00:00:16)
Destination: IPv4mcast_00:00:16 (01:00:5e:00:00:16)
Address: IPv4mcast_00:00:16 (01:00:5e:00:00:16)
.... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: Performa_00:00:01 (00:10:94:00:00:01)
Address: Performa_00:00:01 (00:10:94:00:00:01)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
VLAN tag: VLAN=20, Priority=Best Effort (default)
Identifier: 802.1Q Virtual LAN (0x8100)
000. .... .... .... = Priority: Best Effort (default) (0)
...0 .... .... .... = CFI: Canonical (0)
.... 0000 0001 0100 = VLAN: 20
Type: IP (0x0800)
Trailer: 000000000000ff1672d8
Internet Protocol Version 4, Src: 192.85.1.3 (192.85.1.3), Dst: 224.0.0.22 (224.0.0.22)
Version: 4
Header length: 24 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: 40
Identification: 0xeffa (61434)
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: IGMP (2)
Header checksum: 0x92a6 [correct]
[Good: True]
[Bad: False]
Source: 192.85.1.3 (192.85.1.3)
Destination: 224.0.0.22 (224.0.0.22)
Options: (4 bytes)
Router Alert: Every router examines packet
Internet Group Management Protocol
[IGMP Version: 3]
Type: Membership Report (0x22)
Header checksum: 0xf8fc [correct]
Num Group Records: 1
Group Record : 225.0.0.1 Change To Exclude Mode
Record Type: Change To Exclude Mode (4)
Aux Data Len: 0
Num Src: 0
Multicast Address: 225.0.0.1 (225.0.0.1)
六、IGMPv3 Membership Report (ALLOW_NEW_SOURCES)报文示例
Frame 1: 68 bytes on wire (544 bits), 68 bytes captured (544 bits)
Arrival Time: Feb 21, 2010 10:43:54.467692060
Epoch Time: 1266720234.467692060 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:ip:igmp]
[Coloring Rule Name: Routing]
[Coloring Rule String: hsrp || eigrp || ospf || bgp || cdp || vrrp || gvrp || igmp || ismp]
Ethernet II (VLAN tagged), Src: Performa_00:00:01 (00:10:94:00:00:01), Dst: IPv4mcast_00:00:16 (01:00:5e:00:00:16)
Destination: IPv4mcast_00:00:16 (01:00:5e:00:00:16)
Address: IPv4mcast_00:00:16 (01:00:5e:00:00:16)
.... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: Performa_00:00:01 (00:10:94:00:00:01)
Address: Performa_00:00:01 (00:10:94:00:00:01)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
VLAN tag: VLAN=20, Priority=Best Effort (default)
Identifier: 802.1Q Virtual LAN (0x8100)
000. .... .... .... = Priority: Best Effort (default) (0)
...0 .... .... .... = CFI: Canonical (0)
.... 0000 0001 0100 = VLAN: 20
Type: IP (0x0800)
Trailer: 776134334c9e
Internet Protocol Version 4, Src: 192.85.1.3 (192.85.1.3), Dst: 224.0.0.22 (224.0.0.22)
Version: 4
Header length: 24 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: 44
Identification: 0xeffd (61437)
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: IGMP (2)
Header checksum: 0x929f [correct]
[Good: True]
[Bad: False]
Source: 192.85.1.3 (192.85.1.3)
Destination: 224.0.0.22 (224.0.0.22)
Options: (4 bytes)
Router Alert: Every router examines packet
Internet Group Management Protocol
[IGMP Version: 3]
Type: Membership Report (0x22)
Header checksum: 0x2f52 [correct]
Num Group Records: 1
Group Record : 232.0.0.1 Block Old Sources
Record Type: Block Old Sources (6)
Aux Data Len: 0
Num Src: 1
Multicast Address: 232.0.0.1 (232.0.0.1)
Source Address: 192.168.0.1 (192.168.0.1)
发表评论