MLDv1 Working Mechanisms
The working mechanism of MLDv1 is the same as that of IGMPv2. MLDv1 defines the querier election, general query and report, member join, and leave mechanisms.
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 memberships of the group. The MLD querier determines whether to forward multicast data packets to the network segment based on memberships.
MLDv1 Messages
- General Query message: A querier sends General Query messages to all hosts and routers on the local network segment to discover which host groups have members on the network segment.
- Multicast Address Specific Query message: A querier sends Multicast Address Specific Query messages to members in a specified multicast group on the shared network segment to check whether the group has members.
- Multicast Listener Report message: Hosts send Multicast Listener Report messages to a querier to request to join a multicast group or respond to General Query messages.
- Multicast Listener Done message: A host sends a Multicast Listener Done message to notify the querier on the local network segment that it has left a group.
Figure 3-2 illustrates the MLDv1 message format, and Table 3-1 explains the fields in an MLDv1 message.
Field |
Description |
---|---|
Type |
Message type. Options are:
|
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.
|
How MLDv1 Works
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-4, 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 3-5, 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.
- After the MLD querier receives the Multicast Listener Report message from HostA, it knows that group G1 has members on the local network segment. The MLD querier then uses the IPv6 multicast routing protocol to create a (*, G1) entry, in which * stands for any multicast source. Once the MLD querier receives data sent to G1, it forwards the data to this 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 3-6, IPv6 host HostC joins group G2 through the following process:
- HostC sends a Multicast Listener Report message for G2 without waiting for a General Query message.
- After receiving the Multicast Listener Report message, the MLD querier knows that a member of G2 has connected to the local network segment, and creates a (*, G2) entry. Once the MLD querier receives data sent to G2, it forwards the data to this network segment.
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 3-7, IPv6 host HostA leaves group G1 through the following process:
- HostA sends a Multicast Listener Done message for G1 to all multicast routers on the local network segment. The destination address of the Multicast Listener Done message is FF02::2.
- When the MLD querier receives the Multicast Listener Done message, it sends Multicast Address Specific Query messages for G1 to check whether G1 has other members on the network segment. The query interval and count are configurable. By default, the MLD querier sends Multicast Address Specific Query messages twice, at an interval of 1 second. In addition, the MLD querier starts the group membership timer. The timer length is the product of the group-specific query interval and count.
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 forwards the data downstream.