BSR (Bootstrap) is a protocol that is used to automatically find the RP (Rendezvous Point) in out multicast network. BSR is an open standard protocol, that means it works on MikroTik and on any other vendor that supports multicast. Cisco has a similar protocol which is called AutoRP and it is a Cisco proprietary protocol.
BSR uses two roles:
- Candidate BSR: this router collects information from all available RPs in the network and advertise it throughout the network.
- Candidate RP: These are routers who are advertising themselves that they want to become the RP.
On MikroTik, you see them clearly on PIM settings as the following:
Let’s speak more about the Candidate BSR.
The BSR router sends BSR messages on hop-by-hop basis by sending its packets to the multicast address 18.104.22.168 with TTL=1, that means that these packets will not be routed after received by the peer router because they have a TTL=1. Once the peer router(s) receive the message, it will re-send it on all other PIM-enabled interfaces.
The BSR messages contain information about the BSR itself and about the RP-to-group mappings.
To make it more clear for you, you can see below the drawing showing how the process happens:
Above you see that we have a network of 6 routers where R3 is the BSR. As being the BSR, R3 will send BSR messages on its interfaces, then all routers who received the BSR message will re-send them so at the end all routers in the network learn the information in the BSR messages.
Very important point to note, there can be only one active BSR in the network. In case in a network there is more than one BSR, then BSR routers will listen to the messages of the other BSR routers and the one who has the higher priority will become the active BSR. In case the priority is the same, then the router which has the highest IP address will become the BSR.
Now we know about the Candidate BSR, let’s check about the Candidate RP.
Candidate RPs are routers that want to become an RP by announcing themselves to the BSR. When a candidate RP receives a BSR message, It knows the source address of the BSR and it will send an RP announcement to the BSR as a unicast packet.
Let me show you this in a drawing:
Above you can see that R2 and R6 (who want to be the RP), after receiving the BSR message they have concluded the source IP address of the BSR which his 22.214.171.124 and they have sent him a unicast RP announcement saying that they want to be the RPs.
From his side, once the RP announcement are received by the BSR, he will build a list of all RPs and the multicast groups they serve. This is what is exactly group-to-RP mapping set.
After having this list built on the BSR, then he will include it in the BSR messages that he is sending them to the multicast enabled routers so all routers in the network will receive it.
Now that all multicast-enabled routers have received the BSR message having the list of routers that want to be the RP with their multicast group that they want to serve, then the multicast enabled routers will have to select the best RP from this list.
When you have multiple RPs, it may happen that those RPs want to serve the same multicast group. For example, you have 2 RPs that they want to serve the same multicast group which is 126.96.36.199. Then, which of the 2 RPs would the routers choose?
Here what happens:
- The routers look for the longest match on a multicast group. For example, if we have a multicast group of 188.8.131.52 and we have 2 RPs advertising themselves that they want to be the RP of this multicast group. One of the RPs is advertising himself to serve the 184.108.40.206/8 group range and another RP is advertising himself to serve the 220.127.116.11/24 group. In this case, the second RP will be selected because 18.104.22.168/24 has the longest match.
- When the 2 RPs advertise the same exact group (for example both serve 22.214.171.124), then the RP with the highest priority will be chosen.
Unlike the BSR candidate, the higher priority is the one which has the lower value.
- If the groups and priority ties, then the RP will be the one who has the highest IP address.
Enough of theory, let’s apply a LAB on this topic.