IGMPv2报文格式
IGMP有多个版本,其中IGMPv2版本是由RFC2236定义的。运行IGMPv2的主机发送的IGMP报告中仅携带组信息。
当主机发送一个组的IGMP加入报文给路由器后,路由器会通知组播转发模块,以便这个组的组播数据到来时能够正确转发给该主机。
IGMPv2协议具有报告抑制机制,可以减少网络中的IGMP的重复报告。
一、IGMPv2报文格式
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 | Max Resp Time | Checksum |
+---------------------------------------------------------------
| Group Address |
+---------------------------------------------------------------
二、IGMPv2报文格式解释
字段 | 长度 | 描述 |
---|---|---|
Type | 8比特 | 报文类型,有以下几种类型:
在IGMP版本2中,旧的4位版本字段和旧的4位类型字段拼成了一个新的8位类型字段,通过分别将成员查询(版本1和版本2的)及版本1的成员报告报文的IGMP版本2的类型代码置为0x11和0x12,保持了IGMP版本1和版本2包格式的向后兼容。 |
Max Resp Time | 8比特 |
在发出响应报告前的以1/10秒为单位的最长时间,缺省值为10秒。 新的最大响应时间(以1/10秒为单位)字段允许查询用路由器为它的查询报文指定准确的查询间隔响应时间。IGMP版本2主机在随机选择它们的响应时间值时以此作为上限。 这样在查询响应间隔时有助于控制响应的爆发。 |
Checksum | 16比特 | IGMP消息的校验和。传送报文时,必须计算校验和并填入该字段中;接收报文时,必须在处理报文之前检验校验和,以判断IGMP消息在传输过程中是否发生了错误。 |
Group Address | 32比特 |
组播组地址(如果是通用查询则为0.0.0.0)。 除了在通用查询时这一字段置为0.0.0.0外,这一字段和IGMP版本1中的这一字段意义相同。 |
三、IGMPv2成员查询消息(通用查询)报文示例
Frame 1: 60 bytes on wire (480 bits), 60 bytes captured (480 bits)
Arrival Time: Mar 17, 2015 14:04:35.310054000
Epoch Time: 1426572275.310054000 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: 60 bytes (480 bits)
Capture Length: 60 bytes (480 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, Src: F5Networ_87:d4:01 (00:23:e9:87:d4:01), Dst: IPv4mcast_00:00:01 (01:00:5e:00:00:01)
Destination: IPv4mcast_00:00:01 (01:00:5e:00:00:01)
Address: IPv4mcast_00:00:01 (01:00:5e:00:00:01)
.... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: F5Networ_87:d4:01 (00:23:e9:87:d4:01)
Address: F5Networ_87:d4:01 (00:23:e9:87:d4:01)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Type: IP (0x0800)
Trailer: 0000000000000000000000000000
Internet Protocol Version 4, Src: 0.0.0.0 (0.0.0.0), Dst: 224.0.0.1 (224.0.0.1)
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: 32
Identification: 0x0000 (0)
Flags: 0x02 (Don't Fragment)
0... .... = Reserved bit: Not set
.1.. .... = Don't fragment: Set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 1
Protocol: IGMP (2)
Header checksum: 0x0417 [correct]
[Good: True]
[Bad: False]
Source: 0.0.0.0 (0.0.0.0)
Destination: 224.0.0.1 (224.0.0.1)
Options: (4 bytes)
Router Alert: Every router examines packet
Internet Group Management Protocol
[IGMP Version: 2]
Type: Membership Query (0x11)
Max Response Time: 10.0 sec (0x64)
Header checksum: 0xee9b [correct]
Multicast Address: 0.0.0.0 (0.0.0.0)
四、 IGMPv2成员查询消息(Join Group)报文示例
Frame 1: 60 bytes on wire (480 bits), 60 bytes captured (480 bits)
Arrival Time: Mar 17, 2015 14:04:55.068997000
Epoch Time: 1426572295.068997000 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: 60 bytes (480 bits)
Capture Length: 60 bytes (480 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, Src: F5Networ_88:35:01 (00:23:e9:88:35:01), Dst: IPv4mcast_00:00:01 (01:00:5e:00:00:01)
Destination: IPv4mcast_00:00:01 (01:00:5e:00:00:01)
Address: IPv4mcast_00:00:01 (01:00:5e:00:00:01)
.... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: F5Networ_88:35:01 (00:23:e9:88:35:01)
Address: F5Networ_88:35:01 (00:23:e9:88:35:01)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Type: IP (0x0800)
Trailer: 0000000000000000000000000000
Internet Protocol Version 4, Src: 0.0.0.0 (0.0.0.0), Dst: 224.0.0.1 (224.0.0.1)
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: 32
Identification: 0x0000 (0)
Flags: 0x02 (Don't Fragment)
0... .... = Reserved bit: Not set
.1.. .... = Don't fragment: Set
..0. .... = More fragments: Not set
Fragment offset: 0
Time to live: 1
Protocol: IGMP (2)
Header checksum: 0x0417 [correct]
[Good: True]
[Bad: False]
Source: 0.0.0.0 (0.0.0.0)
Destination: 224.0.0.1 (224.0.0.1)
Options: (4 bytes)
Router Alert: Every router examines packet
Internet Group Management Protocol
[IGMP Version: 2]
Type: Membership Query (0x11)
Max Response Time: 1.0 sec (0x0a)
Header checksum: 0xfefa [correct]
Multicast Address: 239.255.255.250 (239.255.255.250)
五、 IGMPv2成员报告消息报文示例
ytes
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: 32
Identification: 0x2b63 (11107)
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: 0xea95 [correct]
[Good: True]
[Bad: False]
Source: 172.30.129.196 (172.30.129.196)
Destination: 224.0.1.252 (224.0.1.252)
Options: (4 bytes)
Router Alert: Every router examines packet
Internet Group Management Protocol
[IGMP Version: 2]
Type: Membership Report (0x16) Max Response Time: 0.0 sec (0x00)
Header checksum: 0x0903 [correct]
Multicast Address: 224.0.1.252 (224.0.1.252)
六、IGMPv2离开组消息报文示例
Frame 1: 46 bytes on wire (368 bits), 46 bytes captured (368 bits)
Arrival Time: Mar 17, 2015 14:04:55.068858000
Epoch Time: 1426572295.068858000 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: 46 bytes (368 bits)
Capture Length: 46 bytes (368 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ip:igmp]
[Coloring Rule Name: Checksum Errors]
[Coloring Rule String: cdp.checksum_bad==1 || edp.checksum_bad==1 || ip.checksum_bad==1 || tcp.checksum_bad==1 || udp.checksum_bad==1 || sctp.checksum_bad==1 || mstp.checksum_bad==1]
Ethernet II, Src: 40:f2:e9:2e:b2:5a (40:f2:e9:2e:b2:5a), Dst: IPv4mcast_00:00:02 (01:00:5e:00:00:02)
Destination: IPv4mcast_00:00:02 (01:00:5e:00:00:02)
Address: IPv4mcast_00:00:02 (01:00:5e:00:00:02)
.... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Source: 40:f2:e9:2e:b2:5a (40:f2:e9:2e:b2:5a)
Address: 40:f2:e9:2e:b2:5a (40:f2:e9:2e:b2:5a)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
Type: IP (0x0800)
Internet Protocol Version 4, Src: 172.30.129.205 (172.30.129.205), Dst: 224.0.0.2 (224.0.0.2)
Version: 4
Header length: 24 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: 32
Identification: 0x4e45 (20037)
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: 0x0000 [incorrect, should be 0xc8a4 (maybe caused by "IP checksum offload"?)]
[Good: False]
[Bad: True]
[Expert Info (Error/Checksum): Bad checksum]
[Message: Bad checksum]
[Severity level: Error]
[Group: Checksum]
Source: 172.30.129.205 (172.30.129.205)
Destination: 224.0.0.2 (224.0.0.2)
Options: (4 bytes)
Router Alert: Every router examines packet
Internet Group Management Protocol
[IGMP Version: 2]
Type: Leave Group (0x17)
Max Response Time: 0.0 sec (0x00)
Header checksum: 0xf904 [correct]
Multicast Address: 239.255.255.250 (239.255.255.250)
发表评论