IGMPv3成员查询消息
IGMP有多个版本,其中IGMPv3版本是由RFC3376定义的。运行IGMPv3的主机不仅能够选择组,还能根据需要选择组播源/组。主机发送的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 = 0x11 | Max Resp Code | Checksum |
+---------------------------------------------------------------
| Group Address |
+---------------------------------------------------------------
| Resv |S| QRV | QQIC | Number of Sources (N) |
+---------------------------------------------------------------
| Source Address (1) |
+- -+
| Source Address (2) |
+- . -+
. . .
. . .
+- -+
| Source Address (N) |
+---------------------------------------------------------------
查询消息有三种类型的变体:
1、“普通查询”由多播路由器发出,用于获知邻接接口(即查询所传输的网络中所相连的接口)的完整的多播接收状态。在一个普通查询中,组地址字段和源数量(N)字段都为0。
2、“指定组查询”由一台多播路由器发出,用于获知邻接接口中跟某一个IP地址相关的多播接收状态。在指定组查询中,“组地址”字段含有需要查询的那个组地址,源数量(N)字段为0。
3、“指定组和源查询”由一台多播路由器发出,用于获知邻接接口是否需要接收来自指定的这些源的,发往指定组的多播数据报。在一个指定组和源的查询中,组地址字段含有要查询的多播地址,源地址[i]字段含有相关的源地址
二、 IGMPv3查询报文格式解释
字段 | 长度 | 描述 |
---|---|---|
Type | 8比特 | 成员关系查询 Type = 0x11。 |
Max Resp Code | 8比特 | 设备接收到查询消息后发出响应报文的最大延迟时间,超过该时间没有发出响应报文,则查询设备认为此次查询超时,单位是1/10秒。 |
Checksum | 16比特 | IGMP消息的校验和。传送报文时,必须计算校验和并填入该字段中;接收报文时,必须在处理报文之前检验校验和,以判断IGMP消息在传输过程中是否发生了错误。 |
Group Address | 32比特 | 对于普遍组查询消息,该字段置0。对于特定组查询消息、特定组/源查询消息,该字段为设置为欲查询的组播组的地址。 |
Resv | 4比特 | 保留字段,发送报文时置0;接收到报文时,对该字段不做任何处理。 |
S | 1比特 | 该比特位置1时,所有收到此查询消息的其他路由器不启动定时器刷新过程,但是此查询消息并不抑制查询器选举过程和路由器的主机侧处理过程。 |
QRV | 3比特 | 查询者的健壮变量,如果不为0,QRV中包含中一个被查询者使用的[健壮变量]的值,如果查询者的健壮变量的值超过7,即QRV字段的最大值,那么QRV被设成0。路由器取最近收到的查询中的QRV值作为它们自己的健壮性变量的值,除非最近收到的QRV是0,在这种情况下,接收者使用缺省的健壮性变量值,或者是一个静态配置的值。 |
QQIC | 8比特 | 查询器的查询间隔,单位是秒。非查询器收到查询报文时,如果发现该字段非0,则将自己的查询间隔参数调整为该字段的值。 |
Number of Sources (N) | 16比特 | 消息中包含的组播源的数量。对于普遍组查询报文和特定组查询报文,该字段为0;对于特定组/源地址查询报文,该字段非0。此参数的大小受到所在网络MTU大小的限制。 |
Source Address [i] | 32比特 | 组播源地址,其数量受到Number of Sources字段值大小的限制。 |
三、 IGMPv3成员查询消息(普通查询)报文示例
Frame 1: 68 bytes on wire (544 bits), 68 bytes captured (544 bits)
Arrival Time: Feb 21, 2010 10:44:45.242895590
Epoch Time: 1266720285.242895590 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: 00:e1:fc:00:29:d7 (00:e1:fc:00:29:d7), 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: 00:e1:fc:00:29:d7 (00:e1:fc:00:29:d7)
Address: 00:e1:fc:00:29:d7 (00:e1:fc:00:29:d7)
.... ...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: 77616861000000000000271266b0
Internet Protocol Version 4, Src: 192.168.0.1 (192.168.0.1), 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: 36
Identification: 0xc9d4 (51668)
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: 0xb994 [correct]
[Good: True]
[Bad: False]
Source: 192.168.0.1 (192.168.0.1)
Destination: 224.0.0.1 (224.0.0.1)
Options: (4 bytes)
Router Alert: Every router examines packet
Internet Group Management Protocol
[IGMP Version: 3]
Type: Membership Query (0x11)
Max Response Time: 10.0 sec (0x64)
Header checksum: 0xec5f [correct]
Multicast Address: 0.0.0.0 (0.0.0.0)
QRV=2 S=Do not suppress router side processing
.... 0... = S: Do not suppress router side processing
.... .010 = QRV: 2
QQIC: 60
Num Src: 0
四、 IGMPv3成员查询消息(指定组查询)报文示例
Frame 1: 68 bytes on wire (544 bits), 68 bytes captured (544 bits)
Arrival Time: Feb 21, 2010 10:46:29.012641360
Epoch Time: 1266720389.012641360 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: 00:e1:fc:00:29:d7 (00:e1:fc:00:29:d7), 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: 00:e1:fc:00:29:d7 (00:e1:fc:00:29:d7)
Address: 00:e1:fc:00:29:d7 (00:e1:fc:00:29:d7)
.... ...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: aaaa000000001e91356f
Internet Protocol Version 4, Src: 192.168.0.1 (192.168.0.1), Dst: 232.0.0.1 (232.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: 40
Identification: 0xca0b (51723)
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: 0xb159 [correct]
[Good: True]
[Bad: False]
Source: 192.168.0.1 (192.168.0.1)
Destination: 232.0.0.1 (232.0.0.1)
Options: (4 bytes)
Router Alert: Every router examines packet
Internet Group Management Protocol
[IGMP Version: 3]
Type: Membership Query (0x11)
Max Response Time: 1.0 sec (0x0a)
Header checksum: 0x3df2 [correct]
Multicast Address: 232.0.0.1 (232.0.0.1)
QRV=0 S=SUPPRESS router side processing
.... 1... = S: SUPPRESS router side processing
.... .000 = QRV: 0
QQIC: 0
Num Src: 10
Source Address: 192.0.1.0 (192.0.1.0)
发表评论