MLD Snooping

Feature history for MLD snooping

This table provides release and platform support information for the features explained in this module.

These features are available in all the releases subsequent to the one they were introduced in, unless noted otherwise.

Release

Feature name and description

Supported platform

Cisco IOS XE 17.18.1

MLD snooping: MLD snooping enables efficient distribution of IPv6 multicast data to clients and routers in a switched network on the device.

Cisco C9350 Series Smart Switches

Cisco C9610 Series Smart Switches

Understand MLD snooping

Multicast Listener Discovery (MLD) snooping enables efficient distribution of IPv6 multicast data to clients and routers in a switched network on the device. Unless otherwise noted, the term device refers to a standalone device and to a device stack.

In IPv4, Layer 2 devices can use Internet Group Management Protocol (IGMP) snooping to limit the flooding of multicast traffic by dynamically configuring Layer 2 interfaces so that multicast traffic is forwarded to only those interfaces associated with IP multicast devices. In IPv6, MLD snooping performs a similar function. MLD snooping ensures that IPv6 multicast data is forwarded only to designated ports, avoiding flooding of all VLAN ports. This list is constructed by snooping IPv6 multicast control packets.

MLD is a protocol used by IPv6 multicast routers to discover the presence of multicast listeners (nodes wishing to receive IPv6 multicast packets) on the links that are directly attached to the routers and to discover which multicast packets are of interest to neighboring nodes. MLD is derived from IGMP; MLD Version 1 (MLDv1) is equivalent to IGMPv2, and MLD Version 2 (MLDv2) is equivalent to IGMPv3. MLD is a subprotocol of Internet Control Message Protocol Version 6 (ICMPv6), and MLD messages are a subset of ICMPv6 messages, identified in IPv6 packets by a preceding Next Header value of 58.

MLD snooping can be enabled or disabled globally or for each VLAN. When MLD snooping is enabled, IPv6 multicast address tables per VLAN are constructed both in software and hardware. The device then performs IPv6 multicast-address based bridging in hardware.

To use IPv6, you must configure the dual IPv4 and IPv6 Switch Database Management (SDM) template on the device.

MLD snooping versions

The device supports two versions of MLD snooping:

  • MLDv1 snooping is a process that detects MLDv1 control packets to set up traffic bridging using IPv6 destination multicast addresses.

  • MLDv2 basic snooping (MBSS) uses MLDv2 control packets to set up traffic forwarding based on IPv6 destination multicast addresses.

The device can perform snooping on both MLDv1 and MLDv2 protocol packets and bridge IPv6 multicast data based on destination IPv6 multicast addresses.


Note


The device does not support MLDv2 enhanced snooping, which sets up IPv6 source and destination multicast address-based forwarding.


MLD messages

MLDv1 supports three types of messages:

  • Listener Queries are the equivalent of IGMPv2 queries and are either General Queries or Multicast-Address-Specific Queries (MASQs).

  • Multicast Listener Reports are the equivalent of IGMPv2 reports

  • Multicast Listener Done messages are the equivalent of IGMPv2 leave messages.

MLDv2 supports MLDv2 queries and reports, as well as MLDv1 Report and Done messages.

Message timers and state transitions resulting from messages being sent or received are the same as those of IGMPv2 messages. MLD devices ignore MLD messages that do not have valid link-local IPv6 source addresses.

MLD queries

The device sends out MLD queries, constructs an IPv6 multicast address database, and generates MLD group-specific and MLD group-and-source-specific queries in response to MLD Done messages. The device also supports report suppression, report proxying, Immediate-Leave functionality, and static IPv6 multicast group address configuration.

When MLD snooping is disabled, MLD queries flood the ingress VLAN. When MLD snooping is enabled, received MLD queries are flooded in the ingress VLAN, and a copy of the query is sent to the CPU for processing. From the received query, The system uses MLD snooping to build the IPv6 multicast address database. It detects multicast router ports, maintains timers, sets report response time, learns the querier IP source address for the VLAN, learns the querier port in the VLAN, and maintains multicast-address aging.

When a group exists in the MLD snooping database, the device responds to a group-specific query by sending an MLDv1 report. When the group is unknown, the group-specific query is flooded to the ingress VLAN.

When a host wants to leave a multicast group, it can send out an MLD Done message (equivalent to IGMP Leave message). When the device receives an MLDv1 Done message, if Immediate- Leave is not enabled, the device sends an MASQ to the port from which the message was received to determine if other devices connected to the port should remain in the multicast group.

Multicast client aging robustness

You can configure port membership removal from addresses based on the number of queries. A port's membership to an address is removed only when there are no reports to that address on the port for the configured number of queries. The default number is 2.

Multicast router discovery

Like IGMP snooping, MLD snooping performs multicast router discovery, with these characteristics:

  • Ports configured by a user never age out.

  • Dynamic port learning results from MLDv1 snooping queries and IPv6 PIMv2 packets.

  • If there are multiple routers on the same Layer 2 interface, MLD snooping tracks the router on the port that most recently sent a control packet.

  • Dynamic multicast router port aging uses a 5-minute default timer. If no control packet is received, the router is deleted from the port list.

  • IPv6 multicast router discovery occurs when MLD snooping is enabled on the device.

  • IPv6 multicast router control packets are always flooded to the ingress VLAN, irrespective of MLD snooping being enabled on the device.

  • IPv6 multicast data is initially sent to all ingress VLAN. Upon discovering the first IPv6 multicast router port, unknown IPv6 multicast data is sent only to discovered router ports.

MLD reports

The processing of MLDv1 join messages is the same as that of IGMPv2. The device does not process or forward reports if it detects no IPv6 multicast routers in a VLAN. The device enters an IPv6 multicast group address in the VLAN MLD database when IPv6 multicast routers are detected and an MLDv1 report is received. Subsequently, the device forwards all IPv6 multicast traffic to the group within the VLAN using this address. When MLD snooping is disabled, reports are flooded in the ingress VLAN.

When MLD snooping is enabled, MLD report suppression (also known as listener message suppression) is automatically enabled. With report suppression, the device forwards the first MLDv1 report received by a group to IPv6 multicast routers; subsequent reports for the group are not sent to the routers. When MLD snooping is disabled, report suppression is disabled, and all MLDv1 reports are flooded to the ingress VLAN.

The device also supports MLDv1 proxy reporting. When an MLDv1 MASQ is received, the device responds with MLDv1 reports for the address on which the query arrived if the group exists in the device on another port and if the port on which the query arrived is not the last member port for the address.

MLD done messages and immediate-leave

When the Immediate-Leave feature is enabled, and a host sends an MLDv1 Done message (equivalent to an IGMP leave message), the port receiving the Done message is immediately removed from the group. Enable Immediate-Leave on VLANs. As with IGMP snooping, use this feature only on VLANs where a single host is connected to the port. If the port was the last member of a group, the group is also deleted, and the leave information is forwarded to the detected IPv6 multicast routers.

When Immediate Leave is not enabled in a VLAN (when there are multiple clients for a group on the same port) and a Done message is received on a port, an MASQ is generated on that port. You can control when a port membership is removed for an existing address in terms of the number of MASQs. A port is removed from an address membership if no MLDv1 reports exist for the configured number of queries.

Use the ipv6 mld snooping last-listener-query count global configuration command to configure the number of MASQs generated. The default number is 2.

The MASQ is sent to the IPv6 multicast address for which the Done message was sent. If there are no reports sent to the IPv6 multicast address specified in the MASQ during the device maximum response time, the port on which the MASQ was sent is deleted from the IPv6 multicast address database. The maximum response time is the time configured by using the ipv6 mld snooping last-listener-query-interval global configuration command. If the deleted port is the last member of the multicast address, the multicast address is also deleted, and device transmits the address leave information to all detected multicast routers.

Topology change notification processing

When topology change notification (TCN) solicitation is enabled by using the ipv6 mld snooping tcn query solicit global configuration command, MLDv1 snooping sets the VLAN to flood all IPv6 multicast traffic with a configured number of MLDv1 queries before it begins sending multicast data only to selected ports. You set this value by using the ipv6 mld snooping tcn flood query count global configuration command. The default is to send two queries. The device also generates MLDv1 global Done messages with valid link-local IPv6 source addresses when the device becomes the STP root in the VLAN or when it is configured by the user. This process is the same as that used in IGMP snooping.

Default MLD snooping configuration

Table 1. Default MLD snooping configuration

Feature

Default setting

MLD snooping (global)

Disabled.

MLD snooping (per VLAN)

Enabled. MLD snooping must be globally enabled for VLAN MLD snooping to take place.

IPv6 Multicast addresses

None configured.

IPv6 Multicast router ports

None configured.

MLD snooping Immediate Leave

Disabled.

MLD snooping robustness variable

Global: 2; Per VLAN: 0.

Note

 

The VLAN value overrides the global setting. When the VLAN value is 0, the VLAN uses the global count.

Last listener query count

Global: 2; Per VLAN: 0.

Note

 

The VLAN value overrides the global setting. When the VLAN value is 0, the VLAN uses the global count.

Last listener query interval

Global: 1000 (1 second); VLAN: 0.

Note

 

The VLAN value overrides the global setting. When the VLAN value is 0, the VLAN uses the global interval.

TCN query solicit

Disabled.

TCN query count

2.

MLD listener suppression

Disabled.

MLD snooping configuration guidelines

Consider these guidelines when you configure MLD snooping:

  • You can configure MLD snooping characteristics at any time, but you must enable MLD snooping globally using the ipv6 mld snooping global configuration command for the configuration to take effect.

  • MLD snooping and IGMP snooping are independent. Enable them both on the device simultaneously.

  • A device or device stack allows a maximum of 4000 address entries.

Configure MLD snooping

This section provides configuration information about MLD snooping.

Configure MLD snooping on the device

By default, IPv6 MLD snooping is globally disabled on the device and enabled on all VLANs. If MLD snooping is turned off globally, it is not active on any VLANs. When you globally enable MLD snooping, the VLAN configuration overrides the global configuration. That is, MLD snooping is enabled only on VLAN interfaces in the default state (enabled).

You can enable and disable MLD snooping on a per-VLAN basis or for a range of VLANs, but if you globally disable MLD snooping, it is disabled in all VLANs. If global snooping is enabled, you can enable or disable VLAN snooping.

To globally enable MLD snooping on the device, perform this procedure:

Procedure

  Command or Action Purpose

Step 1

enable

Example:


Device> enable 

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 3

ipv6 mld snooping

Example:


Device(config)# ipv6 mld snooping

Enables MLD snooping on the device.

Step 4

end

Example:


Device(config)# end

Returns to privileged EXEC mode.

Step 5

copy running-config startup-config

Example:


Device(config)# copy running-config startup-config

(Optional) Save your entries in the configuration file.

Step 6

reload

Example:


Device(config)# reload

Reload the operating system.

Configure MLD snooping on a VLAN

To enable MLD snooping on a VLAN, perform this procedure:

Procedure

  Command or Action Purpose

Step 1

enable

Example:


Device> enable 

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 3

ipv6 mld snooping

Example:


Device(config)# ipv6 mld snooping

Enables MLD snooping on the device.

Step 4

ipv6 mld snooping vlan vlan-id

Example:


Device(config)# ipv6 mld snooping vlan 1

Enables MLD snooping on the VLAN. The VLAN ID range is 1 to 1001 and 1006 to 4094.

Note

 

MLD snooping must be globally enabled for VLAN snooping to be enabled.

Step 5

end

Example:


Device(config)# end

Returns to privileged EXEC mode.

Configure a static multicast group

While hosts or Layer 2 ports typically join multicast groups dynamically, you have the option to manually configure an IPv6 multicast address and member ports for a VLAN.

To add a Layer 2 port as a member of a multicast group, perform this procedure:

Procedure

  Command or Action Purpose

Step 1

enable

Example:


Device> enable 

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 3

ipv6 mld snooping vlan vlan-id static ipv6_multicast_address interface interface-id

Example:


Device(config)# ipv6 mld snooping vlan 1 static 3333.0000.1111 interface gigabitethernet1/0/1

Configures a multicast group with a Layer 2 port as a member of a multicast group:

  • vlan-id is the multicast group VLAN ID. The VLAN ID range is 1 to 1001 and 1006 to 4094.

  • ipv6_multicast_address is the 128-bit group IPv6 address. The address must be in the form specified in RFC 2373.

  • interface-id is the member port. It can be a physical interface or a port channel (1 to 48).

Step 4

end

Example:


Device(config)# end

Returns to privileged EXEC mode.

Step 5

Use one of the following:

  • show ipv6 mld snooping address
  • show ipv6 mld snooping address vlan vlan-id

Example:


Device# show ipv6 mld snooping address

or

Device# show ipv6 mld snooping vlan 1

Verifies the static member port and the IPv6 address.

Configure a multicast router port


Note


Static connections to multicast routers are supported only on device ports.


To add a multicast router port to a VLAN, perform this procedure:

Procedure

  Command or Action Purpose

Step 1

enable

Example:

Device> enable 

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

ipv6 mld snooping vlan vlan-id mrouter interface interface-id

Example:

Device(config)# ipv6 mld snooping vlan 1 mrouter interface gigabitethernet 1/0/2

Specifies the multicast router VLAN ID, and specify the interface to the multicast router.

  • The VLAN ID range is 1 to 1001 and 1006 to 4094.

  • The interface can be a physical interface or a port channel. The port-channel range is 1 to 48.

Step 4

end

Example:

Device(config)# end

Returns to privileged EXEC mode.

Step 5

show ipv6 mld snooping mrouter [vlan vlan-id ]

Example:

Device# show ipv6 mld snooping mrouter vlan 1

Verifies that IPv6 MLD snooping is enabled on the VLAN interface.

Enable MLD immediate leave

To enable MLDv1 immediate leave, perform this procedure:

Procedure

  Command or Action Purpose

Step 1

enable

Example:


Device> enable 

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

ipv6 mld snooping vlan vlan-id immediate-leave

Example:

Device(config)# ipv6 mld snooping vlan 1 immediate-leave

Enables MLD Immediate Leave on the VLAN interface.

Step 4

end

Example:

Device(config)# end

Returns to privileged EXEC mode.

Step 5

show ipv6 mld snooping vlan vlan-id

Example:

Device# show ipv6 mld snooping vlan 1

Verifies that Immediate Leave is enabled on the VLAN interface.

Configure MLD snooping queries

To configure MLD snooping query characteristics for the device or for a VLAN, perform this procedure:

Procedure

  Command or Action Purpose

Step 1

enable

Example:


Device> enable 

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enters global configuration mode.

Step 3

[no] ipv6 mld snooping robustness-variable value

Example:

Device(config)# ipv6 mld snooping robustness-variable 3

(Optional) Sets the number of queries that are sent before device will deletes a listener (port) that does not respond to a general query. The range is 1 to 3; the default is 2.

Use the no form of this command to disable this feature.

Step 4

ipv6 mld snooping vlan vlan-id robustness-variable value

Example:

Device(config)# ipv6 mld snooping vlan 1 robustness-variable 3

(Optional) Sets the robustness variable on a VLAN basis, which determines the number of general queries that MLD snooping sends before aging out a multicast address when there is no MLD report response. The range is 1 to 3; the default is 0. When set to 0, the number that is used is the global robustness variable value.

Step 5

[no] ipv6 mld snooping last-listener-query-count count

Example:

Device(config)# ipv6 mld snooping last-listener-query-count 7

(Optional) Sets the number of MASQs that the device sends before aging out an MLD client. The range is 1 to 7; the default is 2. The queries are sent 1 second apart.

Use the no form of this command to disable this feature.

Step 6

ipv6 mld snooping vlan vlan-id last-listener-query-count count

Example:

Device(config)# ipv6 mld snooping vlan 1 last-listener-query-count 7

(Optional) Sets the last-listener query count on a VLAN basis. This value overrides the value that is configured globally. The range is 1 to 7; the default is 0. When set to 0, the global count value is used. Queries are sent 1 second apart.

Step 7

[no] ipv6 mld snooping last-listener-query-interval interval

Example:

Device(config)# ipv6 mld snooping last-listener-query-interval 2000

(Optional) Sets the maximum response time that the device waits after sending out a MASQ before deleting a port from the multicast group. The range is 100 to 32,768 thousands of a second. The default is 1000 (1 second).

Use the no form of this command to disable this feature.

Step 8

ipv6 mld snooping vlan vlan-id last-listener-query-interval interval

Example:

Device(config)# ipv6 mld snooping vlan 1 last-listener-query-interval 2000

(Optional) Sets the last-listener query interval on a VLAN basis. This value overrides the value that is configured globally. The range is 0 to 32,768 thousands of a second. The default is 0. When set to 0, the global last-listener query interval is used.

Step 9

[no] ipv6 mld snooping tcn query solicit

Example:

Device(config)# ipv6 mld snooping tcn query solicit

(Optional) Enables topology change notification (TCN) solicitation, which means that VLANs flood all IPv6 multicast traffic for the configured number of queries before sending multicast data to only those ports requesting to receive it. The default is for TCN to be disabled.

Use the no form of this command to disable this feature.

Step 10

[no] ipv6 mld snooping tcn flood query count count

Example:

Device(config)# ipv6 mld snooping tcn flood query count 5

(Optional) When TCN is enabled, specifies the number of TCN queries to be sent. The range is from 1 to 10; the default is 2.

Use the no form of this command to disable this feature.

Step 11

[no] ipv6 mld snooping querier

Example:

Device(config)# ipv6 mld snooping querier

(Optional) Enables MLD snooping queries.

Use the no form of this command to disable MLD snooping queries.

Step 12

[no] ipv6 mld snooping vlan vlan_id querier

Example:

Device(config)# ipv6 mld snooping vlan 1 querier 

(Optional) Enables MLD snooping queries in a VLAN.

Use the no form of this command to disable MLD snooping queries in a VLAN.

Step 13

end

Example:

Device(config)# end

Returns to privileged EXEC mode.

Step 14

show ipv6 mld snooping querier [vlan vlan-id]

Example:

Device# show ipv6 mld snooping querier vlan 1

(Optional) Verifies that the MLD snooping querier information for the device or for the VLAN.

Disable MLD listener message suppression

MLD snooping listener message suppression is enabled by default. When it is enabled, the device forwards only one MLD report per multicast router query. When message suppression is disabled, multiple MLD reports could be forwarded to the multicast routers.

To disable MLD listener message suppression, perform this procedure:

Procedure

  Command or Action Purpose

Step 1

enable

Example:


Device> enable 

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal

Enter global configuration mode.

Step 3

no ipv6 mld snooping listener-message-suppression

Example:

Device(config)# no ipv6 mld snooping listener-message-suppression

Disable MLD message suppression.

Step 4

end

Example:

Device(config)# end

Return to privileged EXEC mode.

Step 5

show ipv6 mld snooping

Example:

Device# show ipv6 mld snooping

Verify that IPv6 MLD snooping report suppression is disabled.

Monitor MLD snooping configuration

You can display MLD snooping information for dynamically learned and statically configured router ports and VLAN interfaces. You can also display IPv6 group address multicast entries for a VLAN configured for MLD snooping.

Table 2. Commands for displaying MLD snooping configuration

Command

Purpose

show ipv6 mld snooping [vlan vlan-id ]

Displays the MLD snooping configuration information for all VLANs on the device or for a specified VLAN.

(Optional) Enter vlan vlan-id to display information for a single VLAN. The VLAN ID range is 1 to 1001 and 1006 to 4094.

show ipv6 mld snooping mrouter [vlan vlan-id ]

Displays information on dynamically learned and manually configured multicast router interfaces. When you enable MLD snooping, the device automatically learns the interface to which a multicast router is connected. These are dynamically learned interfaces.

(Optional) Enters vlan vlan-id to display information for a single VLAN. The VLAN ID range is 1 to 1001 and 1006 to 4094.

show ipv6 mld snooping querier [vlan vlan-id ]

Displays information about the IPv6 address and incoming port for the most-recently received MLD query messages in the VLAN.

(Optional) Enters vlan vlan-id to display information for a single VLAN.The VLAN ID range is 1 to 1001 and 1006 to 4094.

show ipv6 mld snooping address [vlan vlan-id ] [count | dynamic | user ]

Displays all IPv6 multicast address information or specific IPv6 multicast address information for the device or a VLAN.

  • Enters count to show the group count on the device or in a VLAN.

  • Enters dynamic to display MLD snooping learned group information for the device or for a VLAN.

  • Enters user to display MLD snooping user-configured group information for the device or for a VLAN.

show ipv6 mld snooping address vlan vlan-id [ipv6-multicast-address ]

Displays MLD snooping for the specified VLAN and IPv6 multicast address.

Configuration examples

Refer this section for configuration examples of MLD snooping.

Example: Configure a static multicast group

This example shows how to statically configure an IPv6 multicast group:

Device# configure terminal
Device(config)# ipv6 mld snooping vlan 2 static 3333.0000.1111 interface gigabitethernet1/0/1
Device(config)# end

Example: Configure a multicast router port

This example shows how to add a multicast router port to VLAN 200:

Device# configure terminal
Device(config)# ipv6 mld snooping vlan 200 mrouter interface gigabitethernet1/0/2
Device(config)# exit

Example: Enable MLD immediate leave

This example shows how to enable MLD Immediate Leave on VLAN 130:

Device# configure terminal
Device(config)# ipv6 mld snooping vlan 130 immediate-leave
Device(config)# exit

Example: Configure MLD snooping queries

This example shows how to set the MLD snooping global robustness variable to 3:

Device# configure terminal
Device(config)# ipv6 mld snooping robustness-variable 3
Device(config)# exit

This example shows how to set the MLD snooping last-listener query count for a VLAN to 3:

Device# configure terminal
Device(config)# ipv6 mld snooping vlan 200 last-listener-query-count 3
Device(config)# exit

This example shows how to set the MLD snooping last-listener query interval (maximum response time) to 2000 (2 seconds):

Device# configure terminal
Device(config)# ipv6 mld snooping last-listener-query-interval 2000
Device(config)# exit