Configure the IPV4 PIM Anycast RP

The anycast-rp command maps the RP and the Anycast RP peers.
  1. Enter global configuration mode.
    device# configure terminal
  2. Enter router PIM configuration mode.
    device(config)# router pim
  3. Identify the RP address for the PIM-SM domain.
    device(config-pim-router)# rp-address 100.1.1.1
  4. Specify the Anycast RP, including the prefix list that identifies the Anycast peers that are configured with the same Anycast RP address, also called the Anycast RP set.
    device(config-pim-router)# anycast-rp 100.1.1.1 anycast-rp-set

Example

The following is a configuration of PIM Anycast RP 100.1.1.1. The example avoids using the Loopback 1 interface when configuring PIM Anycast RP because the Loopback 1 address could be used as a router-id. A PIM First Hop router registers the source with the closest RP. The first RP that receives the register re-encapsulates the register to all other Anycast RP peers.

The RP shared address 100.1.1.1 is used in the PIM domain. IP addresses 1.1.1.1, 2.2.2.2, and 3.3.3.3 are listed in the ACL that forms the self-inclusive Anycast RP set. Multiple Anycast RP instances can be configured on a system, with each peer having the same or a different Anycast RP set.

device(config)# interface loopback 2
device(config-lbif-2)# ip address 100.1.1.1/24
device(config-lbif-2)# ip pim-sparse
device(config-lbif-2)# interface loopback 3
device(config-lbif-3)# ip address 1.1.1.1/24
device(config-lbif-3)# ip pim-sparse
device(config-lbif-3)# router pim
device(config-pim-router)# rp-address 100.1.1.1
device(config-pim-router)# anycast-rp 100.1.1.1 anycast-rp-set
device(config)# ip prefix-list anycast-rp-set permit 1.1.1.1/32
device(config)# ip prefix-list anycast-rp-set permit 2.2.2.2/32
device(config)# ip prefix-list anycast-rp-set permit 3.3.3.3/32