Setting Up a PIM-SM Bootstrap Router

Problem

You want to use PIM in sparse mode, not in dense mode, and have it dynamically determine RPs, and you want to use a standard method, not auto-RP.

Solution

Configure a PIM bootstrap router to dynamically set up RPs for the PIM domain. First, configure the routers that are candidates to be bootstrap routers:

	[edit protocols pim]
	aviva@RouterB# set rp bootstrap-priority 50
	aviva@RouterB# set interface all mode sparse
	
	[edit protocols pim]
	aviva@RouterA# set rp bootstrap-priority 50
	aviva@RouterA# set interface all mode sparse

Then, configure which routers are candidates to be RPs:

	[edit protocols pim]
	aviva@RouterA# set rp local address 192.168.13.1

	[edit protocols pim]
	aviva@RouterG# set rp local address 192.168.19.1
	aviva@RouterG# set interface all mode sparse

Discussion

PIM Version 2 supports a bootstrap protocol for dynamically learning the RPs in a PIM-SM domain and mapping multicast groups to RP addresses. A bootstrap router is responsible for constructing an RP set, which is a list of candidate RPs and the group prefixes that correspond to the RP set. The bootstrap router distributes this information in Bootstrap messages that are multicast to 224.0.0.13, which is the All-PIM-Routers group. Candidate RPs send Candidate RP Advertisement messages to announce their group prefixes to the elected bootstrap router. It is then the job of the elected bootstrap router to choose the RP for each group.

The PIM bootstrap protocol sets up a primary bootstrap router and a backup candidate bootstrap router, which is available in case the primary one goes down.

In this recipe, RouterA and RouterB act as the bootstrap routers, and RouterA and RouterG are the RPs. The set rp bootstrap-priority commands establish these two routers as the candidate bootstrap routers. The priority value ranks the likelihood for the router to actually become the bootstrap router. The value can be from 0 through 255, with a lower number representing a higher priority. However, setting the value to 0 makes the router ineligible to become the bootstrap router. The set rp local address commands on RouterA and RouterG configure these two routers as RPs. The commands in the recipe include the set mode sparse command to re-enforce the fact that the routers are running in sparse mode. If you are switching from auto-RP, which requires PIM to be in sparse-dense mode, make sure you change PIM back to sparse mode.

Verify that a bootstrap router has been elected. Both routers have the same priority for becoming bootstrap routers, so lets look on RouterA first:

	aviva@RouterA>  
show pim bootstrap
	Instance: PIM.master
	 
BSR Pri Local address Pri State Timeout
	192.168.13.1 50 192.168.13.1 50 Elected 57

The BSR column shows that 192.168.13.1 (RouterA) is the bootstrap router. The State column confirms that this router has been elected as the bootstrap router. Now check RouterB:

	aviva@RouterB> show pim bootstrap
	Instance: PIM.master
	BSR Pri Local address Pri State Timeout
	192.168.13.1 50 192.168.12.1 50 Candidate 124

The BSR column again shows that RouterA is the bootstrap router. The State column indicates that RouterB is the candidate bootstrap router. Why did RouterA win the bootstrap election? Because the bootstrap election priority is the same on both routers, the outcome is determined by choosing the router with the higher IP address.

Verify that the other routers know about the bootstrap router. We can look on RouterG:

	aviva@RouterG> show pim bootstrap
	Instance: PIM.master
	BSR Pri Local address Pri State Timeout
	192.168.13.1 50 192.168.19.1 0 InEligible 121

Again, you see this router knows that RouterA (192.168.13.1)is the bootstrap router. The Pri column shows that RouterGs priority to become the bootstrap router is 0, which means it can never become the bootstrap router. The State column confirms this (Ineligible). The show pim bootstrap command output on the RouterE is similar to that on RouterG.

Now check the RP status on the routers. This recipe configured RouterA and RouterG as RPs. We check RouterA first:

	aviva@RouterA> show pim rps inet
	Instance: PIM.master
	Address family INET
	RP address Type Holdtime Timeout Active 
groups Group prefixes
	192.168.13.1 bootstrap 150 None 3 224.0.0.0/4
	192.168.13.1 static 0 None 3 224.0.0.0/4

The first line shows that this router (192.168.13.1)has been elected as the RP by the bootstrap router. The statically configured RP, shown in the second line of the output, is inactive because its hold time, which is how long the RP should remain active, is 0.

This recipe also configures RouterG as a candidate RP, so check its RP status:

	aviva@RouterG> show pim rps inet
	Instance: PIM.master
	Address family INET
	RP address Type Holdtime Timeout Active groups Group prefixes
	192.168.13.1 bootstrap 150 150 3 224.0.0.0/4
	192.168.19.1 static 0 None 0 224.0.0.0/4

The first line in the output confirms that RouterA (192.168.13.1)is the RP, as elected by the bootstrap router. The second line of the output confirms that we statically configured RouterG to be an RP, but the hold-time value of 0 shows you that this configuration is not active.

See Also

Recipes 16.2 and 16.3


Router Configuration and File Management

Basic Router Security and Access Control

IPSec

SNMP

Logging

NTP

Router Interfaces

IP Routing

Routing Policy and Firewall Filters

RIP

IS-IS

OSPF

BGP

MPLS

VPNs

IP Multicast



JUNOS Cookbook
Junos Cookbook (Cookbooks (OReilly))
ISBN: 0596100140
EAN: 2147483647
Year: 2007
Pages: 290
Authors: Aviva Garrett

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net