IP Multicast
IGMP Snooping Configuration
Section titled “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 20
show 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:40
show 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 : 0
mcast-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 enable
igmp-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 enable
igmp-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 2
mcast-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 20
igmp-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 enable
igmp-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 enable
igmp-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.1
igmp-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 enable
igmp-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 100
igmp-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 200
igmp-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 20
igmp-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 2000
interface 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.1
igmp-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 10
igmp-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 1
ip 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 10
ip 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
MLD Snooping Configuration
Section titled “MLD Snooping Configuration”show vlan mld-snooping
Section titled “show vlan mld-snooping”[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 |+-----------+-----------+----------+-----------+--------------+-----------+--------------+--------------+---------------------+----------------------------------+------------------------------+
show vlan mld-snooping mrouter-aging
Section titled “show vlan mld-snooping mrouter-aging”[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 |+-----------+--------------+
show vlan mld-snooping mrouter
Section titled “show vlan mld-snooping mrouter”[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 |+-----------+-----------+--------+
mld-snooping enable
Section titled “mld-snooping enable”[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 20sonic(config-vlan-20)# mld-snooping enable
mld-snooping version
Section titled “mld-snooping version”[Command]
mld-snooping version 1-2
[Purpose]
Configure the MLD version
[View]
VLAN view
[Use Cases]
sonic(config-vlan-10)# mld-snooping version 1
mld-snooping proxy enable
Section titled “mld-snooping proxy enable”[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 20sonic(config-vlan-20)# mld-snooping proxy enable
mld-snooping querier enable
Section titled “mld-snooping querier 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 20sonic(config-vlan-20)# mld-snooping proxy enable
mld-snooping querier-ip
Section titled “mld-snooping querier-ip”[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 10sonic(config-vlan-10)# mld-snooping querier enablesonic(config-vlan-10)# mld-snooping querier-ip 1000::1
mld-snooping fast-leave enable
Section titled “mld-snooping fast-leave enable”[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 10sonic(config-vlan-10)# mld-snooping fast-leave enable
mld-snooping robustness
Section titled “mld-snooping robustness”[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]
sonic(config)# vlan 10sonic(config-vlan-10)# mld-snooping robustness 100
mld-snooping query-interval
Section titled “mld-snooping query-interval”[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]
sonic(config)# vlan 10sonic(config-vlan-10)# mld-snooping query-interval 200
mld-snooping query-max-response-time
Section titled “mld-snooping query-max-response-time”[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
[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)# mld-snooping query-max-response-time 20
mld-snooping last-member-query-interval
Section titled “mld-snooping last-member-query-interval”[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]
sonic(config)# vlan 10sonic(config-vlan-10)# mld-snooping last-member-query-interval 2000
interface l2mc-static-group
Section titled “interface l2mc-static-group”[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]
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
[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
mld-snooping mrouter-aging
Section titled “mld-snooping mrouter-aging”[Command]
mld-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]
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 20sonic(config-vlan-20)# mld-snooping mrouter-aging 10
mld-snooping mrouter ethernet
Section titled “mld-snooping mrouter ethernet”[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 10sonic(config-vlan-10)# mld-snooping mrouter ethernet 1
Multicast VLAN Configuration
Section titled “Multicast VLAN Configuration”show vlan igmp-snooping mvlan
Section titled “show vlan igmp-snooping mvlan”[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 |+------------+-------------+
igmp-snooping mvlan
Section titled “igmp-snooping mvlan”[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.
[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
PIM Configuration
Section titled “PIM Configuration”show ip pim group-type
Section titled “show ip pim group-type”[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-typeSSM group range : 232.0.0.0/8sonic# show ip pim group-type json{ "ssmGroups":"232.0.0.0\/8"}
show ip pim group-type
Section titled “show ip pim group-type”[Command]
show ip pim group-type [ group_address ]
[Purpose]
Show the PIM mode of the multicast address
[Parameter]
Parameter | Description |
---|---|
group_address | Multicast address |
[View]
System view
[Use Cases]
sonic# show ip pim group-type 224.1.1.1Group type : ASMsonic# show ip pim group-type 232.1.1.1Group type : SSM
show ip pim interface
Section titled “show ip pim interface”[Command]
show ip pim interface [ interface_name | json | detail ]
[Purpose]
Show the status information of the PIM interface
[Parameter]
Parameter | Description |
---|---|
interface_name | Interface name |
[View]
System view
[Use Cases]
sonic# show ip pim interfaceInterface State Address PIM Nbrs PIM DR FHR IfChannelsEthernet49 up 20.1.1.2 1 local 0 0Loopback0 up 120.1.1.122 0 local 0 0Vlan1000 up 123.1.1.1 0 local 0 3Vlan4000 up 20.1.2.2 1 local 0 0pimreg up 0.0.0.0 0 local 0 0
show ip pim interface traffic
Section titled “show ip pim interface traffic”[Command]
show ip pim interface traffic [ interface_name |json]
[Purpose]
Show the statistics of PIM packets sent and received on the interface
[Parameter]
Parameter | Description |
---|---|
interface_name | Interface name |
[View]
System view
[Use Cases]
sonic# show ip pim interface trafficInterface 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/0Loopback0 0/3511 0/0 0/0 0/0 0/0 0/0 0/0Vlan1000 0/3511 0/0 0/0 0/0 0/0 0/0 0/0Vlan4000 2640/2643 0/30 0/17 0/0 0/0 0/0 0/0
show ip pim join
Section titled “show ip pim join”[Command]
show ip pim join [ group1_address | group1_address group2_address | json]
[Purpose]
Show the multicast group information joined via PIM join
[Parameter]
Parameter | Description |
---|---|
group1_address | Multicast address, When group2_address is specified, the value is the multicast group source address |
group2_address | Multicast 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 joinInterface Address Source Group State Uptime Expire PruneVlan1000 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.1Interface Address Source Group State Uptime Expire PruneVlan1000 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.2Interface Address Source Group State Uptime Expire PruneVlan1000 123.1.1.1 12.1.1.1 225.1.3.2 NOINFO --:--:-- --:-- --:--
show ip pim local-membership
Section titled “show ip pim local-membership”[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-membershipInterface Address Source Group MembershipVlan1000 123.1.1.1 12.1.1.1 225.1.3.1 INCLUDEVlan1000 123.1.1.1 12.1.1.1 225.1.3.2 INCLUDEVlan1000 123.1.1.1 12.1.1.1 225.1.3.3 INCLUDE
show ip pim neighbor
Section titled “show ip pim neighbor”[Command]
show ip pim neighbor [ interface_name |details | json ]
[Purpose]
Show the neighbor relationships of the PIM interface
[Parameter]
Parameter | Description |
---|---|
interface_name | Interface name |
[View]
System view
[Use Cases]
sonic# show ip pim neighborInterface Neighbor Uptime Holdtime DR PriEthernet49 20.1.1.1 22:18:17 00:01:29 1Vlan4000 20.1.2.1 23:02:19 00:01:29 1
show ip pim rp-info
Section titled “show ip pim rp-info”[Command]
show ip pim rp-info [json]
[Purpose]
Show RP information
[View]
System view
[Use Cases]
sonic# show ip pim rp-infoRP address group/prefix-list OIF I am RP Source120.1.1.159 225.1.0.0/16 Vlan4000 no Static
show ip pim rpf
Section titled “show ip pim rpf”[Command]
show ip pim rpf [json]
[Purpose]
Show RPF interface information
[View]
System view
[Use Cases]
sonic# show ip pim rpfRPF Cache Refresh Delay: 50 msecsRPF Cache Refresh Timer: 0 msecsRPF Cache Refresh Requests: 50RPF Cache Refresh Events: 48RPF Cache Refresh Last: 22:32:33Nexthop Lookups: 813Nexthop Lookups Avoided: 0
Source Group RpfIface RpfAddress RibNextHop Metric Pref12.1.1.1 225.1.3.1 Ethernet49 20.1.1.1 20.1.1.1 0 112.1.1.1 225.1.3.2 Ethernet49 20.1.1.1 20.1.1.1 0 112.1.1.1 225.1.3.3 Ethernet49 20.1.1.1 20.1.1.1 0 1
show ip pim upstream
Section titled “show ip pim upstream”[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]
Parameter | Description |
---|---|
group1_address | Multicast address, When group2_address is specified, the value is the multicast group source address |
group2_address | Multicast 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 upstreamIif Source Group State Uptime JoinTimer RSTimer KATimer RefCntEthernet49 12.1.1.1 225.1.3.1 J 02:18:47 00:00:12 --:--:-- --:--:-- 1Ethernet49 12.1.1.1 225.1.3.2 J 02:18:47 00:00:12 --:--:-- --:--:-- 1Ethernet49 12.1.1.1 225.1.3.3 J 02:18:47 00:00:12 --:--:-- --:--:-- 1
show ip mroute
Section titled “show ip mroute”[Command]
show ip mroute [vrf { vrf_name |all }] [fill|summary|json]
[Purpose]
Show the multicast routing table entries on the device
[Parameter]
Parameter | Description |
---|---|
vrf_name | Vrf name |
fill | View all fields of multicast group entries without hiding any information |
summary | View the count of multicast routing entries |
[View]
System view
[Use Cases]
sonic# show ip mrouteIP Multicast Routing TableFlags: S - Sparse, C - Connected, P - Pruned R - SGRpt Pruned, F - Register flag, T - SPT-bit set
Source Group Flags Proto Input Output TTL Uptime12.1.1.1 225.1.3.1 SCT IGMP Ethernet49 Vlan1000 1 02:34:1412.1.1.1 225.1.3.2 SC IGMP Ethernet49 Vlan1000 1 02:34:1412.1.1.1 225.1.3.3 SCT IGMP Ethernet49 Vlan1000 1 02:34:14120.1.1.122 224.1.0.2 - STATIC Loopback0 Ethernet49 1 23:09:17
show counters mroute
Section titled “show counters mroute”[Command]
show counters mroute [configured-pattern source_address group_address ] [vrf vrf_name ]
[Purpose]
Show the statistics of multicast routing
[Parameter]
Parameter | Description |
---|---|
vrf_name | Vrf name |
source_address | The source of Multicast address |
group_address | Multicast address |
[View]
System view
[Use Cases]
sonic(config)# do show counters mrouteMRoute 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
counter mroute enable
Section titled “counter mroute enable”[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
counter mroute pattern
Section titled “counter mroute pattern”[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]
Parameter | Description |
---|---|
vrf_name | Vrf name |
source_address | The source of Multicast address |
group_address | Multicast address |
[View]
System configuration view
[Use Cases]
sonic(config)# counter mroute pattern 1.1.1.0/24 224.1.1.1/32 vrf default
counter mroute poll-interval
Section titled “counter mroute poll-interval”[Command]
counter mroute poll-interval interval
no counter mroute poll-interval interval
[Purpose]
Configure the statistics update interval for multicast routing entries
[Parameter]
Parameter | Description |
---|---|
interval | Value range: 1000-30000, unit:ms, default 10000 |
[View]
System configuration view
[Use Cases]
sonic(config)# counter mroute poll-interval 1000
ip pim rp
Section titled “ip pim rp”[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]
Parameter | Description |
---|---|
A.B.C.D | RP address |
A.B.C.D/M | The multicast address range covered by the RP |
prefix_name | Prefix 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
ip pim join-prune-interval
Section titled “ip pim join-prune-interval”[Command]
ip pim join-prune-interval interval
no ip pim join-prune-interval interval
[Purpose]
Configure the join/prune interval
[Parameter]
Parameter | Description |
---|---|
interval | Value 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
ip pim register-accept-list
Section titled “ip pim register-accept-list”[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]
Parameter | Description |
---|---|
prefix_name | name |
[View]
System configuration view
[Use Cases]
sonic(config)# ip pim register-accept-list test
ip pim register-suppress-time
Section titled “ip pim register-suppress-time”[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]
Parameter | Description |
---|---|
interval | Value range: 1-65535, unit:second, default 60s |
[View]
System configuration view
[Use Cases]
sonic(config)# ip pim register-suppress-time 60
clear ip mroute
Section titled “clear ip mroute”[Command]
clear ip mroute [vrf vrf_name |count]
[Purpose]
Clear dynamically generated mroute entries / Clear the statistics of mroute entries
[Parameter]
Parameter | Description |
---|---|
vrf_name | Vrf name |
[View]
System configuration view
[Use Cases]
sonic# clear ip mroute
ip pim
Section titled “ip pim”[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]
Parameter | Description |
---|---|
interval | Value range: 1-65535, default 30 |
priority | Value rangeL 1-65535, default 1 |
A.B.C.D | Specify 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
multicast-enable
Section titled “multicast-enable”[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
ip mroute
Section titled “ip mroute”[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]
Parameter | Description |
---|---|
interface_id | Specify the interface ID as the outbound interface for the mroute |
vlan_id | Specify the VLAN_ID as the outbound interface for the mroute |
lag_id | Specify the LAG_ID as the outbound interface for the mroute |
A.B.C.D | Multicast address |
source_address | The 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
unknown-multicast trap
Section titled “unknown-multicast trap”[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
ip igmp host-proxy
Section titled “ip igmp host-proxy”[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 1000sonic(config-vlanif-1000)# ip igmp host-proxy