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 : SSMshow 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 0show 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/0show 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 INCLUDEshow 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 1show 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 Staticshow 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 1show 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 --:--:-- --:--:-- 1show 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:17show 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 0show ip pim bsr
Section titled “show ip pim bsr”[Command]
show ip pim bsr [candidate-bsr | candidate-rp | candidate-rp-database] [vrf* vrf_name***]**
[Purpose]
Show C-BSR/C-RP configuration/status information
[Parameter]
| Parameter | Description |
|---|---|
| candidate-bsr | show the configuration/status information of the local C-BSR |
| candidate-rp | show the configuration/status information of the local C-RP |
| candidate-rp-database | show the RP and multicast group mapping information sent by all C-RPs in the network. |
| This command should be executed on the BSR device | |
| vrf_name | vrf_name |
[View]
System View
[Comment]
The BSR state machine includes the following states: BSR_ELECTED(E‑BSR): In the “active” state, actively generates BSMs and manages RP-Set synchronization across the entire network. PENDING_ELECTED(P‑BSR): In the “pending confirmation” state, waits for a timer to expire before becoming an E‑BSR, preventing frequent switching. ACCEPT_PREFERRED(AP): Aware of the current active BSR, only accepts BSMs from that BSR or from C-BSRs with higher priority. ACCEPT_ANY(AA): Unaware of the current active BSR, will accept the first received BSM as the new BSR identity and RP‑Set source.
[Use Cases]
sonic# show ip pim bsrPIMv2 Bootstrap Router informationCurrent preferred BSR address: 10.1.1.2Priority Fragment-Tag State UpTime 200 8163 BSR_ELECTED 03:22:38Last BSM seen: 00:00:51sonic#
sonic# show ip pim bsr candidate-bsrCandidate-BSRAddress: 10.1.1.2Priority: 200Elected: Yessonic#
sonic# show ip pim bsr candidate-rpCandidate-RPAddress: 120.1.1.217Priority: 192Next adv.: 9882 msecsonic#
sonic# show ip pim bsr candidate-rp-databaseRP/Group NHT Prio Uptime Hold120.1.1.80 UP 98 12117 144> 224.1.1.0/24120.1.1.81 UP 99 12117 143> 224.1.1.0/24120.1.1.122 UP 192 12117 143120.1.1.217 UP 192 409 141> 227.1.1.1/32show ip pim bsrp-info
Section titled “show ip pim bsrp-info”[Command]
show ip pim bsrp-info
[Purpose]
Show BSR address information and aggregated RP service group range details.
[View]
System View
[Use Cases]
sonic# show ip pim bsrp-infoBSR Address 10.1.1.2Group Address 224.1.1.0/24-------------------------- Rp Address priority Holdtime Hash (ACTIVE) 120.1.1.80 98 151 1767032558 120.1.1.81 99 151 663517313
(PENDING)Pending RP count :0Partial List is empty
Group Address 227.1.1.1/32-------------------------- Rp Address priority Holdtime Hash (ACTIVE) 120.1.1.217 192 151 1736522649
(PENDING)Pending RP count :0Partial List is emptyshow ip pim bsm-database
Section titled “show ip pim bsm-database”[Command]
show ip pim bsm-database
[Purpose]
Show BSR/RP address information and aggregated RP service group range details.
[View]
System View
[Use Cases]
sonic#sonic# show ip pim bsm-databaseScope Zone: GlobalNumber of the fragments: 1
BSM Fragment : 1------------------BSR-Address BSR-Priority Hashmask-len Fragment-Tag10.1.1.2 200 30 56282
Group : 224.1.1.0/24-------------------Rp Count:2Fragment Rp Count : 2RpAddress HoldTime Priority120.1.1.80 151 98120.1.1.81 151 99
Group : 227.1.1.1/32-------------------Rp Count:1Fragment Rp Count : 1RpAddress HoldTime Priority120.1.1.217 151 192sonic# show ip pim bsrPIMv2 Bootstrap Router informationCurrent preferred BSR address: 10.1.1.2Priority Fragment-Tag State UpTime 200 56283 BSR_ELECTED 01:10:23Last BSM seen: 00:00:07show ip pim autorp
Section titled “show ip pim autorp”[Command]
show ip pim autorp [candidate|discovery|mapping-agent]
[Purpose]
Show candidate RP and mapping agent status information in network AutoRP.
[Parameter]
| Parameter | Description |
|---|---|
| candidate | Show local candidate RP status and the covered multicast address ranges |
| discovery | Show the RP and multicast address range mapping relationships learned by the local candidate RP |
| mapping-agent | Show the RP and multicast range information collected by the mapping agent |
[View]
System View
[Use Cases]
sonic# show ip pim autorpAutoRP Discovery is enabled
Discovered RP's (count=1) RP address Group Range 120.1.1.217 224.1.0.0/23
AutoRP Announcement is enabled interval 10s scope 31 holdtime 30s
Candidate RP's (count=1) RP address Group Range Prefix-List 120.1.1.217 224.1.0.0/23 -
AutoRP Mapping-Agent is disabledsonic#sonic# show ip pim autorp candidateAutoRP Announcement is enabled interval 10s scope 31 holdtime 30s
Candidate RP's (count=1) RP address Group Range Prefix-List 120.1.1.217 224.1.0.0/23 -sonic#sonic# show ip pim autorp discoveryAutoRP Discovery is enabled
Discovered RP's (count=1) RP address Group Range 120.1.1.217 224.1.0.0/23sonic#sonic# show ip pim autorp mapping-agentAutoRP Mapping-Agent is enabled interval 10s scope 31 holdtime 180s source 20.1.1.2 (interface Ethernet11)
Advertised RP's (count=1) RP address Group Range 120.1.1.217 224.1.0.0/23soniccounter 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 enablecounter 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 defaultcounter 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 1000ip 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/16ip 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/16ip 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 testip 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 60clear 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 mrouteip 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 pimmulticast-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-enableip 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.122unknown-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 trapip 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-proxyip pim bsr candidate-bsr priority
Section titled “ip pim bsr candidate-bsr priority”[Command]
ip pim bsr candidate-bsr priority* priority_idsource {interface {ethernet interface_id***| vlan*** vlan_id***| link-aggregation*** lag_id***| loopback*** loopback_id***} | address*** A.B.C.D***}** no ip pim bsr candidate-bsr priority* priority_idsource {interface {ethernet interface_id***| vlan*** vlan_id***| link-aggregation*** lag_id***| loopback*** loopback_id***} | address*** A.B.C.D***}**
[Purpose]
Enable dynamic RP in BSR mode, and configure the priority and IP address of the C-BSR..
[Parameter]
| Parameter | Description |
|---|---|
| priority_id | Specify the priority of the C-BSR. Range: 0–255, default is 64; a higher value indicates higher priority. |
| interface_id | Specify a Layer3 physical interface as the IP address of the C-BSR |
| vlan_id | Specify a VlanIf interface as the IP address of the C-BSR |
| lag_id | Specify an aggregate group interface as the IP address of the C-BSR |
| loopback_id | Specify a Loopback interface as the IP address of the C-BSR |
| A.B.C.D | Specify a specific address as the IP address of the C-BSR |
[View]
System Configuration View
[Comment]
When using dynamic RP in BSR mode in a PIM network, each C-BSR in the network participates in electing the BSR. The candidate with the higher priority wins; if priorities are equal, the one with the larger IP address wins. For stability, it is recommended to use a Loopback interface as the IP address of the C-BSR.
[Use Cases]
sonic(config)# ip pim bsr candidate-bsr priority 200 source interface vlan 9ip pim bsr candidate-rp priority
Section titled “ip pim bsr candidate-rp priority”[Command]
ip pim bsr candidate-rp priority* priority_idsource {interface {ethernet interface_id***| vlan*** vlan_id***| link-aggregation*** lag_id***| loopback*** loopback_id***} | address*** A.B.C.D***} interval*** intervalno ip pim bsr candidate-rp prioritypriority_idsource {interface {ethernetinterface_id***| vlanvlan_id| link-aggregationlag_id| loopbackloopback_id} | addressA.B.C.D}interval*** interval*
[Purpose]
Enable dynamic RP in BSR mode, and configure the priority, IP address, and advertisement interval of the C-RP.
[Parameter]
| Parameter | Description |
|---|---|
| priority_id | Specify the priority of the C-BSR. Range: 0–255, default is 192; a lower value indicates higher priority |
| interface_id | Specify a Layer3 physical interface as the IP address of the C-BSR |
| vlan_id | Specify a VlanIf interface as the IP address of the C-BSR |
| lag_id | Specify an aggregate group interface as the IP address of the C-BSR |
| loopback_id | Specify a Loopback interface as the IP address of the C-BSR |
| A.B.C.D | Specify a specific address as the IP address of the C-BSR |
| interval | Configure the advertisement interval for C-RP messages. Range: 1–4,294,967,295 seconds, default is 60 seconds. |
[View]
System Configuration View
[Comment]
When using dynamic RP in BSR mode in a PIM network, each C-RP device periodically sends Advertisement messages to the BSR. These messages include the C-RP address, the group range it serves, and the C-RP priority. The BSR aggregates the RP information and distributes it to every PIM device in the network. Each PIM device then uses the same rules to calculate and compare, selecting the optimal RP for a specific group from multiple candidate C-RPs.
Election rules: The C-RP serving the group with the longest mask wins. If masks are equal, the C-RP with the smaller priority value wins. If priorities are equal, a Hash function is computed, and the candidate with the larger result wins (the Hash result can be Viewed using the show ip pim bsrp-info command). If Hash results are equal, the C-RP with the larger IP address wins.
Hash formula: Value(G,Ci,M) = (1103515245*((1103515245*(G&M)+ 12345) XOR Ci)+ 12345) mod 2^31G is the group address, M is the Hash mask length of the BSR device, Ci is the RP’s IP address. For stability, it is recommended to use a Loopback interface as the IP address of the C-RP.
[Use Cases]
sonic(config)# ip pim bsr candidate-rp priority 100 source interface loopback 0 interval 10
ip pim bsr candidate-rp group
Section titled “ip pim bsr candidate-rp group”[Command]
ip pim bsr candidate-rp group* A.B.C.D/M*****no ip pim bsr candidate-rp group* A.B.C.D/M*
[Purpose]
Enable Enable dynamic RP in BSR mode, configure the multicast group range served by the C-RP. Multiple ranges can be configured.
[Parameter]
| Parameter | Description |
|---|---|
| A.B.C.D/M | Multicast group address range. |
[View]
System Configuration View
[Use Cases]
sonic(config)# ip pim bsr candidate-rp group 239.1.1.0/24ip pim autorp discovery
Section titled “ip pim autorp discovery”[Command]
ip pim autorp discovery no ip pim autorp discovery
[Purpose]
Enable dynamic RP mode as AutoRP
[View]
System Configuration View
[Use Cases]
sonic(config)# ip pim autorp discoveryip pim autorp announce
Section titled “ip pim autorp announce”[Command]
ip pim autorp autorp announce* x.x.x.x***{*** A.B.C.D/M***|group-list*** prefix-list***}** no ip pim autorp announce* x.x.x.x*
[Purpose]
Configure the multicast address range covered by the candidate RP and the IP address of the candidate RP in AutoRP mode.
[Parameter]
| Parameter | Description |
|---|---|
| x.x.x.x | IP address of the candidate RP |
| A.B.C.D/M | Multicast group address range covered by the candidate RP |
| prefix-list | The candidate RP can be associated with a prefix‑list to cover multiple multicast group address ranges |
[View]
System Configuration View
[Comment]
When configuring a specific multicast group address for the candidate RP, only one multicast group address can be specified. If the candidate RP needs to cover multiple multicast group address ranges, the prefix‑list method can be used for association. It is recommended to configure the candidate RP address as a Loopback address. Since AutoRP announce messages (224.1.0.39) are non‑protocol packets (ordinary multicast packets), the device must enable the unknown‑multicast trap function.
[Use Cases]
sonic(config)# ip pim autorp announce 120.1.1.217 224.1.0.0/23ip pim autorp announce interval
Section titled “ip pim autorp announce interval”[Command]
ip pim autorp announce interval* interval***[holdtime*** holdtime***| scope*** TTL***]** no ip pim autorp announce interval* interval***[holdtime*** holdtime***| scope*** TTL***]**
[Purpose]
Configure the interval, holdtime, and TTL value for announce messages in AutoRP mode.
[Parameter]
| Parameter | Description |
|---|---|
| interval | Interval for the candidate RP to send announce messages. Default: 60 seconds. Range: 1‑65535 |
| holdtime | Holdtime for the candidate RP announce. Default: 180 seconds. Range: 1‑65535 |
| TTL | TTL value for the candidate RP announce message. Default: 31. Range: 1‑255 |
[View]
System Configuration View
[Comment]
To ensure network stability in AutoRP, it is recommended to set holdtime to more than 3 times the interval.
[Use Cases]
sonic(config)# ip pim autorp announce interval 10 holdtime 30 scope 10ip pim autorp send-rp-discovery source
Section titled “ip pim autorp send-rp-discovery source”[Command]
ip pim autorp send-rp-discovery source {address* x.x.x.x***| interface {ethernet*** interface_id***| vlan*** vlan_id***| link-aggregation*** lag_id***| loopback*** loopback_id***}}** no ip pim autorp send-rp-discovery source {address* x.x.x.x***| interface {ethernet*** interface_id***| vlan*** vlan_id***| link-aggregation*** lag_id***| loopback*** loopback_id***}}**
[Purpose]
Configure the mapping agent IP address in AutoRP mode.
[Parameter]
| Parameter | Description |
|---|---|
| x.x.x.x | Specify the IP address of the mapping agent |
| interface_id | Specify the mapping agent as an interface |
| vlan_id | Specify the mapping agent as a VLAN interface |
| lag_id | Specify the mapping agent as a LAG interface |
| loopback_id | Specify the mapping agent as a Loopback interface |
[Comment]
For the same multicast group range, if the mapping agent receives announce messages from multiple candidate RPs, it will select the RP with the largest IP address. Since AutoRP mapping messages (224.1.0.40) are non-protocol packets (ordinary multicast packets), the device must enable the unknown-multicast trap function.
[Use Cases]
sonic(config)# ip pim autorp send-rp-discovery source interface ethernet 11ip pim autorp send-rp-discovery interval
Section titled “ip pim autorp send-rp-discovery interval”[Command]
ip pim autorp send-rp-discovery interval* interval***[holdtime*** holdtime***| scope*** TTL***]** ip pim autorp send-rp-discovery interval* interval***[holdtime*** holdtime***| scope*** TTL***]**
[Purpose]
Configure the interval, holdtime, and TTL value for mapping agent advertisement messages in AutoRP mode.
[Parameter]
| Parameter | Description |
|---|---|
| interval | Interval for the mapping agent to send mapping messages. Default: 60 seconds. Range: 1‑65535 |
| holdtime | Holdtime for the mapping agent RP mapping group. Default: 180 seconds. Range: 1‑65535 |
| TTL | TTL value for the mapping agent mapping message. Default: 31. Range: 1‑255 |
[View]
System Configuration View
[Comment]
To ensure network stability in AutoRP, it is recommended to set holdtime to more than 3 times the interval.
[Use Cases]
sonic(config)# ip pim autorp send-rp-discovery interval 10 holdtime 30 scope 10