# MLD Snooping

### 1. Function Overview

MLD snooping is a function to suppress consumption of network bandwidth in an IPv6 VLAN environment, by controlling any surplus multicast flooding.
On an L2 switch, since multicast packets are distributed per VLAN, if there is even one device in the VLAN that wants to receive the multicast packet, the packet will be distributed to all ports within the same VLAN.

- Operations during multicast distribution (no MLD snooping)

When using the MLD snooping function, the MLD messages exchanged between the receiving device and the multicast router are monitored (snooped), the packet from the relevant group will only be distributed to the port, to which the device that wants to receive the multicast packet is connected.

- Operations during multicast distribution (using MLD snooping)

### 2. Definition of Terms Used

MLD (Multicast Listener Discovery)

This is a protocol to control multicast groups using IPv6 (a sub-protocol of ICMPv6).
The multicast router can determine which hosts on the LAN are members of the multicast group, and the hosts can communicate which multicast group they belong to.
There are two protocol versions, respectively defined by MLDv1 (RFC2710), and MLDv2 (RFC3810).

Multicast Router Port

This is the LAN/SFP port to which the multicast router is connected.
The LAN/SFP port that receives the MLD general query is automatically acquired as the multicast router port.

MLD Report Suppression Function

This is a function where the L2 switch controls the data transmission load between the multicast router and the hosts.
The messages gathered by this product to perform control are shown below.

- MLD reports replied to MLD general queries by hosts, sent from the multicast router

- MLD Done messages notified by the host and MLD reports (Leave)

The report suppression function works with MLDv1/v2.

MLD Fast Leave Function

This function allows for the LAN/SFP port that received an MLDv1 Done and an MLDv2 report (Leave) to immediately stop receiving multicasts (deleting the necessary FDB entry).
Previously, when an MLDv1 Done message and an MLDv2 report (Leave) was received in the course of MLD leave processing, a group-specific query was sent to check for the existence of a receiver; but if the fast leave function is enabled, this operation is not performed.
For this reason, the fast leave function is effective only when there is a single receiver under the control of the LAN/SFP port.

MLD Query Transmission Function (MLD Querier)

This is a function to send MLD general and specific queries.
It is used to enable the MLD snooping function in an environment without a multicast router.

### 3. Function Details

The operating specifications for MLD snooping are shown below.

1. This product offers snooping functions compatible with MLD v1/v2.
   You can use the ipv6 mld snooping version command to make later versions work on this product.
   Version settings are made for the VLAN interface, and initial settings are for v2.
   The difference in operations between the configured version and received frame versions are shown in the table below.

   - If an MLD query whose version is higher than the settings is received, the version will be lowered to the version that was configured, and the query will be forwarded.

   - If an MLD report whose version is higher than the configured version is received, the relevant report will be discarded without being forwarded.

2. The settings to enable/disable MLD snooping are made for the VLAN interface.
   The initial setting for the default VLAN (VLAN #1) and the initial setting after a VLAN is generated are both disabled.

3. The MLD snooping function can handle the following four operations.

   - Multicast router port setting

   - MLD report suppression

   - MLD fast leave

   - MLD query transmission

4. Although the multicast router port is automatically acquired on VLAN interfaces where MLD snooping is set to “Enabled”, the ipv6 mld snooping mrouter interface command can also be used to make static settings.
   The show ipv6 mld snooping mrouter command is used to check multicast router ports that are set for the VLAN interface.

5. The MLD report suppression function is specified for VLAN interfaces using the ipv6 mld snooping report-suppression command.
   The default value is enabled.
   When transmitting an MLD report or MLD leave message using the report suppression function, the IPv6 link local address allocated to the VLAN interface will be used for the source IPv6 address.
   (The address will be set and transmitted as “::” if it has not been allocated.)

6. The MLD fast leave function is set for the VLAN interface using the ipv6 mld snooping fast-leave command.
   The initial setting for the default VLAN (VLAN #1) and the initial setting after a VLAN is generated are both disabled.

7. The MLD query transmission function is supported in order to allow use of MLD snooping in environments that do not have a multicast router.
   The MLD query transmission function controls the following two parameters.

   - MLD query transmission function Enable/disable

     - The ipv6 mld snooping querier command is used for VLAN interfaces.

     - The initial setting for the default VLAN (VLAN #1) and the initial setting after a VLAN is generated are both disabled.

   - MLD query transmission interval

     - This is set using the ipv6 mld snooping query-interval command.

     - The transmission interval can be set from 20–18,000 sec., and the default value is 125 sec.

8. When multiple devices transmit queries within a VLAN, the query is sent by the device with the lowest IPv6 address within the VLAN.
   When this product receives a query from a device whose IPv6 address is lower than its own, the query transmission function will be halted.
   The source iPv6 address that is set when a query is transmitted uses the IPv6 link local address allocated to the VLAN interface. If an IPv6 link local address has not been allocated, an IPv6 link local address allocated to a different VLAN interface is used instead.
   (If no IPv6 link local addresses have been allocated to any VLAN interfaces, the query is not transmitted.)

9. In this product, if the Hop Limit of a received MLD packet is invalid (other than 1), the MLD packet will be discarded.

10. In this product, if a received MLD packet does not contain the Router Alert option, the MLD packet will be discarded.

### 4. Related Commands

Related commands are indicated below.
For details on the commands, refer to the Command Reference.

Operations | Operating commands
--- | ---
Enable/disable MLD snooping | ipv6 mld snooping
Set MLD snooping fast-leave | ipv6 mld snooping fast-leave
Multicast router port setting | ipv6 mld snooping mrouter interface
Set the query transmission function | ipv6 mld snooping querier
Set the MLD query transmission interval | ipv6 mld snooping query-interval
Set the MLD version | ipv6 mld snooping version
Set the MLD report suppression function | ipv6 mld snooping report-suppression
Show multicast router port information | show ipv6 mld snooping mrouter
Show MLD multicast recipient information | show ipv6 mld snooping groups
Show MLD related information for an interface | show ipv6 mld snooping interface
Clear the MLD group membership entries | clear ipv6 mld snooping

### 5. Examples of Command Execution

#### 5.1. MLD snooping settings (with multicast router)

In an environment with a multicast router, enable the MLD snooping function and join a multicast group. Data is distributed only to PC1 and PC3.

- Set LAN ports #1–#4 as access ports and associate them with VLAN #10.

- Since there is a multicast router, leave the MLD query transmission function as “disabled”.

- Set multicast router port acquisition to automatic acquisition only. (A static setting is not used.)

- Enable the MLD fast leave function.

■ Setting Procedure

1. Define VLAN #10, and set MLD snooping.

       Yamaha(config)# vlan database
       Yamaha(config-vlan)#vlan 10 (1)
       Yamaha(config-vlan)#exit
       Yamaha(config)#interface vlan10
       Yamaha(config-if)#ipv6 enable (2)
       Yamaha(config-if)#ipv6 mld snooping (3)
       Yamaha(config-if)#no ipv6 mld snooping querier (4)
       Yamaha(config-if)#ipv6 mld snooping fast-leave (5)

   1 | Define VLAN #10
   2 | Enable the IPv6 function for VLAN #10
   3 | Enable MLD Snooping for VLAN #10
   4 | Disable the MLD query transmission function for VLAN #10
   5 | Enable the MLD fast leave function for VLAN #10

   - MLD snooping is enabled and the MLD query transmission function is disabled in default settings, so there is no need to specify those settings.

2. Set LAN ports #1–#4 as access ports, and associate them with VLAN #10.

       Yamaha(config)# interface port1.1
       Yamaha(config-if)# switchport mode access
       Yamaha(config-if)# switchport access vlan 10
       (1)

   1 | Configure the settings above for LAN ports #2–#4 as well.

3. Confirm the multicast router port information. (It should be connected to LAN port #1.)

       Yamaha#show ipv6 mld snooping mrouter vlan10
       VLAN    Interface             IP-address    Expires
       10      port1.1(dynamic)         fe80::2a0:deff:feae:b879        00:00:43

4. Confirm the information for the multicast recipient.

       Yamaha#show ipv6 mld snooping groups
       MLD Connected Group Membership
       Vlan   Group Address                           Interface            Uptime   Expires  Last Reporter
       10     ff15::1                                 port1.2              00:00:13 00:00:41 fe80::a00:27ff:fe8b:87e2
       10     ff15::1                                 port1.4              00:00:02 00:00:48 fe80::a00:27ff:fe8b:87e4

#### 5.2. MLD snooping settings (without multicast router)

In an environment without a multicast router, enable the MLD snooping function and join a multicast group. Data is distributed only to PC1 and PC3.

- Switch #A

  - Set LAN ports #1–#2 as access ports and associate them with VLAN #10.

  - Enable the MLD query transmission function.
    Set the MLD query transmission interval to* 20 sec*.

- Switch #B

  - Set LAN ports #1–#4 as access ports and associate them with VLAN #10.

  - Set multicast router port acquisition to automatic acquisition only. (A static setting is not used.)

  - Enable the MLD fast leave function.

1. [Switch #A] Define VLAN #10, and set MLD snooping.

       Yamaha(config)# vlan database
       Yamaha(config-vlan)#vlan 10 (1)
       Yamaha(config-vlan)#exit
       Yamaha(config)#interface vlan10
       Yamaha(config-if)#ipv6 enable (2)
       Yamaha(config-if)#ipv6 mld snooping (3)
       Yamaha(config-if)#ipv6 mld snooping querier (4)
       Yamaha(config-if)#ipv6 mld snooping query-interval 20 (5)

   1 | Define VLAN #10
   2 | Enable the IPv6 function for VLAN #10
   3 | Enable MLD Snooping for VLAN #10
   4 | Enable the MLD query transmission function for VLAN #10
   5 | Set the MLD query transmission interval for VLAN #10 to 20 sec.

   - Since MLD snooping is enabled by default, we do not need to set this specifically.

2. [Switch #A] Set LAN ports #1–#2 as access ports, and associate them with VLAN #10.

       Yamaha(config)# interface port1.1
       Yamaha(config-if)# switchport mode access
       Yamaha(config-if)# switchport access vlan 10
       (1)

   1 | Configure the settings above for LAN port #2 as well.

3. [Switch #B] Define VLAN #10, and set MLD snooping.

       Yamaha(config)# vlan database
       Yamaha(config-vlan)#vlan 10 (1)
       Yamaha(config-vlan)#exit
       Yamaha(config)#interface vlan10
       Yamaha(config-if)#ipv6 enable (2)
       Yamaha(config-if)#ipv6 mld snooping (3)
       Yamaha(config-if)#no ipv6 mld snooping querier (4)
       Yamaha(config-if)#ipv6 mld snooping fast-leave (5)

   1 | Define VLAN #10
   2 | Enable the IPv6 function for VLAN #10
   3 | Enable MLD Snooping for VLAN #10
   4 | Disable the MLD query transmission function for VLAN #10
   5 | Enable the MLD fast leave function for VLAN #10

   - MLD snooping is enabled and the MLD query transmission function is disabled in default settings, so there is no need to specify those settings.

4. [Switch #B] Set LAN ports #1–#4 as access ports, and associate them with VLAN #10.

       Yamaha(config)# interface port1.1
       Yamaha(config-if)# switchport mode access
       Yamaha(config-if)# switchport access vlan 10
       (1)

   1 | Configure the settings above for LAN ports #2–#4 as well.

5. [Switch #B] Check the multicast router port information. (It should be connected to LAN port #1.)

       Yamaha#show ipv6 mld snooping mrouter vlan10
       VLAN    Interface             IP-address    Expires
       10      port1.1(dynamic)         fe80::2a0:deff:feae:b879        00:00:43

6. [Switch #B] Check the multicast receiver information.

       Yamaha#show ipv6 mld snooping groups
       MLD Connected Group Membership
       Vlan   Group Address                           Interface            Uptime   Expires  Last Reporter
       10     ff15::1                                 port1.2              00:00:13 00:00:41 fe80::a00:27ff:fe8b:87e2
       10     ff15::1                                 port1.4              00:00:02 00:00:48 fe80::a00:27ff:fe8b:87e4

### 6. Points of Caution

- If you want to change the handling of unknown multicast frames, use the l2-unknown-mcast command.

- When a topology change is detected, if you want to send a query regardless of the normal transmission interval, set the l2-mcast snooping tcn-query command.

- If the stack function is enabled, this will be disabled regardless of the MLD snooping settings.

### 7. Related Documentation

- Layer 2 Function: VLAN

- Layer 3 Functions: Basic IPv6 Settings

Search result
No more search results.
There are no topics that match your search query.