This example shows how to configure and verify the multicast PIM RPF next-hop neighbor selection for a group or (S,G) pair.
Before you begin:
Multicast PIM RPF neighbor selection allows you to specify the RPF neighbor (next hop) and source address for a single group or multiple groups using a prefix list. RPF neighbor selection can only be configured for VPN routing and forwarding (VRF) instances.
If you have multiple service VRFs through which a receiver VRF can learn the same source or rendevous point (RP) address, PIM RPF checks typically choose the best path determined by the unicast protocol for all multicast flows. However, if RPF neighbor selection is configured, RPF checks are based on your configuration instead of the unicast routing protocols.
You can use this static RPF selection as a building block for particular applications. For example, an extranet. Suppose you want to split the multicast flows among parallel PIM links or assign one multicast flow to a specific PIM link. With static RPF selection configured, the router sends join and prune messages based on the configuration.
You can use wildcards to designate the source address. Whether or not you use wildcards affects how the PIM joins work:
Figure 1 shows the topology used in this example.
Figure 1: PIM RPF Selection

In this example, the RPF selection is configured on the receiver provider edge router (PE2).
To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.
The following example requires you to navigate various
levels in the configuration hierarchy. For information about navigating
the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide
.
To configure PIM RPF selection:
From configuration mode, confirm your configuration by entering the show policy-options and show routing-instances commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
To verify the configuration, run the following commands, checking the upstream interface and the upstream neighbor: