1
00:00:08,480 --> 00:00:10,780
 So now, congratulations.

2
00:00:10,780 --> 00:00:13,200
 If you've been watching this series
 from the very beginning, you have

3
00:00:13,200 --> 00:00:16,140
 made it to the very last video.

4
00:00:16,140 --> 00:00:19,480
 If your head isn't spinning at this
 point, your eyes aren't glazed over,

5
00:00:19,480 --> 00:00:24,340
 good job. So now we're going to do our
 final thing, which is going back

6
00:00:24,340 --> 00:00:25,680
 to the bootstrap router.

7
00:00:25,680 --> 00:00:28,900
 And the last video I ended with, well,
 what if a router has received a

8
00:00:28,900 --> 00:00:30,960
 bootstrap message?

9
00:00:30,960 --> 00:00:37,120
 It sees multiple RPs in there, all with
 the same priority, all servicing

10
00:00:37,120 --> 00:00:41,700
 or all offering their services
 for the same range of groups.

11
00:00:41,700 --> 00:00:46,460
 How does that individual router decide
 which one is going to be selected?

12
00:00:46,460 --> 00:00:53,220
 So we know that individual
 routers make that decision.

13
00:00:53,220 --> 00:00:55,620
 So here's our other start.

14
00:00:55,620 --> 00:01:00,300
 Whoever has the lowest
 priority wins.

15
00:01:00,300 --> 00:01:03,700
 And if the priority is the same,
 a hash function is performed.

16
00:01:03,700 --> 00:01:07,800
 And this is where it gets
 really sort of complex.

17
00:01:07,800 --> 00:01:14,120
 So remember how when I was configuring
 the candidate BSR, that there was

18
00:01:14,120 --> 00:01:17,940
 a field in there that sort of glossed
 over that was called the hash mask

19
00:01:17,940 --> 00:01:21,880
 length. And I said the
 default was zero.

20
00:01:21,880 --> 00:01:26,560
 Well, that is specifically
 for use in this scenario.

21
00:01:26,560 --> 00:01:29,080
 So let's talk about that.

22
00:01:29,080 --> 00:01:32,220
 So before I go to the next slide, just
 keep in mind this bullet point

23
00:01:32,220 --> 00:01:37,960
 right here. With a default hash mask
 length of zero, a single rendezvous

24
00:01:37,960 --> 00:01:43,200
 point will always be selected for
 every group destination address.

25
00:01:43,200 --> 00:01:50,440
 So what that's saying is, by default,
 these rendezvous everything in the

26
00:01:50,440 --> 00:01:53,100
 class D range, I want to do it.

27
00:01:53,100 --> 00:01:58,520
 So if I've learned about, let's say,
 four rendezvous points who are all

28
00:01:58,520 --> 00:02:02,780
 like that in my bootstrap message, with
 a hash mask length of zero that

29
00:02:02,780 --> 00:02:07,460
 I've learned from the BSR, I, as an
 individual router, will only select

30
00:02:07,460 --> 00:02:12,440
 one of those RPs from the list, and
 I will use him for everything.

31
00:02:12,440 --> 00:02:17,720
 By changing that number from a zero
 to something else, it gives you the

32
00:02:17,720 --> 00:02:19,880
 ability to do a little
 bit of load balance in.

33
00:02:19,880 --> 00:02:23,140
 For example, by changing that number
 to something else, your local router

34
00:02:23,140 --> 00:02:33,060
 could say, okay, for the group range
 of 225.001 through 225.008, I will

35
00:02:33,060 --> 00:02:35,260
 select RP number one.

36
00:02:35,260 --> 00:02:42,020
 For 225.009 through 225.012,
 I'll select RP number two.

37
00:02:42,020 --> 00:02:47,600
 That can happen by modifying your hash
 mask length on the BSR itself.

38
00:02:47,600 --> 00:02:51,500
 But if you leave at the default of
 zero, only a single RP will be used

39
00:02:51,500 --> 00:02:53,540
 for everything. And maybe
 you don't care.

40
00:02:53,540 --> 00:02:57,080
 Maybe that's fine for you.

41
00:02:57,080 --> 00:03:04,600
 Okay, so I'm just putting this
 in here as sort of a reference.

42
00:03:04,600 --> 00:03:10,520
 The algorithm is really just kind of nasty
 and complex, but here's basically

43
00:03:10,520 --> 00:03:18,780
 the idea, is that when a router receives
 a bootstrap message, if you see

44
00:03:18,780 --> 00:03:21,980
 two RPs in there, let's just
 take two as an example.

45
00:03:21,980 --> 00:03:25,420
 Two RPs that have the same weight, the
 same priority, they're both saying,

46
00:03:25,420 --> 00:03:27,560
 I want to be the RP for
 the exact same group.

47
00:03:27,560 --> 00:03:29,520
 Okay, here's what this local
 router is going to do.

48
00:03:29,520 --> 00:03:32,640
 He's going to create a hash,
 which is a long number.

49
00:03:32,640 --> 00:03:35,580
 He's going to do that by his going
 to say, okay, I'm going to take the

50
00:03:35,580 --> 00:03:38,360
 group number that you guys
 are saying you want to do.

51
00:03:38,360 --> 00:03:43,360
 I'm going to take your name, your IP
 address, and I'm going to take the

52
00:03:43,360 --> 00:03:48,440
 hash mask length that was supplied via
 the BSR up a little higher in that

53
00:03:48,440 --> 00:03:51,240
 message. And I'm going to combine all
 that stuff into this really complex

54
00:03:51,240 --> 00:03:54,900
 formula, and that's going to spit
 out this number, this hash value.

55
00:03:54,900 --> 00:04:01,400
 Whoever ends up with the highest hash,
 that's the one I'm going to select.

56
00:04:01,400 --> 00:04:09,260
 Now, it's very unlikely that two RPs
 will hash to the exact same number,

57
00:04:09,260 --> 00:04:14,100
 but if that theoretically happened, which
 is theoretically possible, whichever

58
00:04:14,100 --> 00:04:17,760
 RP had the highest IP address
 would be the winner.

59
00:04:17,760 --> 00:04:21,460
 Okay, so what does this
 all really translate to?

60
00:04:21,460 --> 00:04:23,540
 First of all, how can I
 tell who's the winner?

61
00:04:23,540 --> 00:04:28,020
 Because when I went back to, let's
 go back to this command here, show

62
00:04:28,020 --> 00:04:34,520
 IP PIM mapping, didn't tell me, it just
 said, okay, these are the potential

63
00:04:34,520 --> 00:04:36,620
 RPs I could use.

64
00:04:36,620 --> 00:04:40,080
 Well, here's a really nice command
 you can use to actually figure out,

65
00:04:40,080 --> 00:04:43,760
 even before the multicast happens, you
 might say, well, if the multicast

66
00:04:43,760 --> 00:04:52,240
 of, oh, let's say 228.8.8 ever happens
 in the future, which are PMI going

67
00:04:52,240 --> 00:04:55,440
 to use? What, who's going
 to have the highest hash?

68
00:04:55,440 --> 00:05:03,160
 Well, you can use this nice command
 for that, show IP PIM RP dash hash.

69
00:05:03,160 --> 00:05:06,160
 And then the number, like for example,
 for this particular group, 228

70
00:05:06,160 --> 00:05:14,300
.70.87.65, you can see that 2.7.22,
 he ended up with a slightly higher

71
00:05:14,300 --> 00:05:17,560
 hash value than 3733.

72
00:05:17,560 --> 00:05:23,900
 So 2722 will be selected as the rendezvous
 point for this particular group.

73
00:05:23,900 --> 00:05:26,140
 Let's do that over here
 on my real router.

74
00:05:26,140 --> 00:05:30,920
 Show IP PIM RP dash hash.

75
00:05:30,920 --> 00:05:34,360
 Let's just pick a number, 227.777.

76
00:05:34,360 --> 00:05:41,300
 And you can see here that
 2424 will be the winner.

77
00:05:41,300 --> 00:05:43,320
 He's got the larger hash value.

78
00:05:43,320 --> 00:05:57,740
 Now, any number I put into this command
 should always result to 2424 being

79
00:05:57,740 --> 00:06:00,980
 the winner. It shouldn't
 really matter.

80
00:06:00,980 --> 00:06:04,040
 Yep, he's the winner for that.

81
00:06:04,040 --> 00:06:08,200
 Yep, he's the winner for that.

82
00:06:08,200 --> 00:06:12,540
 So you can see he's pretty much
 hashing to the exact same value.

83
00:06:12,540 --> 00:06:17,920
 Because what this hash mask length refers
 to, it's kind of like a subnet

84
00:06:17,920 --> 00:06:19,940
 mask or a wildcard mask.

85
00:06:19,940 --> 00:06:24,020
 And what it's masking
 is the group.

86
00:06:24,020 --> 00:06:29,320
 But when the mask is all zeroes, that
 basically says, don't even consider

87
00:06:29,320 --> 00:06:31,640
 the group when creating the hash.

88
00:06:31,640 --> 00:06:35,100
 None of the bits in
 the group matter.

89
00:06:35,100 --> 00:06:44,680
 Just hash against the IP address.

90
00:06:44,680 --> 00:06:50,080
 And you can now you might say, OK, well,
 I want to start doing some load

91
00:06:50,080 --> 00:06:53,580
 bouncing like you talked about, Keith,
 I want to have some groups hash

92
00:06:53,580 --> 00:06:57,920
 to RP number one, other groups
 hash to RP number two.

93
00:06:57,920 --> 00:06:59,700
 How do I do that?

94
00:06:59,700 --> 00:07:04,820
 Well, that's where it gets to be more
 of an art form than a science, unless

95
00:07:04,820 --> 00:07:08,500
 you really like algorithms
 and math, which I don't.

96
00:07:08,500 --> 00:07:16,900
 So in this particular case, I'm
 going to change the mask.

97
00:07:16,900 --> 00:07:22,420
 OK, it was router eight, eight
 dot two dot eight dot eight.

98
00:07:22,420 --> 00:07:25,180
 Now, let me go over to him.

99
00:07:25,180 --> 00:07:32,720
 So what I'm going to do is I'm going
 to change his hash mask length.

100
00:07:32,720 --> 00:07:35,260
 And this command right
 here from a zero.

101
00:07:35,260 --> 00:07:41,060
 Something else. I'm going
 to say of that 32 bit.

102
00:07:41,060 --> 00:07:45,060
 Multicast address.

103
00:07:45,060 --> 00:07:53,960
 I want you to hash 31 of
 them, 31 of those bits.

104
00:07:53,960 --> 00:07:57,300
 So theoretically, what this should do,
 because there's only one bit left,

105
00:07:57,300 --> 00:08:00,620
 well, that one bit can only
 be a zero or one, right?

106
00:08:00,620 --> 00:08:05,540
 So theoretically, what this should do
 is evenly divide the load between

107
00:08:05,540 --> 00:08:09,160
 the two RPs. And I'm not sure how it's
 going to do that, but it should

108
00:08:09,160 --> 00:08:12,660
 sort of divide it between
 both RPs now.

109
00:08:12,660 --> 00:08:18,420
 Let's find out. Let's
 go back to router two.

110
00:08:18,420 --> 00:08:21,520
 Has he learned of the
 new hash length?

111
00:08:21,520 --> 00:08:24,860
 Yep. So right here, he's learned
 of the new length.

112
00:08:24,860 --> 00:08:27,040
 So now let's just start
 testing this.

113
00:08:27,040 --> 00:08:34,660
 226, 888. OK, it looks like 2424
 is going to be the RP for that.

114
00:08:34,660 --> 00:08:43,140
 What about 889? Still
 looks like R4, 881.

115
00:08:43,140 --> 00:08:49,060
 Now we come up with some slightly different
 numbers, but it's still R4,

116
00:08:49,060 --> 00:08:55,060
 888.11. At some point,
 there we go.

117
00:08:55,060 --> 00:09:02,520
 OK, so 888.12. Now we've got the second
 RP, 8383 coming up with the higher

118
00:09:02,520 --> 00:09:06,360
 number. So like I said, it's
 kind of an art form.

119
00:09:06,360 --> 00:09:10,060
 You just have to play around on the
 BSR with different numbers for the

120
00:09:10,060 --> 00:09:11,760
 hash mask length.

121
00:09:11,760 --> 00:09:16,840
 But I think it's virtually impossible
 to predict in advance to come up

122
00:09:16,840 --> 00:09:21,340
 with a number where you can predict,
 OK, if I use 31 or if I use 30, this

123
00:09:21,340 --> 00:09:24,400
 RP will be used or that
 RP will be used.

124
00:09:24,400 --> 00:09:27,180
 You know, if you go into the formula
 in the PIM specification, you might

125
00:09:27,180 --> 00:09:28,540
 be able to figure that out.

126
00:09:28,540 --> 00:09:32,540
 But that's a lot more work
 than I would care to do.

127
00:09:32,540 --> 00:09:38,600
 And so that's how RPs are selected based
 on these bootstrap messages that

128
00:09:38,600 --> 00:09:40,280
 have been received.

129
00:09:40,280 --> 00:09:44,120
 So let's just summarize all
 this and then we'll be done.

130
00:09:44,120 --> 00:09:47,700
 So with the PIM bootstrap router, number
 one, it's an internet standard

131
00:09:47,700 --> 00:09:51,660
 developed for PIM version two.

132
00:09:51,660 --> 00:09:57,320
 Number two, you still have the concept
 of candidate RPs and a BSR.

133
00:09:57,320 --> 00:09:59,620
 The BSR has to be
 discovered first.

134
00:09:59,620 --> 00:10:02,220
 It's elected. There's only one.

135
00:10:02,220 --> 00:10:05,900
 Everybody finds out
 who the BSR is.

136
00:10:05,900 --> 00:10:10,360
 And then the candidate RPs all
 unicast their messages to him.

137
00:10:10,360 --> 00:10:15,900
 Next, that BSR creates what's called
 a bootstrap message, which has a

138
00:10:15,900 --> 00:10:20,420
 full listing of every single RP he's
 ever heard from and the group and

139
00:10:20,420 --> 00:10:26,000
 the priority for that RP that gets
 dispersed among the entire network.

140
00:10:26,000 --> 00:10:31,980
 And lastly, when an individual router
 actually needs to use an RP because

141
00:10:31,980 --> 00:10:36,420
 it needs to register something and
 needs to send a join, it goes into

142
00:10:36,420 --> 00:10:40,260
 that bootstrap message, which is it
 has stored that in memory, like we

143
00:10:40,260 --> 00:10:44,840
 see here. It performs the hash value,
 the hash function, and then whichever

144
00:10:44,840 --> 00:10:48,880
 RP end up with the highest hash, that's
 the one that's used right now

145
00:10:48,880 --> 00:10:53,800
 for this specific need to register
 something or to send a join.

146
00:10:53,800 --> 00:10:58,620
 And that summarizes this concept
 of the PIM bootstrap router.
