---
title: IGMP Snooping Configuration
slug: enterprise-v5p2/igmp-snooping-configuration
description: ip multicast
createdAt: 2025-11-14T03:58:43.763Z
---

### <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   |
+===========+============+========+
| 20        | Ethernet32 | static |
+-----------+------------+--------+
```

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

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

**\[Purpose]**
Show router port aging time for IGMP snooping

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show vlan igmp-snooping mrouter-aging
+-----------+--------------+
| VLAN ID   | Aging Time   |
+===========+==============+
| 20        | 180          |
+-----------+--------------+
| 200       | 180          |
+-----------+--------------+
| 800       | 180          |
+-----------+--------------+
```

### <font color="#1d50a2">show ip igmp</font>

**\[Command]**
**show ip igmp** \[**vrf** \{**all**|\< *vrf\_name* >}] \{ **join**|**groups**|**interface** }

**\[Purpose]**
Show the statically configured IGMP entries, multicast groups, and querier interface information on the interface

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show ip igmp interface
Interface         State          Address  V   Querier          QuerierIp  Query Timer    Uptime
Ethernet49         mtrc         20.1.1.2  3    other           20.1.1.2     --:--:--  07:05:57
Vlan1000             up        123.1.1.1  3    local          123.1.1.1     00:00:06  01:59:11
sonic#
sonic# show ip igmp join
Interface        Address         Source          Group           Socket Uptime
Vlan1000         123.1.1.1       120.1.1.122     224.1.1.1           27 00:06:33
sonic#
sonic# show ip igmp groups
Total IGMP groups: 4
Watermark warn limit(Not Set): 0
Interface        Group           Mode Timer    Srcs V Uptime
Vlan1000         225.1.3.1       INCL --:--:--    1 3 01:59:16
Vlan1000         225.1.3.2       INCL --:--:--    1 3 01:59:16
Vlan1000         225.1.3.3       INCL --:--:--    1 3 01:59:16
Vlan1000         224.1.1.1       INCL --:--:--    1 3 00:06:40
```

### <font color="#1d50a2">show ip igmp statistics</font>

**\[Command]**
**show ip igmp statistics**

**\[Purpose]**
Show the statistics of received IGMP packets.

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show ip igmp statistics
IGMP RX statistics
Interface       : global
V1 query        : 0
V2 query        : 0
V3 query        : 0
V2 leave        : 0
V1 report       : 0
V2 report       : 0
V3 report       : 130
mtrace response : 0
mtrace request  : 0
unsupported     : 0
```

### <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

**\[Notes]**
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

**\[Commit]**
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

**\[Notes]**
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 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

**\[Notes]**
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
```

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

**\[Command]**
**igmp-snooping mrouter-aging** *time*

**\[Purpose]**
Configure dynamic router port aging time within a VLAN

**\[Parameter]**

| **Parameter** | **Description**                                      |
| ------------- | ---------------------------------------------------- |
| *time*        | Value range: 1-1000, unit: s, default is 180 seconds |

**\[View]**
VLAN view

**\[Usage Scenario]**
Within the aging time of the dynamic router port, if no IGMP Query or PIM Hello messages are received, it is considered that this port no longer belongs to the router port.

**\[Use Cases]**

```plaintext
sonic(config)# vlan 20
sonic(config-vlan-20)# igmp-snooping mrouter-aging 10
```

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

**\[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">ip igmp</font>

**\[Command]**
**ip igmp** \[**query-interval** *query\_interval* |**query-max-response-time** *time* |**last-member-query-count** *count* |**last-member-query-interval** *last\_query\_interval* |**version** *version* ]
**no ip igmp** \[**query-interval** *query\_interval* |**query-max-response-time** *time* |**last-member-query-count** *count* |**last-member-query-interval** *last\_query\_interval* |**version** *version* ]

**\[Purpose]**
Configure the IGMP querier function on the interface

**\[Parameter]**

| **Parameter**           | **Description**                            |
| ----------------------- | ------------------------------------------ |
| *query\_interval*       | Value range: 1-1800, unit: s, default 125s |
| *time*                  | Value range: 10-250, unit: s, default 10s  |
| *count*                 | Value range: 1-7,  default 2               |
| *last\_query\_interval* | Value range: 1-255, unit: ms, default 10   |
| *version*               | Value range: 2-3, default 3                |

**\[View]**
VLANIf view,Interface view,LAGIf view

**\[Use Cases]**

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

### <font color="#1d50a2">ip igmp join</font>

**\[Command]**
**ip igmp join** *group\_address* \[ *source\_address* ]
**no ip igmp join** *group\_address* \[ *source\_address* ]

**\[Purpose]**
Statically join the multicast group

**\[Parameter]**

| **Parameter**     | **Description**                       |
| ----------------- | ------------------------------------- |
| *group\_address*  | Multicast group address               |
| *source\_address* | The source of Multicast group address |

**\[View]**
VLANIf view,Interface view,LAGIf view

**\[Use Cases]**

```plaintext
sonic(config-vlan-10)# ip igmp join 224.1.1.1 120.1.1.122
```

