Example: Configuring Bidirectional PIM
This example shows how to configure bidirectional PIM, as specified in RFC 5015, Bidirectional Protocol Independent Multicast (BIDIR-PIM).
Requirements
This example uses the following hardware and software components:
- Eight Juniper Networks routers that can be M120, M320, MX Series, or T Series platforms. To support bidirectional PIM, M Series platforms must have I-chip FPCs. M7i, M10i, M40e, and other older M Series routers do not support bidirectional PIM.
- Junos OS Release 12.1 or later running on all eight routers.
Overview
Compared to PIM sparse mode, bidirectional PIM requires less PIM router state information. Because less state information is required, bidirectional PIM scales well and is useful in deployments with many dispersed sources and receivers.
In this example, two rendezvous points are configured statically. One RP is configured as a phantom RP. A phantom RP is an RP address that is a valid address on a subnet, but is not assigned to a PIM router interface. The subnet must be reachable by the bidirectional PIM routers in the network. For the other (non-phantom) RP in this example, the RP address is assigned to a PIM router interface. It can be assigned to either the loopback interface or any physical interface on the router. In this example, it is assigned to a physical interface.
OSPF is used as the interior gateway protocol (IGP) in this example. The OSPF metric determines the designated forwarder (DF) election process. In bidirectional PIM, the DF establishes a loop-free shortest-path tree that is rooted at the RP. On every network segment and point-to-point link, all PIM routers participate in DF election. The procedure selects one router as the DF for every RP of bidirectional groups. This router forwards multicast packets received on that network upstream to the RP. The DF election uses the same tie-break rules used by PIM assert processes.
This example uses the default DF election parameters. Optionally, at the [edit protocols pim interface (interface-name | all) bidirectional] hierarchy level, you can configure the following parameters related to the DF election:
- The robustness-count is the minimum number of DF election messages that must be lost for election to fail.
- The offer period is the interval to wait between repeated DF Offer and Winner messages.
- The backoff period is the period that the acting DF waits between receiving a better DF Offer and sending the Pass message to transfer DF responsibility.
This example uses bidirectional-sparse-dense mode on the interfaces. The choice of PIM mode is closely tied to controlling how groups are mapped to PIM modes, as follows:
- bidirectional-sparse—Use if all multicast groups are operating in bidirectional, sparse, or SSM mode.
- bidirectional-sparse-dense—Use if multicast groups, except those that are specified in the dense-groups statement, are operating in bidirectional, sparse, or SSM mode.
Topology Diagram
Figure 1 shows the topology used in this example.
Figure 1: Bidirectional PIM with Statically Configured Rendezvous Points

Configuration
CLI Quick Configuration
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.
Router R1
Router R2
Router R3
Router R4
Router R5
Router R6
Router R7
Router R8
Router R1
Step-by-Step Procedure
To configure Router R1:
Configure the router interfaces.
[edit interfaces]user@R1# set ge-0/0/1 unit 0 family inet address 10.10.1.1/24user@R1# set xe-2/1/0 unit 0 family inet address 10.10.2.1/24user@R1# set lo0 unit 0 family inet address 10.255.11.11/32Configure OSPF on the interfaces.
[edit protocols ospf area 0.0.0.0]user@R1# set interface ge-0/0/1.0user@R1# set interface xe-2/1/0.0user@R1# set interface lo0.0user@R1# set interface fxp0.0 disable- The RP represented by IP address 10.10.1.3 is a phantom RP. The 10.10.1.3 address is not assigned to any interface on any of the routers in the topology. It is, however, a reachable address. It is in the subnet between Routers R1 and R2.
Configure the group-to-RP mappings.
[edit protocols pim rp bidirectional]user@R1# set address 10.10.1.3 group-ranges 224.1.3.0/24user@R1# set address 10.10.1.3 group-ranges 225.1.3.0/24user@R1# set address 10.10.13.2 group-ranges 224.1.1.0/24user@R1# set address 10.10.13.2 group-ranges 225.1.1.0/24The RP represented by address 10.10.13.2 is assigned to the ge-2/0/0 interface on Router R6.
Enable bidirectional PIM on the interfaces.
[edit protocols pim]user@R1# set interface ge-0/0/1.0 mode bidirectional-sparse-denseuser@R1# set interface xe-2/1/0.0 mode bidirectional-sparse-dense(Optional) Configure tracing operations for the DF election process.
[edit protocols pim]user@R1# set traceoptions file dfuser@R1# set traceoptions flag bidirectional-df-election detail
Results
From configuration mode, confirm your configuration by entering the show interfaces and show protocols commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
If you are done configuring the router, enter commit from configuration mode.
Repeat the procedure for every Juniper Networks router in the bidirectional PIM network, using the appropriate interface names and addresses for each router.
Verification
Confirm that the configuration is working properly.
- Verifying Rendezvous Points
- Verifying Messages
- Checking the PIM Join State
- Displaying the Designated Forwarder
- Displaying the PIM Interfaces
- Checking the PIM Neighbors
- Checking the Route to the Rendezvous Points
- Verifying Multicast Routes
- Viewing Multicast Next Hops
Verifying Rendezvous Points
Purpose
Verify the group-to-RP mapping information.
Action
user@R1> show pim rps
Instance: PIM.master Address family INET RP address Type Mode Holdtime Timeout Groups Group prefixes 10.10.1.3 static bidir 150 None 2 224.1.3.0/24 225.1.3.0/24 10.10.13.2 static bidir 150 None 2 224.1.1.0/24 225.1.1.0/24
Verifying Messages
Purpose
Check the number of DF election messages sent and received, and check bidirectional join and prune error statistics.
Action
user@R1> show pim statistics
PIM Message type Received Sent Rx errors V2 Hello 16 34 0 ... V2 DF Election 18 38 0 ... Global Statistics ... Rx Bidir Join/Prune on non-Bidir if 0 Rx Bidir Join/Prune on non-DF if 0
Checking the PIM Join State
Purpose
Confirm the upstream interface, neighbor, and state information.
Action
user@R1> show pim join extensive
Instance: PIM.master Family: INET R = Rendezvous Point Tree, S = Sparse, W = Wildcard Group: 224.1.1.0 Bidirectional group prefix length: 24 Source: * RP: 10.10.13.2 Flags: bidirectional,rptree,wildcard Upstream interface: ge-0/0/1.0 Upstream neighbor: 10.10.1.2 Upstream state: None Bidirectional accepting interfaces: Interface: ge-0/0/1.0 (RPF) Interface: lo0.0 (DF Winner) Group: 224.1.3.0 Bidirectional group prefix length: 24 Source: * RP: 10.10.1.3 Flags: bidirectional,rptree,wildcard Upstream interface: ge-0/0/1.0 (RP Link) Upstream neighbor: Direct Upstream state: Local RP Bidirectional accepting interfaces: Interface: ge-0/0/1.0 (RPF) Interface: lo0.0 (DF Winner) Interface: xe-2/1/0.0 (DF Winner) Group: 225.1.1.0 Bidirectional group prefix length: 24 Source: * RP: 10.10.13.2 Flags: bidirectional,rptree,wildcard Upstream interface: ge-0/0/1.0 Upstream neighbor: 10.10.1.2 Upstream state: None Bidirectional accepting interfaces: Interface: ge-0/0/1.0 (RPF) Interface: lo0.0 (DF Winner) Group: 225.1.3.0 Bidirectional group prefix length: 24 Source: * RP: 10.10.1.3 Flags: bidirectional,rptree,wildcard Upstream interface: ge-0/0/1.0 (RP Link) Upstream neighbor: Direct Upstream state: Local RP Bidirectional accepting interfaces: Interface: ge-0/0/1.0 (RPF) Interface: lo0.0 (DF Winner) Interface: xe-2/1/0.0 (DF Winner)
Meaning
The output shows a (*,G-range) entry for each active bidirectional RP group range. These entries provide a hierarchy from which the individual (*,G) routes inherit RP-derived state (upstream information and accepting interfaces). These entries also provide the control plane basis for the (*, G-range) forwarding routes that implement the sender-only branches of the tree.
Displaying the Designated Forwarder
Purpose
Display RP address information and confirm the DF elected.
Action
user@R1> show pim bidirectional df-election
Instance: PIM.master Family: INET RPA: 10.10.1.3 Group ranges: 224.1.3.0/24, 225.1.3.0/24 Interfaces: ge-0/0/1.0 (RPL) DF: none lo0.0 (Win) DF: 10.255.179.246 xe-2/1/0.0 (Win) DF: 10.10.2.1 RPA: 10.10.13.2 Group ranges: 224.1.1.0/24, 225.1.1.0/24 Interfaces: ge-0/0/1.0 (Lose) DF: 10.10.1.2 lo0.0 (Win) DF: 10.255.179.246 xe-2/1/0.0 (Lose) DF: 10.10.2.2
Displaying the PIM Interfaces
Purpose
Verify that the PIM interfaces have bidirectional-sparse-dense (SDB) mode assigned.
Action
user@R1> show pim interfaces
Instance: PIM.master Stat = Status, V = Version, NbrCnt = Neighbor Count, S = Sparse, D = Dense, B = Bidirectional, DR = Designated Router, P2P = Point-to-point link, Active = Bidirectional is active, NotCap = Not Bidirectional Capable Name Stat Mode IP V State NbrCnt JoinCnt(sg/*g) DR address ge-0/0/1.0 Up SDB 4 2 NotDR,Active 1 0/0 10.10.1.2 lo0.0 Up SDB 4 2 DR,Active 0 9901/100 10.255.179.246 xe-2/1/0.0 Up SDB 4 2 NotDR,Active 1 0/0 10.10.2.2
Checking the PIM Neighbors
Purpose
Check that the router detects that its neighbors are enabled for bidirectional PIM by verifying that the B option is displayed.
Action
user@R1> show pim neighbors
Instance: PIM.master B = Bidirectional Capable, G = Generation Identifier, H = Hello Option Holdtime, L = Hello Option LAN Prune Delay, P = Hello Option DR Priority, T = Tracking Bit Interface IP V Mode Option Uptime Neighbor addr ge-0/0/1.0 4 2 HPLGBT 00:06:46 10.10.1.2 xe-2/1/0.0 4 2 HPLGBT 00:06:46 10.10.2.2
Checking the Route to the Rendezvous Points
Purpose
Check the interface route to the rendezvous points.
Action
user@R1> show route 10.10.13.2
inet.0: 56 destinations, 56 routes (55 active, 0 holddown, 1 hidden) + = Active Route, - = Last Active, * = Both 10.10.13.0/24 *[OSPF/10] 00:04:35, metric 4 > to 10.10.1.2 via ge-0/0/1.0
user@R1> show route 10.10.1.3
inet.0: 56 destinations, 56 routes (55 active, 0 holddown, 1 hidden) + = Active Route, - = Last Active, * = Both 10.10.1.0/24 *[Direct/0] 00:06:25 > via ge-0/0/1.0
Verifying Multicast Routes
Purpose
Verify the multicast traffic route for each group.
For bidirectional PIM, the show multicast route extensive command shows the (*, G/prefix) forwarding routes and the list of interfaces that accept bidirectional PIM traffic.
Action
user@R1> show multicast route extensive
Family: INET Group: 224.0.0.0/4 Source: * Incoming interface list: lo0.0 ge-0/0/1.0 xe-4/1/0.0 Downstream interface list: ge-0/0/1.0 Session description: zeroconfaddr Statistics: 0 kBps, 0 pps, 0 packets Next-hop ID: 2097157 Incoming interface list ID: 559 Upstream protocol: PIM Route state: Active Forwarding state: Forwarding Cache lifetime/timeout: forever Wrong incoming interface notifications: 0 Group: 224.1.1.0/24 Source: * Incoming interface list: lo0.0 ge-0/0/1.0 Downstream interface list: ge-0/0/1.0 Session description: NOB Cross media facilities Statistics: 0 kBps, 0 pps, 0 packets Next-hop ID: 2097157 Incoming interface list ID: 579 Upstream protocol: PIM Route state: Active Forwarding state: Forwarding Cache lifetime/timeout: forever Wrong incoming interface notifications: 0 Group: 224.1.3.0/24 Source: * Incoming interface list: lo0.0 ge-0/0/1.0 xe-4/1/0.0 Downstream interface list: ge-0/0/1.0 Session description: NOB Cross media facilities Statistics: 0 kBps, 0 pps, 0 packets Next-hop ID: 2097157 Incoming interface list ID: 556 Upstream protocol: PIM Route state: Active Forwarding state: Forwarding Cache lifetime/timeout: forever Wrong incoming interface notifications: 0 Group: 225.1.1.0/24 Source: * Incoming interface list: lo0.0 ge-0/0/1.0 Downstream interface list: ge-0/0/1.0 Session description: Unknown Statistics: 0 kBps, 0 pps, 0 packets Next-hop ID: 2097157 Incoming interface list ID: 579 Upstream protocol: PIM Route state: Active Forwarding state: Forwarding Cache lifetime/timeout: forever Wrong incoming interface notifications: 0 Group: 225.1.3.0/24 Source: * Incoming interface list: lo0.0 ge-0/0/1.0 xe-4/1/0.0 Downstream interface list: ge-0/0/1.0 Session description: Unknown Statistics: 0 kBps, 0 pps, 0 packets Next-hop ID: 2097157 Incoming interface list ID: 556 Upstream protocol: PIM Route state: Active Forwarding state: Forwarding Cache lifetime/timeout: forever Wrong incoming interface notifications: 0
Meaning
For information about how the incoming and outgoing interface lists are derived, see the forwarding rules in RFC 5015.
Viewing Multicast Next Hops
Purpose
Verify that the correct accepting interfaces are shown in the incoming interface list.
Action
user@R1> show multicast next-hops
Family: INET ID Refcount KRefcount Downstream interface 2097157 10 5 ge-0/0/1.0 Family: Incoming interface list ID Refcount KRefcount Downstream interface 579 5 2 lo0.0 ge-0/0/1.0 556 5 2 lo0.0 ge-0/0/1.0 xe-4/1/0.0 559 3 1 lo0.0 ge-0/0/1.0 xe-4/1/0.0
Meaning
The nexthop IDs for the outgoing and incoming next hops are referenced directly in the show multicast route extensive command.