Multicast PIM Bootstrap (BSR)

BSR (Bootstrap) is similar to Cisco’s AutoRP, it’s a protocol that we use to automatically find the RP (Rendezvous Point) in our multicast network. BSR however, is a standard and included in PIMv2, unlike AutoRP which is a Cisco proprietary protocol.

BSR uses two roles:

  • Candidate BSR: this is the router that collects information from all available RPs in the network and advertises is throughout the network. It’s function is similar to the mapping agent in AutoRP.
  • Candidate RP: these are routers that are advertising themselves who want to become the RP.

Candidate BSR

The BSR sends messages on a hop-by-hop basis and does so by sending its packets to multicast address 224.0.0.13 with a TTL of 1. These multicast packets have a local scope thanks to their TTL so they are not routed.When a multicast router receives the message, it will do an RPF check on the source address of the BSR and will re-send the message on all other PIM-enabled interfaces. This is a big difference with the mapping agent of AutoRP which uses multicast where we require dense mode flooding to flood the packets of the mapping agent throughout the network.

The BSR messages will contain information about the BSR and of course the RP-to-group mappings.

Here is an illustration of this process:

bsr bootstrap router topology

Above we have a small network with six routers. R3 is the BSR and sending BSR messages on its interfaces. All other routers will re-send these messages which allows the entire network to learn the information in the BSR messages.

There can be only one active BSR in the network. BSR routers will listen for messages from other BSR routers, the BSR router with the highest priority will become the active BSR. The highest BSR priority is 255 (thehigher the better). When the priority is the same then the router with the highest IP address will become the BSR.

Candidate RP

Routers that want to become an RP are called candidate RPs and they have to announce themselves to the BSR. When a candidate RP receives a BSR message, it will learn the source address of the BSR and it will register itself using unicast packets. This is another difference with AutoRP where the candidate RPs announce themselves using multicast packets.

Multicast PIM Bootstrap RP Announcement

Above you can see two routers, R2 and R6 who would like to become the RP. They are sending their RP announcement packets to the unicast IP address of the BSR (3.3.3.3).

Once the BSR receives the RP announcements, it will build a list of all RPs and the multicast groups they want to serve. This is called the group-to-RP mapping set.

The BSR will then include this list in its BSR messages so that all multicast routers receive it. One big difference with the mapping agent of AutoRP is that the BSR router does not select the RP to use. It will advertise all RPs with the multicast groups that they want to serve, it’s up to the multicast router to select the RP it wants to use.

RP Selection

The multicast routers will receive multiple group-to-rp mapping sets from the BSR and they’ll have to select the best RP from this list. When you have multiple RPs then it’s very likely that you have multiple RPs that want to serve the same multicast groups. Here’s how we select the RP:

  1. We look for the longest match on a multicast group. For example, let’s say we want to join multicast group 239.1.1.1. One RP advertises itself that it serves the 239.0.0.0/8 group range and another RP wants to serve the 239.1.1.0/24 range. In this case, we will prefer the second RP since 239.1.1.0/24 is the longest match.
  2. When two RPs advertise the exact same groups then we will prefer the RP with the highest priority. Unlike the BSR selection, highest priority for RP selection means the lowest priority value (0 is the highest priority). The priority is a value we can configure on the RP.
  3. If the groups and priority on the RP are the same then we will look at the highest hash value from a hash function to decide what the best RP is. I’ll explain the hash function in a bit.
  4. If the groups, priority, and hash value of all RPs is the same then the RP with the highest IP address will be preferred.

Hash Function

The hash function is used by all multicast routers to map multicast group addresses to different RPs.

for the sake of completeness, this is what the hash function looks like:

Value(G,M,C(i))=
   (1103515245 * ((1103515245 * (G&M)+12345) XOR C(i)) + 12345) mod 2^31

The input for this function is:

  • G: the multicast group address.
  • M: a hash mask value.
  • C: the IP address of the RP.

Don’t get scared by the formula above, the router will do the calculations for you 🙂

The hash mask is a 32-bit value and advertised in the BSR messages. The router takes these values, puts them in the hash function and returns a hash value. The RP with the highest hash value will be selected.

By default, the hash mask value is 0 which means that the hash value is only calculated based on the IP address of the RP.

Things become interesting when we change the hash mask. The remaining bits in the hash mask decide how many groups we map to an RP.

The hash mask is a 32-bit value so if you use a 31-bit mask, we only have one bit left. With a single bit, we can create two values which means that two multicast groups will be mapped to one RP.

If you use a 30-bit hash mask, we have two bits left. With two bits, we can create four values which means that four multicast groups will be mapped to one RP.

Let me give you an example:

We have two RPs with the same priority, both want to become the RP for the entire 239.0.0.0/8 multicast range. We have multicast listeners who want to receive traffic for the following multicast groups:

  • 239.0.0.0
  • 239.0.0.1
  • 239.0.0.2
  • 239.0.0.3
  • 239.0.0.4
  • 239.0.0.5
  • 239.0.0.6
  • 239.0.0.7

Without a hash mask, all eight multicast groups will be assigned to one RP.

With a 31-bit hash mask, we assign two multicast groups to each RP:

RP1:

  • 239.0.0.0
  • 239.0.0.1

RP2:

  • 239.0.0.2
  • 239.0.0.3

RP1:

  • 239.0.0.4
  • 239.0.0.5

RP2:

  • 239.0.0.6
  • 239.0.0.7

If you use a 30-bit hash mask, we assign four multicast groups to each RP:

RP1:

  • 239.0.0.0
  • 239.0.0.1
  • 239.0.0.2
  • 239.0.0.3

RP2:

  • 239.0.0.4
  • 239.0.0.5
  • 239.0.0.6
  • 239.0.0.7

This is a nice way to configure load balancing between RPs. The hash mask that you choose decides how many groups you map to one RP.

Configuration

You have now learned the basics of BSR. Let’s see it in action! I will use the following topology for this example:

multicast pim bsr topology

Teaser


First we enable multicast routing on all routers::

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 660 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

510 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Tags: , ,


Forum Replies

  1. Rene,

    Based on the below entry:
    "Above you can see that R2 is receiving the RP announcement traffic from R1. Let’s check R3:

    R3#show ip mroute | begin 224
    (*, 224.0.1.39), 00:05:28/00:01:57, RP 0.0.0.0, flags: DC
      Incoming interface: Null, RPF nbr 0.0.0.0
      Outgoing interface list:
        GigabitEthernet0/2, Forward/Sparse, 00:05:28/00:01:57
    
    (*, 224.0.1.40), 00:27:34/stopped, RP 0.0.0.0, flags: DPL
      Incoming interface: Null, RPF nbr 0.0.0.0
      Outgoing interface list: Null
    
    (2.2.2.2, 224.0.1.40), 00:04:29/00:02:29, flags: PLT
      <strong>Incoming interface: 
    ... Continue reading in our forum

  2. @Hans redundancy is no problem but you should configure multiple RPs AND multiple mapping agents. Otherwise a single mapping agent is your single point of failure.

    @Abhishek CGMP is pretty old so it’s possible that this command is not even needed in your network. It’s used for within your L2 domain:

    ... Continue reading in our forum

  3. Hello Parajuli

    Although Rene doesn’t go into details in the lesson, a router is configured as a mapping agent using the following command:

    ip pim send-rp-discovery

    You can find out more about this command at this Cisco Command Reference Documentation (search for ip pim send-rp-discovery.

    It is possible to configure two or more mapping agents within a network. Each will function independently. Engineers often misunderstand how multiple mapping agents interact and often believe that there is more complexity to such a configuration than there really is. Receiv

    ... Continue reading in our forum

  4. Hello Deep

    Routers will only play the role of a RP or an MA if they are statically configured as such. Specifically, to configure a router as a candidate RP and thus to have it announce itself as such, the following command must be present:

    ip pim send-rp-announce

    To configure a router as an MA the following command must be present:

    ip pim send-rp-discovery

    The above are configured on R1 and R2 respectively. R4 is not configured to announce itself as an RP so it will not do so. R4 does however recieve the information from the mapping agent because of the fol

    ... Continue reading in our forum

19 more replies! Ask a question or join the discussion by visiting our Community Forum