---
title: PIM Configuration
slug: enterprise-v5p2/pim-configuration
description: ip multicast
createdAt: 2025-11-14T03:58:43.763Z
---

### <font color="#1d50a2">show ip pim group-type</font>

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

```plaintext
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"
}
```

### <font color="#1d50a2">show ip pim group-type</font>

**\[Command]**
**show ip pim group-type** \[ *group\_addres*s ]

**\[Purpose]**
Show the PIM mode of the multicast address

**\[Parameter]**

| **Parameter**    | **Description**   |
| ---------------- | ----------------- |
| *group\_address* | Multicast address |

**\[View]**
System view

**\[Use Cases]**

```plaintext
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
```

### <font color="#1d50a2">show ip pim interface</font>

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

```plaintext
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
```

### <font color="#1d50a2">show ip pim interface traffic</font>

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

```plaintext
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
```

### <font color="#1d50a2">show ip pim join</font>

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

```plaintext
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     --:--:-- --:--  --:-- 
```

### <font color="#1d50a2">show ip pim local-membership</font>

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

```plaintext
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
```

### <font color="#1d50a2">show ip pim neighbor</font>

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

```plaintext
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      
```

### <font color="#1d50a2">show ip pim rp-info</font>

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

**\[Purpose]**
Show RP information

**\[View]**
System view

**\[Use Cases]**

```plaintext
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    
```

### <font color="#1d50a2">show ip pim rpf</font>

**\[Command]**
**show ip pim rpf \[json]**

**\[Purpose]**
Show RPF interface information

**\[View]**
System view

**\[Use Cases]**

```plaintext
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  
```

### <font color="#1d50a2">show ip pim upstream</font>

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

```plaintext
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
```

### <font color="#1d50a2">show ip mroute</font>

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

```plaintext
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
```

### <font color="#1d50a2">show counters mroute</font>

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

```plaintext
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
```

### <font color="#1d50a2">show ip pim bsr</font>

**\[Command]**

**show ip pim bsr \[candidate-bsr | candidate-rp | candidate-rp-database] \[vrf&#x20;***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.<br />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]**

```text
sonic# show ip pim bsr
PIMv2 Bootstrap Router information
Current preferred BSR address: 10.1.1.2
Priority        Fragment-Tag       State           UpTime
  200             8163            BSR_ELECTED      03:22:38
Last BSM seen: 00:00:51
sonic#

sonic# show ip pim bsr candidate-bsr
Candidate-BSR
Address:   10.1.1.2
Priority:  200
Elected:   Yes
sonic#

sonic# show ip pim bsr candidate-rp
Candidate-RP
Address:   120.1.1.217
Priority:  192
Next adv.: 9882 msec
sonic#

sonic# show ip pim bsr candidate-rp-database
RP/Group             NHT  Prio  Uptime    Hold
120.1.1.80            UP    98     12117   144
> 224.1.1.0/24
120.1.1.81            UP    99     12117   143
> 224.1.1.0/24
120.1.1.122           UP   192     12117   143
120.1.1.217           UP   192       409   141
> 227.1.1.1/32

```

### <font color="#1d50a2">show ip pim bsrp-info</font>

**\[Command]**

**show ip pim bsrp-info**

**\[Purpose]**

Show BSR address information and aggregated RP service group range details.

**\[View]**

System View

**\[Use Cases]**

```text
sonic#  show ip pim bsrp-info
BSR Address  10.1.1.2
Group 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 :0
Partial 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 :0
Partial List is empty

```

### <font color="#1d50a2">show ip pim bsm-database</font>

**\[Command]**

**show ip pim bsm-database**

**\[Purpose]**

Show BSR/RP address information and aggregated RP service group range details.

**\[View]**

System View

**\[Use Cases]**

```text
sonic#
sonic# show ip pim bsm-database
Scope Zone: Global
Number of the fragments: 1

BSM Fragment : 1
------------------
BSR-Address     BSR-Priority    Hashmask-len    Fragment-Tag
10.1.1.2        200             30              56282

Group : 224.1.1.0/24
-------------------
Rp Count:2
Fragment Rp Count : 2
RpAddress     HoldTime     Priority
120.1.1.80      151          98
120.1.1.81      151          99

Group : 227.1.1.1/32
-------------------
Rp Count:1
Fragment Rp Count : 1
RpAddress     HoldTime     Priority
120.1.1.217     151          192
sonic# show ip pim bsr
PIMv2 Bootstrap Router information
Current preferred BSR address: 10.1.1.2
Priority        Fragment-Tag       State           UpTime
  200             56283           BSR_ELECTED      01:10:23
Last BSM seen: 00:00:07

```

### <font color="#1d50a2">show ip pim autorp</font>

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

```text
sonic# show ip pim autorp
AutoRP 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 disabled
sonic#
sonic# show ip pim autorp candidate
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  -
sonic#
sonic# show ip pim autorp discovery
AutoRP Discovery is enabled

Discovered RP's (count=1)
 RP address   Group Range
 120.1.1.217   224.1.0.0/23
sonic#
sonic# show ip pim autorp mapping-agent
AutoRP 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/23
sonic

```

### <font color="#1d50a2">counter mroute enable</font>

**\[Command]**
**counter mroute enable**
**no counter mroute enable**

**\[Purpose]**
Globally enable the multicast routing statistics function

**\[View]**
System configuration view

**\[Use Cases]**

```plaintext
sonic(config)# counter mroute enable
```

### <font color="#1d50a2">counter mroute pattern</font>

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

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

### <font color="#1d50a2">counter mroute poll-interval</font>

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

```plaintext
sonic(config)# counter mroute poll-interval 1000
```

### <font color="#1d50a2">ip pim rp</font>

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

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

### <font color="#1d50a2">ip pim join-prune-interval</font>

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

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

### <font color="#1d50a2">ip pim register-accept-list</font>

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

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

### <font color="#1d50a2">ip pim register-suppress-time</font>

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

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

### <font color="#1d50a2">clear ip mroute</font>

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

```plaintext
sonic# clear ip mroute
```

### <font color="#1d50a2">ip pim</font>

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

```plaintext
sonic(config-vlanif-1000)# ip pim
```

### <font color="#1d50a2">multicast-enable</font>

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

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

### <font color="#1d50a2">ip mroute</font>

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

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

### <font color="#1d50a2">unknown-multicast trap</font>

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

```plaintext
sonic(config)# unknown-multicast trap
```

### <font color="#1d50a2">ip igmp host-proxy</font>

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

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

### <font color="#1d50a2">ip pim bsr candidate-bsr priority </font>

**\[Command]**

**ip pim bsr candidate-bsr priority&#x20;***priority\_id***&#x20;source \{interface \{ethernet&#x20;***interface\_id***&#x20;| vlan&#x20;***vlan\_id***&#x20;| link-aggregation&#x20;***lag\_id***&#x20;| loopback&#x20;***loopback\_id***} | address&#x20;***A.B.C.D***}**
**no ip pim bsr candidate-bsr priority&#x20;***priority\_id***&#x20;source \{interface \{ethernet&#x20;***interface\_id***&#x20;| vlan&#x20;***vlan\_id***&#x20;| link-aggregation&#x20;***lag\_id***&#x20;| loopback&#x20;***loopback\_id***} | address&#x20;***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]**

```text
sonic(config)# ip pim bsr candidate-bsr priority 200 source interface vlan 9
```

### <font color="#1d50a2">ip pim bsr candidate-rp priority </font>

**\[Command]**

**ip pim bsr candidate-rp priority&#x20;***priority\_id***&#x20;source \{interface \{ethernet&#x20;***interface\_id***&#x20;| vlan&#x20;***vlan\_id***&#x20;| link-aggregation&#x20;***lag\_id***&#x20;| loopback&#x20;***loopback\_id***} | address&#x20;***A.B.C.D***} interval&#x20;***interval*****
**no ip pim bsr candidate-rp priority&#x20;***priority\_id***&#x20;source \{interface \{ethernet&#x20;***interface\_id***&#x20;| vlan&#x20;***vlan\_id***&#x20;| link-aggregation&#x20;***lag\_id***&#x20;| loopback&#x20;***loopback\_id***} | address&#x20;***A.B.C.D***}interval&#x20;***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

### <font color="#1d50a2">ip pim bsr candidate-rp group </font>

**\[Command]**

**ip pim bsr candidate-rp group&#x20;***A.B.C.D/M*****
**no ip pim bsr candidate-rp group&#x20;***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]**

```text
sonic(config)# ip pim bsr candidate-rp group 239.1.1.0/24
```

### <font color="#1d50a2">ip pim autorp discovery</font>

**\[Command]**

**ip pim autorp discovery**
**no ip pim autorp discovery**

**\[Purpose]**

Enable dynamic RP mode as AutoRP

**\[View]**

System Configuration View

**\[Use Cases]**

```text
sonic(config)# ip pim autorp discovery
```

### <font color="#1d50a2">ip pim autorp announce </font>

**\[Command]**

**ip pim autorp autorp announce&#x20;***x.x.x.x***&#x20;\{***A.B.C.D/M***|group-list&#x20;***prefix-list***}**
**no ip pim autorp announce&#x20;***x.x.x.x*&#x20;

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

```text
sonic(config)# ip pim autorp announce 120.1.1.217 224.1.0.0/23
```

### <font color="#1d50a2">ip pim autorp announce interval</font>

**\[Command]**

**ip pim autorp announce interval&#x20;***interval***&#x20;\[holdtime&#x20;***holdtime***&#x20;| scope&#x20;***TTL***]**
**no ip pim autorp announce interval&#x20;***interval***&#x20;\[holdtime&#x20;***holdtime***&#x20;| scope&#x20;***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]**

```text
sonic(config)# ip pim autorp announce interval 10 holdtime 30 scope 10
```

### ip pim autorp send-rp-discovery source&#x20;

**\[Command]**

**ip pim autorp send-rp-discovery source \{address&#x20;***x.x.x.x***&#x20;| interface \{ethernet&#x20;***interface\_id***&#x20;| vlan&#x20;***vlan\_id***&#x20;| link-aggregation&#x20;***lag\_id***&#x20;| loopback&#x20;***loopback\_id***}}**
**no ip pim autorp send-rp-discovery source \{address&#x20;***x.x.x.x***&#x20;| interface \{ethernet&#x20;***interface\_id***&#x20;| vlan&#x20;***vlan\_id***&#x20;| link-aggregation&#x20;***lag\_id***&#x20;| loopback&#x20;***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]**

```text
sonic(config)# ip pim autorp send-rp-discovery source interface ethernet 11
```

### <font color="#1d50a2">ip pim autorp send-rp-discovery interval </font>

**\[Command]**

**ip pim autorp send-rp-discovery interval&#x20;***interval***&#x20;\[holdtime&#x20;***holdtime***&#x20;| scope&#x20;***TTL***]**
**ip pim autorp send-rp-discovery interval&#x20;***interval***&#x20;\[holdtime&#x20;***holdtime***&#x20;| scope&#x20;***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]**

```text
sonic(config)# ip pim autorp send-rp-discovery interval 10 holdtime 30 scope 10
```

