How MLD snooping works
The ports in this section are dynamic ports. For information about how to configure and remove static ports, see "Configuring static ports."
MLD messages include general query, MLD report, and done message. An MLD snooping-enabled switch performs differently depending on the MLD message.
General query
The MLD querier periodically sends MLD general queries to all hosts and routers on the local subnet to check for the existence of IPv6 multicast group members.
After receiving an MLD general query from the MLD querier, the switch forwards the query to all ports in the VLAN except the receiving port. The switch also performs one of the following operations:
If the receiving port is a dynamic router port in the router port list, the switch restarts the aging timer for the router port.
If the receiving port does not exist in the router port list, the switch adds the port to the router port list. It also starts an aging timer for the port.
MLD report
A host sends an MLD report to the MLD querier for the following purposes:
Responds to queries if the host is an IPv6 multicast group member.
Applies for an IPv6 multicast group membership.
After receiving an MLD report from a host, the switch forwards the report through all the router ports in the VLAN. It also resolves the IPv6 address of the reported IPv6 multicast group, and looks up the forwarding table for a matching entry:
If no match is found, the switch creates a forwarding entry for the group with the receiving port as an outgoing interface. It also marks the receiving port as a dynamic member port and starts an aging timer for the port.
If a match is found but the receiving port is not in the forwarding entry, the switch adds the receiving port as an outgoing interface to the forwarding entry. It also marks the receiving port as a dynamic member port and starts an aging timer for the port.
If a match is found and the receiving port is in the forwarding entry, the switch restarts the aging timer for the port.
In an application with an IPv6 multicast group policy configured on an MLD snooping-enabled switch, when a user requests a multicast program, the user's host initiates an MLD report. After receiving this report message, the switch resolves the IPv6 multicast group address in the report and performs ACL filtering on the report. If the report passes ACL filtering, the switch creates an MLD snooping forwarding entry for the IPv6 multicast group with the receiving port as an outgoing interface. Otherwise, the switch drops this report message, which means the receiver does not successfully join the IPv6 multicast group and cannot retrieve the program.
A switch does not forward an MLD report through a non-router port because of the MLD report suppression mechanism.
Done message
When a host leaves an IPv6 multicast group, the host sends an MLD done message to the multicast routers. When the switch receives the MLD done message on a dynamic member port, the switch first examines whether a forwarding entry matches the IPv6 multicast group address in the message.
If no match is found, the switch discards the MLD done message.
If a match is found but the receiving port is not an outgoing interface in the forwarding entry, the switch discards the MLD done message.
If a match is found and the receiving port is not the only outgoing interface in the forwarding entry, the switch performs the following operations:
Discards the MLD done message.
Sends an MLD multicast-address-specific query to identify whether the group has active listeners attached to the receiving port.
Sets the aging timer for the receiving port to twice the MLD last listener query interval.
If a match is found and the receiving port is the only outgoing interface in the forwarding entry, the switch performs the following operations:
Forwards the MLD done message to all router ports in the VLAN.
Sends an MLD multicast-address-specific query to identify whether the group has active listeners attached to the receiving port.
Sets the aging timer for the receiving port to twice the MLD last listener query interval.
After receiving the MLD done message, the MLD querier resolves the IPv6 multicast group address in the message. Then, it sends an MLD multicast-address-specific query to the IPv6 multicast group through the port that received the done message.
After receiving the MLD multicast-address-specific query, the switch forwards the query through all its router ports in the VLAN and all member ports of the IPv6 multicast group. Then, it waits for the responding MLD reports from the directly connected hosts. For the member port that received the done message, the switch performs one of the following operations:
If the port receives an MLD report before the aging timer expires, the switch adjusts the aging timer for the port.
If the port does not receive an MLD report when the aging timer expires, the switch removes the port from the forwarding entry for the IPv6 multicast group.