Skip to content
Ask AI

IGMP Snooping Configuration

[Command]

show l2-multicast-table

[Purpose]

View information about a multicast group

[View]

System view

[Use Cases]

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

[Command]

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

[Purpose]

Display IGMP snooping information

[View]

System view

[Use Cases]

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

[Command]

show vlan igmp-snooping mrouter

[Purpose]

Display the router port information of IGMP snooping

[View]

System view

[Use Cases]

sonic# show vlan igmp-snooping mrouter
+-----------+------------+--------+
| VLAN ID | Mrouter | Type |
+===========+============+========+
| 20 | Ethernet32 | static |
+-----------+------------+--------+

[Command]

show vlan igmp-snooping mrouter-aging

[Purpose]

Show router port aging time for IGMP snooping

[View]

System view

[Use Cases]

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

[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]

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

[Command]

show ip igmp statistics

[Purpose]

Show the statistics of received IGMP packets.

[View]

System view

[Use Cases]

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

[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]

sonic(config)# mcast-snooping enable

[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]

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

[Command]

igmp-snooping version 1-3

[Purpose]

Configure the IGMP version

[View]

VLAN view

[Use Cases]

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

[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]

ParameterDescription
interface_nameInterface name
limitValue 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]

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

[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]

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

[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]

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

[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]

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

[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]

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

[Command]

igmp-snooping robustness count

[Purpose]

Configure robustness

[Parameter]

ParameterDescription
countDefault 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]

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

[Command]

igmp-snooping query-interval interval

[Purpose]

Configure the interval at which the device sends general query messages

[Parameter]

ParameterDescription
intervalUnit: s, the default value is: 125s, range:1~18000

[View]

VLAN view

[Use Cases]

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

[Command]

igmp-snooping query-max-response-time time

[Purpose]

Configure the maximum response time for query messages

[Parameter]

ParameterDescription
timeUnit: 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]

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

[Command]

igmp-snooping last-member-query-interval last_query_interval

[Purpose]

Configure the interval at which the querier sends specific group query messages.

[Parameter]

ParameterDescription
last_query_intervalUnit: ms, the default value is: 1000ms,range:100-22500

[View]

VLAN view

[Use Cases]

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

[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]

ParameterDescription
interface_nameInterface name
vlan_idVLAN ID of the interface
A.B.C.DInterface 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]

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

[Command]

igmp-snooping mrouter-aging time

[Purpose]

Configure dynamic router port aging time within a VLAN

[Parameter]

ParameterDescription
timeValue 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]

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

[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]

ParameterDescription
interface_nameInterface name

[View]

VLAN view

[Use Cases]

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

[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]

ParameterDescription
query_intervalValue range: 1-1800, unit: s, default 125s
timeValue range: 10-250, unit: s, default 10s
countValue range: 1-7, default 2
last_query_intervalValue range: 1-255, unit: ms, default 10
versionValue range: 2-3, default 3

[View]

VLANIf view,Interface view,LAGIf view

[Use Cases]

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

[Command]

ip igmp join group_address [ source_address ]

no ip igmp join group_address [ source_address ]

[Purpose]

Statically join the multicast group

[Parameter]

ParameterDescription
group_addressMulticast group address
source_addressThe source of Multicast group address

[View]

VLANIf view,Interface view,LAGIf view

[Use Cases]

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