1
00:00:00,000 --> 00:00:06,000
welcome back, my name is David Bombal CCIE 1123

2
00:00:06,000 --> 00:00:10,000
and in this section, we're going to look at Variable Length Subnet Mask or VLSM

3
00:00:10,000 --> 00:00:12,000
and route summarization.

4
00:00:12,000 --> 00:00:15,000
VLSM allows us to better use IP addresses

5
00:00:15,000 --> 00:00:21,000
by allowing for Variable Length Subnet Mask on a single network.

6
00:00:21,000 --> 00:00:25,000
so what we're going to cover in this section is firstly VLSM

7
00:00:25,000 --> 00:00:28,000
once again Variable Length Subnet Mask, we're going to look at CIDR

8
00:00:28,000 --> 00:00:31,000
or classless Inter-Domain Routing

9
00:00:31,000 --> 00:00:33,000
I want to explain summarization and show you

10
00:00:33,000 --> 00:00:38,000
how you can summarize multiple routes into fewer or single a route.

11
00:00:38,000 --> 00:00:40,000
we're going to look at routing choices

12
00:00:40,000 --> 00:00:43,000
and how routers choose one route over another

13
00:00:43,000 --> 00:00:45,000
not just based on administrative distance

14
00:00:45,000 --> 00:00:49,000
but also based on the legnth of the  prefix match

15
00:00:49,000 --> 00:00:53,000
and then lastly we're going to look at issues regarding discontiguous networks.

16
00:00:53,000 --> 00:00:55,000
so Variable Length Subnet Mask

17
00:00:55,000 --> 00:01:00,000
allow us to have varying or variable mask throughout our network

18
00:01:00,000 --> 00:01:03,000
so for example, a classful network of 10

19
00:01:03,000 --> 00:01:06,000
will have a mask of /8 with the first octet

20
00:01:06,000 --> 00:01:08,000
10 is the network portion of the address

21
00:01:08,000 --> 00:01:11,000
and the last 3 octets, in other words, the last 24 bits

22
00:01:11,000 --> 00:01:13,000
is the host portion of the address.

23
00:01:13,000 --> 00:01:16,000
that classful network was subnetted

24
00:01:16,000 --> 00:01:21,000
we could, for instance, have a subnet of 10.1.1.0/24

25
00:01:21,000 --> 00:01:24,000
where 10.1.1 is the network portion of the address

26
00:01:24,000 --> 00:01:27,000
in other words, the most siginificant 24 bits

27
00:01:27,000 --> 00:01:32,000
or most significant 3 octets is the netwok portion and the last octet

28
00:01:32,000 --> 00:01:36,000
or least significant portion of the address is the host portion.

29
00:01:36,000 --> 00:01:43,000
we could also subnet a 10 network down to 10.1.0.0/16

30
00:01:43,000 --> 00:01:46,000
where half of the address is the network portion

31
00:01:46,000 --> 00:01:49,000
and half of the address is the host portion.

32
00:01:49,000 --> 00:01:52,000
please refer to the ICND 1 part of this course

33
00:01:52,000 --> 00:01:57,000
or my subnetting explained e-book, for lots of detail on subnetting.

34
00:01:57,000 --> 00:02:03,000
CIDR or Classless Inter-Domain Routing was introduced in 1993

35
00:02:03,000 --> 00:02:07,000
to replace the prior addressing architecture of classful networks.

36
00:02:07,000 --> 00:02:10,000
classful networks were not scalable

37
00:02:10,000 --> 00:02:14,000
classful networking introduce 3 classes of addresses

38
00:02:14,000 --> 00:02:18,000
for allocation of IP addresses to hosts and networking devices

39
00:02:18,000 --> 00:02:22,000
we had A B and C networks.

40
00:02:22,000 --> 00:02:29,000
so for instance 10.0.0.0/8 is an example of a classful A network.

41
00:02:29,000 --> 00:02:35,000
172.16.0.0/16 is an example of a class B network

42
00:02:35,000 --> 00:02:41,000
and 192.168.1.0/24 is an example of a class C network.

43
00:02:41,000 --> 00:02:44,000
the problem with this method is that you were forced to use

44
00:02:44,000 --> 00:02:50,000
for instances a /16 mask which gave you approximately 65000 host addresses

45
00:02:50,000 --> 00:02:53,000
or you could use a class C address like this

46
00:02:53,000 --> 00:02:56,000
which only gave you 254 host addresses.

47
00:02:56,000 --> 00:02:58,000
this scheme would have resulted

48
00:02:58,000 --> 00:03:02,000
in the quick extortion of IP addresses and inflexibility.

49
00:03:02,000 --> 00:03:06,000
so CIDR replaced this which is based on Variable Length Subnet Mask

50
00:03:06,000 --> 00:03:10,000
were masks can vary on arbitrary lengths

51
00:03:10,000 --> 00:03:12,000
so they allow for different size subnets

52
00:03:12,000 --> 00:03:17,000
so rather than being forced to use for instance 10.0.0.0/8

53
00:03:17,000 --> 00:03:25,000
you can also use 10.0.0.0/16 or 24 or 30 depending on the requirements

54
00:03:25,000 --> 00:03:29,000
for the number of subnets or hosts in your network

55
00:03:29,000 --> 00:03:37,000
or you can use for instance 10.1.1.0/27 or 10.1.2.0/26 and so forth and so on.

56
00:03:37,000 --> 00:03:40,000
so you could take a single class A address

57
00:03:40,000 --> 00:03:44,000
and subdivide it into multiple subnets based on your requirements.

58
00:03:44,000 --> 00:03:47,000
it's also important to note that in CIDR

59
00:03:47,000 --> 00:03:52,000
we don't just advertise a network, we advertise a routing prefix

60
00:03:52,000 --> 00:04:00,000
in other words, we would advertise 192.168.1.0/24 not just 192.168.1.0

61
00:04:00,000 --> 00:04:03,000
CIDR also allows for the summarization of addresses

62
00:04:03,000 --> 00:04:06,000
which I'm going to explain in more detail in a moment.

63
00:04:06,000 --> 00:04:09,000
but this is were we take multiple subnets

64
00:04:09,000 --> 00:04:12,000
and put them into a super net or summary network

65
00:04:12,000 --> 00:04:14,000
which will reduce routing table sizes.

66
00:04:14,000 --> 00:04:19,000
Variable Length Subnet Mask have many advantages

67
00:04:19,000 --> 00:04:23,000
including the better utilization of IP addresses and subnets.

68
00:04:23,000 --> 00:04:28,000
on a WAN link as an example only 2 IP addresses are required.

69
00:04:28,000 --> 00:04:30,000
1 IP address for 1 end of the link

70
00:04:30,000 --> 00:04:32,000
and another IP address for the other end of the link

71
00:04:32,000 --> 00:04:39,000
thus a /30 mask would be better in say a /16 or /24 mask.

72
00:04:39,000 --> 00:04:43,000
a /30 mask only support 2 hosts on that subnet

73
00:04:43,000 --> 00:04:48,000
and thats all that's required in the point-to-point scenario like this.

74
00:04:48,000 --> 00:04:52,000
a /24 mask for instance would support 254 hosts

75
00:04:52,000 --> 00:04:55,000
and that would be over kill on this specific link.

76
00:04:55,000 --> 00:04:58,000
so VLSM gives assist the administrator

77
00:04:58,000 --> 00:05:02,000
the ability to better utilize IP addresses and subnets.

78
00:05:02,000 --> 00:05:04,000
where we subnet down subnets

79
00:05:04,000 --> 00:05:09,000
to support the required number of IP addresses on that specific segment.

80
00:05:09,000 --> 00:05:12,000
so as an example, here we have subnets

81
00:05:12,000 --> 00:05:17,000
that are using a /27 mask, on the WAN links we are using /30 mask

82
00:05:17,000 --> 00:05:22,000
and for the instance at the headquarters we are using a /16 mask.

83
00:05:22,000 --> 00:05:25,000
it also allows us to implement better summarization

84
00:05:25,000 --> 00:05:30,000
and scalability of networks as rather than the entire world

85
00:05:30,000 --> 00:05:32,000
being forced to use a specific subnet mask

86
00:05:32,000 --> 00:05:37,000
we are able to use varying mask in our own networks

87
00:05:37,000 --> 00:05:41,000
and advertise summaries to other companies or to the Internet.

88
00:05:41,000 --> 00:05:44,000
so heres a simple network to explain the problem

89
00:05:44,000 --> 00:05:46,000
when summarization is not used.

90
00:05:46,000 --> 00:05:51,000
on the left hand side we have networks 10.1.1.0/24

91
00:05:51,000 --> 00:05:54,000
up to 10.1.2.200.0/24

92
00:05:54,000 --> 00:05:57,000
on the right hand side we have networks 10.2.1.0/24

93
00:05:57,000 --> 00:06:05,000
up to 10.2.200.0/24 now summarization is now implemented

94
00:06:05,000 --> 00:06:08,000
and let's say you're running a routeing protocol like RIP

95
00:06:08,000 --> 00:06:11,000
which advertises the entire routing table every 30 seconds

96
00:06:11,000 --> 00:06:14,000
you're going to have scenario like this

97
00:06:14,000 --> 00:06:16,000
with the router on the left-hand side

98
00:06:16,000 --> 00:06:21,000
advertises 200 routes every 30 seconds and the router on the router side

99
00:06:21,000 --> 00:06:25,000
also advertises 200 routes every 30 seconds.

100
00:06:25,000 --> 00:06:29,000
RIP will continually sends out its entire routing table

101
00:06:29,000 --> 00:06:32,000
every 30 seconds even though there are no changes.

102
00:06:32,000 --> 00:06:36,000
so 400 routes are advertised across this WAN link

103
00:06:36,000 --> 00:06:39,000
which is very inefficient, those routing updates

104
00:06:39,000 --> 00:06:42,000
consume a lot of bandwidth and don’t accomplish much

105
00:06:42,000 --> 00:06:44,000
because they will continuously be advertise

106
00:06:44,000 --> 00:06:46,000
even though there are no changes

107
00:06:46,000 --> 00:06:49,000
so it makes more sense to summarize the routes

108
00:06:49,000 --> 00:06:53,000
so on the left-hand side, we have 10.1.1.0

109
00:06:53,000 --> 00:06:56,000
all the way up to 10.1.200.0

110
00:06:56,000 --> 00:07:01,000
So these are subnets of the 10.1.0.0 network

111
00:07:01,000 --> 00:07:05,000
so we could summarize those 200 routes into a single route

112
00:07:05,000 --> 00:07:11,000
and on the left hand side 10.2.1.0 up to 10.2.200.0

113
00:07:11,000 --> 00:07:14,000
could be summarize as 10.2.0.0/16

114
00:07:14,000 --> 00:07:20,000
so rather than advertising 400 routes a single route from the left-hand side

115
00:07:20,000 --> 00:07:22,000
is advertised to the left-hand side.

116
00:07:22,000 --> 00:07:26,000
and a single route from right-hand side is advertised to the left-hand side

117
00:07:26,000 --> 00:07:29,000
With summarization what we are have looking for

118
00:07:29,000 --> 00:07:33,000
is most significant bits that are equal, in other words

119
00:07:33,000 --> 00:07:37,000
starting from the left-and side and working towards the right-hand side

120
00:07:37,000 --> 00:07:40,000
we look for bits that are the same

121
00:07:40,000 --> 00:07:43,000
so in the first octet all the subnets contain 10

122
00:07:43,000 --> 00:07:47,000
so that’s common, in the second octet all the subnets contain 1

123
00:07:47,000 --> 00:07:52,000
so that's common but in the 3rd octet the values vary from 1 - 200

124
00:07:52,000 --> 00:07:56,000
so it’s not as easy to see what’s in common

125
00:07:56,000 --> 00:07:59,000
so we could just summarize it as 10.1.0.00/16

126
00:07:59,000 --> 00:08:03,000
knowing that 10.1 is common throughout

127
00:08:03,000 --> 00:08:06,000
and the router over here will summarize all of those routes

128
00:08:06,000 --> 00:08:09,000
and only send out 1 advertisement

129
00:08:09,000 --> 00:08:13,000
the router on the left-hand side can still get to all of this subnets

130
00:08:13,000 --> 00:08:17,000
because they are subnets of this network

131
00:08:17,000 --> 00:08:20,000
so even though we've summarized routes

132
00:08:20,000 --> 00:08:23,000
we still have full connectivity throughout the network

133
00:08:23,000 --> 00:08:25,000
here’s some more complicated example

134
00:08:25,000 --> 00:08:30,000
assume that we have networks 172.16.32.0/24

135
00:08:30,000 --> 00:08:36,000
all the way up to 172.16.63.0/24

136
00:08:36,000 --> 00:08:40,000
now rather than this router advertising all of those networks

137
00:08:40,000 --> 00:08:47,000
can we summarize this network into 1 or at least a few summaries

138
00:08:47,000 --> 00:08:51,000
now to work this out you start from the most significant bits

139
00:08:51,000 --> 00:08:53,000
in other words, you start from the left-hand side

140
00:08:53,000 --> 00:08:58,000
and you look for what is common throughout all of this networks

141
00:08:58,000 --> 00:09:04,000
so in the first octet 172 is common, so we know that’s common

142
00:09:04,000 --> 00:09:10,000
16 is also common, so we know does far that the 1st 2 octets are common

143
00:09:10,000 --> 00:09:15,000
in the third octet, however, the numbers are changing

144
00:09:15,000 --> 00:09:20,000
so we have 32, 33, 34, 35, all the way up to 63

145
00:09:20,000 --> 00:09:24,000
so it's not as easy to visualize or see what’s common here

146
00:09:24,000 --> 00:09:27,000
so what we're going to do is we can convert the third octet

147
00:09:27,000 --> 00:09:37,000
into binary to look for common bits, so for example 32 = 0010 0000

148
00:09:37,000 --> 00:09:41,000
now obviously there’s no gap halfway through an octet

149
00:09:41,000 --> 00:09:45,000
I’ve just put the space here to try and make it easier to read

150
00:09:45,000 --> 00:09:50,000
so an octet consists of 8 binary values, 32 would look at follows

151
00:09:50,000 --> 00:09:53,000
now as soon as you convert into binary

152
00:09:53,000 --> 00:09:56,000
you should convert the remaining bits into binary as well

153
00:09:56,000 --> 00:09:59,000
now in this example, you don’t need to do that

154
00:09:59,000 --> 00:10:04,000
because you can see that the last octet contains just a 0

155
00:10:04,000 --> 00:10:11,000
but I’ve done it here for completeness, the second network is 172.16.33.0

156
00:10:11,000 --> 00:10:18,000
and 33 in binary looks as follows, 34 looks as follows, 35 looks as follows

157
00:10:18,000 --> 00:10:22,000
and I wouldn’t recommend that you convert all the addresses into binary

158
00:10:22,000 --> 00:10:24,000
I would just do say the first 3 or 4

159
00:10:24,000 --> 00:10:26,000
and then the last one to see what’s in common.

160
00:10:26,000 --> 00:10:31,000
in the real world, however, you may come across far more complicated examples

161
00:10:31,000 --> 00:10:34,000
and you may need to convert all the addresses into binary

162
00:10:34,000 --> 00:10:38,000
but at the CCNA level that may not be necessary.

163
00:10:38,000 --> 00:10:41,000
So once we’ve done that we can look for bits that are in common

164
00:10:41,000 --> 00:10:45,000
so the first binary 0 in the 3rd octet is common throughout

165
00:10:45,000 --> 00:10:51,000
the second binary 0 is also common throughout, the 3rd binary bit is a 1

166
00:10:51,000 --> 00:10:55,000
and that is common throughout, however, in the 4th binary bit position

167
00:10:55,000 --> 00:11:02,000
the values change as you can see here the first few networks have 0's

168
00:11:02,000 --> 00:11:05,000
but the last network has a 1 in the fourth binary bit position

169
00:11:05,000 --> 00:11:11,000
so we can draw a line to the right of all the bits that are common

170
00:11:11,000 --> 00:11:15,000
so as you can see here to the left of the line in the 3rd octet

171
00:11:15,000 --> 00:11:18,000
we have 001 in binary

172
00:11:18,000 --> 00:11:23,000
the remaining bits in binary are not common in other words bits vary.

173
00:11:23,000 --> 00:11:27,000
Now Cisco does not support discontiguous subnet masks

174
00:11:27,000 --> 00:11:33,000
so you can see these bits are not in common and these this bits are in common

175
00:11:33,000 --> 00:11:36,000
there has to be a contiguous grouping of common bits

176
00:11:36,000 --> 00:11:40,000
starting from the left-hand side moving from the right-hand side

177
00:11:40,000 --> 00:11:43,000
and as soon as there are bits that are not common

178
00:11:43,000 --> 00:11:47,000
you have to draw a line to make a differentiation between common bits

179
00:11:47,000 --> 00:11:49,000
and bits that are not common

180
00:11:49,000 --> 00:11:54,000
so we know now that the first octet is common, the second octet is common

181
00:11:54,000 --> 00:12:00,000
so 172.16 in the third octet, the first 3 binary bits are common

182
00:12:00,000 --> 00:12:05,000
so 001 now any bits that are not in common are just set to 0

183
00:12:05,000 --> 00:12:11,000
so notice, we’ve populate the remaining portion of the address with binary 0's

184
00:12:11,000 --> 00:12:14,000
and then we convert the  binary back to decimal

185
00:12:14,000 --> 00:12:17,000
so hopefully remember this from the ICND 1 course.

186
00:12:17,000 --> 00:12:23,000
So the first octet is 172, the second octet is 16

187
00:12:23,000 --> 00:12:28,000
the third octet if you convert this to decimal is equal to 32

188
00:12:28,000 --> 00:12:32,000
and the last octet converted to decimal is 0.

189
00:12:32,000 --> 00:12:37,000
So the summary address is 172.16.32.0

190
00:12:37,000 --> 00:12:41,000
The last step is to work out the bits that are in common

191
00:12:41,000 --> 00:12:45,000
now the first octet is in common and an octet is 8 bits

192
00:12:45,000 --> 00:12:49,000
the second octet is in common and that’s an additional 8 bits

193
00:12:49,000 --> 00:12:54,000
so thus far we have 8 bits + 8 bits in other words, 16 bits that are in common

194
00:12:54,000 --> 00:13:02,000
3 bits in the third octet are in common, so 8+8+3 will give you 19 bits in common

195
00:13:02,000 --> 00:13:10,000
thus the summary address for this subnets will be 172.16.32.0/19

196
00:13:10,000 --> 00:13:14,000
it’s a simple as that to work out summarization

197
00:13:14,000 --> 00:13:16,000
and I’m going to show you trick in a moment

198
00:13:16,000 --> 00:13:19,000
that allows you to work this out in the few seconds

199
00:13:19,000 --> 00:13:29,000
here’s another example, we have subnets 172.16.64.0/24 up to 172.16.127.0/24

200
00:13:29,000 --> 00:13:36,000
can these subnets be summarized into a single subnet or fewer subnets?

201
00:13:36,000 --> 00:13:40,000
so using the same process we start from the left-hand side

202
00:13:40,000 --> 00:13:42,000
and we look for bits that are in common

203
00:13:42,000 --> 00:13:47,000
in the first octet, we have 172 throughout all of those subnets

204
00:13:47,000 --> 00:13:51,000
so that’s common, in the second octet we have 16

205
00:13:51,000 --> 00:13:53,000
so that’s common throughout

206
00:13:53,000 --> 00:13:58,000
So we know that the first 2 octets 172.16 are common throughout

207
00:13:58,000 --> 00:14:01,000
but in the third octet the values are changing

208
00:14:01,000 --> 00:14:06,000
we’ve got 64, 65, 66, 67 all the way up to 127

209
00:14:06,000 --> 00:14:10,000
so that third octet we're going to convert to binary

210
00:14:10,000 --> 00:14:13,000
to be able to better see what’s in common

211
00:14:13,000 --> 00:14:20,000
so converting 64 into binary will give you 00100 0000

212
00:14:20,000 --> 00:14:26,000
65 will look as follows, 66 as this, 67 as that

213
00:14:26,000 --> 00:14:30,000
and you could convert a third octet of all of the subnets until you get a 127

214
00:14:30,000 --> 00:14:32,000
which looks as follows

215
00:14:32,000 --> 00:14:38,000
the last octet is a 0 in decimal which looks as follows in binary

216
00:14:38,000 --> 00:14:40,000
so now what we need to do is we need to look for the common bits

217
00:14:40,000 --> 00:14:44,000
so the common bits are once again 172.16

218
00:14:44,000 --> 00:14:50,000
and then the first binary 0 is in common throughout the subnets

219
00:14:50,000 --> 00:14:55,000
the second binary bit which is set to 1 is common throughout

220
00:14:55,000 --> 00:15:00,000
but the third binary bit is not common throughout notice there’s 0

221
00:15:00,000 --> 00:15:02,000
and then here there’s a binary 1

222
00:15:02,000 --> 00:15:05,000
so we can draw a line after the second binary bit

223
00:15:05,000 --> 00:15:09,000
to denote that everything to the left of the line is in common

224
00:15:09,000 --> 00:15:12,000
and everything to the right of the line is not in common

225
00:15:12,000 --> 00:15:16,000
so all of this is in common and all of this is not in common.

226
00:15:16,000 --> 00:15:23,000
therefore 172.16 in decimal, the first 2 octets are in common

227
00:15:23,000 --> 00:15:26,000
and the first 2 binary bits of the third octet are in common

228
00:15:26,000 --> 00:15:30,000
the remaining binary bits need to be set to 0's

229
00:15:30,000 --> 00:15:34,000
so filling the remaining binary bits is to 0 will look as follows

230
00:15:34,000 --> 00:15:36,000
and then converting the binary back to decimal

231
00:15:36,000 --> 00:15:41,000
will get 172 in the first octet, 16 in the second octet

232
00:15:41,000 --> 00:15:47,000
this is 64 in decimal, so the third octet is 64

233
00:15:47,000 --> 00:15:52,000
and the last octet binary 0's is equal to 0 in decimal

234
00:15:52,000 --> 00:16:01,000
so the address is 172.16.64.0 that is the summary network for all of these subnets.

235
00:16:01,000 --> 00:16:04,000
the last step is to count the number of bits in common

236
00:16:04,000 --> 00:16:08,000
the first octet is 8 bits, the second octet is 8 bits

237
00:16:08,000 --> 00:16:12,000
so that’s  16 bits in total followed by another 2 binary bits

238
00:16:12,000 --> 00:16:15,000
which gives you 18 bits in common

239
00:16:15,000 --> 00:16:19,000
so the first 18 bits are in common throughout all of this subnets

240
00:16:19,000 --> 00:16:25,000
so our final answer will be 172.16.64.0/18

241
00:16:25,000 --> 00:16:30,000
that is the summary network for all of the listed subnets.
