MLDv2报文格式
MLDv2查询消息分为普遍组查询消息和特定组查询消息。
普遍组查询消息是查询器定期向共享网段内所有主机以组播方式发送的查询消息,用于查询哪些组播组存在成员;
特定组查询消息是查询器向共享网段内特定组播组成员发送的消息,用于查询该组播组是否存在成员。
一、MLDv2查询消息报文格式
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type = 130 | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Maximum Response Code | Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
* *
| |
* Multicast Address *
| |
* *
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Resv |S| QRV | QQIC | Number of Sources (N) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
* *
| |
* Source Address [1] *
| |
* *
| |
+- -+
| |
* *
| |
* Source Address [2] *
| |
* *
| |
+- . -+
. . .
. . .
+- -+
| |
* *
| |
* Source Address [N] *
| |
* *
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
二、MLDv2查询消息字段解释
字段 | 长度 | 描述 |
---|---|---|
Type | 1字节 | 消息类型,该字段取值为130。 |
Code | 1字节 | 发送时此字段设置为0,接收时不处理此字段。 |
Checksum | 2字节 | 标准的ICMPv6校验和,覆盖所有MLD消息以及IPv6首部区域中的伪首部。在计算校验和时,此字段以零计算。发送报文时必须计算校验和并将结果写入此字段。接收报文时首先验证校验和,然后才处理报文。 |
Maximum Response Delay | 2字节 | 主机发送报告消息前允许的最长响应延迟。 |
Reserved | 2字节 | 保留字段。发送时此字段设置为0,接收时不处理此字段。 |
Multicast Address | 16字节 | 组地址。
|
Resv | 4比特 | 保留字段。发送时此字段设置为0,接收时不处理此字段。 |
S(Suppress Router-Side Processing) | 1比特 | 标识位,表示路由器接收到查询消息后是否对定时器更新进行抑制。 |
QRV(Querier’s Robustness Variable) | 3比特 | 查询器健壮系数。 |
QQIC(Querier’s Query Interval Code) | 1字节 | 查询器查询间隔。 |
Number of Sources | 2字节 | 组播源个数。
|
Source Address [i] | 16字节 | 组播源地址列表。
|
三、MLD Membership Query (General) message报文示例
Frame 401: 86 bytes on wire (688 bits), 86 bytes captured (688 bits) on interface 0
Interface id: 0 (\Device\NPF_{69F7154F-F213-4B4C-9DC4-C423DA185F1E})
Encapsulation type: Ethernet (1)
Arrival Time: Mar 17, 2015 14:04:35.310056000
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1426572275.310056000 seconds
[Time delta from previous captured frame: 0.000002000 seconds]
[Time delta from previous displayed frame: 0.000002000 seconds]
[Time since reference or first frame: 23.762389000 seconds]
Frame Number: 401
Frame Length: 86 bytes (688 bits)
Capture Length: 86 bytes (688 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ipv6:ipv6.nxt:ipv6.hop_opt:icmpv6]
[Coloring Rule Name: ICMP]
[Coloring Rule String: icmp || icmpv6]
Ethernet II, Src: 00:23:e9:87:d4:01 (00:23:e9:87:d4:01), Dst: IPv6mcast_01 (33:33:00:00:00:01)
Destination: IPv6mcast_01 (33:33:00:00:00:01)
Address: IPv6mcast_01 (33:33:00:00:00:01)
.... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
.... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
Source: 00:23:e9:87:d4:01 (00:23:e9:87:d4:01)
Address: 00:23:e9:87:d4:01 (00:23:e9:87:d4:01)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: IPv6 (0x86dd)
Internet Protocol Version 6, Src: 2073:7472:696e:6706:c0a8:ca02:0:586 (2073:7472:696e:6706:c0a8:ca02:0:586), Dst: ff02::1 (ff02::1)
0110 .... = Version: 6
[0110 .... = This field makes the filter "ip.version == 6" possible: 6]
.... 0000 0000 .... .... .... .... .... = Traffic class: 0x00000000
.... 0000 00.. .... .... .... .... .... = Differentiated Services Field: Default (0x00000000)
.... .... ..0. .... .... .... .... .... = ECN-Capable Transport (ECT): Not set
.... .... ...0 .... .... .... .... .... = ECN-CE: Not set
.... .... .... 0000 0000 0000 0000 0000 = Flowlabel: 0x00000000
Payload length: 32
Next header: IPv6 hop-by-hop option (0)
Hop limit: 1
Source: 2073:7472:696e:6706:c0a8:ca02:0:586 (2073:7472:696e:6706:c0a8:ca02:0:586)
Destination: ff02::1 (ff02::1)
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Hop-by-Hop Option
Next header: ICMPv6 (58)
Length: 0 (8 bytes)
IPv6 Option (Router Alert)
Type: Router Alert (5)
Length: 2
Router Alert: MLD (0)
IPv6 Option (Pad1)
Type: Pad1 (0)
Pad1
IPv6 Option (Pad1)
Type: Pad1 (0)
Pad1
Internet Control Message Protocol v6
Type: Multicast Listener Query (130)
Code: 0
Checksum: 0x8535 [correct]
Maximum Response Delay [ms]: 1000
Reserved: 0000
Multicast Address: :: (::)
发表评论