MLDv1 messages carry only group information and do not carry multicast source information. Therefore, MLDv1 hosts can only select the groups they want to join and cannot select the multicast sources from which they want to receive multicast data. MLDv2 allows hosts to select both multicast groups and multicast sources. Unlike MLDv1 Membership Report messages that carry only one group, MLDv2 Membership Report messages can carry multiple groups, greatly reducing the number of messages transmitted between receiver hosts and the querier.
Compared with MLDv1, MLDv2 has the following changes:
Figure 1 illustrates the MLDv2 Query message format, and Table 1 explains the fields in an MLDv2 message.
Field |
Description |
---|---|
Type |
Message type. In MLDv2 Query messages, this field is set to 130. MLDv2 Query messages include:
|
Code |
This field is set to 0 by the sender and is ignored by the receiver. |
Checksum |
Standard ICMPv6 checksum. It covers the entire MLD message plus a pseudo header of IPv6 header fields. When computing the checksum, a device initially sets the checksum field to 0. The receiver verifies the checksum before processing the packet. |
Maximum Response Code |
Maximum response time. After receiving a General Query message, hosts must respond with a Multicast Listener Report message within the maximum response time. This field is valid only in MLD Query messages. |
Reserved |
Reserved field. This field is set to 0 by the sender and is ignored by the receiver. |
Multicast Address |
Address of a multicast group. In a General Query message, this field is set to 0. In a Multicast Address Specific Query or Multicast Address and Source Specific Query message, this field is set to the IPv6 address of the queried group. |
Resv |
Reserved field. This field is set to 0 by the sender and is ignored by the receiver. |
S |
Suppressed router-side processing. When this flag is set to 1, routers receiving the Query message suppress timer updates. Such a Query message does not suppress the querier election or normal host-side processing on the routers. |
QRV |
Querier's robustness variable. A non-0 value indicates the robustness variable of the querier. This field is set to 0 if the robustness variable of the querier exceeds 7. When a router receives a Query message and finds that the QRV field is not 0, the router sets its robustness variable to the value of the QRV field. If the QRV field is 0, the router ignores this field. |
QQIC |
Query interval code of an MLD querier, in seconds. When a non-querier router receives a Query message and finds that the QQIC field is not 0, the non-querier router sets its query interval to the value of the QQIC field. If the QQIC field is 0, the non-querier router ignores this field. |
Number of Sources |
Number of multicast sources in the message. In a General Query or Multicast Address Specific Query message, this field is set to 0. In a Multicast Address and Source Specific Query message, this field is not 0. This number is limited by the maximum transmission unit (MTU) of the network over which the Query message is transmitted. |
Source Address |
Address of a multicast source. The value is limited by the value of the Number of Sources field. |
Figure 2 illustrates the MLDv2 Multicast Listener Report message format, and Table 2 explains the fields in an MLDv2 Multicast Listener Report message.
Field |
Description |
---|---|
Type |
Message type. In MLDv2 Multicast Listener Report messages, this field is set to 143. |
Reserved |
Reserved field. This field is set to 0 by the sender and is ignored by the receiver. |
Checksum |
Standard ICMPv6 checksum. It covers the entire MLD message plus a pseudo header of IPv6 header fields. When computing the checksum, a device initially sets the checksum field to 0. The receiver verifies the checksum before processing the packet. |
Nr of Mcast Address Records |
Number of multicast group records in the message. |
Multicast Address Record |
Multicast address record. Figure 3 illustrates the format of a multicast address record, and Table 3 explains the fields in a multicast address record. |
Field |
Description |
---|---|
Record Type |
Group record type:
|
Aux Data Len |
Length of the Auxiliary Data field. MLDv2 Multicast Listener Report messages do not contain auxiliary data, so the Aux Data Len field is set to 0. |
Number of Sources |
Number of source addresses in this group record. |
Multicast Address |
Address of a multicast group. |
Sources Address |
Address of a multicast source. |
Auxiliary Data |
Additional information in this group record. MLDv2 Multicast Listener Report messages do not contain auxiliary data. |
Compared with MLDv1, MLDv2 allows hosts to select specific multicast sources.
Joining a specific source and group
MLDv2 Multicast Listener Report messages have a destination address FF02::16, which indicates all MLD-capable multicast routers on the same network segment. A Multicast Listener Report message contains Group Record fields, allowing hosts to specify the multicast sources which they do or do not want to receive data from when joining a multicast group. As shown in Figure 4, two multicast sources S1 and S2 send data to multicast group G. The host only wants to receive data sent from S1 to G.
If MLDv1 is running between the host and its upstream router, the host cannot select multicast sources when it joins group G. The host receives data from both S1 and S2, regardless of whether it requires the data. If MLDv2 is running between the host and its upstream router, the host can choose to receive only data from S1 using either of the following methods:
Send an MLDv2 Multicast Listener Report (G, INCLUDE, (S1)), requesting to receive only the data sent from S1 to G.
Send an MLDv2 Multicast Listener Report (G, EXCLUDE, (S2)), notifying the upstream router that it does not want to receive data from S2. Then only data sent from S1 is forwarded to the host.
Multicast Address and Source Specific Query
When an MLD querier receives a Multicast Listener Report message with Filter-Mode-Change Records or Source-List-Change Records (such as CHANGE_TO_INCLUDE_MODE and CHANGE_TO_EXCLUDE_MODE), it sends a Multicast Address and Source Specific Query message. If members want to receive data from any source in the source list, they send Multicast Listener Report messages. The MLD querier updates the source list of the corresponding group according to the received Multicast Listener Report messages.