Skip to content

IP Multicast

[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

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

[Purpose]
Display MLD snooping information

[View]
System view

[Use Cases]

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

[Command]
show vlan mld-snooping mrouter-aging

[Purpose]
Show router port aging time for MLD snooping

[View]
System view

[Use Cases]

sonic# show vlan mld-snooping mrouter-aging
+-----------+--------------+
| VLAN ID | Aging Time |
+===========+==============+
| 10 | 180 |
+-----------+--------------+

[Command]
show vlan mld-snooping mrouter

[Purpose]
Display the router port information of MLD snooping

[View]
System view

[Use Cases]

sonic# show vlan mld-snooping mrouter
+-----------+-----------+--------+
| VLAN ID | Mrouter | Type |
+===========+===========+========+
| 10 | Ethernet5 | static |
+-----------+-----------+--------+

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

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

[Command]
mld-snooping version 1-2

[Purpose]
Configure the MLD version

[View]
VLAN view

[Use Cases]

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

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

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

[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

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

[Use Cases]

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

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

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

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

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

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

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

[Command]
mld-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)# mld-snooping query-interval 200

[Command]
mld-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)# mld-snooping query-max-response-time 20

[Command]
mld-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-25500

[Use Cases]

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

[Command]
interface l2mc-static-group etherne interface_name vlan_id X:X::X:X

no interface l2mc-static-group ethernet interface_name vlan_id X:X::X:X

[Purpose]
Static addition of interfaces to multicast groups

[Parameter]

ParameterDescription
interface_nameInterface name
vlan_idVLAN ID of the interface
X:X::X:XInterface 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 MLD Snooping function.

[Use Cases]

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

[Command]
mld-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]
System configuration view

[Notes]
Within the aging time of the dynamic router port, if no MLD 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)# mld-snooping mrouter-aging 10

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

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

[Command]
show vlan igmp-snooping mvlan vlan_id

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

[View]
System view

[Use Cases]

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

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

ParameterDescription
mvlan_idMulticast VLAN
uvlan_idsUser 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.

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

[Use Cases]

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

[Command]
show ip pim group-type [json]

[Purpose]
Show the current multicast group address range for the PIM-SSM model

[View]
System view

[Use Cases]

sonic# show ip pim group-type
SSM group range : 232.0.0.0/8
sonic# show ip pim group-type json
{
"ssmGroups":"232.0.0.0\/8"
}

[Command]
show ip pim group-type [ group_address ]

[Purpose]
Show the PIM mode of the multicast address

[Parameter]

ParameterDescription
group_addressMulticast address

[View]
System view

[Use Cases]

sonic# show ip pim group-type 224.1.1.1
Group type : ASM
sonic# show ip pim group-type 232.1.1.1
Group type : SSM

[Command]
show ip pim interface [ interface_name | json | detail ]

[Purpose]
Show the status information of the PIM interface

[Parameter]

ParameterDescription
interface_nameInterface name

[View]
System view

[Use Cases]

sonic# show ip pim interface
Interface State Address PIM Nbrs PIM DR FHR IfChannels
Ethernet49 up 20.1.1.2 1 local 0 0
Loopback0 up 120.1.1.122 0 local 0 0
Vlan1000 up 123.1.1.1 0 local 0 3
Vlan4000 up 20.1.2.2 1 local 0 0
pimreg up 0.0.0.0 0 local 0 0

[Command]
show ip pim interface traffic [ interface_name |json]

[Purpose]
Show the statistics of PIM packets sent and received on the interface

[Parameter]

ParameterDescription
interface_nameInterface name

[View]
System view

[Use Cases]

sonic# show ip pim interface traffic
Interface HELLO JOIN PRUNE REGISTER REGISTER-STOP ASSERT BSM
Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx Rx/Tx
----------------------------------------------------------------------------------------------------
Ethernet49 2554/2558 0/1075 0/2 0/0 0/0 0/0 0/0
Loopback0 0/3511 0/0 0/0 0/0 0/0 0/0 0/0
Vlan1000 0/3511 0/0 0/0 0/0 0/0 0/0 0/0
Vlan4000 2640/2643 0/30 0/17 0/0 0/0 0/0 0/0

[Command]
show ip pim join [ group1_address | group1_address group2_address | json]

[Purpose]
Show the multicast group information joined via PIM join

[Parameter]

ParameterDescription
group1_addressMulticast address, When group2_address is specified, the value is the multicast group source address
group2_addressMulticast address

[View]
System view

[Notes]

If group1_address is specified, the display will be filtered to show only that multicast group address. If group2_address is also specified, group1_address will be treated as the source (S) in the (S, G) entry, and group2_address will be treated as the group (G) for filtered display.

A state of JOIN indicates that the entry was generated by a PIM join message. A state of NOINFO indicates that the entry was not generated by locally received PIM join messages. This can be cross-referenced with the ‘show ip pim local-membership’ command to determine whether the entry was generated by locally received IGMP messages.

[Use Cases]

sonic# show ip pim join
Interface Address Source Group State Uptime Expire Prune
Vlan1000 123.1.1.1 12.1.1.1 225.1.3.1 NOINFO --:--:-- --:-- --:--
Vlan1000 123.1.1.1 12.1.1.1 225.1.3.2 NOINFO --:--:-- --:-- --:--
Vlan1000 123.1.1.1 12.1.1.1 225.1.3.3 NOINFO --:--:-- --:-- --:--
sonic#
sonic# show ip pim join 225.1.3.1
Interface Address Source Group State Uptime Expire Prune
Vlan1000 123.1.1.1 12.1.1.1 225.1.3.1 NOINFO --:--:-- --:-- --:--
sonic#
sonic# show ip pim join 12.1.1.1 225.1.3.2
Interface Address Source Group State Uptime Expire Prune
Vlan1000 123.1.1.1 12.1.1.1 225.1.3.2 NOINFO --:--:-- --:-- --:--

[Command]
show ip pim local-membership [json]

[Purpose]
Show the local relationships of PIM entries

[View]
System view

[Notes]

A status of INCLUDE indicates that the entry was generated by locally received IGMP messages.

A status of NOINFO indicates that the entry was not generated by locally received IGMP messages. In this case, you can use the ‘show ip pim join’ command to check whether the entry was generated by PIM join messages.

[Use Cases]

sonic# show ip pim local-membership
Interface Address Source Group Membership
Vlan1000 123.1.1.1 12.1.1.1 225.1.3.1 INCLUDE
Vlan1000 123.1.1.1 12.1.1.1 225.1.3.2 INCLUDE
Vlan1000 123.1.1.1 12.1.1.1 225.1.3.3 INCLUDE

[Command]
show ip pim neighbor [ interface_name |details | json ]

[Purpose]
Show the neighbor relationships of the PIM interface

[Parameter]

ParameterDescription
interface_nameInterface name

[View]
System view

[Use Cases]

sonic# show ip pim neighbor
Interface Neighbor Uptime Holdtime DR Pri
Ethernet49 20.1.1.1 22:18:17 00:01:29 1
Vlan4000 20.1.2.1 23:02:19 00:01:29 1

[Command]
show ip pim rp-info [json]

[Purpose]
Show RP information

[View]
System view

[Use Cases]

sonic# show ip pim rp-info
RP address group/prefix-list OIF I am RP Source
120.1.1.159 225.1.0.0/16 Vlan4000 no Static

[Command]
show ip pim rpf [json]

[Purpose]
Show RPF interface information

[View]
System view

[Use Cases]

sonic# show ip pim rpf
RPF Cache Refresh Delay: 50 msecs
RPF Cache Refresh Timer: 0 msecs
RPF Cache Refresh Requests: 50
RPF Cache Refresh Events: 48
RPF Cache Refresh Last: 22:32:33
Nexthop Lookups: 813
Nexthop Lookups Avoided: 0
Source Group RpfIface RpfAddress RibNextHop Metric Pref
12.1.1.1 225.1.3.1 Ethernet49 20.1.1.1 20.1.1.1 0 1
12.1.1.1 225.1.3.2 Ethernet49 20.1.1.1 20.1.1.1 0 1
12.1.1.1 225.1.3.3 Ethernet49 20.1.1.1 20.1.1.1 0 1

[Command]
show ip pim upstream [ group1_address | group1_address group2_address | json ]

[Purpose]
Show the upstream interface status information of the (S, G) entry

[Parameter]

ParameterDescription
group1_addressMulticast address, When group2_address is specified, the value is the multicast group source address
group2_addressMulticast address

[View]
System view

[Notes]

If group1_address is specified, the display will be filtered to show only that multicast group address. If group2_address is also specified, group1_address will be treated as the source (S) in the (S, G) entry, and group2_address will be treated as the group (G) for filtered display.

[Use Cases]

sonic# show ip pim upstream
Iif Source Group State Uptime JoinTimer RSTimer KATimer RefCnt
Ethernet49 12.1.1.1 225.1.3.1 J 02:18:47 00:00:12 --:--:-- --:--:-- 1
Ethernet49 12.1.1.1 225.1.3.2 J 02:18:47 00:00:12 --:--:-- --:--:-- 1
Ethernet49 12.1.1.1 225.1.3.3 J 02:18:47 00:00:12 --:--:-- --:--:-- 1

[Command]
show ip mroute [vrf { vrf_name |all }] [fill|summary|json]

[Purpose]
Show the multicast routing table entries on the device

[Parameter]

ParameterDescription
vrf_nameVrf name
fillView all fields of multicast group entries without hiding any information
summaryView the count of multicast routing entries

[View]
System view

[Use Cases]

sonic# show ip mroute
IP Multicast Routing Table
Flags: S - Sparse, C - Connected, P - Pruned
R - SGRpt Pruned, F - Register flag, T - SPT-bit set
Source Group Flags Proto Input Output TTL Uptime
12.1.1.1 225.1.3.1 SCT IGMP Ethernet49 Vlan1000 1 02:34:14
12.1.1.1 225.1.3.2 SC IGMP Ethernet49 Vlan1000 1 02:34:14
12.1.1.1 225.1.3.3 SCT IGMP Ethernet49 Vlan1000 1 02:34:14
120.1.1.122 224.1.0.2 - STATIC Loopback0 Ethernet49 1 23:09:17

[Command]
show counters mroute [configured-pattern source_address group_address ] [vrf vrf_name ]

[Purpose]
Show the statistics of multicast routing

[Parameter]

ParameterDescription
vrf_nameVrf name
source_addressThe source of Multicast address
group_addressMulticast address

[View]
System view

[Use Cases]

sonic(config)# do show counters mroute
MRoute pattern VRF Matched mroutes Packets
--------------------------------------------------------------------------------
120.1.1.122/32|224.1.1.123/32 default 120.1.1.122,224.1.1.123 0

[Command]

counter mroute enable

no counter mroute enable

[Purpose]
Globally enable the multicast routing statistics function

[View]
System configuration view

[Use Cases]

sonic(config)# counter mroute enable

[Command]

counter mroute pattern source_address group_address vrf vrf_name

no counter mroute pattern source_address group_address vrf vrf_name

[Purpose]
Enable the statistics function for multicast routing entries

[Parameter]

ParameterDescription
vrf_nameVrf name
source_addressThe source of Multicast address
group_addressMulticast address

[View]
System configuration view

[Use Cases]

sonic(config)# counter mroute pattern 1.1.1.0/24 224.1.1.1/32 vrf default

[Command]

counter mroute poll-interval interval

no counter mroute poll-interval interval

[Purpose]
Configure the statistics update interval for multicast routing entries

[Parameter]

ParameterDescription
intervalValue range: 1000-30000, unit:ms, default 10000

[View]
System configuration view

[Use Cases]

sonic(config)# counter mroute poll-interval 1000

[Command]

ip pim rp A.B.C.D [ A.B.C.D/M |prefix-list prefix_name ]

no ip pim rp A.B.C.D [ A.B.C.D/M |prefix-list prefix_name ]

[Purpose]
Statically configure the multicast RP address

[Parameter]

ParameterDescription
A.B.C.DRP address
A.B.C.D/MThe multicast address range covered by the RP
prefix_namePrefix list name. Configure a prefix list to covere the RP corresponding to multicast groups

[View]
System configuration view

[Use Cases]

sonic(config)# ip pim rp 120.1.1.159 225.1.0.0/16

[Command]

ip pim join-prune-interval interval

no ip pim join-prune-interval interval

[Purpose]
Configure the join/prune interval

[Parameter]

ParameterDescription
intervalValue range: 1-65535, unit:second, default 60s

[View]
System configuration view

[Notes]

The default join/prune interval is 60 seconds. The default aging cycle for PIM entries is 3.5 times the join/prune interval, which is 210 seconds.

[Use Cases]

sonic(config)# ip pim rp 120.1.1.159 225.1.0.0/16

[Command]

ip pim register-accept-list prefix_name

no ip pim register-accept-list prefix_name

[Purpose]
When PIM receives a registration packet, the source address of the packet will be compared against the specified prefix list. If the comparison passes, the packet will continue to be processed normally. If the source address of the registration packet is denied (rejected), a Register-Stop message will be sent to the source.

[Parameter]

ParameterDescription
prefix_namename

[View]
System configuration view

[Use Cases]

sonic(config)# ip pim register-accept-list test

[Command]

ip pim register-suppress-time interval

no ip pim register-suppress-time interval

[Purpose]
Configure the source registration suppression timer. When the timer expires, the RP will send a Register-Stop message to the source’s DR

[Parameter]

ParameterDescription
intervalValue range: 1-65535, unit:second, default 60s

[View]
System configuration view

[Use Cases]

sonic(config)# ip pim register-suppress-time 60

[Command]

clear ip mroute [vrf vrf_name |count]

[Purpose]
Clear dynamically generated mroute entries / Clear the statistics of mroute entries

[Parameter]

ParameterDescription
vrf_nameVrf name

[View]
System configuration view

[Use Cases]

sonic# clear ip mroute

[Command]

ip pim [hello interval |drpriority priority |use-source A.B.C.D ]

no ip pim [hello interval |drpriority priority |use-source A.B.C.D ]

[Purpose]
Enable the PIM function on the Layer 3 interface

[Parameter]

ParameterDescription
intervalValue range: 1-65535, default 30
priorityValue rangeL 1-65535, default 1
A.B.C.DSpecify the source IP address for PIM Hello packet

[View]
Interface view,VLANIf view,LAGIf view,Loopback view

[Use Cases]

sonic(config-vlanif-1000)# ip pim

[Command]

multicast-enable

no multicast-enable

[Purpose]
Enable multicast routing and forwarding on the Layer 3 interface

[View]
Interface view,VLANIf view,LAGIf view,Loopback view

[Use Cases]

sonic(config-vlanif-1000)# multicast-enable

[Command]

ip mroute {ethernet interface_id |vlan vlan_id |link-aggregation lag_id } A.B.C.D [ source_address ]

no ip mroute {ethernet interface_id |vlan vlan_id |link-aggregation lag_id } A.B.C.D [source_address ]

[Purpose]
Configure static mroute entries

[Parameter]

ParameterDescription
interface_idSpecify the interface ID as the outbound interface for the mroute
vlan_idSpecify the VLAN_ID as the outbound interface for the mroute
lag_idSpecify the LAG_ID as the outbound interface for the mroute
A.B.C.DMulticast address
source_addressThe source of Multicast address

[View]
Interface view,VLANIf view,LAGIf view,Loopback view

[Notes]

When configuring static multicast routing entries, ensure that both the inbound and outbound interfaces have PIM enabled.

[Use Cases]

sonic(config-vlanif-1000)# ip mroute ethernet 1 224.1.1.1 120.1.1.122

[Command]

unknown-multicast trap

no unknown-multicast trap

[Purpose]
Configure unknown multicast packets to be sent to the CPU

[View]
System configuration view

[Use Cases]

sonic(config)# unknown-multicast trap

[Command]

ip igmp host-proxy

no ip igmp host-proxy

[Purpose]
Enabling this function under the interface allows the Layer 3 multicast routing table entries to be converted into IGMP Report messages as a response.

[View]
Interface view,VLANIf view,LAGIf view

[Use Cases]

sonic(config)# interface vlan 1000
sonic(config-vlanif-1000)# ip igmp host-proxy