1
1

00:00:00,570  -->  00:00:02,940
<v ->Alright, now that we got those computer mathematics</v>
2

2

00:00:02,940  -->  00:00:06,760
under our belt, let's dive into the concept of subnetting.
3

3

00:00:06,760  -->  00:00:08,800
Subnetting is where we can take a large network
4

4

00:00:08,800  -->  00:00:11,150
and we split it up into smaller networks.
5

5

00:00:11,150  -->  00:00:14,690
When we do this, this is all about logical IP addressing.
6

6

00:00:14,690  -->  00:00:16,550
The default classful subnet mask
7

7

00:00:16,550  -->  00:00:20,610
is rarely going to be the optimal subnet for our subnet size.
8

8

00:00:20,610  -->  00:00:24,120
So, instead, we use subnet masks to modify the subnets
9

9

00:00:24,120  -->  00:00:26,930
and create networks that are much better in scope.
10

10

00:00:26,930  -->  00:00:28,820
For instance, let's say I gave you a network
11

11

00:00:28,820  -->  00:00:31,380
of 10 dot something dot something dot something,
12

12

00:00:31,380  -->  00:00:33,220
this is a class A address, that means
13

13

00:00:33,220  -->  00:00:37,560
there are 16.7 million IP addresses in that range.
14

14

00:00:37,560  -->  00:00:39,050
You may have a large network,
15

15

00:00:39,050  -->  00:00:42,760
but your network is probably not 16.7 million clients.
16

16

00:00:42,760  -->  00:00:45,130
So, we would want to create subnets
17

17

00:00:45,130  -->  00:00:48,100
that allow us to borrow bits from the original host portion
18

18

00:00:48,100  -->  00:00:50,490
and then we can add them into the network portion
19

19

00:00:50,490  -->  00:00:52,840
to make smaller networks for us.
20

20

00:00:52,840  -->  00:00:57,550
So, for example, if I had a network like 10.0.0.0/8,
21

21

00:00:57,550  -->  00:00:59,840
that is a classful class A subnet,
22

22

00:00:59,840  -->  00:01:02,560
and it has 16.7 million hosts.
23

23

00:01:02,560  -->  00:01:04,410
But I probably need something like
24

24

00:01:04,410  -->  00:01:07,700
a couple of hundred hosts, maybe 256 of them.
25

25

00:01:07,700  -->  00:01:08,790
Well, if I wanted to do that,
26

26

00:01:08,790  -->  00:01:12,630
I might use the class C subnet mask of slash 24
27

27

00:01:12,630  -->  00:01:14,020
and use that, instead.
28

28

00:01:14,020  -->  00:01:17,270
By using 10.0.0.0/24,
29

29

00:01:17,270  -->  00:01:20,890
that's going to give me 256 IPs in that subnet,
30

30

00:01:20,890  -->  00:01:22,960
and that means, those other 16 million
31

31

00:01:22,960  -->  00:01:24,750
can be used by other people.
32

32

00:01:24,750  -->  00:01:26,630
Then, maybe I'm going to create a second subnet,
33

33

00:01:26,630  -->  00:01:31,570
like 10.0.1.0/24, and then I can create a third subnet
34

34

00:01:31,570  -->  00:01:36,570
with 10.0.2.0/24, and now I've used three subnets
35

35

00:01:36,610  -->  00:01:40,900
of 256 IPs each, and I still have millions of leftover IPs
36

36

00:01:40,900  -->  00:01:42,710
that I can subnet out later.
37

37

00:01:42,710  -->  00:01:45,040
This is why it's really important to use subnets,
38

38

00:01:45,040  -->  00:01:47,960
because it's an efficient use of the IP addresses you have,
39

39

00:01:47,960  -->  00:01:50,540
instead of just using the classful default.
40

40

00:01:50,540  -->  00:01:51,800
Even in your home network,
41

41

00:01:51,800  -->  00:01:53,440
if you're using a class C address
42

42

00:01:53,440  -->  00:01:58,310
of something like 192.168.1.0/24,
43

43

00:01:58,310  -->  00:02:00,880
this gives you 256 possibilities,
44

44

00:02:00,880  -->  00:02:02,790
but you probably only have five or 10 devices
45

45

00:02:02,790  -->  00:02:04,400
on your home network.
46

46

00:02:04,400  -->  00:02:06,530
Now, by doing subnets, this is going to allow us
47

47

00:02:06,530  -->  00:02:08,680
to create additional VLANs in subnets
48

48

00:02:08,680  -->  00:02:11,750
and allow separation of our networks for better security
49

49

00:02:11,750  -->  00:02:14,330
and giving us better bandwidth control.
50

50

00:02:14,330  -->  00:02:16,020
Here on the screen you can see a chart
51

51

00:02:16,020  -->  00:02:19,600
that has the addresses for the class A, B, and C subnets
52

52

00:02:19,600  -->  00:02:20,950
and their default masks,
53

53

00:02:20,950  -->  00:02:23,040
which should be a review for you at this point.
54

54

00:02:23,040  -->  00:02:24,810
Now, on the right side, you're going to see
55

55

00:02:24,810  -->  00:02:26,870
the assignable number of IP addresses,
56

56

00:02:26,870  -->  00:02:30,220
which is for class A, of 16.7 million addresses,
57

57

00:02:30,220  -->  00:02:33,640
for class B, 65,000 plus IP addresses,
58

58

00:02:33,640  -->  00:02:37,360
and class C, 254 usable IP addresses,
59

59

00:02:37,360  -->  00:02:39,900
that is a lot of IP addresses.
60

60

00:02:39,900  -->  00:02:41,700
Now, we may want to start nicking those down
61

61

00:02:41,700  -->  00:02:43,030
into usable chunks,
62

62

00:02:43,030  -->  00:02:45,550
and that is what we're going to use subnetting for.
63

63

00:02:45,550  -->  00:02:48,540
If we're using private IPs, this really isn't a big deal,
64

64

00:02:48,540  -->  00:02:50,210
because they don't cost me anything.
65

65

00:02:50,210  -->  00:02:53,760
But with public IPs, every public IP I paid for,
66

66

00:02:53,760  -->  00:02:55,400
and that's money out of my pocket,
67

67

00:02:55,400  -->  00:02:56,450
and you want to minimize that
68

68

00:02:56,450  -->  00:02:58,210
to only getting the ones you need.
69

69

00:02:58,210  -->  00:03:02,870
For example, my ISP charges $5 per month for a static IP.
70

70

00:03:02,870  -->  00:03:07,080
If I need one, that's $5, if I need 10, that's $50,
71

71

00:03:07,080  -->  00:03:09,330
if I need 100, that's $500,
72

72

00:03:09,330  -->  00:03:11,540
and so, that can add up pretty quickly, right?
73

73

00:03:11,540  -->  00:03:14,000
By subnetting, it allows me to just get the things
74

74

00:03:14,000  -->  00:03:16,700
that I need and the fewer IPs that I need.
75

75

00:03:16,700  -->  00:03:18,140
Now, how do we do this?
76

76

00:03:18,140  -->  00:03:21,010
Well, that's what we use a subnet mask for.
77

77

00:03:21,010  -->  00:03:22,720
We talked about class A, class B,
78

78

00:03:22,720  -->  00:03:24,800
and class C default subnet masks
79

79

00:03:24,800  -->  00:03:26,320
back when we talked about it before,
80

80

00:03:26,320  -->  00:03:28,310
and you'll see those on the screen in red.
81

81

00:03:28,310  -->  00:03:32,370
They are the slash eight, slash 16, and slash 24.
82

82

00:03:32,370  -->  00:03:34,120
Now, when you convert those to binary,
83

83

00:03:34,120  -->  00:03:36,410
you can see that they're filled by all the octets
84

84

00:03:36,410  -->  00:03:40,830
with either all ones or all zeros, making them classful.
85

85

00:03:40,830  -->  00:03:42,530
Now, the ones on the bottom of the screen,
86

86

00:03:42,530  -->  00:03:46,460
from 25 down to slash 30, are going to be smaller subnets.
87

87

00:03:46,460  -->  00:03:48,250
These are called classless subnets
88

88

00:03:48,250  -->  00:03:49,740
because they're going to use different things
89

89

00:03:49,740  -->  00:03:53,510
besides all ones or all zeros in that octet.
90

90

00:03:53,510  -->  00:03:55,490
Now, as you can see, we're borrowing bits
91

91

00:03:55,490  -->  00:03:58,040
from the host portion and making all those zeros
92

92

00:03:58,040  -->  00:04:00,230
and taking some of those by adding them over
93

93

00:04:00,230  -->  00:04:02,310
into the network portion, as well.
94

94

00:04:02,310  -->  00:04:05,030
And so, this borrowing is what we're doing with subnetting.
95

95

00:04:05,030  -->  00:04:06,520
If you don't get it yet, don't worry,
96

96

00:04:06,520  -->  00:04:07,800
we are going to dig deeper into it
97

97

00:04:07,800  -->  00:04:09,760
as we continue through this lesson.
98

98

00:04:09,760  -->  00:04:11,430
Now, let's take a look at some formulas
99

99

00:04:11,430  -->  00:04:13,490
that we're going to need to understand for calculating
100

100

00:04:13,490  -->  00:04:16,930
the number of subnets and the number of assignable hosts.
101

101

00:04:16,930  -->  00:04:19,110
If I'm calculating the number of subnets,
102

102

00:04:19,110  -->  00:04:21,340
the formula is two to the s power,
103

103

00:04:21,340  -->  00:04:24,560
where s is the number of borrowed bits from the host.
104

104

00:04:24,560  -->  00:04:26,710
So, when I start taking those zeros from the host
105

105

00:04:26,710  -->  00:04:28,346
and turning them to ones to make them
106

106

00:04:28,346  -->  00:04:30,610
be part of the network portion,
107

107

00:04:30,610  -->  00:04:33,450
that is the s that we're talking about here.
108

108

00:04:33,450  -->  00:04:36,670
For instance, if I'm using a slash 25 as my network,
109

109

00:04:36,670  -->  00:04:38,840
I'm borrowing one bit from the host space
110

110

00:04:38,840  -->  00:04:41,070
and putting it into the network space.
111

111

00:04:41,070  -->  00:04:43,240
Now, this would make it two to the one
112

112

00:04:43,240  -->  00:04:45,560
and that would give me two, and so that tells me
113

113

00:04:45,560  -->  00:04:48,980
I can have two subnets by using a slash 25.
114

114

00:04:48,980  -->  00:04:49,890
Now, if I'm looking at the number
115

115

00:04:49,890  -->  00:04:51,580
of assignable IP addresses,
116

116

00:04:51,580  -->  00:04:55,180
this is going to be two to the number of host bits minus two.
117

117

00:04:55,180  -->  00:04:57,300
So, in my case of a slash 25 network,
118

118

00:04:57,300  -->  00:05:00,150
there are 32 total bits in the address.
119

119

00:05:00,150  -->  00:05:03,500
I have 25 of those being assigned for the network portion,
120

120

00:05:03,500  -->  00:05:05,790
leaving me with seven host bits.
121

121

00:05:05,790  -->  00:05:09,500
So, if I take two to the seventh and then I minus two,
122

122

00:05:09,500  -->  00:05:14,500
I get 128 minus two, or 126 available.
123

123

00:05:14,550  -->  00:05:17,220
Now, why do I have to have that minus two there?
124

124

00:05:17,220  -->  00:05:19,240
This is a concept that a lot of students miss,
125

125

00:05:19,240  -->  00:05:21,330
so, really pay attention to it.
126

126

00:05:21,330  -->  00:05:24,790
Every network out there has to have two IP addresses
127

127

00:05:24,790  -->  00:05:25,860
to be a network.
128

128

00:05:25,860  -->  00:05:27,780
The first is known as the network ID,
129

129

00:05:27,780  -->  00:05:31,020
and it's the first IP in the range for that network.
130

130

00:05:31,020  -->  00:05:33,090
And the other one is a broadcast ID,
131

131

00:05:33,090  -->  00:05:35,670
which is the last IP in the network.
132

132

00:05:35,670  -->  00:05:37,520
So, no matter what network you choose,
133

133

00:05:37,520  -->  00:05:40,850
you always have to sacrifice the first one and the last one.
134

134

00:05:40,850  -->  00:05:43,680
The first one is your network ID or network name,
135

135

00:05:43,680  -->  00:05:46,110
and your last one is your broadcast.
136

136

00:05:46,110  -->  00:05:49,250
Now, anytime you calculate this number of usable IPs,
137

137

00:05:49,250  -->  00:05:52,050
it's always going to be the number minus two,
138

138

00:05:52,050  -->  00:05:54,310
because you have to take away the network name
139

139

00:05:54,310  -->  00:05:56,090
and the broadcast name.
140

140

00:05:56,090  -->  00:05:59,510
Let's take a look at classful versus subnetted networks.
141

141

00:05:59,510  -->  00:06:01,060
A classful network, if you remember,
142

142

00:06:01,060  -->  00:06:05,180
are the ones like slash eight, slash 16, slash 24.
143

143

00:06:05,180  -->  00:06:10,180
And if I use the example of 192.168.1.0/24,
144

144

00:06:10,200  -->  00:06:12,980
this is a classical class C network,
145

145

00:06:12,980  -->  00:06:16,300
there is one network here because it is two to the zero,
146

146

00:06:16,300  -->  00:06:20,810
because I borrowed zero bits, because slash 24 is classful.
147

147

00:06:20,810  -->  00:06:23,200
This means that there is two to the eight
148

148

00:06:23,200  -->  00:06:27,530
minus two assignable IPs, which gives me 256 IPs,
149

149

00:06:27,530  -->  00:06:30,620
minus two, one for the broadcast, one for the network,
150

150

00:06:30,620  -->  00:06:33,980
and that gives me 254 usable IPs.
151

151

00:06:33,980  -->  00:06:35,470
As you can see here on the screen,
152

152

00:06:35,470  -->  00:06:38,450
we have all the network bits, all 24 of them,
153

153

00:06:38,450  -->  00:06:40,920
and therefore, it is classful.
154

154

00:06:40,920  -->  00:06:42,880
Now, we have eight bits of the host,
155

155

00:06:42,880  -->  00:06:45,380
and let's say that I wanted to make a smaller subnet.
156

156

00:06:45,380  -->  00:06:46,470
How can I do that?
157

157

00:06:46,470  -->  00:06:48,670
Well, I could borrow two bits from the host
158

158

00:06:48,670  -->  00:06:49,970
and create a subnet,
159

159

00:06:49,970  -->  00:06:52,570
this would make it a slash 26, for instance.
160

160

00:06:52,570  -->  00:06:54,707
So, if I borrow those two host bits,
161

161

00:06:54,707  -->  00:06:58,290
now it becomes two to the s or two to the second power,
162

162

00:06:58,290  -->  00:07:00,349
which gives me four networks,
163

163

00:07:00,349  -->  00:07:01,930
four subnets that I've created.
164

164

00:07:01,930  -->  00:07:03,730
So, if I consider those four networks,
165

165

00:07:03,730  -->  00:07:05,790
how many IPs can I have in each one
166

166

00:07:05,790  -->  00:07:07,710
of those four networks I just created?
167

167

00:07:07,710  -->  00:07:09,590
Well, in the original slash 24,
168

168

00:07:09,590  -->  00:07:13,490
I had 256 hosts total or IPs total.
169

169

00:07:13,490  -->  00:07:15,430
Now, I borrowed those two host bits
170

170

00:07:15,430  -->  00:07:16,640
and gave them to the network.
171

171

00:07:16,640  -->  00:07:19,510
And so, now I have two to the six power,
172

172

00:07:19,510  -->  00:07:22,510
that's going to give me 64 IPs per subnet.
173

173

00:07:22,510  -->  00:07:27,510
So, if I have 64 plus 64 plus 64 plus 64 that equals two 56.
174

174

00:07:28,400  -->  00:07:31,430
So, I took that one big network, that slash 24,
175

175

00:07:31,430  -->  00:07:33,700
and I turned it into four smaller networks,
176

176

00:07:33,700  -->  00:07:35,500
those slash 26s.
177

177

00:07:35,500  -->  00:07:39,320
But remember, each of those, I have to give away two IPs,
178

178

00:07:39,320  -->  00:07:40,920
the first one and the last one,
179

179

00:07:40,920  -->  00:07:42,310
the first one is the network name,
180

180

00:07:42,310  -->  00:07:44,010
the last one is the broadcast.
181

181

00:07:44,010  -->  00:07:48,330
So, I only have 62 usable IPs that I can assign
182

182

00:07:48,330  -->  00:07:51,720
to a server or a laptop or a phone or something like that.
183

183

00:07:51,720  -->  00:07:54,170
And so, for each of these four networks I've created,
184

184

00:07:54,170  -->  00:07:58,490
I now have 62 usable IPs and I have four of those
185

185

00:07:58,490  -->  00:08:01,830
that were made up out of that original slash 24 network.
186

186

00:08:01,830  -->  00:08:03,620
Now, if you look at the blue at the bottom of this,
187

187

00:08:03,620  -->  00:08:06,770
you can see my original 256 possible IPs,
188

188

00:08:06,770  -->  00:08:09,450
which does include my broadcast and my network.
189

189

00:08:09,450  -->  00:08:12,440
If I submit that down, I'm going to have four subnets
190

190

00:08:12,440  -->  00:08:14,270
or two to the second power.
191

191

00:08:14,270  -->  00:08:16,930
Now, I'm going to have 62 possible IPs,
192

192

00:08:16,930  -->  00:08:19,830
because each one was two to the sixth minus two,
193

193

00:08:19,830  -->  00:08:21,480
because I take away the first and the last
194

194

00:08:21,480  -->  00:08:23,490
for the network name and the broadcast.
195

195

00:08:23,490  -->  00:08:26,110
In our case, this is going to give us the four subnets
196

196

00:08:26,110  -->  00:08:31,110
as their name of 192.168.1.0, 192.168.1.64,
197

197

00:08:33,539  -->  00:08:38,539
192.168.1.128, and 192.168.1.192,
198

198

00:08:41,290  -->  00:08:43,200
those are my four network names.
199

199

00:08:43,200  -->  00:08:44,520
Now, for the broadcast,
200

200

00:08:44,520  -->  00:08:46,690
it's going to be the last IP of each subnet,
201

201

00:08:46,690  -->  00:08:49,920
so, that's going to be the ones ending in dot 63,
202

202

00:08:49,920  -->  00:08:54,550
dot 27, dot 191 and dot 255.
203

203

00:08:54,550  -->  00:08:56,500
So, hopefully now you're starting to see how these subnets
204

204

00:08:56,500  -->  00:08:58,040
start to work together.
205

205

00:08:58,040  -->  00:08:59,940
If we wanted to calculate those IPs,
206

206

00:08:59,940  -->  00:09:02,960
we're going to do that based on those subnet masks.
207

207

00:09:02,960  -->  00:09:04,840
So, when we take those 32 bits,
208

208

00:09:04,840  -->  00:09:06,450
which is the total number of bits
209

209

00:09:06,450  -->  00:09:09,640
minus whatever our slash or CIDR notation is,
210

210

00:09:09,640  -->  00:09:11,290
in this case 26,
211

211

00:09:11,290  -->  00:09:13,960
we get that there are six host bits remaining,
212

212

00:09:13,960  -->  00:09:15,820
that would be two to the sixth minus two,
213

213

00:09:15,820  -->  00:09:20,820
which is 64 minus two or 62 usable, assignable IPs.
214

214

00:09:21,380  -->  00:09:22,700
Now, I'm hoping that all of this
215

215

00:09:22,700  -->  00:09:24,710
is starting to come together as we've gone through it.
216

216

00:09:24,710  -->  00:09:27,510
Subnetting is a very complex topic
217

217

00:09:27,510  -->  00:09:29,300
that a lot of students struggle with.
218

218

00:09:29,300  -->  00:09:30,750
I want you to keep practicing it
219

219

00:09:30,750  -->  00:09:32,370
and keep working through the problems,
220

220

00:09:32,370  -->  00:09:34,530
because I guarantee on test day, you're going
221

221

00:09:34,530  -->  00:09:36,910
to get some questions on subnetting.
222

222

00:09:36,910  -->  00:09:38,680
Now, some of these questions might ask you
223

223

00:09:38,680  -->  00:09:40,170
just to do the problem,
224

224

00:09:40,170  -->  00:09:42,780
but most of them are going to be more about troubleshooting.
225

225

00:09:42,780  -->  00:09:44,630
There's going to be some computers that aren't talking
226

226

00:09:44,630  -->  00:09:47,210
to another, and when you start looking at their IP addresses
227

227

00:09:47,210  -->  00:09:49,220
and their subnet masks, you're going to notice
228

228

00:09:49,220  -->  00:09:50,550
they're not on the same subnet,
229

229

00:09:50,550  -->  00:09:51,990
and if there's no router there,
230

230

00:09:51,990  -->  00:09:53,990
data won't go from one subnet to another,
231

231

00:09:53,990  -->  00:09:56,110
and so, this is an important concept.
232

232

00:09:56,110  -->  00:09:59,030
Now, let's talk about how we list out these subnets.
233

233

00:09:59,030  -->  00:10:04,030
Let's keep going with our example of the 192.168.1.0/26
234

234

00:10:04,680  -->  00:10:08,890
and those four subnets we created of 62 usable IPs each.
235

235

00:10:08,890  -->  00:10:11,520
Now, where does each network begin and end?
236

236

00:10:11,520  -->  00:10:13,430
We kind of already went over this by saying
237

237

00:10:13,430  -->  00:10:18,430
it was the dot zero, the dot 64, the dot 128, and the dot 192
238

238

00:10:18,610  -->  00:10:20,370
as our beginning of each network.
239

239

00:10:20,370  -->  00:10:22,240
Now, where did I come up with those?
240

240

00:10:22,240  -->  00:10:26,157
Well, I started with the original IP, of 192.168.1.0.
241

241

00:10:27,820  -->  00:10:29,740
Now, zero is my first IP
242

242

00:10:29,740  -->  00:10:32,230
and it is going to be the name of that network.
243

243

00:10:32,230  -->  00:10:35,200
Each subnet we said was 64 IPs in length,
244

244

00:10:35,200  -->  00:10:39,100
so, if I take zero plus 64, I get dot 64,
245

245

00:10:39,100  -->  00:10:41,830
if I add another 64, I get dot 128,
246

246

00:10:41,830  -->  00:10:44,780
if I had another 64, I get dot 192.
247

247

00:10:44,780  -->  00:10:47,660
Now, how do I find the last IP for each of these?
248

248

00:10:47,660  -->  00:10:49,620
Well, that's going to be my broadcast address.
249

249

00:10:49,620  -->  00:10:53,020
All I need to do is add dot 63 to each of these numbers,
250

250

00:10:53,020  -->  00:10:56,070
because there's 64 IPs, the first one is used for the name,
251

251

00:10:56,070  -->  00:11:00,310
the last one, the plus 63 gets me to that broadcast ID,
252

252

00:11:00,310  -->  00:11:05,310
and so, I get 63, 127, 191 and 255,
253

253

00:11:05,720  -->  00:11:08,300
that's going to be the beginning and ending of each subnet.
254

254

00:11:08,300  -->  00:11:13,300
It goes from zero to 63, 64 to 127, 128 to 191,
255

255

00:11:14,080  -->  00:11:17,920
and 192 to 255, and everything in between those,
256

256

00:11:17,920  -->  00:11:20,470
for instance, I might have something like 32
257

257

00:11:20,470  -->  00:11:22,620
is going to be a usable IP.
258

258

00:11:22,620  -->  00:11:24,370
Those are things we're going to assign to clients
259

259

00:11:24,370  -->  00:11:26,070
and servers and tablets and laptops
260

260

00:11:26,070  -->  00:11:28,410
and desktops and all those things.
261

261

00:11:28,410  -->  00:11:29,989
Now, when we do all of these,
262

262

00:11:29,989  -->  00:11:31,730
we're going to write them out
263

263

00:11:31,730  -->  00:11:33,970
with what's known as the slash notation.
264

264

00:11:33,970  -->  00:11:38,970
So, we'd write 192.168.1.0/192.168.1.127,
265

265

00:11:43,070  -->  00:11:44,360
that's pretty long to write that out
266

266

00:11:44,360  -->  00:11:46,750
for each of the four subnets, so instead,
267

267

00:11:46,750  -->  00:11:50,230
we have this shorthand notation called a CIDR notation,
268

268

00:11:50,230  -->  00:11:53,240
and this stands for the Classless Inter-Domain Routing.
269

269

00:11:53,240  -->  00:11:56,150
Instead of advertising multiple individual routes,
270

270

00:11:56,150  -->  00:11:59,020
we summarize all of those as a single route.
271

271

00:11:59,020  -->  00:12:01,720
We do this through CIDR notation, and in this case,
272

272

00:12:01,720  -->  00:12:03,760
we had the slash 26.
273

273

00:12:03,760  -->  00:12:06,960
So, I can consolidate all those underneath them
274

274

00:12:06,960  -->  00:12:09,410
by doing a summary of the continuous networks
275

275

00:12:09,410  -->  00:12:11,030
using route aggregation.
276

276

00:12:11,030  -->  00:12:13,640
When I do this, and I look at the slash 26,
277

277

00:12:13,640  -->  00:12:16,680
I noticed that the first 26 bits are all equivalent,
278

278

00:12:16,680  -->  00:12:18,930
they're all the same for the subnet mask.
279

279

00:12:18,930  -->  00:12:20,660
So, by consolidating those,
280

280

00:12:20,660  -->  00:12:22,550
this allows me to put all those networks together
281

281

00:12:22,550  -->  00:12:26,380
in one slash notation and simply write them down this way.
282

282

00:12:26,380  -->  00:12:30,540
Next, we have a Variable-Length Subnet Mask or VLSM,
283

283

00:12:30,540  -->  00:12:33,660
this allows subnets of various sizes to be used.
284

284

00:12:33,660  -->  00:12:36,050
Everything I've done so far has been equal.
285

285

00:12:36,050  -->  00:12:39,610
I took a big chunk of 256 IPs and broke them up
286

286

00:12:39,610  -->  00:12:43,940
into four equal 64-bit chunks, but we don't have to do that,
287

287

00:12:43,940  -->  00:12:46,460
I could actually break it up and have a 16 chunk
288

288

00:12:46,460  -->  00:12:50,170
and a 32 chunk and a 64 chunk, and that way, I can do that
289

289

00:12:50,170  -->  00:12:52,420
to what's right for my network.
290

290

00:12:52,420  -->  00:12:54,510
Now, this is going to require a routing protocol
291

291

00:12:54,510  -->  00:12:57,720
that supports this, but all modern routing protocols do,
292

292

00:12:57,720  -->  00:13:01,533
including things like RIP, OSPF, IS-IS, EIGRP, and BGP.
293

293

00:13:03,960  -->  00:13:06,410
Now, we haven't talked much about routing protocols yet,
294

294

00:13:06,410  -->  00:13:08,420
but we will in the next section of this course
295

295

00:13:08,420  -->  00:13:10,130
when we talk about routing.
296

296

00:13:10,130  -->  00:13:12,470
Basically, Variable-Length Subnet Masking
297

297

00:13:12,470  -->  00:13:14,580
is a subnetting of subnets.
298

298

00:13:14,580  -->  00:13:18,370
Without VLSM, all subnets would have to be the same size
299

299

00:13:18,370  -->  00:13:19,940
as you see here on the screen,
300

300

00:13:19,940  -->  00:13:21,810
but by using VLSM,
301

301

00:13:21,810  -->  00:13:24,390
I can break them up into whatever chunks I want.
302

302

00:13:24,390  -->  00:13:26,640
And I'm going to give you the key to subnetting here.
303

303

00:13:26,640  -->  00:13:27,880
When you look at this chart,
304

304

00:13:27,880  -->  00:13:30,120
this is your subnetting exam tip.
305

305

00:13:30,120  -->  00:13:31,970
Write this down in your notes.
306

306

00:13:31,970  -->  00:13:33,550
Now, the one I want you to memorize here,
307

307

00:13:33,550  -->  00:13:35,620
is this small chart off to the right.
308

308

00:13:35,620  -->  00:13:37,440
You can do all the math on test day
309

309

00:13:37,440  -->  00:13:39,880
and spend a lot of time trying to do two to the s,
310

310

00:13:39,880  -->  00:13:41,710
and two to h minus two,
311

311

00:13:41,710  -->  00:13:44,740
or you can memorize this small chart on the right.
312

312

00:13:44,740  -->  00:13:47,490
If you notice, it's going to start with slash 24,
313

313

00:13:47,490  -->  00:13:50,610
and you have that as your subnet as a classful class C,
314

314

00:13:50,610  -->  00:13:52,790
you have 256 IPs, you know this,
315

315

00:13:52,790  -->  00:13:54,760
because we've talked about this a lot, right?
316

316

00:13:54,760  -->  00:13:58,500
Now, if I add one to the CIDR notation, it becomes slash 25,
317

317

00:13:58,500  -->  00:14:00,750
I increase the number of networks,
318

318

00:14:00,750  -->  00:14:03,190
by adding one, I borrowed a bit,
319

319

00:14:03,190  -->  00:14:05,680
that's going to give me two subnets,
320

320

00:14:05,680  -->  00:14:08,320
and that's going to take my 256 IPs
321

321

00:14:08,320  -->  00:14:11,300
and divide it by two, giving me 128.
322

322

00:14:11,300  -->  00:14:14,060
Notice, I'm always going to have 256 IPs
323

323

00:14:14,060  -->  00:14:18,530
as I go from slash 24 downward all the way down to slash 30.
324

324

00:14:18,530  -->  00:14:21,330
So, every time my CIDR notation goes up by one,
325

325

00:14:21,330  -->  00:14:23,460
my number of networks goes up by one
326

326

00:14:23,460  -->  00:14:26,400
and my number of IPs gets divided by two.
327

327

00:14:26,400  -->  00:14:28,370
If you can remember this chart on the right,
328

328

00:14:28,370  -->  00:14:29,960
this is going to help you on test day,
329

329

00:14:29,960  -->  00:14:32,170
get through a lot of the questions on subnetting
330

330

00:14:32,170  -->  00:14:33,810
and it's really nice and easy.
331

331

00:14:33,810  -->  00:14:35,750
Now, the good thing is for Network+,
332

332

00:14:35,750  -->  00:14:38,190
they're not going to give you a lot of difficult subnets.
333

333

00:14:38,190  -->  00:14:39,990
Almost all of the ones you're going to get
334

334

00:14:39,990  -->  00:14:42,660
are going to be slashed 24 or higher,
335

335

00:14:42,660  -->  00:14:45,460
the most are going to give you something like a slash 23 maybe,
336

336

00:14:45,460  -->  00:14:47,820
or a splash 22, but that's rare.
337

337

00:14:47,820  -->  00:14:52,070
Generally it's going to be slashed 25, 26, 27, 28, 29, and 30,
338

338

00:14:52,070  -->  00:14:53,550
that is the most common.
339

339

00:14:53,550  -->  00:14:56,210
So, if they ask you something like, you have a slash 28,
340

340

00:14:56,210  -->  00:14:57,740
how many subnets are created?
341

341

00:14:57,740  -->  00:14:59,467
It's pretty easy, you look at this chart and go,
342

342

00:14:59,467  -->  00:15:01,167
"Oh, the answer is 16."
343

343

00:15:01,167  -->  00:15:04,530
And if I go from 24 up to 28, I keep doubling it
344

344

00:15:04,530  -->  00:15:06,290
and I double it to get to 25,
345

345

00:15:06,290  -->  00:15:07,850
I double it again to get to 26,
346

346

00:15:07,850  -->  00:15:09,410
double it again to get to 27,
347

347

00:15:09,410  -->  00:15:11,860
double it again to get to 16, right?
348

348

00:15:11,860  -->  00:15:14,970
And that is where I get to slash 28 is 16,
349

349

00:15:14,970  -->  00:15:18,620
because I went two, four, eight, 16, and there we go.
350

350

00:15:18,620  -->  00:15:20,740
Now, you might ask, how many IPs you'd have in each subnet
351

351

00:15:20,740  -->  00:15:22,310
if you had a slash 30?
352

352

00:15:22,310  -->  00:15:23,930
Well, for a slash 30,
353

353

00:15:23,930  -->  00:15:26,010
that's what we use for point to point connections,
354

354

00:15:26,010  -->  00:15:27,670
and there's going to be four IPs,
355

355

00:15:27,670  -->  00:15:29,200
but only two of those are usable,
356

356

00:15:29,200  -->  00:15:31,850
because again, our first one is always the name
357

357

00:15:31,850  -->  00:15:34,460
of the network and the last one is always the broadcast.
358

358

00:15:34,460  -->  00:15:37,537
So, you have four IPs, two of which are usable.
359

359

00:15:37,537  -->  00:15:39,490
And if you remember this chart, you're going to be able
360

360

00:15:39,490  -->  00:15:42,120
to do great on subnetting on the exam.
361

361

00:15:42,120  -->  00:15:43,410
Now, before the test,
362

362

00:15:43,410  -->  00:15:46,320
I want you to take lots of practice subnetting problems,
363

363

00:15:46,320  -->  00:15:48,410
especially in your class C range.
364

364

00:15:48,410  -->  00:15:50,830
Everything from slash 24 to slash 30
365

365

00:15:50,830  -->  00:15:53,520
is really fair game for the Network+ exam.
366

366

00:15:53,520  -->  00:15:55,970
Memorizing these slash notations and the CIDR
367

367

00:15:55,970  -->  00:15:58,640
is going to help you answer any question they throw at you.
368

368

00:15:58,640  -->  00:16:00,500
But as we go through this section,
369

369

00:16:00,500  -->  00:16:01,960
I'm going to show you a shortcut
370

370

00:16:01,960  -->  00:16:04,080
that you can do just using your hands, as well,
371

371

00:16:04,080  -->  00:16:05,480
and you're going to really like this,
372

372

00:16:05,480  -->  00:16:06,670
but having this chart memorized
373

373

00:16:06,670  -->  00:16:08,360
is going to help with that, as well.
374

374

00:16:08,360  -->  00:16:11,120
Now, for the exam, something you may see is they might
375

375

00:16:11,120  -->  00:16:14,050
have you do a variable-length subnetting problem.
376

376

00:16:14,050  -->  00:16:16,300
Now, if they do a VLSM problem for you,
377

377

00:16:16,300  -->  00:16:20,340
it might be they gave you an IP address with 256 IPs
378

378

00:16:20,340  -->  00:16:22,100
because they're going to be a slash 24
379

379

00:16:22,100  -->  00:16:23,077
and then, they might say,
380

380

00:16:23,077  -->  00:16:26,647
"Hey, you have an it department that needs X number of IPs,
381

381

00:16:26,647  -->  00:16:29,387
you have HR department that needs X amount of IPs,
382

382

00:16:29,387  -->  00:16:32,580
you have a sales department that needs Y amount of IPs."
383

383

00:16:32,580  -->  00:16:34,980
And you'll have to go through and do the slash notations
384

384

00:16:34,980  -->  00:16:37,900
for each one based on the number of IPs they give you.
385

385

00:16:37,900  -->  00:16:40,230
That is a totally fair question on the exam
386

386

00:16:40,230  -->  00:16:42,420
and how you'd put this subnetting stuff to work
387

387

00:16:42,420  -->  00:16:43,423
in the real world.
