Glossary

MLD Snooping

Multicast Listener Discovery Snooping

What is MLD Snooping

MLD Snooping (Multicast Listener Discovery Snooping) is an IPv6 Layer 2 multicast protocol. In an IPv6 network, a Layer 2 switch has no built-in knowledge of which hosts want to receive a given multicast stream, so by default it floods multicast packets to every port in the VLAN. This wastes bandwidth and delivers traffic to hosts that never asked for it. MLD Snooping solves this by letting the switch precisely forward multicast packets only where they are needed.

It works much like IGMP Snooping does in an IPv4 multicast network. The Layer 2 device listens to and analyzes the MLD messages exchanged between multicast users and upstream routers. From this information, it builds Layer 2 multicast forwarding entries, which then control how multicast data packets are forwarded.

How MLD Snooping Works

A switch running MLD Snooping handles each type of MLD message in a specific way:

  • General Group Query messages: When the switch receives a General Group Query, it forwards it out through all ports in the VLAN except the receiving port. The receiving port is treated as a dynamic router port. If it is already in the router port list, its aging timer is reset. If not, it is added to the list and its aging timer is started.

  • MLD Report messages: A host sends a Report either in response to a Query or when it proactively wants to join a multicast group. When the switch receives a Report, it forwards it through all router ports in the VLAN, reads the multicast group address from the message, and processes the receiving port. If no forwarding entry exists for the group, one is created and the port is added as a dynamic member port with an aging timer. If an entry exists but does not include the port, the port is added and its timer started. If the port is already a dynamic member, its aging timer is reset.

  • Leaving multicast groups: A host sends an MLD Leave Group message when it leaves a group. If the switch has no matching entry or the port is not in the group's outgoing port list, the message is discarded. Otherwise, the switch forwards the message through all router ports in the VLAN. Because it cannot tell whether other members of the group remain behind that port, it does not remove the port immediately, but resets its aging timer instead.

Port aging

Member ports age out according to the message that last refreshed them. After a Report, the aging time is the robustness factor × general query interval + maximum response time. After a Leave, it is the specific query interval × robustness factor.

Fast Leave

With Fast Leave enabled on a port, the switch immediately removes the port from the outgoing port list when it receives a Leave message, and stops forwarding group-specific queries out of that port.

MLD Snooping Proxy

When there are many member hosts, or hosts join and leave groups frequently, the volume of MLD messages can put pressure on access devices. With MLD Snooping Proxy enabled on an edge device, the device acts on behalf of downstream hosts toward the upstream device. It sends a Report upstream only when it creates a new group entry, answers General Queries using its locally maintained membership, and sends a Leave upstream only when the last member port of a group is removed. Group-specific queries are sent to the port when a Leave is received.

Why MLD Snooping is Beneficial

MLD Snooping makes IPv6 multicast efficient at the access layer:

  • Saves bandwidth: Multicast traffic is no longer flooded to every port in the VLAN, so links to uninterested hosts stay free.

  • Precise delivery: Only ports with interested receivers get the multicast stream, which also reduces unnecessary load on end hosts.

  • Dynamic and self-maintaining: Forwarding entries are learned from MLD messages and removed by aging timers, with no manual maintenance.

  • Faster channel changes: Fast Leave removes ports as soon as a host leaves, which suits scenarios where hosts frequently switch groups.

  • Lower message load: The proxy function reduces the number of join and leave messages sent to upstream devices.

At Asteraix

What We Can Do at Asteraix

AsterNOS supports MLD Snooping on its enterprise and campus switches, providing precise IPv6 multicast forwarding in Layer 2 networks:

  • Basic function: In VLAN view, mld-snooping enable turns on MLD Snooping.

  • · Querier: mld-snooping querier enable enables the MLD Snooping querier, and mld-snooping querier-ip sets the source address used for MLD queries.

  • Timers and aging: mld-snooping query-interval, query-max-response-time, last-member-query-interval, and robustness tune the general query interval, maximum response time, specific query interval, and robustness factor, which together determine port aging time.

  • Fast Leave: In Ethernet interface view, prompt-leave enable enables fast leave on a member interface.

  • Proxy function: In VLAN view, mld-snooping-proxy enable enables MLD Snooping Proxy, to cut down join and leave messages reaching upstream devices.

  • Typical deployment: In an IPv6 campus network where users receive multicast streams such as video, MLD Snooping is enabled on the access VLAN so streams reach only the receiving ports. On edge devices with many frequently joining hosts, Fast Leave and the proxy function are added to speed up leave handling and reduce upstream message load.

sonic(config)# vlan 100
sonic(config-vlan-100)# mld-snooping enable
sonic(config-vlan-100)# mld-snooping querier enable
sonic(config-vlan-100)# mld-snooping-proxy enable

sonic(config)# interface ethernet 1
sonic(config-if-1)# prompt-leave enable