IGMP Snooping Configuration
show l2-multicast-table
Section titled “show l2-multicast-table”[Command]
show l2-multicast-table
[Purpose]
View information about a multicast group
[View]
System view
[Use Cases]
sonic# show l2-multicast-tableTotal L2_multicast_forwarding_group counters: 2(Source,Group) Interface Vlan-------------------- ----------- --------(0.0.0.0, 224.1.1.1) Ethernet31 20 Ethernet30 20show vlan igmp-snooping
Section titled “show vlan igmp-snooping”[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 |+-----------+------------+----------+-----------+--------------+-----------+--------------+--------------+---------------------+----------------------------------+------------------------------+show vlan igmp-snooping mrouter
Section titled “show vlan igmp-snooping mrouter”[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 |+-----------+------------+--------+show vlan igmp-snoopingmrouter-aging
Section titled “show vlan igmp-snoopingmrouter-aging”[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 |+-----------+--------------+show ip igmp
Section titled “show ip igmp”[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 interfaceInterface State Address V Querier QuerierIp Query Timer UptimeEthernet49 mtrc 20.1.1.2 3 other 20.1.1.2 --:--:-- 07:05:57Vlan1000 up 123.1.1.1 3 local 123.1.1.1 00:00:06 01:59:11sonic#sonic# show ip igmp joinInterface Address Source Group Socket UptimeVlan1000 123.1.1.1 120.1.1.122 224.1.1.1 27 00:06:33sonic#sonic# show ip igmp groupsTotal IGMP groups: 4Watermark warn limit(Not Set): 0Interface Group Mode Timer Srcs V UptimeVlan1000 225.1.3.1 INCL --:--:-- 1 3 01:59:16Vlan1000 225.1.3.2 INCL --:--:-- 1 3 01:59:16Vlan1000 225.1.3.3 INCL --:--:-- 1 3 01:59:16Vlan1000 224.1.1.1 INCL --:--:-- 1 3 00:06:40show ip igmp statistics
Section titled “show ip igmp statistics”[Command]
show ip igmp statistics
[Purpose]
Show the statistics of received IGMP packets.
[View]
System view
[Use Cases]
sonic# show ip igmp statisticsIGMP RX statisticsInterface : globalV1 query : 0V2 query : 0V3 query : 0V2 leave : 0V1 report : 0V2 report : 0V3 report : 130mtrace response : 0mtrace request : 0unsupported : 0mcast-snooping enable
Section titled “mcast-snooping enable”[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 enableigmp-snooping enable
Section titled “igmp-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 20sonic(config-vlan-20)# igmp-snooping enableigmp-snooping version
Section titled “igmp-snooping version”[Command]
igmp-snooping version 1-3
[Purpose]
Configure the IGMP version
[View]
VLAN view
[Use Cases]
sonic(config-vlan-10)# igmp-snooping version 2mcast-snooping group-limit ethernet
Section titled “mcast-snooping group-limit ethernet”[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]
sonic(config)# vlan 20sonic(config-vlan-20)# mcast-snooping group-limit ethernet 1 20igmp-snooping-proxy enable
Section titled “igmp-snooping-proxy enable”[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 20sonic(config-vlan-20)# igmp-snooping-proxy enableigmp-snooping querier enable
Section titled “igmp-snooping querier 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 10sonic(config-vlan-10)# igmp-snooping querier enableigmp-snooping querier-ip
Section titled “igmp-snooping querier-ip”[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 10sonic(config-vlan-10)# igmp-snooping querier enablesonic(config-vlan-10)# igmp-snooping querier-ip 10.110.1.1igmp-snooping fast-leave enable
Section titled “igmp-snooping fast-leave enable”[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 10sonic(config-vlan-10)# igmp-snooping fast-leave enableigmp-snooping robustness
Section titled “igmp-snooping robustness”[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]
sonic(config)# vlan 10sonic(config-vlan-10)# igmp-snooping robustness 100igmp-snooping query-interval
Section titled “igmp-snooping query-interval”[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]
sonic(config)# vlan 10sonic(config-vlan-10)# igmp-snooping query-interval 200igmp-snooping query-max-response-time
Section titled “igmp-snooping query-max-response-time”[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]
sonic(config)# vlan 10sonic(config-vlan-10)# igmp-snooping query-max-response-time 20igmp-snooping last-member-query-interval
Section titled “igmp-snooping last-member-query-interval”[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]
sonic(config)# vlan 10sonic(config-vlan-10)# igmp-snooping last-member-query-interval 2000interface l2mc-static-group
Section titled “interface l2mc-static-group”[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]
sonic(config)# interface l2mc-static-group ethernet 2 20 224.1.1.1igmp-snooping mrouter-aging
Section titled “igmp-snooping mrouter-aging”[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]
sonic(config)# vlan 20sonic(config-vlan-20)# igmp-snooping mrouter-aging 10igmp-snooping mroute ethernet
Section titled “igmp-snooping mroute ethernet”[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]
sonic(config-vlan-10)# igmp-snooping mrouter ethernet 1ip igmp
Section titled “ip igmp”[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]
sonic(config-vlan-10)# ip igmp query-interval 10ip igmp join
Section titled “ip igmp join”[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]
sonic(config-vlan-10)# ip igmp join 224.1.1.1 120.1.1.122