Skip to content
Ask AI

IP Multicast Configuration

[Command] mcast-snooping enable

[Purpose] Enable multicast functionality

[View] System configuration view

[Notes] The multicast container is disabled by default. If the device needs to perform multicast data forwarding and learning, this command must be issued in advance

[Use Cases]

sonic(config)# mcast-snooping enable

[Command] show vlan igmp-snooping

[Purpose] Display IGMP Snooping information

[View] System view

[Use Cases]

sonic# show vlan igmp-snooping

[Command] show vlan igmp-snooping mrouter

[Purpose] Display IGMP Snooping router port information

[View] System view

[Use Cases]

sonic# show vlan igmp-snooping mrouter

[Command] show vlan igmp-snooping mvlan

[Purpose] Display VLAN-to-multicast VLAN binding

[View] System view

[Use Cases]

sonic# show vlan igmp-snooping mvlan

[Command] igmp-snooping enable

[Purpose] Enable IGMP Snooping for the VLAN

[View] VLAN view

[Notes] The IGMP Snooping function operates on the Layer 2 switching network between the router and user terminals. It maintains the multicast forwarding table by listening to multicast protocol messages sent from the router and user terminals, thereby enabling multicast packets to be broadcast between designated interfaces within the VLAN

[Use Cases]

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

[Command] igmp-snooping version1-3

[Purpose] Configure IGMP version

[View] VLAN view

[Use Cases]

sonic(config)# vlan 100
sonic(config-vlan-100)# igmp-snooping version 3

[Command] mcast-snooping group-limit ethernetinterface-name limit

[Purpose] Set the maximum number of multicast entries that the interface can accommodate

[Parameter]

ParameterDescription
interface-nameInterface name
limitValue range: 1–4094

[View] VLAN view

[Notes] After modifying the maximum number of entries an interface can learn, any entries exceeding the limit will be learned into the IGMP process memory space but will not be installed (i.e., not delivered to hardware). Additionally, these entries will not be relearned within their aging cycle

[Use Cases]

sonic(config)# vlan 100
sonic(config-vlan-100)# mcast-snooping group-limit ethernet 10 4094

[Command] igmp-snooping proxy enable

[Purpose] Enable IGMP Snooping proxy

[View] VLAN view

[Notes] After enabling the IGMP Snooping Proxy function, the device can send IGMP Query messages on behalf of the router and receive IGMP Report/Leave messages from users, thereby reducing the load on the routing device when a large number of terminals exist in the network

[Use Cases]

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

[Command] igmp-snooping querier enable

[Purpose] Enable IGMP querier functionality

[View] VLAN view

[Notes] Configuring the querier on the device allows it to send IGMP Query messages on behalf of the upstream device. The device will periodically send IGMP Query packets to all interfaces (including router ports) within the VLAN. If an IGMP querier already exists in the multicast network, this may trigger a re-election of the IGMP querier

[Use Cases]

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

[Command] igmp-snooping querier-ipip-address

[Purpose] Configure the source IP address of IGMP Query packets

[View] VLAN view

[Notes] When multiple queriers exist within the network, the selection of the querier can be controlled by modifying the IP address of the device’s Query packets

[Use Cases]

sonic(config)# vlan 100
sonic(config-vlan-100)# igmp-snooping querier enable
sonic(config-vlan-100)# igmp-snooping querier-ip 10.1.0.10

[Command] igmp-snooping fast-leave enable

[Purpose] Enable fast leave for member ports

[View] VLAN view

[Notes] When an IGMP Leave message is received from a host leaving a specific multicast group, the device will immediately delete the corresponding multicast forwarding entry for that host without sending a Group-Specific Query

[Use Cases]

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

[Command] igmp-snooping robustness1-255

[Purpose] Configure the robustness variable

[View] VLAN view

[Notes] This command adjusts robustness in the following two ways:

  • It adjusts the number of Group-Specific Query messages sent by the querier to avoid potential network packet loss. When an IGMP Leave message for a multicast group is received from a user, the querier sends the configured number of Group-Specific Query messages to inquire whether any members remain in that multicast group.
  • It adjusts the member aging time. After a port receives a report message from a downstream host, it sets the member aging time as: (Number of Group-Specific Query messages × General Query interval) + Maximum response time for downstream hosts to reply to the querier

[Use Cases]

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

[Command] igmp-snooping query-interval1-18000

[Purpose] Configure the interval at which the device sends General Query messages

[Parameter]

ParameterDescription
1-18000Unit: seconds (s); default value: 125 s

[View] VLAN view

[Use Cases]

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

[Command] igmp-snooping query-max-response-time1-25

[Purpose] Configure the maximum response time for Query messages

[Parameter]

ParameterDescription
1-25Unit: seconds (s); default value: 10 s

[View] VLAN view

[Notes] Ensure that the General Query interval is greater than the maximum response time for downstream hosts to reply to the querier; otherwise, the device may incorrectly delete member entries

[Use Cases]

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

[Command] igmp-snooping last-member-query-interval100-25500

[Purpose] Configure the interval for the querier to send Group-Specific Query messages

[Parameter]

ParameterDescription
100-25500Unit: milliseconds (ms); default value: 1000 ms

[View] VLAN view

[Use Cases]

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

[Command] igmp-snooping mrouter-aging1-1000

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

[Parameter]

ParameterDescription
1-1000Unit: seconds ; default value: 180 s

[View] VLAN view

[Notes] If no IGMP Query or PIM Hello message is received within the dynamic router port aging time, the port will no longer be considered a router port

[Use Cases]

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

[Command] igmp-snooping mrouter ethernetinterface-name

[Purpose] Configure the interface as a static router port for the VLAN

[Parameter]

ParameterDescription
interface-nameinterface name

[View] VLAN view

[Use Cases]

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

[Command] igmp-snooping mvlanmulticast-vlan user-vlan

[Purpose] Configure multicast VLAN

[Parameter]

ParameterDescription
multicast-vlanMulticast VLAN
user-vlanUser VLAN(s), which can be configured individually with commas separating discrete values or as a continuous range using a hyphen

[View] System configuration view

[Notes] When users in different VLANs need to receive data from the same multicast source, the device must replicate the data stream for each VLAN. In this scenario, efficient forwarding can be achieved by configuring a multicast VLAN: configure the VLANs where the users reside as user VLANs, and configure the VLAN to which the router interface belongs as the multicast VLAN. Data is then unidirectionally replicated from the multicast VLAN to each user VLAN. This configuration takes effect only when IGMP Snooping is enabled in both the multicast VLAN and the user VLANs

[Use Cases]

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

[Command] show vlan mld-snooping

[Purpose] Display MLD Snooping information

[View] System view

[Use Cases]

sonic# show vlan mld-snooping

[Command] show vlan mld-snooping mrouter

[Purpose] Display MLD Snooping router port information

[View] System view

[Use Cases]

sonic# show vlan mld-snooping mrouter

[Command] show vlan mld-snooping mvlan

[Purpose] Display VLAN-to-multicast VLAN binding

[View] System view

[Use Cases]

sonic# show vlan mld-snooping mvlan

[Command] mld-snooping enable

[Purpose] Enable MLD Snooping for the VLAN

[View] System view

[Notes] The MLD Snooping function operates on the Layer 2 switching network between the router and user terminals. It maintains the multicast forwarding table by listening to IPv6 multicast protocol messages sent from the router and user terminals, thereby enabling multicast packets to be broadcast between designated interfaces within the VLAN

[Use Cases]

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

[Command] mld-snooping version1-2

[Purpose] Configure MLD version

[View] VLAN view

[Use Cases]

sonic(config)# vlan 100
sonic(config-vlan-100)# mld-snooping version 2

[Command] mld-snooping proxy enable

[Purpose] Enable MLD Snooping proxy

[View] VLAN view

[Notes] After enabling the MLD Snooping Proxy function, the device can send MLD Query messages on behalf of the router and receive IGMP Report/Leave messages from users, thereby reducing the load on the routing device when a large number of terminals exist in the network

[Use Cases]

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

[Command] mld-snooping querier enable

[Purpose] Enable MLD querier functionality

[View] VLAN view

[Notes] Configuring the querier on the device allows it to send MLD Query messages on behalf of the upstream device. The device will periodically send MLD Query packets to all interfaces (including router ports) within the VLAN. If an MLD querier already exists in the multicast network, this may trigger a re-election of the MLD querier

[Use Cases]

sonic(config)# vlan 100
sonic(config-vlan-100)# mld-snooping querier enable

[Command] mld-snooping querier-ipipv6-address

[Purpose] Configure the source IPv6 address of MLD Query packets

[View] VLAN view

[Notes] When multiple queriers exist within the network, the selection of the querier can be controlled by modifying the IPv6 address of the device’s Query packets

[Use Cases]

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

[Command] mld-snooping fast-leave enable

[Purpose] Enable fast leave for member ports

[View] VLAN view

[Notes] When an MLD Leave message is received from a host leaving a specific multicast group, the device will immediately delete the corresponding multicast forwarding entry for that host without sending a Group-Specific Query

[Use Cases]

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

[Command] mld-snooping robustness1-255

[Purpose] Configure the robustness variable

[View] VLAN view

[Notes] This command adjusts robustness in the following two ways:

  • It adjusts the number of Group-Specific Query messages sent by the querier to avoid potential network packet loss. When an MLD Leave message for a multicast group is received from a user, the querier sends the configured number of Group-Specific Query messages to inquire whether any members remain in that multicast group.
  • It adjusts the member aging time. After a port receives a report message from a downstream host, it sets the member aging time as: (Number of Group-Specific Query messages × General Query interval) + Maximum response time for downstream hosts to reply to the querier

[Use Cases]

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

[Command] mld-snooping query-interval1-18000

[Purpose] Configure the interval at which the device sends General Query messages

[Parameter]

ParameterDescription
1-18000Unit: seconds (s); default value: 125 s

[View] VLAN view

[Use Cases]

sonic(config)# vlan 100
sonic(config-vlan-100)# mld-snooping query-interval 200

[Command] mld-snooping query-max-response-time1-25

[Purpose] Configure the maximum response time for Query messages

[Parameter]

ParameterDescription
1-25Unit: seconds (s); default value: 10 s

[View] VLAN view

[Notes] Ensure that the General Query interval is greater than the maximum response time for downstream hosts to reply to the querier; otherwise, the device may incorrectly delete member entries

[Use Cases]

sonic(config)# vlan 100
sonic(config-vlan-100)# mld-snooping query-max-response-time 10

[Command] mld-snooping last-member-query-interval100-25500

[Purpose] Configure the interval for the querier to send Group-Specific Query messages

[Parameter]

ParameterDescription
100-25500Unit: milliseconds (ms); default value: 1000 ms

[View] VLAN view

[Use Cases]

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

[Command] mld-snooping mrouter-aging1-1000

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

[Parameter]

ParameterDescription
1-1000Unit: seconds ; default value: 180 s

[View] VLAN view

[Notes] If no MLD Query or PIM Hello message is received within the dynamic router port aging time, the port will no longer be considered a router port

[Use Cases]

sonic(config)# vlan 100
sonic(config-vlan-100)# mld-snooping mrouter-aging 10

[Command] mld-snooping mrouter ethernetinterface-name

[Purpose] Configure the interface as a static router port for the VLAN

[Parameter]

ParameterDescription
interface-nameinterface name

[View] VLAN view

[Use Cases]

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

[Command] mld-snooping mvlanmulticast-vlan user-vlan

[Purpose] Configure multicast VLAN

[Parameter]

ParameterDescription
multicast-vlanMulticast VLAN
user-vlanUser VLAN(s), which can be configured individually with commas separating discrete values or as a continuous range using a hyphen

[View] System configuration view

[Notes] When users in different VLANs need to receive data from the same multicast source, the device must replicate the data stream for each VLAN. In this scenario, efficient forwarding can be achieved by configuring a multicast VLAN: configure the VLANs where the users reside as user VLANs, and configure the VLAN to which the router interface belongs as the multicast VLAN. Data is then unidirectionally replicated from the multicast VLAN to each user VLAN. This configuration takes effect only when MLD Snooping is enabled in both the multicast VLAN and the user VLANs

[Use Cases]

sonic(config)# mld-snooping mvlan 100 200,201

[Command] show l2-multicast-table

[Purpose] Display multicast address information

[View] System view

[Use Cases]

sonic# show l2-multicast-table

[Command] interface l2mc-static-group ethernetinterface-name vlan-id ip/ipv6-address

[Purpose] Statically join a multicast group on the interface

[Parameter]

ParameterDescription
interface-nameinterface name
vlan-idVLAN ID of the interface
ip/ipv6-addressMulticast group address to be statically joined on the interface

[View] System configuration view

[Use Cases]

sonic(config)# interface l2mc-static-group ethernet 1 100 224.1.1.1

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

[Purpose] Display PIM mode information

[Parameter]

ParameterDescription
group-addressiMulticast group address
jsonOutput in JSON format

[View] System view

[Use Cases]

sonic# show ip pim group-type

[Command] show ip pim interface [[detail[json]] |[json] |[traffic[json]] |[interface-name[json]]]

[Purpose] Display PIM interface status information

[Parameter]

ParameterDescription
detailDetailed information
trafficPIM packet statistics
interface-nameinterface name
jsonOutput in JSON format

[View] System view

[Use Cases]

sonic# sonic# show ip pim interface

[Command] show ip pim join [group1-address[json]|group1-address group2-address[json]| [json]]

[Purpose] Display multicast group information learned via PIM join

[Parameter]

ParameterDescription
group1-addressMulticast group IP address
group2-addressMulticast group IP address
jsonOutput in JSON format

[View] System view

[Notes] If group1-address is specified, the display is filtered to show only that multicast address. If group2-address is also specified, group1-address is treated as the source (S) in an (S,G) entry, and group2-address as the group (G) for filtered display. A state of JOIN indicates the entry was generated by a received PIM join message. A state of NOINFO indicates the entry was not generated by a PIM join message received locally

[Use Cases]

sonic# show ip pim join

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

[Purpose] Display the locally generated relationship of PIM entries

[Parameter]

ParameterDescription
jsonOutput in JSON format

[View] System view

[Notes] A state of INCLUDE indicates that the entry was generated locally by receiving an IGMP message. A state of NOINFO indicates that the entry was not generated locally by receiving an IGMP message

[Use Cases]

sonic# show ip pim local-membership

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

[Purpose] Display PIM interface neighbor relationships

[Parameter]

ParameterDescription
detailview detailed information of PIM neighbors
interface_namedisplay PIM neighbor information for a specific interface
jsonOutput in JSON format

[View] System view

[Use Cases]

sonic# show ip pim neighbor

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

[Purpose] Display RP information

[Parameter]

ParameterDescription
jsonOutput in JSON format

[View] System view

[Use Cases]

sonic# show ip pim rp-info

[Command] show ip pim rpf [json]

[Purpose] Display RPF interface status information

[Parameter]

ParameterDescription
jsonOutput in JSON format

[View] System view

[Use Cases]

sonic# show ip pim rpf

[Command] show ip pim upstream [group1-address[json]|group1-address group2-address[json]| [json]]

[Purpose] Display the upstream interface status information for (S,G) entries

[Parameter]

ParameterDescription
group1-addressMulticast group IP address
group2-addressMulticast group IP address
jsonOutput in JSON format

[View] System view

[Notes]

If group1-address is specified, the display is filtered to show only that multicast address. If group2-address is also specified, group1-address is treated as the source (S) in an (S,G) entry, and group2-address as the group (G) for filtered display

[Use Cases]

sonic# show ip pim upstream

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

[Purpose] Display multicast routing table

[Parameter]

ParameterDescription
vrf_nameVRF name
fillDisplay all multicast group entry fields in full, with no truncation
SummaryDisplay the number of multicast routing entries
jsonOutput in JSON format

[View] System view

[Use Cases]

sonic# show ip mroute summary

[Command] ip pim [drprioritypriority**| hellointerval|use-sourceip-address]**

[Purpose] Enable PIM functionality on the Layer 3 interface

[Parameter]

ParameterDescription
prioritySet the PIM interface priority ,value range: 1-65535
intervalSet the PIM Hello message interval, value range: 1-65535
ip-addressSpecify the source IP address for PIM Hello messages

[View] Interface view

[Use Cases]

sonic(config)# interface ethernet 10
sonic(config-if-10)# ip pim

[Command] ip pim rpA.B.C.D**[A.B.C.D/M| prefix-listprefix-list-name]**

[Purpose] Configure static RP

[Parameter]

ParameterDescription
A.B.C.DSRP address
A.B.C.D/MMulticast address range covered by the RP
prefix-list-namePrefix list name, configured to control the RP corresponding to multicast groups using a prefix list

[View] System configuration view

[Use Cases]

sonic(config)# ip pim rp 1.1.1.1 224.10.10.0/24

[Command] ip pim join-prune-intervalinterval

[Purpose] Configure join/prune interval period

[Parameter]

ParameterDescription
intervalInterval period, default 60 seconds, unit: seconds, valid range: 1-65535

[View] System configuration view

[Use Cases]

sonic(config)# ip pim join-prune-interval 60

[Command] ip pim register-accept-listprefix_name

[Purpose] When PIM receives a register packet, the packet’s source will be compared against the specified prefix list. If the comparison passes, normal processing continues. If the source address of the register packet is denied by the prefix list, a register-stop message is sent to the source

[Parameter]

ParameterDescription
prefix_namePrefix list name

[View] System configuration view

[Use Cases]

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

[Command] ip pim register-suppress-timeinterval

[Purpose] Configure the source registration suppression timer. When the timer expires, the RP sends a register-stop message to the source DR

[Parameter]

ParameterDescription
intervalRegistration suppression time: default 60 seconds, unit: seconds, range: 1-65535

[View] System configuration view

[Use Cases]

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

[Command] clear ip mroute [vrfvrf_name**| count]**

[Purpose] Clear dynamically generated multicast routing entries / Clear multicast routing entry statistics

[Parameter]

ParameterDescription
vrf_nameVRF name

[View] System view

[Use Cases]

sonic# clear ip mroute

[Command] ip mroute {ethernetinterface_id**|vlanvlan_id|link-aggregationlag_id}A.B.C.D[source_address]**

[Purpose] Configure static multicast route

[Parameter]

ParameterDescription
interface_idSpecify the interface ID as the egress interface for the mroute
vlan_idSpecify the VLAN ID as the egress interface for the mroute
lag_idSpecify the LAG ID as the egress interface for the mroute
A.B.C.DMulticast group address
source_addressMulticast source address

[View] Interface view

[Use Cases]

sonic(config)# interface ethernet 10
sonic(config-if-10)# ip mroute ethernet 1 224.1.1.1 120.1.1.122

[Command] 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 [joinA.B.C.D**[A.B.C.D]|last-member-query-intervalinterval| last-member-query-countcount| query-intervalinterval| query-max-response-timeinterval| versionversion-number]**

[Purpose] Configure the IGMP function for the member-side DR

[Parameter]

ParameterDescription
A.B.C.Dmulticast group address
A.B.C.Dmulticast source address
intervalquery interval, range: 1-65535
countquery count, range: 1-255
intervalgeneral query message interval, range: 1-1800
intervalmaximum response time for query messages, range: 10-250
version-numberversion number, range: 2-3

[View] Interface view

[Use Cases]

sonic(config)# interface ethernet 10
sonic(config-if-10)# ip igmp