So now, congratulations.
If you've been watching this series from the very beginning, you have
made it to the very last video.
If your head isn't spinning at this point, your eyes aren't glazed over,
good job. So now we're going to do our final thing, which is going back
to the bootstrap router.
And the last video I ended with, well, what if a router has received a
bootstrap message?
It sees multiple RPs in there, all with the same priority, all servicing
or all offering their services for the same range of groups.
How does that individual router decide which one is going to be selected?
So we know that individual routers make that decision.
So here's our other start.
Whoever has the lowest priority wins.
And if the priority is the same, a hash function is performed.
And this is where it gets really sort of complex.
So remember how when I was configuring the candidate BSR, that there was
a field in there that sort of glossed over that was called the hash mask
length. And I said the default was zero.
Well, that is specifically for use in this scenario.
So let's talk about that.
So before I go to the next slide, just keep in mind this bullet point
right here. With a default hash mask length of zero, a single rendezvous
point will always be selected for every group destination address.
So what that's saying is, by default, these rendezvous everything in the
class D range, I want to do it.
So if I've learned about, let's say, four rendezvous points who are all
like that in my bootstrap message, with a hash mask length of zero that
I've learned from the BSR, I, as an individual router, will only select
one of those RPs from the list, and I will use him for everything.
By changing that number from a zero to something else, it gives you the
ability to do a little bit of load balance in.
For example, by changing that number to something else, your local router
could say, okay, for the group range of 225.001 through 225.008, I will
select RP number one.
For 225.009 through 225.012, I'll select RP number two.
That can happen by modifying your hash mask length on the BSR itself.
But if you leave at the default of zero, only a single RP will be used
for everything. And maybe you don't care.
Maybe that's fine for you.
Okay, so I'm just putting this in here as sort of a reference.
The algorithm is really just kind of nasty and complex, but here's basically
the idea, is that when a router receives a bootstrap message, if you see
two RPs in there, let's just take two as an example.
Two RPs that have the same weight, the same priority, they're both saying,
I want to be the RP for the exact same group.
Okay, here's what this local router is going to do.
He's going to create a hash, which is a long number.
He's going to do that by his going to say, okay, I'm going to take the
group number that you guys are saying you want to do.
I'm going to take your name, your IP address, and I'm going to take the
hash mask length that was supplied via the BSR up a little higher in that
message. And I'm going to combine all that stuff into this really complex
formula, and that's going to spit out this number, this hash value.
Whoever ends up with the highest hash, that's the one I'm going to select.
Now, it's very unlikely that two RPs will hash to the exact same number,
but if that theoretically happened, which is theoretically possible, whichever
RP had the highest IP address would be the winner.
Okay, so what does this all really translate to?
First of all, how can I tell who's the winner?
Because when I went back to, let's go back to this command here, show
IP PIM mapping, didn't tell me, it just said, okay, these are the potential
RPs I could use.
Well, here's a really nice command you can use to actually figure out,
even before the multicast happens, you might say, well, if the multicast
of, oh, let's say 228.8.8 ever happens in the future, which are PMI going
to use? What, who's going to have the highest hash?
Well, you can use this nice command for that, show IP PIM RP dash hash.
And then the number, like for example, for this particular group, 228
.70.87.65, you can see that 2.7.22, he ended up with a slightly higher
hash value than 3733.
So 2722 will be selected as the rendezvous point for this particular group.
Let's do that over here on my real router.
Show IP PIM RP dash hash.
Let's just pick a number, 227.777.
And you can see here that 2424 will be the winner.
He's got the larger hash value.
Now, any number I put into this command should always result to 2424 being
the winner. It shouldn't really matter.
Yep, he's the winner for that.
So you can see he's pretty much hashing to the exact same value.
Because what this hash mask length refers to, it's kind of like a subnet
mask or a wildcard mask.
And what it's masking is the group.
But when the mask is all zeroes, that basically says, don't even consider
the group when creating the hash.
None of the bits in the group matter.
Just hash against the IP address.
And you can now you might say, OK, well, I want to start doing some load
bouncing like you talked about, Keith, I want to have some groups hash
to RP number one, other groups hash to RP number two.
How do I do that?
Well, that's where it gets to be more of an art form than a science, unless
you really like algorithms and math, which I don't.
So in this particular case, I'm going to change the mask.
OK, it was router eight, eight dot two dot eight dot eight.
Now, let me go over to him.
So what I'm going to do is I'm going to change his hash mask length.
And this command right here from a zero.
Something else. I'm going to say of that 32 bit.
Multicast address.
I want you to hash 31 of them, 31 of those bits.
So theoretically, what this should do, because there's only one bit left,
well, that one bit can only be a zero or one, right?
So theoretically, what this should do is evenly divide the load between
the two RPs. And I'm not sure how it's going to do that, but it should
sort of divide it between both RPs now.
Let's find out. Let's go back to router two.
Has he learned of the new hash length?
Yep. So right here, he's learned of the new length.
So now let's just start testing this.
226, 888. OK, it looks like 2424 is going to be the RP for that.
What about 889? Still looks like R4, 881.
Now we come up with some slightly different numbers, but it's still R4,
888.11. At some point, there we go.
OK, so 888.12. Now we've got the second RP, 8383 coming up with the higher
number. So like I said, it's kind of an art form.
You just have to play around on the BSR with different numbers for the
hash mask length.
But I think it's virtually impossible to predict in advance to come up
with a number where you can predict, OK, if I use 31 or if I use 30, this
RP will be used or that RP will be used.
You know, if you go into the formula in the PIM specification, you might
be able to figure that out.
But that's a lot more work than I would care to do.
And so that's how RPs are selected based on these bootstrap messages that
have been received.
So let's just summarize all this and then we'll be done.
So with the PIM bootstrap router, number one, it's an internet standard
developed for PIM version two.
Number two, you still have the concept of candidate RPs and a BSR.
The BSR has to be discovered first.
It's elected. There's only one.
Everybody finds out who the BSR is.
And then the candidate RPs all unicast their messages to him.
Next, that BSR creates what's called a bootstrap message, which has a
full listing of every single RP he's ever heard from and the group and
the priority for that RP that gets dispersed among the entire network.
And lastly, when an individual router actually needs to use an RP because
it needs to register something and needs to send a join, it goes into
that bootstrap message, which is it has stored that in memory, like we
see here. It performs the hash value, the hash function, and then whichever
RP end up with the highest hash, that's the one that's used right now
for this specific need to register something or to send a join.
And that summarizes this concept of the PIM bootstrap router.