---
title: IP Multicast
slug: enterprise-v6p1/ip-multicast
description: ip multicast
createdAt: 2025-11-14T03:58:45.040Z
---

## <font color="#1d50a2">Feature Enable</font>

### <font color="#1d50a2">mcast-snooping enable</font>

**\[Command]**
**mcast-snooping enable**

**\[Purpose]**
Enable multicast function

**\[View]**
System view

**\[Usage Scenario]**
The multicast container is initially disabled by default. If the device needs to forward and learn multicast data, this command must be issued in advance.

**\[Use Cases]**

```none
sonic(config)# mcast-snooping enable
```

##

### <font color="#1d50a2">show l2-multicast-table</font>

**\[Command]**
**show l2-multicast-table**

**\[Purpose]**
View information about a multicast group

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show l2-multicast-table
Total L2_multicast_forwarding_group counters: 2
(Source,Group)           Interface   Vlan
-------------------- ----------- --------
(0.0.0.0, 224.1.1.1)     Ethernet31  20
                         Ethernet30  20
```

### <font color="#1d50a2">show vlan igmp-snooping</font>

**\[Command]**
**show vlan igmp-snooping \[** *vlan-id* **]**

**\[Purpose]**
Display IGMP snooping information

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show vlan igmp-snooping
+-----------+------------+----------+-----------+--------------+-----------+--------------+--------------+---------------------+----------------------------------+------------------------------+
| VLAN ID   | IGMP SNP   | Proxy    |   version | Fast-leave   | Querier   | Querier-ip   |   robustness |   Query-interval(s) |   Last-member-query-interval(ms) |   Query-max-response-time(s) |
+===========+============+==========+===========+==============+===========+==============+==============+=====================+==================================+==============================+
| Vlan1000  | enabled    | disabled |         2 | disabled     | disabled  | 0.0.0.0      |            2 |                 125 |                             1000 |                           10 |
+-----------+------------+----------+-----------+--------------+-----------+--------------+--------------+---------------------+----------------------------------+------------------------------+
```

### <font color="#1d50a2">show vlan igmp-snooping mrouter</font>

**\[Command]**
**show vlan igmp-snooping mrouter**

**\[Purpose]**
Display the router port information of IGMP snooping

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show vlan igmp-snooping mrouter
+-----------+-----------+--------+---------+
|   VLAN ID | Mrouter   | Type   |   Aging |
+===========+===========+========+=========+
|        10 | Ethernet1 | static |     180 |
+-----------+-----------+--------+---------+
```

### <font color="#1d50a2">mcast-snooping enable</font>

**\[Command]**
**mcast-snooping enable**
**no mcast-snooping enable**

**\[Purpose]**
Enable multicast function

**\[View]**
System view

**\[Usage Scenario]**
The multicast container is initially disabled by default. If the device needs to forward and learn multicast data, this command must be issued in advance.

**\[Use Cases]**

```plaintext
sonic(config)# mcast-snooping enable
```

### <font color="#1d50a2">igmp-snooping enable</font>

**\[Command]**
**igmp-snooping enable**
**no igmp-snooping enable**

**\[Purpose]**
Enable IGMP snooping for VLAN

**\[View]**
VLAN view

**\[Usage Scenario]**
IGMP Snooping functionality is typically used in Layer 2 switching networks. It maintains a multicast forwarding table by listening to multicast protocol messages sent by routers and user terminals. This ensures that multicast packets are correctly propagated among specific interfaces within a VLAN. It helps optimize the transmission of multicast data by ensuring that only the necessary interfaces receive this data, rather than broadcasting it to all interfaces, thereby reducing network bandwidth wastage.

**\[Use Cases]**

```plaintext
sonic(config)# vlan 20
sonic(config-vlan-20)# igmp-snooping enable
```

### <font color="#1d50a2">igmp-snooping version</font>

**\[Command]**
**igmp-snooping version** *1-3*

**\[Purpose]**
Configure the IGMP version

**\[View]**
VLAN view

**\[Use Cases]**

```plaintext
sonic(config-vlan-10)# igmp-snooping version 2
```

### <font color="#1d50a2">mcast-snooping group-limit ethernet</font>

**\[Command]**
**mcast-snooping group-limit ethernet** *interface\_name limit*
**no mcast-snooping group-limit ethernet** *interface\_name limit*

**\[Purpose]**
Specify the maximum number of multicast table entries that the interface can learn

**\[Parameter]**

| **Parameter**     | **Description**     |
| ----------------- | ------------------- |
| *interface\_name* | Interface name      |
| *limit*           | Value range: 1-4094 |

**\[View]**

VLAN view

**\[Comment]**
When the maximum learning table entries on the interface are modified, entries exceeding the limit will be learned into the IGMP process memory space but will not be forwarded to the chip. Additionally, these entries will not be relearned during the aging period

**\[Use Cases]**

```plaintext
sonic(config)# vlan 20
sonic(config-vlan-20)# mcast-snooping group-limit ethernet 1 20
```

### <font color="#1d50a2">igmp-snooping-proxy enable</font>

**\[Command]**
**igmp-snooping-proxy enable**
**no igmp-snooping-proxy enable**

**\[Purpose]**
Enable IGMP snooping for VLAN

**\[View]**
Vlan view

**\[Usage Scenario]**
Enabling IGMP Snooping Proxy functionality allows the switch to take on the role of the router in sending IGMP Query messages and receiving IGMP Report/Leave messages from users. This helps alleviate the load on the router, especially in scenarios where there are a large number of terminals in the network.

**\[Use Cases]**

```plaintext
sonic(config)# vlan 20
sonic(config-vlan-20)# igmp-snooping-proxy enable
```

### <font color="#1d50a2">igmp-snooping querier enable</font>

**\[Command]**
**igmp-snooping querier enable**
**no igmp-snooping querier enable**

**\[Purpose]**
Enable IGMP query function

**\[View]**
VLAN view

**\[Usage Scenario]**
On the device, configuring the querier involves enabling the device to send IGMP Query messages in place of the upstream device. The device will periodically broadcast IGMP Query messages to all interfaces within the VLAN, including router ports

**\[Comment]**
If an IGMP querier already exists in the multicast network, enabling the IGMP querier on another device may trigger a re-election process for the IGMP querier role.

**\[Use Cases]**

```plaintext
sonic(config)# vlan 10
sonic(config-vlan-10)# igmp-snooping querier enable
```

### <font color="#1d50a2">igmp-snooping querier-ip</font>

**\[Command]**
**igmp-snooping querier-ip** *A.B.C.D*
**no igmp-snooping querier-ip** *A.B.C.D*

**\[Purpose]**
Configuring the source IP address of IGMP query messages.

**\[View]**
VLAN view

**\[Usage Scenario]**
When there are multiple queriers in the network, you can control the selection of the querier by modifying the IP address of the device's query messages.

**\[Use Cases]**

```plaintext
sonic(config)# vlan 10
sonic(config-vlan-10)# igmp-snooping querier enable
sonic(config-vlan-10)# igmp-snooping querier-ip 10.110.1.1
```

### <font color="#1d50a2">igmp-snooping fast-leave enable</font>

**\[Command]**
**igmp-snooping fast-leave enable**
**no igmp-snooping fast-leave enable**

**\[Purpose]**
Enable member interfaces to quickly leave a multicast group

**\[View]**
VLAN view

**\[Usage Scenario]**
When an IGMP Leave packet is received from a host leaving a multicast group, the corresponding member host list table entry is deleted directly.

**\[Use Cases]**

```plaintext
sonic(config)# vlan 10
sonic(config-vlan-10)# igmp-snooping fast-leave enable
```

### <font color="#1d50a2">igmp-snooping robustness</font>

**\[Command]**
**igmp-snooping robustness** *count*

**\[Purpose]**
Configure robustness

**\[Parameter]**

| **Parameter** | **Description**         |
| ------------- | ----------------------- |
| *count*       | Default 2, range:1\~255 |

**\[View]**
VLAN view

**\[Usage Scenario]**
This command adjusts robustness in two ways:

- Adjusts the number of specific group query messages sent by the querier to avoid potential network packet loss. When an IGMP Leave message is received from a user for a specific multicast group, the command sends a specific group query message for a configured number of times, inquiring whether there are still members in that multicast group.
- Adjusts the member aging time. After receiving a report message from a downstream host, the member aging time is set to: specific group query message count × general query message interval + maximum response time for downstream hosts to reply to the querier.

**\[Use Cases]**

```plaintext
sonic(config)# vlan 10
sonic(config-vlan-10)# igmp-snooping robustness 100
```

### <font color="#1d50a2">igmp-snooping query-interval</font>

**\[Command]**
**igmp-snooping query-interval** *interval*

**\[Purpose]**
Configure the interval at which the device sends general query messages

**\[Parameter]**

| **Parameter** | **Description**                                     |
| ------------- | --------------------------------------------------- |
| *interval*    | Unit: s, the default value is: 125s, range:1\~18000 |

**\[View]**
VLAN view

**\[Use Cases]**

```plaintext
sonic(config)# vlan 10
sonic(config-vlan-10)# igmp-snooping query-interval 200
```

### <font color="#1d50a2">igmp-snooping query-max-response-time</font>

**\[Command]**
**igmp-snooping query-max-response-time** *time*

**\[Purpose]**
Configure the maximum response time for query messages

**\[Parameter]**

| **Parameter** | **Description**                                 |
| ------------- | ----------------------------------------------- |
| *time*        | Unit: s, the default value is: 10s, range:1\~25 |

**\[View]**
VLAN view

**\[Comment]**
It should be ensured that the interval at which the querier sends general query messages is greater than the maximum response time for downstream hosts to reply to the querier. Otherwise, there is a possibility of the device mistakenly deleting entries in the member table.

**\[Use Cases]**

```plaintext
sonic(config)# vlan 10
sonic(config-vlan-10)# igmp-snooping query-max-response-time 20
```

### <font color="#1d50a2">igmp-snooping last-member-query-interval</font>

**\[Command]**
**igmp-snooping last-member-query-interval** *last\_query\_interval*

**\[Purpose]**
Configure the interval at which the querier sends specific group query messages.

**\[Parameter]**

| **Parameter**           | **Description**                                        |
| ----------------------- | ------------------------------------------------------ |
| *last\_query\_interval* | Unit: ms, the default value is: 1000ms,range:100-22500 |

**\[View]**
VLAN view

**\[Use Cases]**

```plaintext
sonic(config)# vlan 10
sonic(config-vlan-10)# igmp-snooping last-member-query-interval 2000
```

### <font color="#1d50a2">interface </font><font color="#1d50a2">l2mc-static-group</font>

**\[Command]**
**interface l2mc-static-group ethernet** *interface\_name vlan\_id A.B.C.D*
**no interface l2mc-static-group ethernet** *interface\_name vlan\_id A.B.C.D*

**\[Purpose]**
Static addition of interfaces to multicast groups

**\[Parameter]**

| **Parameter**     | **Description**                                    |
| ----------------- | -------------------------------------------------- |
| *interface\_name* | Interface name                                     |
| *vlan\_id*        | VLAN ID of the interface                           |
| *A.B.C.D*         | Interface statically added multicast group address |

**\[View]**
System configuration view

**\[Comment]**
After configuring the interface to statically add a multicast group, users under the interface can receive multicast data from the group in a long-term and stable manner, and need to enable the IGMP Snooping function.

**\[Use Cases]**

```plaintext
sonic(config)# interface l2mc-static-group ethernet 2 20 224.1.1.1
```

###

**\[Command]**
**igmp-snooping mroute ethernet** *interface\_name*
**no igmp-snooping mroute ethernet** *interface\_name*

**\[Purpose]**
Configure the interface as a static router port for VLAN

**\[Parameter]**

| **Parameter**     | **Description** |
| ----------------- | --------------- |
| *interface\_name* | Interface name  |

**\[View]**
VLAN view

**\[Use Cases]**

```plaintext
sonic(config-vlan-10)# igmp-snooping mrouter ethernet 1
```

## <font color="#1d50a2">MLD Snooping Configuration</font>

### <font color="#1d50a2">show vlan mld-snooping</font>

**\[Command]**
**show vlan mld-snooping \[** *vlan-id* **]**

**\[Purpose]**
Display MLD snooping information

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic(config)# do show vlan mld-snooping
+-----------+-----------+----------+-----------+--------------+-----------+--------------+--------------+---------------------+----------------------------------+------------------------------+
| VLAN ID   | MLD SNP   | Proxy    | version   | Fast-leave   | Querier   | Querier-ip   | robustness   | Query-interval(s)   | Last-member-query-interval(ms)   | Query-max-response-time(s)   |
+===========+===========+==========+===========+==============+===========+==============+==============+=====================+==================================+==============================+
| 10        | enabled   | disabled | 1         | disabled     | disabled  | 0.0.0.0      | 2            | 125                 | 1000                             | 10                           |
+-----------+-----------+----------+-----------+--------------+-----------+--------------+--------------+---------------------+----------------------------------+------------------------------+
```

### <font color="#1d50a2">show vlan mld-snooping mrouter</font>

**\[Command]**
**show vlan mld-snooping mrouter**

**\[Purpose]**
Display the router port information of MLD snooping

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show vlan mld-snooping mrouter
+-----------+-----------+--------+---------+
|   VLAN ID | Mrouter   | Type   |   Aging |
+===========+===========+========+=========+
|        10 | Ethernet1 | static |     180 |
+-----------+-----------+--------+---------+
```

### <font color="#1d50a2">mld-snooping enable</font>

**\[Command]**
**mld-snooping enable**
**no mld-snooping enable**

**\[Purpose]**
Enable MLD snooping for VLAN

**\[View]**
VLAN view

**\[Usage Scenario]**
MLD Snooping operates on a Layer 2 switching network between routers and user terminals. It maintains multicast forwarding tables by listening to IPv6 multicast protocol messages from routers and user terminals, allowing multicast packets to be broadcast between specified interfaces within the VLAN

**\[Use Cases]**

```plaintext
sonic(config)# vlan 20
sonic(config-vlan-20)# mld-snooping enable
```

### <font color="#1d50a2">mld-snooping version</font>

**\[Command]**
**mld-snooping version** *1-2*

**\[Purpose]**
Configure the MLD version

**\[View]**
VLAN view

**\[Use Cases]**

```plaintext
sonic(config-vlan-10)# mld-snooping version 1
```

### <font color="#1d50a2">mld-snooping proxy enable</font>

**\[Command]**
**mld-snooping proxy enable**

**\[Purpose]**
Enable MLD snooping proxy for VLAN

**\[View]**
VLAN view

**\[Usage Scenario]**
Enabling MLD Snooping Proxy functionality allows the switch to substitute for routers in sending MLD Query messages and receiving MLD Report/Leave messages from users. This alleviates the burden on router devices when there are numerous terminals in the network

**\[Use Cases]**

```plaintext
sonic(config)# vlan 20
sonic(config-vlan-20)# mld-snooping proxy enable
```

### <font color="#1d50a2">mld-snooping querier enable</font>

**\[Command]**
**mld-snooping querier enable**

**\[Purpose]**
Enable MLD querier functionality

**\[View]**
VLAN view

**\[Usage Scenario]**
Configuring a querier on the device allows it to replace upstream devices in sending MLD Query messages. The device will periodically broadcast MLD Query messages to all interfaces within the VLAN, including router ports

**\[Comment]**
If an MLD querier already exists in the multicast network, it may trigger a re-election of the MLD querier

**\[Use Cases]**

```plaintext
sonic(config)# vlan 20
sonic(config-vlan-20)# mld-snooping proxy enable
```

### <font color="#1d50a2">mld-snooping querier-ip</font>

**\[Command]**
**mld-snooping querier-ip** *X\:X\::X*:X
**no mld-snooping querier-ip** *X\:X\::X*:X

**\[Purpose]**
Configuring the source IP address of MLD Query messages

**\[View]**
VLAN view

**\[Usage Scenario]**
When there are multiple queriers in the network, you can control the selection of the querier by modifying the IP address of the device's query messages.

**\[Use Cases]**

```plaintext
sonic(config)# vlan 10
sonic(config-vlan-10)# mld-snooping querier enable
sonic(config-vlan-10)# mld-snooping querier-ip 1000::1
```

### <font color="#1d50a2">mld-snooping fast-leave enable</font>

**\[Command]**
**mld-snooping fast-leave enable**
**no mld-snooping fast-leave enable**

**\[Purpose]**
Enable fast leave of multicast groups on member interfaces

**\[View]**
VLAN view

**\[Usage Scenario]**
Upon receiving an MLD Leave message from a host indicating departure from a multicast group, the corresponding multicast forwarding table entry for that host is removed immediately without waiting for aging time

**\[Use Cases]**

```plaintext
sonic(config)# vlan 10
sonic(config-vlan-10)# mld-snooping fast-leave enable
```

### <font color="#1d50a2">mld-snooping robustness</font>

**\[Command]**
**mld-snooping robustness** *count*

**\[Purpose]**
Configure robustness

**\[Parameter]**

| **Parameter** | **Description**         |
| ------------- | ----------------------- |
| *count*       | Default 2, range:1\~255 |

**\[View]**
VLAN view

**\[Usage Scenario]**
This command adjusts robustness in two ways:

- Adjusts the number of specific group query messages sent by the querier to avoid potential network packet loss. When an MLD Leave message is received from a user for a specific multicast group, the command sends a specific group query message for a configured number of times, inquiring whether there are still members in that multicast group.
- Adjusts the member aging time. After receiving a report message from a downstream host, the member aging time is set to: specific group query message count × general query message interval for downstream hosts to reply to the querier.

**\[Use Cases]**

```plaintext
sonic(config)# vlan 10
sonic(config-vlan-10)# mld-snooping robustness 100
```

### <font color="#1d50a2">mld-snooping query-interval</font>

**\[Command]**
**mld-snooping query-interval** *interval*

**\[Purpose]**
Configure the interval at which the device sends general query messages

**\[Parameter]**

| **Parameter** | **Description**                                   |
| ------------- | ------------------------------------------------- |
| *interval*    | Unit: s, the default value is: 125s,range:1-18000 |

**\[View]**
VLAN view

**\[Use Cases]**

```plaintext
sonic(config)# vlan 10
sonic(config-vlan-10)# mld-snooping query-interval 200
```

### <font color="#1d50a2">mld-snooping query-max-response-time</font>

**\[Command]**
**mld-snooping query-max-response-time** *time*

**\[Purpose]**
Configure the maximum response time for query messages

**\[Parameter]**

| **Parameter** | **Description**                                 |
| ------------- | ----------------------------------------------- |
| *time*        | Unit: s, the default value is: 10s, range:1\~25 |

**\[View]**
VLAN view

**\[Comment]**
It should be ensured that the interval at which the querier sends general query messages is greater than the maximum response time for downstream hosts to reply to the querier. Otherwise, there is a possibility of the device mistakenly deleting entries in the member table

**\[Use Cases]**

```plaintext
sonic(config)# vlan 10
sonic(config-vlan-10)# mld-snooping query-max-response-time 20
```

### <font color="#1d50a2">mld-snooping last-member-query-interval</font>

**\[Command]**
**mld-snooping last-member-query-interval** *last\_query\_interval*

**\[Purpose]**
Configure the interval at which the querier sends specific group query messages.

**\[Parameter]**

| **Parameter**           | **Description**                                        |
| ----------------------- | ------------------------------------------------------ |
| *last\_query\_interval* | Unit: ms, the default value is: 1000ms,range:100-25500 |

**\[Use Cases]**

```plaintext
sonic(config)# vlan 10
sonic(config-vlan-10)# mld-snooping last-member-query-interval 2000
```

### <font color="#1d50a2">l2mc-static-group</font>

**\[Command]**
**l2mc-static-group etherne** *interface\_name vlan\_id X\:X\::X*:X
**no l2mc-static-group ethernet** *interface\_name vlan\_id X\:X\::X*:X

**\[Purpose]**
Static addition of interfaces to multicast groups

**\[Parameter]**

| **Parameter**     | **Description**                                    |
| ----------------- | -------------------------------------------------- |
| *interface\_name* | Interface name                                     |
| *vlan\_id*        | VLAN ID of the interface                           |
| *X\:X\::X*:X      | Interface statically added multicast group address |

**\[View]**
System configuration view

**\[Comment]**
After configuring the interface to statically add a multicast group, users under the interface can receive multicast data from the group in a long-term and stable manner, and need to enable the MLD Snooping function.

**\[Use Cases]**

```plaintext
sonic(config)# interface l2mc-static-group ethernet 11 10 ff1e:0:0:0:0:0:0:1
```

### <font color="#1d50a2">mld-snooping mrouter ethernet</font>

**\[Command]**
**mld-snooping mrouter ethernet** *interface\_name*
**no mld-snooping mrouter ethernet** *interface\_name*

**\[Purpose]**
Configure the interface as a static router port for VLAN

**\[View]**
VLAN view

**\[Use Cases]**

```plaintext
sonic(config)# vlan 10
sonic(config-vlan-10)# mld-snooping mrouter ethernet 1
```

## <font color="#1d50a2">Multicast VLAN Configuration</font>

### <font color="#1d50a2">show vlan igmp-snooping mvlan</font>

**\[Command]**
**show vlan igmp-snooping mvlan** *vlan\_id*

**\[Purpose]**
Show the binding relationship between VLAN and multicast VLAN

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show vlan igmp-snooping mvlan
+------------+-------------+
|   MVLAN ID |   UVLAN IDS |
+============+=============+
|          2 |           3 |
+------------+-------------+
```

### <font color="#1d50a2">igmp-snooping mvlan</font>

**\[Command]**
**igmp-snooping mvlan** *mvlan\_id uvlan\_id*
**no igmp-snooping mvlan** *mvlan\_id uvlan\_ids*

**\[Purpose]**
Configure the VLAN as a multicast VLAN

**\[Parameter]**

| **Parameter** | **Description**                                                                            |
| ------------- | ------------------------------------------------------------------------------------------ |
| *mvlan\_id*   | Multicast VLAN                                                                             |
| *uvlan\_ids*  | User VLAN, support multiple configurations at intervals, or connection range configuration |

**\[View]**
System configuration view

**\[Usage Scenario]**
When users from different VLANs need to receive multicast data from the same multicast source, the device needs to replicate the data for each VLAN. In this scenario, you can configure multicast VLANs, where the VLAN where users are located is configured as the user VLAN and the VLAN where the router interface is located is configured as the multicast VLAN. Data is replicated from the multicast VLAN to the user VLAN.

**\[Comment]**
IGMP Snooping needs to be enabled in both the multicast VLAN and the user VLAN for this configuration to work.

**\[Use Cases]**

```plaintext
sonic(config)# igmp-snooping mvlan 20 200,201
```

