1
00:00:00,000 --> 00:00:02,430
Let's talk about how multicast routing works.

2
00:00:02,430 --> 00:00:04,710
Now, multicast routing is when you send traffic

3
00:00:04,710 --> 00:00:08,670
to a Class D IP address, known as the multicast group.

4
00:00:08,670 --> 00:00:11,730
Now, our goal here is for us only to send traffic out once

5
00:00:11,730 --> 00:00:13,290
and then have all of the devices who want

6
00:00:13,290 --> 00:00:15,000
to get that information.

7
00:00:15,000 --> 00:00:17,760
And anybody who doesn't want to get it doesn't get it.

8
00:00:17,760 --> 00:00:20,160
Now, there are two primary ways of doing this.

9
00:00:20,160 --> 00:00:22,170
The first is known as IGMP

10
00:00:22,170 --> 00:00:24,510
or the Internet Group Management Protocol.

11
00:00:24,510 --> 00:00:28,620
The second is PIM or Protocol Independent Multicast.

12
00:00:28,620 --> 00:00:31,800
We'll cover both of those in detail in this lesson.

13
00:00:31,800 --> 00:00:34,920
Now, IGMP or the Internet Group Management Protocol,

14
00:00:34,920 --> 00:00:35,880
is used by clients

15
00:00:35,880 --> 00:00:38,550
and routers so that the routers know which interfaces have

16
00:00:38,550 --> 00:00:40,560
multicast receivers on them.

17
00:00:40,560 --> 00:00:42,930
This allows a client to join a multicast group

18
00:00:42,930 --> 00:00:44,370
and then be able to receive messages

19
00:00:44,370 --> 00:00:45,203
that they wanted to get

20
00:00:45,203 --> 00:00:47,040
through this multicast group.

21
00:00:47,040 --> 00:00:49,560
Now, there are three variants of IGMP.

22
00:00:49,560 --> 00:00:52,230
The first one was IGMP version one,

23
00:00:52,230 --> 00:00:55,170
and then it was improved to version two and version three.

24
00:00:55,170 --> 00:00:56,280
Now, in version one,

25
00:00:56,280 --> 00:00:57,990
clients could request joining the group

26
00:00:57,990 --> 00:00:59,460
and every 60 seconds,

27
00:00:59,460 --> 00:01:01,140
their router would go back and say,

28
00:01:01,140 --> 00:01:02,280
Do you still want to be here?

29
00:01:02,280 --> 00:01:03,330
Do you still want to be here?

30
00:01:03,330 --> 00:01:04,346
Do you still want to be here?

31
00:01:04,346 --> 00:01:05,910
And you could see how that causes a lot

32
00:01:05,910 --> 00:01:07,560
of unnecessary traffic.

33
00:01:07,560 --> 00:01:09,540
In version two, clients had the ability

34
00:01:09,540 --> 00:01:11,760
to send leave messages to exit the group

35
00:01:11,760 --> 00:01:12,720
when they want it.

36
00:01:12,720 --> 00:01:14,810
Essentially, now the router's just going to assume you want

37
00:01:14,810 --> 00:01:16,320
to be there until you told it

38
00:01:16,320 --> 00:01:17,970
that you didn't want to be there.

39
00:01:17,970 --> 00:01:19,500
Finally, in version three,

40
00:01:19,500 --> 00:01:20,831
the client could request a multicast

41
00:01:20,831 --> 00:01:23,700
from only a specific server and then choose,

42
00:01:23,700 --> 00:01:25,740
Did I want to get my messages from one server

43
00:01:25,740 --> 00:01:27,150
and not from server two?

44
00:01:27,150 --> 00:01:28,260
That was allowed.

45
00:01:28,260 --> 00:01:29,093
It would also allow

46
00:01:29,093 --> 00:01:30,780
for source specific multicast,

47
00:01:30,780 --> 00:01:32,970
which is what this server request was called.

48
00:01:32,970 --> 00:01:35,160
Now this allowed us to have multiple video streams

49
00:01:35,160 --> 00:01:37,350
to a single multicast stream.

50
00:01:37,350 --> 00:01:38,520
Now, almost like you'd have

51
00:01:38,520 --> 00:01:39,660
with cable TV where you could

52
00:01:39,660 --> 00:01:41,340
dial into the channel you wanted,

53
00:01:41,340 --> 00:01:43,290
that's kind of what we were doing here digitally

54
00:01:43,290 --> 00:01:45,510
using the IGMP protocol.

55
00:01:45,510 --> 00:01:47,760
So how did IGMP work?

56
00:01:47,760 --> 00:01:49,560
Well, let's look at this diagram.

57
00:01:49,560 --> 00:01:51,960
If I have a server that wants to send out traffic,

58
00:01:51,960 --> 00:01:53,460
it's going to send it to the router

59
00:01:53,460 --> 00:01:56,040
and the IP address of the multicast group.

60
00:01:56,040 --> 00:02:00,150
In this case, 239.2.1.3.

61
00:02:00,150 --> 00:02:02,520
Right now, the router is not sending it anywhere

62
00:02:02,520 --> 00:02:04,830
because nobody's requested that information.

63
00:02:04,830 --> 00:02:08,280
But if PC2 sends a request message to router one,

64
00:02:08,280 --> 00:02:10,491
now router one is going to remember that PC2

65
00:02:10,491 --> 00:02:13,110
wants to be a part of this multicast group.

66
00:02:13,110 --> 00:02:14,761
Anything it gets as part of this multicast group

67
00:02:14,761 --> 00:02:17,880
will now be sent over to PC2 as well,

68
00:02:17,880 --> 00:02:19,380
and only going to go to PC2

69
00:02:19,380 --> 00:02:21,780
because remember, PC1 and PC3

70
00:02:21,780 --> 00:02:23,820
didn't ask to be a part of this group.

71
00:02:23,820 --> 00:02:25,980
So hopefully you can see the benefits of this now.

72
00:02:25,980 --> 00:02:27,087
In this example here, we have PC1

73
00:02:27,087 --> 00:02:30,600
and PC3 that wanted to be in there

74
00:02:30,600 --> 00:02:32,280
and they could join the group as well,

75
00:02:32,280 --> 00:02:35,040
and then the server can send it out to all three people

76
00:02:35,040 --> 00:02:37,830
with only one copy of the message being sent in.

77
00:02:37,830 --> 00:02:39,600
That's the benefit of this.

78
00:02:39,600 --> 00:02:41,520
The second thing we want to look at is PIM

79
00:02:41,520 --> 00:02:44,220
or the Protocol Independent Multicast.

80
00:02:44,220 --> 00:02:46,530
PIM is going to allow multicast traffic to be routed

81
00:02:46,530 --> 00:02:48,750
between multicast enabled routers.

82
00:02:48,750 --> 00:02:52,020
Multicast routing forms this multicast distribution tree,

83
00:02:52,020 --> 00:02:54,210
and it really works between all these different routers

84
00:02:54,210 --> 00:02:56,970
together because IGMP was more about clients

85
00:02:56,970 --> 00:02:57,960
and servers together

86
00:02:57,960 --> 00:02:59,700
where PIM is much more focused on

87
00:02:59,700 --> 00:03:01,530
the routing part of this.

88
00:03:01,530 --> 00:03:03,331
Now, there are two different modes in PIM.

89
00:03:03,331 --> 00:03:04,920
There's a PIM-DM,

90
00:03:04,920 --> 00:03:06,150
which is the dense mode,

91
00:03:06,150 --> 00:03:08,670
or PIM-SM or sparse mode.

92
00:03:08,670 --> 00:03:11,160
In dense mode, we're going to use a periodic flood

93
00:03:11,160 --> 00:03:14,160
and prune behavior to form an optimal distribution tree

94
00:03:14,160 --> 00:03:15,720
across these routers.

95
00:03:15,720 --> 00:03:17,640
And this can actually cause a negative performance

96
00:03:17,640 --> 00:03:19,080
impact on your network.

97
00:03:19,080 --> 00:03:21,000
And because of this, in modern networks,

98
00:03:21,000 --> 00:03:22,500
we really don't use it.

99
00:03:22,500 --> 00:03:24,810
Instead, we tend to use sparse mode.

100
00:03:24,810 --> 00:03:26,940
With PM-SM or sparse mode,

101
00:03:26,940 --> 00:03:30,362
this is going to use a shared distribution tree initially,

102
00:03:30,362 --> 00:03:33,030
and then it's going to over time, find the best tree.

103
00:03:33,030 --> 00:03:34,110
Now when we start out,

104
00:03:34,110 --> 00:03:36,570
that shared distribution tree is not optimal,

105
00:03:36,570 --> 00:03:37,590
but over time,

106
00:03:37,590 --> 00:03:39,450
we're going to learn where the best tree is

107
00:03:39,450 --> 00:03:40,500
and then start switching over

108
00:03:40,500 --> 00:03:42,871
to the shortest path tree or SPT

109
00:03:42,871 --> 00:03:45,960
once it determines what that actually is.

110
00:03:45,960 --> 00:03:47,550
Now, I know that's a lot of words,

111
00:03:47,550 --> 00:03:49,170
so let's take a look at some pictures

112
00:03:49,170 --> 00:03:51,660
to hopefully understand how this works a little better.

113
00:03:51,660 --> 00:03:54,720
Here you can see PIM-DM or dense mode.

114
00:03:54,720 --> 00:03:57,330
Now what happens in dense mode is to begin with,

115
00:03:57,330 --> 00:04:00,270
it has this flooding procedure where all of the routers,

116
00:04:00,270 --> 00:04:01,800
every router in this entire network,

117
00:04:01,800 --> 00:04:03,660
is getting all of the information.

118
00:04:03,660 --> 00:04:05,670
Now, as you can see, that's a lot of traffic,

119
00:04:05,670 --> 00:04:08,730
but we do already have the optimal way of getting there from

120
00:04:08,730 --> 00:04:11,940
that multicast source to the multicast destination

121
00:04:11,940 --> 00:04:15,360
because it comes all of it at once with that big flood.

122
00:04:15,360 --> 00:04:17,070
So in this case, it would be going down

123
00:04:17,070 --> 00:04:18,959
the left side of that pyramid.

124
00:04:18,959 --> 00:04:20,040
Now, as we go through,

125
00:04:20,040 --> 00:04:22,650
it's going to then prune off all the non-optimal routes,

126
00:04:22,650 --> 00:04:25,320
which in this case is all the routers off to the right.

127
00:04:25,320 --> 00:04:26,767
It sends out this prune message saying,

128
00:04:26,767 --> 00:04:28,537
"Hey, I don't need this traffic.

129
00:04:28,537 --> 00:04:30,217
I'm not part of the optical route.

130
00:04:30,217 --> 00:04:31,440
Get me out of here."

131
00:04:31,440 --> 00:04:32,700
And that way they can go ahead

132
00:04:32,700 --> 00:04:34,470
and drop those from the route.

133
00:04:34,470 --> 00:04:36,510
Now, after sending all these pruning messages,

134
00:04:36,510 --> 00:04:39,060
we now have the optimal path between the source router

135
00:04:39,060 --> 00:04:41,070
and the last hop router, giving us

136
00:04:41,070 --> 00:04:43,350
the quickest and easiest path.

137
00:04:43,350 --> 00:04:45,540
Now, this is the idea of flood and prune,

138
00:04:45,540 --> 00:04:47,730
and this happens every three minutes trying

139
00:04:47,730 --> 00:04:50,130
to find a more optimal route, which again,

140
00:04:50,130 --> 00:04:52,500
can cause a really big performance hit to your network

141
00:04:52,500 --> 00:04:54,870
because we're flooding it every three minutes,

142
00:04:54,870 --> 00:04:57,300
and this is why we don't really use it much anymore.

143
00:04:57,300 --> 00:04:59,580
Instead, we use sparse mode.

144
00:04:59,580 --> 00:05:01,980
Now, sparse mode or PIM-SM

145
00:05:01,980 --> 00:05:04,380
is going to use a shared distribution tree.

146
00:05:04,380 --> 00:05:07,020
Essentially, when the server sends out the first message,

147
00:05:07,020 --> 00:05:09,270
the router's going to send it over any way it can

148
00:05:09,270 --> 00:05:12,330
to get it from the first router down to the last hop.

149
00:05:12,330 --> 00:05:13,890
In this case, it's going to be sending it

150
00:05:13,890 --> 00:05:15,690
to this rendezvous point first

151
00:05:15,690 --> 00:05:17,880
and then down to the last router hop.

152
00:05:17,880 --> 00:05:19,530
Now, this isn't the optimal path,

153
00:05:19,530 --> 00:05:20,640
but it is a path,

154
00:05:20,640 --> 00:05:22,050
and that's okay and it works.

155
00:05:22,050 --> 00:05:24,480
And so this information is going to start to flow.

156
00:05:24,480 --> 00:05:26,190
As you can see, there are four

157
00:05:26,190 --> 00:05:28,440
of the six routers that got the information.

158
00:05:28,440 --> 00:05:30,780
Two of them weren't even bothered to get the information,

159
00:05:30,780 --> 00:05:32,550
and so they saved all that resources

160
00:05:32,550 --> 00:05:34,230
because they weren't being flooded.

161
00:05:34,230 --> 00:05:35,063
Now, over time,

162
00:05:35,063 --> 00:05:37,290
we figured out this was a suboptimal path

163
00:05:37,290 --> 00:05:38,910
and instead it would be a lot quicker

164
00:05:38,910 --> 00:05:41,040
to go down the left hand side of the diagram.

165
00:05:41,040 --> 00:05:43,020
So we're going to start switching over to that,

166
00:05:43,020 --> 00:05:44,970
getting rid of all these unused branches

167
00:05:44,970 --> 00:05:48,000
and then going to the shortest path tree, SPT.

168
00:05:48,000 --> 00:05:50,430
And that now gives us the optimal tree in this shared

169
00:05:50,430 --> 00:05:53,550
distribution tree just like we had before in dense mode.

170
00:05:53,550 --> 00:05:55,950
Now you can see how this uses a lot less resources than

171
00:05:55,950 --> 00:05:57,030
dense mode did,

172
00:05:57,030 --> 00:05:59,070
but it did take us a little bit more time

173
00:05:59,070 --> 00:06:00,870
to find that optimal way.

174
00:06:00,870 --> 00:06:02,370
That's the trade off here.

175
00:06:02,370 --> 00:06:04,320
Do you want to get optimal right from the start,

176
00:06:04,320 --> 00:06:05,730
but flood your network?

177
00:06:05,730 --> 00:06:07,140
Or can you wait for optimal

178
00:06:07,140 --> 00:06:08,880
and use a lot less resources?

179
00:06:08,880 --> 00:06:09,929
In most modern networks,

180
00:06:09,929 --> 00:06:12,840
we choose PIM-SM or sparse mode

181
00:06:12,840 --> 00:06:14,520
because it works better on our networks

182
00:06:14,520 --> 00:06:16,410
and uses less resources upfront,

183
00:06:16,410 --> 00:06:18,390
and eventually gets that optimal distribution

184
00:06:18,390 --> 00:06:19,540
that we're looking for.

