#

Tuesday, November 12, 2019

PIM Sparse Mode, BSR (Bootstrap) Protocol & Configuration

PIM Sparse mode requires a Rendezvous Point (RP) to work. We have to manually configure one or many RPs. Then we can manually configure all the routers in the network to tell what is the RP or we can use 2 protocols to advertise the RP information.

1. Cisco Auto-RP
2. BSR (Bootstrap Router)

In this post I am going to explore BSR protocol. To get basic idea about PIM Sparse mode and Cisco Auto-RP please go though the following posts.

PIM Sparse Mode Operation & Behavior of Multicast Routing Table
PIM Sparse Mode, Cisco Auto-RP Protocol & Configuration

Let's take the following topology..
















In BSR, there are 2 special router roles.

1. Candidate RP
2. Candidate BSR

Candidate RP of course is the Rendezvous Point, Candidate BSR is the router which collects information about the RPs and advertise it to other routers. So it is the most important router in the BSR enabled network much like the Mapping Agent of Cisco Auto-RP.

One big difference is that the Mapping Agent is prioritizing the RP for a group and advertise while BSR is advertising all learned RP info and individual router should select the best RP for a group.

Another thing is that packets from BSR which is received by a directly connected router is resent to all it's other interfaces back so that all the routers in the network gets the update. So no need of additional Dense mode / listener command like in Cisco Auto-RP.

Also the RPs do not advertise them selves until they get a packet from BSR. When they get a packet from a BSR, they send a unicast update to BSR about their RP info.

Assume all other PIM Sparse mode configuration (interface level) is already completed, and note that unlike the manual configuration, the loopback interface which is configured as the RP and BSR must be enabled with PIM Sparse mode too..

Let's configure R1 as the RP and R2 as the BSR.

R1(config)#ip pim rp-candidate loopback 0

Let's see the routing table now.













There is no change in it as expected..

Now let's configure the BSR..

R2(config)#ip pim bsr-candidate loopback 0

Let's see the routing table of R2 now,













Well there is nothing new here too.. Looks like it is just working at backend..

Note :-
When BSR is configured, it sends packets to 224.0.0.13 which is the All PIM enabled routers.
TTL is 1 for this packet but when one router receives it, it forwards it as a new packet to all it's neighbors.. This is not shown in the multicast routing table.

Even at R4, the show ip pim rp mapping and show ip pim bsr-router will show the same info as all other routers.









Note :-
If you extend the BSR command further you will see a value called hash mask.





This is used to load balance between several RPs. As an example if configured 31, two multicast groups will be assigned to one RP. If configured 30, 4 multicast groups will be assigned to one RP.

2 and 4 of above comes with 2^[32 - (value configured)]

Let's say there are 2 RPs.

If hash 31 is configured for all the multicast addresses,
224.0.0.1 will be served by first RP
224.0.0.2 will be served by first RP
224.0.0.3 will be served by second RP
224.0.0.4 will be served by second RP

If hash 30 is configured for all the multicast addresses,
224.0.0.1 will be served by first RP
224.0.0.2 will be served by first RP
224.0.0.3 will be served by first RP
224.0.0.4 will be served by first RP
224.0.0.5 will be served by second RP
224.0.0.6 will be served by second RP
224.0.0.7 will be served by second RP
224.0.0.8 will be served by second RP

Note :- 
RP selection by routers.

When the RP list is received by a router, following order will select the best RP for a group.

1. Longest match (ex:- RP for 224.0.0.0/30 is preferred over 224.0.0.0/4)
2. Lowest priority configured for RP
3. Highest hash value
4. Highest IP address

No comments:

Post a Comment