MLDv1报文格式
MLD(Multicast Listener Discovery)组播监听者发现协议现有MLDv1和MLDv2两个版本,MLDv2在MLDv1的基础上增加了对SSM模型的支持。
一、MLDv1消息格式
+0--------------7--------------15------------------------------31
| Type | Code | Checksum |
+---------------|--------------|-------------------------------|
| Maximum Response Delay | Reserved |
+--------------------------------------------------------------|
| Multicast Address |
| |
| |
| |
二、MLDv1消息格式字段解释
字段 | 长度 | 描述 |
---|---|---|
Type | 1字节 | MLDv1消息类型,有3种取值,如下面三、MLDv1消息类型所示。 |
Code | 1字节 | 代码。发送时此字段设置为0,接收时不处理此字段。 |
Checksum | 2字节 | 标准的ICMPv6校验和,覆盖所有MLD消息以及IPv6首部区域中的伪首部。在计算校验和时,此字段以零计算。发送报文时必须计算校验和并将结果写入此字段。接收报文时首先验证校验和,然后才处理报文。 |
Maximum Response Delay | 2字节 | 最大响应时间。这个字段只有在查询消息中才有意义。在其他类型的消息中,发送时这个字段被清零,接收时不处理这个字段。 |
Reserved | 2字节 | 保留位。发送时此字段被清零,接收时不处理此字段。 |
Multicast Address | 16字节 | 组地址。 |
三、MLDv1消息类型
取值(十进制) | 消息类型 | 备注 |
---|---|---|
130 | MLDv1普遍组查询消息 | 普遍组查询消息是查询器定期向共享网段内所有主机以组播方式发送的查询消息,用于查询哪些组播组存在成员。封装该消息的IPv6报文头的目的地址字段为FF02::1。组地址字段为全0,表示不指定组播组。 |
MLDv1特定组查询消息 | 特定组查询消息是查询器向共享网段内特定组播组成员发送的消息,用于查询该组播组是否存在成员。封装该消息的IPv6报文头的目的地址字段为被查询的组播组的IP地址,网络中属于该组播组的成员才能识别并响应。组地址字段为被查询的IPv6组播组地址。 | |
131 | MLDv1的成员报告消息 | 成员报告消息是主机向组播路由器发送的报告消息,用于申请加入某个组播组或者应答查询消息。封装该消息的IPv6报文头的目的地址字段为主机要加入的IPv6组播组地址,只有网络中的组播路由器和该组成员才能识别并接收。组地址字段为主机要加入的IPv6组播组地址。 |
132 | MLDv1离开消息 | 离开消息是主机主动离开组播组时向组播路由器发送的消息,用于宣告自己离开了某个组播组。封装该消息的IPv6报文头的目的地址字段为FF02::2。组地址字段为主机要离开的IPv6组播组地址。 |
四、MLD普遍组查询消息报文示例
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: :: (::)
五、MLDv1的成员报告消息报文示例
Frame 23: 86 bytes on wire (688 bits), 86 bytes captured (688 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Feb 25, 2011 11:37:01.840894000
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1298605021.840894000 seconds
[Time delta from previous captured frame: 3.099607000 seconds]
[Time delta from previous displayed frame: 3.099607000 seconds]
[Time since reference or first frame: 58.990687000 seconds]
Frame Number: 23
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:13:d3:2e:d7:01 (00:13:d3:2e:d7:01), Dst: IPv6mcast_ff:e0:ab:38 (33:33:ff:e0:ab:38)
Destination: IPv6mcast_ff:e0:ab:38 (33:33:ff:e0:ab:38)
Address: IPv6mcast_ff:e0:ab:38 (33:33:ff:e0:ab:38)
.... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
.... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
Source: 00:13:d3:2e:d7:01 (00:13:d3:2e:d7:01)
Address: 00:13:d3:2e:d7:01 (00:13:d3:2e:d7:01)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: IPv6 (0x86dd)
Internet Protocol Version 6, Src: fe80::213:d3ff:fe2e:d701 (fe80::213:d3ff:fe2e:d701), Dst: ff02::1:ffe0:ab38 (ff02::1:ffe0:ab38)
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: fe80::213:d3ff:fe2e:d701 (fe80::213:d3ff:fe2e:d701)
[Source SA MAC: 00:13:d3:2e:d7:01 (00:13:d3:2e:d7:01)]
Destination: ff02::1:ffe0:ab38 (ff02::1:ffe0:ab38)
[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 (PadN)
Type: PadN (1)
Length: 0
PadN: <MISSING>
Internet Control Message Protocol v6
Type: Multicast Listener Report (131)
Code: 0
Checksum: 0x7ead [correct]
Maximum Response Delay [ms]: 0
Reserved: 0000
Multicast Address: ff02::1:ffe0:ab38 (ff02::1:ffe0:ab38)
六、MLDv1离开消息报文示例
Frame 5: 86 bytes on wire (688 bits), 86 bytes captured (688 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Feb 25, 2011 11:36:04.849903000
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1298604964.849903000 seconds
[Time delta from previous captured frame: 0.000018000 seconds]
[Time delta from previous displayed frame: 0.000018000 seconds]
[Time since reference or first frame: 1.999696000 seconds]
Frame Number: 5
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:13:d3:2e:d7:01 (00:13:d3:2e:d7:01), Dst: IPv6mcast_02 (33:33:00:00:00:02)
Destination: IPv6mcast_02 (33:33:00:00:00:02)
Address: IPv6mcast_02 (33:33:00:00:00:02)
.... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
.... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
Source: 00:13:d3:2e:d7:01 (00:13:d3:2e:d7:01)
Address: 00:13:d3:2e:d7:01 (00:13:d3:2e:d7:01)
.... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)
.... ...0 .... .... .... .... = IG bit: Individual address (unicast)
Type: IPv6 (0x86dd)
Internet Protocol Version 6, Src: fe80::213:d3ff:fe2e:d701 (fe80::213:d3ff:fe2e:d701), Dst: ff02::2 (ff02::2)
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: fe80::213:d3ff:fe2e:d701 (fe80::213:d3ff:fe2e:d701)
[Source SA MAC: 00:13:d3:2e:d7:01 (00:13:d3:2e:d7:01)]
Destination: ff02::2 (ff02::2)
[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 (PadN)
Type: PadN (1)
Length: 0
PadN: <MISSING>
Internet Control Message Protocol v6
Type: Multicast Listener Done (132)
Code: 0
Checksum: 0xd3db [correct]
Maximum Response Delay [ms]: 0
Reserved: 0000
Multicast Address: ff05::2 (ff05::2)
七、MLD协议栈结构
MLD消息是ICMPv6消息的一个子集,封装在IPv6报文中。
+---------------+----------------------------+---------------+
| IPv6 Header | Hop-by-Hop Option Header | MLD message |
+---------------+----------------------------+---------------+
IPv6报文头的源地址字段为MLD消息发送者的IPv6本地链路地址。
IPv6报文头的目的地址字段用来标识MLD消息所属的组播组。
IPv6报文头的Hop Limit字段值为1,表示MLD消息只在本地网段传播。
逐跳选项头(Hop-by-Hop Option Header)。其中下一报头(Next Header)字段值为58,表示该报文是ICMPv6消息;路由器告警选项(RTR-ALERT)的值是0x05020000,表明该报文是MLD消息。
不同版本的MLD协议,使用不同的消息格式,支持不同的消息类型。
MLDv1有以下几种消息:
MLDv1查询消息(Type=130)
MLDv1成员报告消息(Type=131)
MLDv1离开消息(Type=132)
MLDv2有以下几种消息:
MLDv2查询消息(Type=130)
MLDv1成员报告消息(Type=131)
MLDv1离开消息(Type=132)
MLDv2成员报告消息(Type=143)
发表评论