The MLD querier periodically sends a General Query message to all hosts and multicast routers on the local network segment and maintains memberships based on Multicast Listener Report messages from the hosts. When receiving a Multicast Listener Done message, the querier sends a Multicast Address Specific Query message to check whether the group has other members. If the MLD querier does not receive any Report message for the group within a specified period, it no longer maintains membership of the group. The MLD querier determines whether to forward multicast data packets to the network segment based on memberships.
A message sent by a querier to all hosts and routers on the local network segment to discover which host groups have members on the network segment.
A message sent by a querier to members in a specified multicast group on the shared network segment to check whether the group has members.
A message sent by a host to a querier to request to join a multicast group or respond to General Query messages.
A message sent by a host to notify the querier on the local network segment that it has left a group.
Figure 1 illustrates the MLDv1 message format, and Table 1 explains the fields in an MLDv1 message.
Field | Description |
---|---|
Type | Message type:
|
Code | This field is set to 0 by the sender and is ignored by the receiver. |
Checksum | Standard Internet Control Message Protocol version 6 (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 Delay | 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.
|
Querier election mechanism
When there are multiple IPv6 multicast routers on a network segment, all the multicast routers can receive Membership Report messages from hosts. Therefore, only one multicast router needs to send Query messages to the network segment. The router selected to send Query messages is regarded as the MLD querier.
As shown in Figure 3, a querier is elected as follows:
All MLD routers (RouterA and RouterB in this example) consider themselves queriers and send General Query messages to all hosts and multicast routers on the local network segment.
When the routers receive a General Query message, they compare the source IPv6 address of the message with their own interface IPv6 address. The router with the smallest IPv6 address becomes the querier, and the other routers are considered non-queriers. In this example, RouterA has a smaller interface address than RouterB. Therefore, RouterA becomes a querier, and RouterB becomes a non-querier.
The MLD querier (RouterA) sends General Query messages to all hosts and other multicast routers on the local network segment. The non-querier (RouterB) no longer sends General Query messages.
RouterB starts the other querier present timer. If RouterB receives a Query message from the querier before the timer expires, it resets the timer; otherwise, it triggers a querier election.
General query and report mechanism
By sending General Query messages and receiving Report messages, an MLD querier knows which groups have members on the local network segment.
As shown in Figure 4, the general query and report process is as follows:
The MLD querier sends a General Query message with destination address FF02::1 (indicating all hosts and routers on the network segment). All group members start a timer when they receive the General Query message.
The MLD querier sends General Query messages at intervals. The interval is configurable, and the default interval is 125 seconds. HostA and HostB are members of G1 and they start a timer for G1 (Timer-G1). The timer length is a random value between 0 and the maximum response time (10 seconds by default).
The host whose timer expires first sends a Multicast Listener Report message for the group.
In this example, Timer-G1 on HostA expires first, and HostA sends a Report message with the destination address G1. When HostB receives the Report message sent by HostA, it stops Timer-G1 and does not send any Report message for G1. This mechanism reduces the number of MLD messages transmitted on the network segment.
Join mechanism
A host on the shared network segment who wants to join a multicast group sends a Multicast Listener Report message to an MLD querier without waiting for a General Query message.
As shown in Figure 5, IPv6 host HostC joins group G2 through the following process:
Leave mechanism
The leave mechanism allows an MLD querier to know the groups that have no members on a local network segment and quickly update memberships. This mechanism reduces redundant multicast traffic on the network.
As shown in Figure 6, IPv6 host HostA leaves group G1 through the following process:
G1 has another member, HostB, on the network segment. When receiving a Multicast Address Specific Query message, HostB immediately sends a Multicast Listener Report message for G1. The MLD querier continues maintaining the membership of G1 after receiving the Multicast Listener Report message.
If G1 has no member on the network segment, the MLD querier will not receive any Multicast Listener Report message for G1. When the group membership timer times out, the querier deletes the (*, G1) entry. Thereafter, if the MLD querier receives multicast data sent to G1, it does not forward the data downstream.