1
1

00:00:00,150  -->  00:00:02,740
<v ->Internet Protocol version 4 addressing.</v>
2

2

00:00:02,740  -->  00:00:03,650
In this lesson,
3

3

00:00:03,650  -->  00:00:05,610
we're going to talk about IPv4
4

4

00:00:05,610  -->  00:00:07,960
or Internet Protocol version 4.
5

5

00:00:07,960  -->  00:00:10,130
IPv4 is extremely popular
6

6

00:00:10,130  -->  00:00:12,400
and is the most common type of IP addressing
7

7

00:00:12,400  -->  00:00:13,810
that's used in our networks.
8

8

00:00:13,810  -->  00:00:15,570
In fact, if you're like most people,
9

9

00:00:15,570  -->  00:00:18,400
you've already seen an IPv4 address before.
10

10

00:00:18,400  -->  00:00:19,233
When you look at them,
11

11

00:00:19,233  -->  00:00:21,350
they're written as a series of four decimal numbers
12

12

00:00:21,350  -->  00:00:22,710
separated by dots.
13

13

00:00:22,710  -->  00:00:26,910
Some examples of this are IPv4 addresses like 10.1.2.3
14

14

00:00:26,910  -->  00:00:31,190
or 172.21.243.67.
15

15

00:00:31,190  -->  00:00:32,200
As you can see,
16

16

00:00:32,200  -->  00:00:34,740
each IPv4 address is made up of four parts
17

17

00:00:34,740  -->  00:00:36,050
to form that address.
18

18

00:00:36,050  -->  00:00:38,660
This is known as a dotted-decimal notation.
19

19

00:00:38,660  -->  00:00:39,840
When you're referring to each of those
20

20

00:00:39,840  -->  00:00:41,010
four individual parts,
21

21

00:00:41,010  -->  00:00:42,370
we call this an octet
22

22

00:00:42,370  -->  00:00:44,100
because they each have a decimal number
23

23

00:00:44,100  -->  00:00:46,610
that's used to represent an 8-bit number.
24

24

00:00:46,610  -->  00:00:48,670
Because these decimal numbers represent an 8-bit
25

25

00:00:48,670  -->  00:00:50,350
or eight binary digits,
26

26

00:00:50,350  -->  00:00:52,470
this means that they can only represent a value
27

27

00:00:52,470  -->  00:00:56,290
from zero to 255 in each of those four positions.
28

28

00:00:56,290  -->  00:00:58,330
Now, when all four octets are combined,
29

29

00:00:58,330  -->  00:01:01,390
we have four octets that contain eight bits each,
30

30

00:01:01,390  -->  00:01:04,630
for a total of 32 bits of total addressable space
31

31

00:01:04,630  -->  00:01:07,050
when using an IPv4 address.
32

32

00:01:07,050  -->  00:01:08,080
Now, for example,
33

33

00:01:08,080  -->  00:01:13,010
if I have the IPv4 address of 192.168.1.4,
34

34

00:01:13,010  -->  00:01:15,190
this is written in dotted-decimal notation
35

35

00:01:15,190  -->  00:01:17,420
to make it easier for us as humans to read it.
36

36

00:01:17,420  -->  00:01:18,800
But in reality,
37

37

00:01:18,800  -->  00:01:23,590
it's actually 11000000.10101000.00000001.00000100
38

38

00:01:34,810  -->  00:01:37,330
if I put its into true binary form.
39

39

00:01:37,330  -->  00:01:38,270
As you can see,
40

40

00:01:38,270  -->  00:01:39,910
being able to use dotted-decimal notation
41

41

00:01:39,910  -->  00:01:42,820
is a lot easier for us to read and to type.
42

42

00:01:42,820  -->  00:01:45,310
And therefore, it's less prone to us making mistakes
43

43

00:01:45,310  -->  00:01:47,300
because as humans entering these numbers
44

44

00:01:47,300  -->  00:01:49,140
into our network devices using binary
45

45

00:01:49,140  -->  00:01:51,380
would just be a big issue for us.
46

46

00:01:51,380  -->  00:01:53,170
We just don't think that way.
47

47

00:01:53,170  -->  00:01:58,080
Now, when we see an IP address like 192.168.1.4,
48

48

00:01:58,080  -->  00:02:00,700
it's actually being broken down into two portions
49

49

00:02:00,700  -->  00:02:04,740
by using a second 32-bit number known as a subnet mask.
50

50

00:02:04,740  -->  00:02:06,730
Now, one part of the IPv4 address
51

51

00:02:06,730  -->  00:02:08,610
is used to identify the network portion
52

52

00:02:08,610  -->  00:02:09,500
and the other part
53

53

00:02:09,500  -->  00:02:11,850
is going to be used to identify the host portion.
54

54

00:02:11,850  -->  00:02:13,180
When you look at a subnet mask,
55

55

00:02:13,180  -->  00:02:15,760
it's going to look a lot like an IPv4 address,
56

56

00:02:15,760  -->  00:02:17,740
but if you convert it to binary,
57

57

00:02:17,740  -->  00:02:18,573
you're going to see that it has
58

58

00:02:18,573  -->  00:02:21,000
a continuous strings of ones or zeros
59

59

00:02:21,000  -->  00:02:22,040
to identify the network
60

60

00:02:22,040  -->  00:02:24,010
and host portions of that address
61

61

00:02:24,010  -->  00:02:26,090
being used by the client or device.
62

62

00:02:26,090  -->  00:02:31,090
So if I have a subnet mask like 255.255.255.0,
63

63

00:02:31,280  -->  00:02:34,290
this is known as a default class C subnet mask.
64

64

00:02:34,290  -->  00:02:36,330
Now, don't worry about classes just yet,
65

65

00:02:36,330  -->  00:02:38,600
we are going to cover them more in just a moment.
66

66

00:02:38,600  -->  00:02:39,680
For now, I just want you to see
67

67

00:02:39,680  -->  00:02:41,540
what a subnet mask looks like.
68

68

00:02:41,540  -->  00:02:44,420
Now, if I converted this into binary,
69

69

00:02:44,420  -->  00:02:46,610
each of those octets that are 255
70

70

00:02:46,610  -->  00:02:48,260
are going to be written as 11111111.
71

71

00:02:50,100  -->  00:02:52,303
So I'm going to get 11111111.11111111.11111111.
72

72

00:03:00,450  -->  00:03:01,923
and then 00000000.
73

73

00:03:04,220  -->  00:03:06,060
This is because in binary,
74

74

00:03:06,060  -->  00:03:08,470
eight ones is going to equal 255
75

75

00:03:08,470  -->  00:03:09,690
when I read it in decimal.
76

76

00:03:09,690  -->  00:03:11,300
And if I have eight zeros in binary
77

77

00:03:11,300  -->  00:03:13,750
that is going to equal zero in decimal.
78

78

00:03:13,750  -->  00:03:16,480
Again, don't worry too much about this conversion just yet.
79

79

00:03:16,480  -->  00:03:18,730
We are going to do a lot of these different conversions
80

80

00:03:18,730  -->  00:03:20,900
and math problems in a separate video lesson
81

81

00:03:20,900  -->  00:03:23,090
when we talk about computer mathematics.
82

82

00:03:23,090  -->  00:03:24,830
Now, when you look at this number,
83

83

00:03:24,830  -->  00:03:27,490
if you see a one in the binary of that subnet mask,
84

84

00:03:27,490  -->  00:03:29,670
this means it's part of the network portion
85

85

00:03:29,670  -->  00:03:31,130
of the IP address.
86

86

00:03:31,130  -->  00:03:33,860
If I see a zero in the binary portion of the subnet mask,
87

87

00:03:33,860  -->  00:03:35,620
this means it's part of the host portion
88

88

00:03:35,620  -->  00:03:37,130
of the IPv4 address.
89

89

00:03:37,130  -->  00:03:40,527
So let's put this together by showing both an IPv4 address
90

90

00:03:40,527  -->  00:03:42,370
and a subnet mask together.
91

91

00:03:42,370  -->  00:03:45,893
First, we have our IPv4 address of 192.168.1.4.
92

92

00:03:47,800  -->  00:03:49,460
Next we have our subnet mask
93

93

00:03:49,460  -->  00:03:54,050
underneath it with 255.255.255.0.
94

94

00:03:54,050  -->  00:03:56,460
Now, everywhere I see that 255,
95

95

00:03:56,460  -->  00:03:58,980
this is going to represent a one in binary.
96

96

00:03:58,980  -->  00:04:01,240
So this becomes part of the network portion
97

97

00:04:01,240  -->  00:04:03,140
of that IPv4 address.
98

98

00:04:03,140  -->  00:04:07,130
If I use this example, 192.168.1.4,
99

99

00:04:07,130  -->  00:04:11,520
the 198.168.1, that is part of the network.
100

100

00:04:11,520  -->  00:04:16,420
Now, I can do anything that starts with 192.168.1.something
101

101

00:04:16,420  -->  00:04:19,020
and it would all be addressable by the same local network
102

102

00:04:19,020  -->  00:04:22,260
because they all share this same network portion.
103

103

00:04:22,260  -->  00:04:23,870
Now, when I get to the second part,
104

104

00:04:23,870  -->  00:04:25,540
anytime I see those zeros,
105

105

00:04:25,540  -->  00:04:27,950
this represents all zeros in binary.
106

106

00:04:27,950  -->  00:04:31,780
So that's going to be the host portion of that IPv4 address.
107

107

00:04:31,780  -->  00:04:35,260
In this case, that is the .4 portion of this address,
108

108

00:04:35,260  -->  00:04:36,930
which is going to represent the host.
109

109

00:04:36,930  -->  00:04:40,560
That host could be a server, a desktop, a laptop, a tablet,
110

110

00:04:40,560  -->  00:04:42,800
a smartphone or any other network device.
111

111

00:04:42,800  -->  00:04:44,110
It really doesn't matter.
112

112

00:04:44,110  -->  00:04:46,230
But when we talk about this .4 device,
113

113

00:04:46,230  -->  00:04:47,770
that is a single host.
114

114

00:04:47,770  -->  00:04:50,720
When I talk about the 192.168.1,
115

115

00:04:50,720  -->  00:04:55,330
that is the network that can contain up to 254 devices.
116

116

00:04:55,330  -->  00:04:59,670
So if I have a device like 192.168.1.50
117

117

00:04:59,670  -->  00:05:03,560
with a subnet of 255.255.255.0
118

118

00:05:03,560  -->  00:05:06,050
that device is also in the same network
119

119

00:05:06,050  -->  00:05:09,340
as our 192.168.1.4 device,
120

120

00:05:09,340  -->  00:05:11,840
and they can communicate with each other using a switch
121

121

00:05:11,840  -->  00:05:13,340
and they wouldn't have to use a router
122

122

00:05:13,340  -->  00:05:18,340
because they both share the same network portion, 192.168.1.
123

123

00:05:18,490  -->  00:05:19,540
Now, on the other hand,
124

124

00:05:19,540  -->  00:05:23,970
let's assume I have a device like 192.168.0.100
125

125

00:05:23,970  -->  00:05:27,970
with a subnet of 255.255.255.0,
126

126

00:05:27,970  -->  00:05:30,160
that device is on a different network,
127

127

00:05:30,160  -->  00:05:34,720
specifically, it's on the 192.168.0.something network.
128

128

00:05:34,720  -->  00:05:37,920
So we cannot communicate that from our original device
129

129

00:05:37,920  -->  00:05:42,350
at 192.168.1.4 without leaving our network
130

130

00:05:42,350  -->  00:05:44,820
and routing our traffic over to this new network,
131

131

00:05:44,820  -->  00:05:48,370
this 192.168.0.something network.
132

132

00:05:48,370  -->  00:05:50,440
This is why we need to have a router.
133

133

00:05:50,440  -->  00:05:52,360
Now, if this doesn't quite make sense yet,
134

134

00:05:52,360  -->  00:05:53,810
don't worry too much.
135

135

00:05:53,810  -->  00:05:55,740
We are going to dive deeper into subnetting
136

136

00:05:55,740  -->  00:05:57,840
and you're going to actually calculate subnet mast
137

137

00:05:57,840  -->  00:06:00,360
and things like that to learn how routing works.
138

138

00:06:00,360  -->  00:06:02,810
Right now, we have barely just scratched the surface
139

139

00:06:02,810  -->  00:06:04,260
in the examples we talked about.
140

140

00:06:04,260  -->  00:06:05,480
And I just wanted to get you the idea
141

141

00:06:05,480  -->  00:06:07,510
and introduce you to this concept.
142

142

00:06:07,510  -->  00:06:09,660
Now, the next concept that we need to talk about
143

143

00:06:09,660  -->  00:06:11,520
is that an IPv4 addresses
144

144

00:06:11,520  -->  00:06:13,380
and how they're broken up into classes
145

145

00:06:13,380  -->  00:06:15,000
or groupings or ranges
146

146

00:06:15,000  -->  00:06:17,010
that can be used for different purposes.
147

147

00:06:17,010  -->  00:06:20,220
Now, each class has its own default subnet mask as well.
148

148

00:06:20,220  -->  00:06:21,340
When we talk about classes,
149

149

00:06:21,340  -->  00:06:23,270
we identify these by a letter.
150

150

00:06:23,270  -->  00:06:27,430
These letters are A, B, C, D, and E.
151

151

00:06:27,430  -->  00:06:30,160
Now, to identify the class for a given IP address,
152

152

00:06:30,160  -->  00:06:32,700
you just need to look at the first octet.
153

153

00:06:32,700  -->  00:06:36,410
If that first octet begins with a number between 1 and 127,
154

154

00:06:36,410  -->  00:06:38,297
it's going to be considered a class A address,
155

155

00:06:38,297  -->  00:06:42,930
and it has a default subnet mask of 255.0.0.0.
156

156

00:06:42,930  -->  00:06:45,010
This means the network portion of that address
157

157

00:06:45,010  -->  00:06:46,690
is just the first octet,
158

158

00:06:46,690  -->  00:06:48,550
and the second, third and fourth octets
159

159

00:06:48,550  -->  00:06:50,640
are going to make up the host portion.
160

160

00:06:50,640  -->  00:06:52,850
This means that with a class A network,
161

161

00:06:52,850  -->  00:06:57,760
we can have 256 times 256 times 256 hosts
162

162

00:06:57,760  -->  00:06:59,120
on a single network,
163

163

00:06:59,120  -->  00:07:01,880
which means there are 16.7 million
164

164

00:07:01,880  -->  00:07:03,500
possible host IP addresses
165

165

00:07:03,500  -->  00:07:05,820
available for a single network address portion
166

166

00:07:05,820  -->  00:07:07,610
assigned in the class A.
167

167

00:07:07,610  -->  00:07:09,110
Now, our second class we have
168

168

00:07:09,110  -->  00:07:10,670
occurs when we have that first octet
169

169

00:07:10,670  -->  00:07:14,360
beginning with a number between 128 and 191.
170

170

00:07:14,360  -->  00:07:16,560
This would be considered a class B address,
171

171

00:07:16,560  -->  00:07:21,560
and it will have a default subnet mask of 255.255.0.0.
172

172

00:07:21,710  -->  00:07:24,000
This means that the network portion of this address
173

173

00:07:24,000  -->  00:07:26,120
is going to be the first and second octets,
174

174

00:07:26,120  -->  00:07:27,520
and the third and fourth octet
175

175

00:07:27,520  -->  00:07:29,560
are going to make up the host portion.
176

176

00:07:29,560  -->  00:07:31,530
This means that for a class B network,
177

177

00:07:31,530  -->  00:07:36,030
we can have up to 256 times 256 hosts on a single network.
178

178

00:07:36,030  -->  00:07:41,030
And that means we get 65,536 possible host IP addresses
179

179

00:07:41,260  -->  00:07:43,380
available for a single network address portion
180

180

00:07:43,380  -->  00:07:45,680
assigned within a class B.
181

181

00:07:45,680  -->  00:07:48,380
Now, the third class we have occurs when the first octet
182

182

00:07:48,380  -->  00:07:52,150
begins with a number between 192 and 223.
183

183

00:07:52,150  -->  00:07:54,170
This is considered a class C address,
184

184

00:07:54,170  -->  00:07:59,170
and it has a default subnet mask of 255.255.255.0.
185

185

00:07:59,470  -->  00:08:01,360
This means that the network portion of the address
186

186

00:08:01,360  -->  00:08:04,140
is going to be the first, second and third octet.
187

187

00:08:04,140  -->  00:08:07,290
And we save that fourth octet for the host portion.
188

188

00:08:07,290  -->  00:08:09,130
This means that for a class C network,
189

189

00:08:09,130  -->  00:08:12,460
you can only have 256 hosts on a single network.
190

190

00:08:12,460  -->  00:08:16,160
And this means there are only 256 possible host IP addresses
191

191

00:08:16,160  -->  00:08:18,200
available for a single network address portion
192

192

00:08:18,200  -->  00:08:19,580
that's being assigned.
193

193

00:08:19,580  -->  00:08:22,310
Now the fourth class we have occurs when the first octet
194

194

00:08:22,310  -->  00:08:25,820
begins with a number between 224 and 239.
195

195

00:08:25,820  -->  00:08:28,350
This is considered a class D address.
196

196

00:08:28,350  -->  00:08:29,610
Now, a class D address
197

197

00:08:29,610  -->  00:08:32,280
does not have any subnet mask assigned to it.
198

198

00:08:32,280  -->  00:08:34,950
This is because class D addresses are special
199

199

00:08:34,950  -->  00:08:38,570
and they're reserved for multicasting or multicast routing.
200

200

00:08:38,570  -->  00:08:41,200
Now, a multicast address is a logical identifier
201

201

00:08:41,200  -->  00:08:43,290
for a group of hosts in a computer network
202

202

00:08:43,290  -->  00:08:45,860
that are already going to be available to process datagrams
203

203

00:08:45,860  -->  00:08:48,070
or frames intended to be multicast
204

204

00:08:48,070  -->  00:08:49,930
for a designated network service.
205

205

00:08:49,930  -->  00:08:52,300
So the actual multicast address
206

206

00:08:52,300  -->  00:08:54,510
doesn't have to align with a single host,
207

207

00:08:54,510  -->  00:08:57,040
but instead, it aligns with a group of hosts.
208

208

00:08:57,040  -->  00:08:58,960
When you think about a multicast address,
209

209

00:08:58,960  -->  00:09:01,470
I want you to think about it like a group chat on Facebook.
210

210

00:09:01,470  -->  00:09:02,810
You might have a group chat name,
211

211

00:09:02,810  -->  00:09:04,750
in our case, a multicast address.
212

212

00:09:04,750  -->  00:09:07,270
And when you send a message to your group chat's name,
213

213

00:09:07,270  -->  00:09:08,440
all of the members of that group
214

214

00:09:08,440  -->  00:09:10,260
are going to get a copy of that message.
215

215

00:09:10,260  -->  00:09:12,710
Well, the same thing is going to happen in multicast
216

216

00:09:12,710  -->  00:09:14,550
when we're using IPv4.
217

217

00:09:14,550  -->  00:09:16,760
We're going to talk more about multicasting later on
218

218

00:09:16,760  -->  00:09:18,650
when we discuss the different types of data flows
219

219

00:09:18,650  -->  00:09:20,220
within IPv4.
220

220

00:09:20,220  -->  00:09:21,053
But for now,
221

221

00:09:21,053  -->  00:09:22,640
this is the idea of what you need to understand
222

222

00:09:22,640  -->  00:09:23,700
with multicasting.
223

223

00:09:23,700  -->  00:09:25,150
I sent it from one person
224

224

00:09:25,150  -->  00:09:27,820
and it goes to multiple people all at the same time.
225

225

00:09:27,820  -->  00:09:30,120
Now, the fifth class we have occurs when the first octet
226

226

00:09:30,120  -->  00:09:33,410
begins with a number between 240 and 255.
227

227

00:09:33,410  -->  00:09:35,530
This is called a class E address
228

228

00:09:35,530  -->  00:09:38,280
and it also has no default subnet mask.
229

229

00:09:38,280  -->  00:09:41,010
This is because class E addresses are also special.
230

230

00:09:41,010  -->  00:09:41,850
In this case,
231

231

00:09:41,850  -->  00:09:44,530
they're reserved for experimental purposes for research
232

232

00:09:44,530  -->  00:09:46,640
and development or study only.
233

233

00:09:46,640  -->  00:09:50,570
This experimental range contains about 268 million addresses
234

234

00:09:50,570  -->  00:09:52,940
that are reserved for future use.
235

235

00:09:52,940  -->  00:09:53,773
Over the years,
236

236

00:09:53,773  -->  00:09:54,920
there've been a few proposals
237

237

00:09:54,920  -->  00:09:58,030
to reallocate these class E addresses for general use
238

238

00:09:58,030  -->  00:09:59,810
because public IPv4 addresses
239

239

00:09:59,810  -->  00:10:01,300
were becoming more and more scarce
240

240

00:10:01,300  -->  00:10:04,140
in the class A, class B, and class C ranges
241

241

00:10:04,140  -->  00:10:06,190
as more and more devices started getting connected
242

242

00:10:06,190  -->  00:10:07,220
to the internet.
243

243

00:10:07,220  -->  00:10:09,130
That said, so far to date,
244

244

00:10:09,130  -->  00:10:10,310
these class E addresses
245

245

00:10:10,310  -->  00:10:13,070
still remain allocated for experimental use only,
246

246

00:10:13,070  -->  00:10:15,440
and most IP implementations within our networks
247

247

00:10:15,440  -->  00:10:19,950
will consider any IP in this range from 240.0.0.0
248

248

00:10:19,950  -->  00:10:24,000
all the way up to 255.255.255.255
249

249

00:10:24,000  -->  00:10:28,100
to be invalid as a source or destination within a datagram.
250

250

00:10:28,100  -->  00:10:28,933
And therefore,
251

251

00:10:28,933  -->  00:10:31,920
the datagram would be rejected by the destination system.
252

252

00:10:31,920  -->  00:10:34,510
So if you try to send something to a window server
253

253

00:10:34,510  -->  00:10:35,720
or a workstation,
254

254

00:10:35,720  -->  00:10:38,080
it's going to refuse to communicate with that device
255

255

00:10:38,080  -->  00:10:40,950
if you claim to be from a class E address.
256

256

00:10:40,950  -->  00:10:41,783
All right.
257

257

00:10:41,783  -->  00:10:43,770
So now that we've covered the five different classes
258

258

00:10:43,770  -->  00:10:45,250
of IPv4 addresses,
259

259

00:10:45,250  -->  00:10:47,920
let's talk a little more about subnet masks.
260

260

00:10:47,920  -->  00:10:48,753
Let's pretend that
261

261

00:10:48,753  -->  00:10:52,410
we have an IP address of 192.168.1.4 again,
262

262

00:10:52,410  -->  00:10:56,870
with a subnet mask of 255.255.255.0.
263

263

00:10:56,870  -->  00:10:59,540
This subnet mask is the default subnet mask
264

264

00:10:59,540  -->  00:11:00,890
for a class C network.
265

265

00:11:00,890  -->  00:11:03,590
And since our IP address begins with a 192,
266

266

00:11:03,590  -->  00:11:05,770
it is also a class C address.
267

267

00:11:05,770  -->  00:11:07,810
This means we have a class C address
268

268

00:11:07,810  -->  00:11:10,100
using a class C default subnet mask.
269

269

00:11:10,100  -->  00:11:13,120
So we consider this to be classful
270

270

00:11:13,120  -->  00:11:15,480
We call this a classful mask.
271

271

00:11:15,480  -->  00:11:18,500
Now, a classful subnet mask is just the default
272

272

00:11:18,500  -->  00:11:20,630
for a given class of IP address.
273

273

00:11:20,630  -->  00:11:21,740
This doesn't mean though,
274

274

00:11:21,740  -->  00:11:24,000
that it's the best one for us to always use.
275

275

00:11:24,000  -->  00:11:26,460
For example, if we're using a class A address,
276

276

00:11:26,460  -->  00:11:31,460
you may recall that his default subnet mask is 255.0.0.0.
277

277

00:11:31,800  -->  00:11:33,810
This means we have a possibility of having
278

278

00:11:33,810  -->  00:11:37,530
16.7 million hosts on a single network.
279

279

00:11:37,530  -->  00:11:38,780
Now, I don't know about you,
280

280

00:11:38,780  -->  00:11:41,420
but I don't often come across networks that are that large
281

281

00:11:41,420  -->  00:11:43,120
and require that many hosts.
282

282

00:11:43,120  -->  00:11:44,230
In fact, I used to work
283

283

00:11:44,230  -->  00:11:46,260
on one of the world's largest internets,
284

284

00:11:46,260  -->  00:11:48,610
and we had a little over 1 million hosts
285

285

00:11:48,610  -->  00:11:51,180
spread across six continents around the globe.
286

286

00:11:51,180  -->  00:11:53,320
That was a really, really big network,
287

287

00:11:53,320  -->  00:11:54,860
and we still didn't come close
288

288

00:11:54,860  -->  00:11:57,740
to using all 16.7 million IP addresses
289

289

00:11:57,740  -->  00:11:59,860
in a classful class A subnet.
290

290

00:11:59,860  -->  00:12:01,800
So, often what we'll want to do
291

291

00:12:01,800  -->  00:12:04,530
is break up these networks into smaller networks.
292

292

00:12:04,530  -->  00:12:07,500
So we often instead want to break down these large networks
293

293

00:12:07,500  -->  00:12:09,020
into smaller networks.
294

294

00:12:09,020  -->  00:12:09,853
To do this,
295

295

00:12:09,853  -->  00:12:11,900
we're going to use a process known as subnetting.
296

296

00:12:11,900  -->  00:12:13,990
Now, we're not going to cover subnetting in detail
297

297

00:12:13,990  -->  00:12:15,180
in this lesson.
298

298

00:12:15,180  -->  00:12:17,970
Instead, I'm going to dedicate a few lessons later on
299

299

00:12:17,970  -->  00:12:19,610
to fully dive into that concept
300

300

00:12:19,610  -->  00:12:21,630
because you need to understand how to do it.
301

301

00:12:21,630  -->  00:12:22,500
But for now,
302

302

00:12:22,500  -->  00:12:24,540
I just want you to remember that we don't have to stick
303

303

00:12:24,540  -->  00:12:26,350
with a classical subnet mask.
304

304

00:12:26,350  -->  00:12:30,040
Instead, we can use a classless subnet mask if we want to.
305

305

00:12:30,040  -->  00:12:33,620
This is a process known as classless inter-domain routing.
306

306

00:12:33,620  -->  00:12:35,930
This will let us borrow some of those host bits,
307

307

00:12:35,930  -->  00:12:37,860
those zeros that I showed you in the subnet mask,
308

308

00:12:37,860  -->  00:12:40,580
and then reassign them to the network portion.
309

309

00:12:40,580  -->  00:12:43,150
So this lets me cut down the size of my networks
310

310

00:12:43,150  -->  00:12:45,600
into much smaller portions with less hosts
311

311

00:12:45,600  -->  00:12:46,830
and this is more efficient.
312

312

00:12:46,830  -->  00:12:48,100
This will give me, at the same time,
313

313

00:12:48,100  -->  00:12:50,370
a lot more networks that I can possibly use.
314

314

00:12:50,370  -->  00:12:52,320
Because again, if you think of it like a pie,
315

315

00:12:52,320  -->  00:12:53,850
you can cut it many different ways,
316

316

00:12:53,850  -->  00:12:56,410
but it's still one pie and it's a fixed amount of IPs
317

317

00:12:56,410  -->  00:12:57,610
that we have in total.
318

318

00:12:57,610  -->  00:12:59,430
So, I can cut the pie in half
319

319

00:12:59,430  -->  00:13:01,200
and we'd have two halves of the pie,
320

320

00:13:01,200  -->  00:13:02,500
or I can cut it in quarters
321

321

00:13:02,500  -->  00:13:04,190
and we can have four pieces of pie,
322

322

00:13:04,190  -->  00:13:06,130
but each of those pieces are smaller.
323

323

00:13:06,130  -->  00:13:07,980
The same thing with our networks.
324

324

00:13:07,980  -->  00:13:09,260
So, for example,
325

325

00:13:09,260  -->  00:13:11,810
let's say I have a classful class C subnet mask,
326

326

00:13:11,810  -->  00:13:16,810
and I would have 255.255.255.0 as that subnet mask.
327

327

00:13:16,840  -->  00:13:19,710
This allowed me to have 256 hosts, right?
328

328

00:13:19,710  -->  00:13:20,880
Well, in my home network,
329

329

00:13:20,880  -->  00:13:23,310
I don't really need 256 hosts.
330

330

00:13:23,310  -->  00:13:26,630
So maybe I want to break this down into four smaller networks.
331

331

00:13:26,630  -->  00:13:29,390
If I take 256 and I divide it by four,
332

332

00:13:29,390  -->  00:13:32,740
I get 64 hosts for each of those four networks.
333

333

00:13:32,740  -->  00:13:33,573
To do this,
334

334

00:13:33,573  -->  00:13:38,030
I would change the subnet mask from 255.255.255.0
335

335

00:13:38,030  -->  00:13:42,010
to 255.255.255.192.
336

336

00:13:42,010  -->  00:13:43,040
How do I do this?
337

337

00:13:43,040  -->  00:13:45,130
Well, I borrowed two bits from the host
338

338

00:13:45,130  -->  00:13:47,730
and I gave it to the network portion of the address.
339

339

00:13:47,730  -->  00:13:50,420
And this is how I make four different subnetworks
340

340

00:13:50,420  -->  00:13:53,740
or subnets out of this by using my subnet mask.
341

341

00:13:53,740  -->  00:13:54,930
Now, later on in this section,
342

342

00:13:54,930  -->  00:13:56,740
I'm going to teach you how to do subnetting
343

343

00:13:56,740  -->  00:13:59,800
and understand how I got that number for that subnet mask,
344

344

00:13:59,800  -->  00:14:01,490
including all the math involved,
345

345

00:14:01,490  -->  00:14:02,750
just like I did here.
346

346

00:14:02,750  -->  00:14:03,930
But for now,
347

347

00:14:03,930  -->  00:14:06,080
I just want you to remember that subnetting allows you
348

348

00:14:06,080  -->  00:14:09,130
to use a classless subnet mask to create smaller networks
349

349

00:14:09,130  -->  00:14:11,780
with fewer hosts in each of those networks than you could
350

350

00:14:11,780  -->  00:14:14,440
if you had a classful subnet mask by itself.
351

351

00:14:14,440  -->  00:14:15,747
This process is known as
352

352

00:14:15,747  -->  00:14:19,170
the classless inter-domain routing or CIDR,
353

353

00:14:19,170  -->  00:14:21,340
and we are going to abbreviate our IP addresses
354

354

00:14:21,340  -->  00:14:24,650
using this CIDR or CIDR notation.
355

355

00:14:24,650  -->  00:14:25,750
Now, when we do this,
356

356

00:14:25,750  -->  00:14:27,600
we don't have to write out the subnet mask.
357

357

00:14:27,600  -->  00:14:31,650
Instead, we just write the IP address, a slash and a number.
358

358

00:14:31,650  -->  00:14:33,910
This is known as our CIDR notation.
359

359

00:14:33,910  -->  00:14:38,690
So if I have an IP address of 192.168.1.4
360

360

00:14:38,690  -->  00:14:42,890
with a subnet mask of 255.255.255.0,
361

361

00:14:42,890  -->  00:14:47,760
I can abbreviate this using CIDR notation as 192.168.1.4/24.
362

362

00:14:50,220  -->  00:14:53,930
Oftentimes, you'll hear this called CIDR or slash notation.
363

363

00:14:53,930  -->  00:14:57,920
Now, if I had an IP address of 192.168.1.4,
364

364

00:14:57,920  -->  00:15:02,920
but my subnet mask was 255.255.255.192,
365

365

00:15:03,000  -->  00:15:08,000
I can abbreviate that as 192.168.1.4/26
366

366

00:15:09,100  -->  00:15:12,400
because remember, I borrowed two bits from the host portion.
367

367

00:15:12,400  -->  00:15:16,440
So I went from 24 as my default subnet mask, /24,
368

368

00:15:16,440  -->  00:15:17,800
into a /26,
369

369

00:15:17,800  -->  00:15:20,830
by borrowing two bits and making my network portion
370

370

00:15:20,830  -->  00:15:22,090
that much larger,
371

371

00:15:22,090  -->  00:15:24,810
bringing it from 24 up to 26.
372

372

00:15:24,810  -->  00:15:27,520
Now, when you're trying to calculate your CIDR notation,
373

373

00:15:27,520  -->  00:15:28,890
it's really going to be easiest
374

374

00:15:28,890  -->  00:15:31,100
when you're dealing with classful subnet masks.
375

375

00:15:31,100  -->  00:15:33,770
The CIDR notation here is really, really easy.
376

376

00:15:33,770  -->  00:15:35,710
Now, for the classful subnet masks,
377

377

00:15:35,710  -->  00:15:38,480
our CIDR notation is going to be rather simple.
378

378

00:15:38,480  -->  00:15:41,110
If you have a class A classful subnet mask,
379

379

00:15:41,110  -->  00:15:44,130
you're going to have a /8 after the IP address.
380

380

00:15:44,130  -->  00:15:48,050
This means that the subnet mask is 255.0.0.0,
381

381

00:15:48,050  -->  00:15:50,210
or it has eight bits of ones,
382

382

00:15:50,210  -->  00:15:51,240
which is the /8,
383

383

00:15:51,240  -->  00:15:54,950
and then 24 bits of zeros inside the subnet mask.
384

384

00:15:54,950  -->  00:15:57,320
Now, if you have a class B classful subnet mask,
385

385

00:15:57,320  -->  00:16:00,510
you're going to use a /16 after your IP address.
386

386

00:16:00,510  -->  00:16:04,800
This means the subnet mask is 255.255.0.0.
387

387

00:16:04,800  -->  00:16:07,310
Also, it means that it has 16 bits of ones
388

388

00:16:07,310  -->  00:16:10,600
and 16 bits of zeros in that subnet mask.
389

389

00:16:10,600  -->  00:16:12,970
Now, if you have a class C class will subnet mask,
390

390

00:16:12,970  -->  00:16:16,260
you're going to use a /24 after the IP address.
391

391

00:16:16,260  -->  00:16:21,020
This means that the subnet mask is going to be 255.255.255.0,
392

392

00:16:21,020  -->  00:16:23,690
or that it has 24 bits of ones
393

393

00:16:23,690  -->  00:16:26,850
and then eight bits of zeros in that subnet mask.
394

394

00:16:26,850  -->  00:16:28,240
Next, we need to talk about
395

395

00:16:28,240  -->  00:16:30,750
two different types of IPv4 addresses.
396

396

00:16:30,750  -->  00:16:32,970
These are called public and private IPs,
397

397

00:16:32,970  -->  00:16:35,120
and you may also hear them called routable
398

398

00:16:35,120  -->  00:16:36,950
and non-routable IPs.
399

399

00:16:36,950  -->  00:16:39,830
When an IP is considered a public or a routable IP,
400

400

00:16:39,830  -->  00:16:43,030
this IP address can be directly accessed over the internet
401

401

00:16:43,030  -->  00:16:44,410
and assigned to your network
402

402

00:16:44,410  -->  00:16:46,470
by your internet service provider.
403

403

00:16:46,470  -->  00:16:48,600
Routable IPs are publicly routable
404

404

00:16:48,600  -->  00:16:50,030
across the entire internet,
405

405

00:16:50,030  -->  00:16:53,040
and therefore, they're globally managed by ICANN.
406

406

00:16:53,040  -->  00:16:54,810
ICANN is the Internet Corporation
407

407

00:16:54,810  -->  00:16:56,570
for Assigned Names and Numbers.
408

408

00:16:56,570  -->  00:16:58,710
So if you want a public IP address,
409

409

00:16:58,710  -->  00:17:00,760
like for running a web server for your company
410

410

00:17:00,760  -->  00:17:02,570
or a Minecraft server for your kids,
411

411

00:17:02,570  -->  00:17:04,090
you can buy that IP address
412

412

00:17:04,090  -->  00:17:06,900
and ICANN is the one who will lease those out to you.
413

413

00:17:06,900  -->  00:17:09,630
Now, ICANN has five different groups underneath them
414

414

00:17:09,630  -->  00:17:10,610
who are responsible for actually
415

415

00:17:10,610  -->  00:17:12,350
handing out these public IPs
416

416

00:17:12,350  -->  00:17:14,470
based on where you actually live in the world.
417

417

00:17:14,470  -->  00:17:17,650
There is ARAIN, A-R-I-N, which is for North America.
418

418

00:17:17,650  -->  00:17:21,130
There's LACNIC, L-A-C-N-I-C, which is for Latin America.
419

419

00:17:21,130  -->  00:17:24,450
There's ethnic AFNIC, A-F-N-I-C, which is for Africa.
420

420

00:17:24,450  -->  00:17:26,630
There's APNIC, A-P-N-I-C,
421

421

00:17:26,630  -->  00:17:28,400
which is for Asia and the Pacific region.
422

422

00:17:28,400  -->  00:17:31,640
And there's RIPE, R-I-P-E, which is for Europe.
423

423

00:17:31,640  -->  00:17:33,850
These are the ones who are responsible for the management
424

424

00:17:33,850  -->  00:17:36,550
of the public IP space on behalf of ICANN
425

425

00:17:36,550  -->  00:17:38,450
in each of those different regions.
426

426

00:17:38,450  -->  00:17:40,110
Now, since I'm located in America,
427

427

00:17:40,110  -->  00:17:41,840
if I wanted a public IP address,
428

428

00:17:41,840  -->  00:17:43,490
I should go to ARIN, right?
429

429

00:17:43,490  -->  00:17:45,620
Well, not exactly.
430

430

00:17:45,620  -->  00:17:47,610
ARIN will be way too busy to handle that.
431

431

00:17:47,610  -->  00:17:49,920
They're not just going to sell me one address,
432

432

00:17:49,920  -->  00:17:51,120
they're only going to sell me IPs
433

433

00:17:51,120  -->  00:17:53,250
if I want a whole bunch of IPs.
434

434

00:17:53,250  -->  00:17:55,740
So instead, I'm going to have to go to a reseller
435

435

00:17:55,740  -->  00:17:57,860
who will sell me just a single IP.
436

436

00:17:57,860  -->  00:18:00,810
In my case, I can contact my internet service provider,
437

437

00:18:00,810  -->  00:18:02,550
somebody like Verizon or Comcast
438

438

00:18:02,550  -->  00:18:04,740
and tell them that I want a public IP.
439

439

00:18:04,740  -->  00:18:06,900
Then Verizon will pick me out one
440

440

00:18:06,900  -->  00:18:09,150
out of their entire chunk from ARIN that they have
441

441

00:18:09,150  -->  00:18:11,950
such as a class A with 16.7 million IPs,
442

442

00:18:11,950  -->  00:18:16,830
or a class B with 65,536 IPs and assign one to me.
443

443

00:18:16,830  -->  00:18:19,650
This way, Verizon can lease out that single IP
444

444

00:18:19,650  -->  00:18:22,300
or a small subnet worth of IPs for my company
445

445

00:18:22,300  -->  00:18:24,180
'cause maybe I need 5 or 10 of them.
446

446

00:18:24,180  -->  00:18:26,980
Public IPs must be purchased before you can use them
447

447

00:18:26,980  -->  00:18:27,813
and you do this
448

448

00:18:27,813  -->  00:18:29,950
through your local internet service provider.
449

449

00:18:29,950  -->  00:18:30,860
Now, on the other hand,
450

450

00:18:30,860  -->  00:18:33,830
there are also non-routable IPs known as private IPs,
451

451

00:18:33,830  -->  00:18:36,150
because, well, they're not public.
452

452

00:18:36,150  -->  00:18:39,120
Private IPs can be used by anyone at any time,
453

453

00:18:39,120  -->  00:18:41,800
but only within their own local area networks.
454

454

00:18:41,800  -->  00:18:44,630
This is why these IPs are considered not routable
455

455

00:18:44,630  -->  00:18:46,670
because no one is controlling who's using them
456

456

00:18:46,670  -->  00:18:48,310
and in which networks.
457

457

00:18:48,310  -->  00:18:49,143
In fact,
458

458

00:18:49,143  -->  00:18:51,490
if you look at your IP address of your computer right now,
459

459

00:18:51,490  -->  00:18:52,547
I bet you're using an IP address
460

460

00:18:52,547  -->  00:18:56,520
and it starts with either a 10, a 172, or a 192
461

461

00:18:56,520  -->  00:18:57,980
as its first octet.
462

462

00:18:57,980  -->  00:18:58,870
Don't believe me?
463

463

00:18:58,870  -->  00:19:01,240
Go ahead, pause this video and check.
464

464

00:19:01,240  -->  00:19:02,140
If you don't know how to check,
465

465

00:19:02,140  -->  00:19:04,090
I'm going to tell you how to do it right now.
466

466

00:19:04,090  -->  00:19:05,500
If you're on a Windows computer,
467

467

00:19:05,500  -->  00:19:07,170
I want you to hold down the Windows key
468

468

00:19:07,170  -->  00:19:09,230
and press the R key at the same time.
469

469

00:19:09,230  -->  00:19:12,210
Then type CMD and hit enter.
470

470

00:19:12,210  -->  00:19:13,710
This stands for command.
471

471

00:19:13,710  -->  00:19:15,920
Next, you have this black window on your screen.
472

472

00:19:15,920  -->  00:19:19,540
Type in ipconfig for IP configuration,
473

473

00:19:19,540  -->  00:19:22,220
and then hit enter and look at your IP address.
474

474

00:19:22,220  -->  00:19:25,380
Does it start with a 10, a 172 or a 192?
475

475

00:19:25,380  -->  00:19:26,700
I bet it does.
476

476

00:19:26,700  -->  00:19:28,050
Now, if you're on a Mac, don't worry.
477

477

00:19:28,050  -->  00:19:29,260
I'm not leaving you out.
478

478

00:19:29,260  -->  00:19:31,200
You can go ahead and look at this as well.
479

479

00:19:31,200  -->  00:19:32,160
If you're watching this video
480

480

00:19:32,160  -->  00:19:33,880
over a wireless network connection,
481

481

00:19:33,880  -->  00:19:35,830
go ahead and hold down your option key
482

482

00:19:35,830  -->  00:19:37,660
and then click on the Wi-Fi icon
483

483

00:19:37,660  -->  00:19:39,410
in the top right of your menu bar.
484

484

00:19:39,410  -->  00:19:41,410
Look down under your wireless networks name,
485

485

00:19:41,410  -->  00:19:42,990
and you're going to see your IP address.
486

486

00:19:42,990  -->  00:19:45,570
Again, I bet it starts today with either a 10,
487

487

00:19:45,570  -->  00:19:49,330
a 172 or a 192 as part of that IP.
488

488

00:19:49,330  -->  00:19:50,410
Now, am I a magician
489

489

00:19:50,410  -->  00:19:52,480
being able to tell you what your IP address is?
490

490

00:19:52,480  -->  00:19:53,730
Well, not really.
491

491

00:19:53,730  -->  00:19:55,110
You see those three values
492

492

00:19:55,110  -->  00:19:57,880
are part of what we call the private IP ranges.
493

493

00:19:57,880  -->  00:20:01,140
This includes something like 10.0.0.something,
494

494

00:20:01,140  -->  00:20:04,350
or 172.16.1.something,
495

495

00:20:04,350  -->  00:20:07,450
or 192.168.1.something
496

496

00:20:07,450  -->  00:20:09,440
and a bunch of other IPs as well.
497

497

00:20:09,440  -->  00:20:11,650
So, if you're using one of these private IPs,
498

498

00:20:11,650  -->  00:20:13,220
and I said they're not routable,
499

499

00:20:13,220  -->  00:20:14,620
how are you actually getting out to the internet
500

500

00:20:14,620  -->  00:20:16,170
to watch this video?
501

501

00:20:16,170  -->  00:20:18,000
Well, when you go out to the internet,
502

502

00:20:18,000  -->  00:20:20,200
your router actually conducts a little trick
503

503

00:20:20,200  -->  00:20:21,940
known as Network Address Translation,
504

504

00:20:21,940  -->  00:20:25,270
and it changes your private IP into a public IP.
505

505

00:20:25,270  -->  00:20:26,720
Now, we're going to cover the concept
506

506

00:20:26,720  -->  00:20:28,090
of Network Address Translation
507

507

00:20:28,090  -->  00:20:30,550
and Port Address Translation in a separate lesson
508

508

00:20:30,550  -->  00:20:32,340
because it's really important for you understand that.
509

509

00:20:32,340  -->  00:20:33,173
But for now,
510

510

00:20:33,173  -->  00:20:36,110
let's stick to talking about these private IPs.
511

511

00:20:36,110  -->  00:20:36,943
All right.
512

512

00:20:36,943  -->  00:20:37,776
For the exam
513

513

00:20:37,776  -->  00:20:39,950
and your life as a real world network technician,
514

514

00:20:39,950  -->  00:20:41,900
it's going to be really important for you to understand
515

515

00:20:41,900  -->  00:20:44,320
the ranges for private IP addresses.
516

516

00:20:44,320  -->  00:20:48,203
Now, these are defined in something known as RFC 1918.
517

517

00:20:48,203  -->  00:20:50,890
Now, RFC just stands for request for comments.
518

518

00:20:50,890  -->  00:20:53,270
And request for comments is a formal publication
519

519

00:20:53,270  -->  00:20:54,500
from the Internet Society
520

520

00:20:54,500  -->  00:20:57,890
and the Internet Engineering Task Force or IETF.
521

521

00:20:57,890  -->  00:21:00,070
These RFCs are authored by individuals
522

522

00:21:00,070  -->  00:21:01,680
or groups of computer scientists
523

523

00:21:01,680  -->  00:21:04,180
to document new technologies or standards.
524

524

00:21:04,180  -->  00:21:07,280
In this case, the RFC 1918,
525

525

00:21:07,280  -->  00:21:09,520
this is going to be used to document how organizations
526

526

00:21:09,520  -->  00:21:12,660
can conduct address allocation for private internet,
527

527

00:21:12,660  -->  00:21:16,180
which we now call intranet or your local area networks.
528

528

00:21:16,180  -->  00:21:18,130
Now in RFC 1918,
529

529

00:21:18,130  -->  00:21:20,910
there are specific ranges of private IPs described
530

530

00:21:20,910  -->  00:21:24,530
within class A, B and C that anyone can use.
531

531

00:21:24,530  -->  00:21:26,520
If you're looking at class A addresses,
532

532

00:21:26,520  -->  00:21:29,060
anything that starts with a 10 in the first octet
533

533

00:21:29,060  -->  00:21:31,230
is going to be considered a private IP.
534

534

00:21:31,230  -->  00:21:34,640
So, you can have anything from 10.0.0.0
535

535

00:21:34,640  -->  00:21:39,330
all the way up to 10.255.255.255 as your address,
536

536

00:21:39,330  -->  00:21:40,920
and it's going to be a private IP.
537

537

00:21:40,920  -->  00:21:44,730
This gives you a total of 16.7 million IP addresses
538

538

00:21:44,730  -->  00:21:46,280
that anyone can use.
539

539

00:21:46,280  -->  00:21:47,400
Now, in addition to that,
540

540

00:21:47,400  -->  00:21:49,170
we also have some class B addresses,
541

541

00:21:49,170  -->  00:21:51,270
and this one's a little bit harder to memorize.
542

542

00:21:51,270  -->  00:21:52,560
For class B addresses,
543

543

00:21:52,560  -->  00:21:55,490
anything that starts with a 172.16
544

544

00:21:55,490  -->  00:21:57,930
all the way up to 172.31
545

545

00:21:57,930  -->  00:22:00,450
is going to be part of a private IP range.
546

546

00:22:00,450  -->  00:22:03,150
This includes over 1 million IP addresses
547

547

00:22:03,150  -->  00:22:07,120
because we have 16 times 256 times 256.
548

548

00:22:07,120  -->  00:22:09,340
Now, if you're looking at a class C address,
549

549

00:22:09,340  -->  00:22:12,090
anything that starts with a 192.168
550

550

00:22:12,090  -->  00:22:14,010
is considered a private IP.
551

551

00:22:14,010  -->  00:22:17,810
This includes a range of 192.168.0.0
552

552

00:22:17,810  -->  00:22:22,070
all the way up to 192.168.255.255.
553

553

00:22:22,070  -->  00:22:25,990
This gives you 65,536 IP addresses
554

554

00:22:25,990  -->  00:22:28,400
that are there for you to use if you want them.
555

555

00:22:28,400  -->  00:22:30,740
Now, I want you to commit these ranges to memory.
556

556

00:22:30,740  -->  00:22:32,930
Remember, class A is really easy.
557

557

00:22:32,930  -->  00:22:34,450
Anything that starts with a 10
558

558

00:22:34,450  -->  00:22:36,100
dot something dot something dot something
559

559

00:22:36,100  -->  00:22:38,470
is a private IP in the class A range.
560

560

00:22:38,470  -->  00:22:40,090
Now, class C is also pretty easy
561

561

00:22:40,090  -->  00:22:43,850
because anything that is 192.168 dot something dot something
562

562

00:22:43,850  -->  00:22:46,460
is also considered a private address, in this case,
563

563

00:22:46,460  -->  00:22:48,290
a class C private address.
564

564

00:22:48,290  -->  00:22:50,850
But class B is where most people are going to struggle
565

565

00:22:50,850  -->  00:22:52,420
because it's a little bit different.
566

566

00:22:52,420  -->  00:22:54,140
It's going to contain any addresses
567

567

00:22:54,140  -->  00:22:57,700
that start with 172.16 dot something dot something
568

568

00:22:57,700  -->  00:23:01,440
all the way up to 172.31 dot something dot something.
569

569

00:23:01,440  -->  00:23:04,780
This is essentially 16 classes of class B addresses
570

570

00:23:04,780  -->  00:23:06,220
that are all next to each other,
571

571

00:23:06,220  -->  00:23:09,000
and you could use any of them as a private IP.
572

572

00:23:09,000  -->  00:23:10,280
Now, on test day,
573

573

00:23:10,280  -->  00:23:13,120
CompTIA may try to trick you and say something like,
574

574

00:23:13,120  -->  00:23:15,750
which of these addresses is not a private IP?
575

575

00:23:15,750  -->  00:23:17,410
And then they're going to give you something like
576

576

00:23:17,410  -->  00:23:19,950
172.12 dot something dot something.
577

577

00:23:19,950  -->  00:23:21,570
Now, this starts with a 172,
578

578

00:23:21,570  -->  00:23:23,300
so it looks like a private IP,
579

579

00:23:23,300  -->  00:23:26,120
but because it's 172.12,
580

580

00:23:26,120  -->  00:23:30,570
it's not between 172.16 and 172.31.
581

581

00:23:30,570  -->  00:23:33,590
So 172.12 dot something dot something
582

582

00:23:33,590  -->  00:23:35,410
is actually a private IP
583

583

00:23:35,410  -->  00:23:37,590
because it's outside of my private range.
584

584

00:23:37,590  -->  00:23:38,950
You have to be especially careful
585

585

00:23:38,950  -->  00:23:41,160
when you see an address that starts with 172
586

586

00:23:41,160  -->  00:23:45,423
because it has to be between 172.16 to 172.31
587

587

00:23:46,600  -->  00:23:48,350
to be a private IP.
588

588

00:23:48,350  -->  00:23:51,040
All of the other 172 dot something addresses
589

589

00:23:51,040  -->  00:23:52,530
will be public.
590

590

00:23:52,530  -->  00:23:54,190
Now, the next thing we need to talk about
591

591

00:23:54,190  -->  00:23:55,950
is some specialized IPS,
592

592

00:23:55,950  -->  00:23:58,340
and there are two big categories that we need to cover:
593

593

00:23:58,340  -->  00:24:01,180
the loopback address and APIPA addresses.
594

594

00:24:01,180  -->  00:24:04,080
Now, the first special IP is the loopback address.
595

595

00:24:04,080  -->  00:24:07,580
This is assigned as 127.0.0.1.
596

596

00:24:07,580  -->  00:24:08,500
Now, when this was created
597

597

00:24:08,500  -->  00:24:10,550
all the way back in the early days of the internet,
598

598

00:24:10,550  -->  00:24:13,060
the designers weren't too worried about wasting IPs
599

599

00:24:13,060  -->  00:24:14,100
because they never envisioned
600

600

00:24:14,100  -->  00:24:16,160
that we were going to use a lot of IP addresses
601

601

00:24:16,160  -->  00:24:17,390
in the entire world.
602

602

00:24:17,390  -->  00:24:22,390
So they simply dedicate an entire range that's 127.0.0.1/8
603

603

00:24:23,630  -->  00:24:26,540
or 16.7 million IP addresses
604

604

00:24:26,540  -->  00:24:29,270
to be used as internet hosts loopback addresses.
605

605

00:24:29,270  -->  00:24:31,550
Now, this allows any higher level protocol
606

606

00:24:31,550  -->  00:24:33,520
to send data to the host itself
607

607

00:24:33,520  -->  00:24:36,050
without actually going out to a switch or a router.
608

608

00:24:36,050  -->  00:24:38,320
Essentially, this creates a loop back to the host
609

609

00:24:38,320  -->  00:24:40,250
and it tests your networking protocols.
610

610

00:24:40,250  -->  00:24:41,740
So it's often used in troubleshooting
611

611

00:24:41,740  -->  00:24:44,210
and testing that were protocols on a given system
612

612

00:24:44,210  -->  00:24:46,390
to make sure your drivers are working properly.
613

613

00:24:46,390  -->  00:24:48,450
Now, because of the way the standard was developed,
614

614

00:24:48,450  -->  00:24:49,283
anything you see
615

615

00:24:49,283  -->  00:24:51,124
that starts with 127 dot something dot something
616

616

00:24:51,124  -->  00:24:54,140
dot something is considered a loopback address,
617

617

00:24:54,140  -->  00:24:58,430
although most people just use 127.0.0.1
618

618

00:24:58,430  -->  00:25:00,580
as our loopback address by default.
619

619

00:25:00,580  -->  00:25:04,650
This means the other 16.7 million IPs are pretty much wasted
620

620

00:25:04,650  -->  00:25:06,130
because we're using this range
621

621

00:25:06,130  -->  00:25:07,720
to be the entire loopback range,
622

622

00:25:07,720  -->  00:25:10,830
even though most of us only use this one IP address.
623

623

00:25:10,830  -->  00:25:12,310
Now, you may have heard the old joke
624

624

00:25:12,310  -->  00:25:14,210
that some network technicians like to use.
625

625

00:25:14,210  -->  00:25:17,490
There's no place like 127.0.0.1,
626

626

00:25:17,490  -->  00:25:20,270
which means there's no place like here, home, right?
627

627

00:25:20,270  -->  00:25:22,130
That's one 127.0.0.1.
628

628

00:25:22,130  -->  00:25:23,450
It's the local host.
629

629

00:25:23,450  -->  00:25:24,910
Now, and during the COVID pandemic,
630

630

00:25:24,910  -->  00:25:29,410
I also saw a couple of funny memes saying stay at 127.0.0.1
631

631

00:25:29,410  -->  00:25:33,110
and wear a 255.255.255.0,
632

632

00:25:33,110  -->  00:25:34,270
which essentially says,
633

633

00:25:34,270  -->  00:25:36,170
stay at home and wear a mask.
634

634

00:25:36,170  -->  00:25:40,130
Now, when it comes to the IP address of 127.0.0.1,
635

635

00:25:40,130  -->  00:25:41,960
you're going to hear it called either the loopback
636

636

00:25:41,960  -->  00:25:44,340
or you might hear people call it the local host,
637

637

00:25:44,340  -->  00:25:45,630
like I did earlier.
638

638

00:25:45,630  -->  00:25:50,090
Now, the word local hosts will always resolve to 127.0.0.1
639

639

00:25:50,090  -->  00:25:53,000
on every computer as part of its local DNS settings.
640

640

00:25:53,000  -->  00:25:58,000
So if you ping 127.0.0.1 or you ping local hosts,
641

641

00:25:58,140  -->  00:25:59,770
you're going to get the same result.
642

642

00:25:59,770  -->  00:26:01,460
It's going to result to the IP address
643

643

00:26:01,460  -->  00:26:05,650
of that loopback IP, 127.0.0.1.
644

644

00:26:05,650  -->  00:26:07,870
Now, the second special IP addresses we have
645

645

00:26:07,870  -->  00:26:10,940
is known as APIPA, A-P-I-P-A.
646

646

00:26:10,940  -->  00:26:14,190
This is also known as the Automatic Private IP Addresses.
647

647

00:26:14,190  -->  00:26:15,910
These addresses are dynamically assigned
648

648

00:26:15,910  -->  00:26:17,100
by your operating system
649

649

00:26:17,100  -->  00:26:19,370
whenever your DHCP server is unavailable
650

650

00:26:19,370  -->  00:26:22,853
and an IP address has not already been statically assigned.
651

651

00:26:22,853  -->  00:26:24,337
APIPA addresses are always going to start with
652

652

00:26:24,337  -->  00:26:28,060
169.254 dot something dot something.
653

653

00:26:28,060  -->  00:26:29,220
So you're going to find them
654

654

00:26:29,220  -->  00:26:33,360
in the address range of 169.254.0.0
655

655

00:26:33,360  -->  00:26:37,800
all the way up to 169.254.255.255.
656

656

00:26:37,800  -->  00:26:40,320
So if you ever see an IP address in this range
657

657

00:26:40,320  -->  00:26:42,400
when you look at the IP of a network device,
658

658

00:26:42,400  -->  00:26:45,000
it means that there is something wrong with the DHCP process
659

659

00:26:45,000  -->  00:26:47,520
and the device isn't getting a normal private IP
660

660

00:26:47,520  -->  00:26:50,980
from one of our class A, class B or class C ranges.
661

661

00:26:50,980  -->  00:26:52,710
Now, as your workstation boots up,
662

662

00:26:52,710  -->  00:26:54,790
it's going to attempt to get its own IP address
663

663

00:26:54,790  -->  00:26:58,290
using dynamic IPS using the DHCP protocol.
664

664

00:26:58,290  -->  00:27:01,370
This goes through a four-step process known as DORA.
665

665

00:27:01,370  -->  00:27:04,890
This is discover, offer, request and acknowledge.
666

666

00:27:04,890  -->  00:27:05,810
If something goes wrong
667

667

00:27:05,810  -->  00:27:08,670
with this DORA negotiation process with DHCP,
668

668

00:27:08,670  -->  00:27:10,730
the system simply can't get an address
669

669

00:27:10,730  -->  00:27:12,370
and your computer would eventually just crash
670

670

00:27:12,370  -->  00:27:13,800
because it wouldn't know what to do,
671

671

00:27:13,800  -->  00:27:15,830
and it would keep trying over and over again.
672

672

00:27:15,830  -->  00:27:17,360
So with the brilliant engineers
673

673

00:27:17,360  -->  00:27:20,550
of the Internet Task Force did was create this APIPA range.
674

674

00:27:20,550  -->  00:27:22,000
Now, basically what it says is that
675

675

00:27:22,000  -->  00:27:24,110
if a workstation can't get a DHCP assignment
676

676

00:27:24,110  -->  00:27:26,990
for a dynamic IP address within some amount of time,
677

677

00:27:26,990  -->  00:27:29,210
the workstation is simply going to pick its own address
678

678

00:27:29,210  -->  00:27:30,990
from this special APIPA range.
679

679

00:27:30,990  -->  00:27:32,530
Basically, any IP at once,
680

680

00:27:32,530  -->  00:27:33,930
as long as it starts with
681

681

00:27:33,930  -->  00:27:36,990
169.254 dot something dot something.
682

682

00:27:36,990  -->  00:27:38,470
So if you find a computer
683

683

00:27:38,470  -->  00:27:40,040
that can not connect to the internet,
684

684

00:27:40,040  -->  00:27:42,810
the first thing you should do is check its IP address.
685

685

00:27:42,810  -->  00:27:44,990
You can do this using ipconfig on Windows,
686

686

00:27:44,990  -->  00:27:47,840
or ifconfig on Mac or Linux machines.
687

687

00:27:47,840  -->  00:27:49,340
Now, if you see an IP address of
688

688

00:27:49,340  -->  00:27:52,430
169.254 dot something dot something,
689

689

00:27:52,430  -->  00:27:54,480
you know you have a DHCP problem
690

690

00:27:54,480  -->  00:27:56,360
and you need to check your DHCP server
691

691

00:27:56,360  -->  00:27:57,770
to ensure it's working properly,
692

692

00:27:57,770  -->  00:27:59,770
and that it's handing out private IP addresses
693

693

00:27:59,770  -->  00:28:03,140
from class A, class B or class C assigned ranges.
694

694

00:28:03,140  -->  00:28:06,730
Now, that's as deep as we need to go into DHCP right now,
695

695

00:28:06,730  -->  00:28:09,870
but I promise we are going to go back to DHCP later on,
696

696

00:28:09,870  -->  00:28:11,430
and we'll talk about all of these things
697

697

00:28:11,430  -->  00:28:13,460
and how it provides these IP addresses
698

698

00:28:13,460  -->  00:28:16,290
and how those are going to be used inside your networks.
699

699

00:28:16,290  -->  00:28:18,100
Now, the last two things we need to discuss
700

700

00:28:18,100  -->  00:28:19,810
in terms of IPv4 addressing
701

701

00:28:19,810  -->  00:28:23,270
is the concept of virtual IP addresses and subinterfaces.
702

702

00:28:23,270  -->  00:28:26,010
Now, first let's talk about virtual IP addresses,
703

703

00:28:26,010  -->  00:28:29,320
usually abbreviate as VIP or VIPA.
704

704

00:28:29,320  -->  00:28:31,710
Now, a virtual IP address is an IP address
705

705

00:28:31,710  -->  00:28:32,880
that does not correlate
706

706

00:28:32,880  -->  00:28:35,250
to an actual physical network interface.
707

707

00:28:35,250  -->  00:28:37,270
Instead, these virtual IP addresses
708

708

00:28:37,270  -->  00:28:39,530
are usually used for network address translation,
709

709

00:28:39,530  -->  00:28:41,880
fault-tolerance and virtualization.
710

710

00:28:41,880  -->  00:28:42,713
In your computer,
711

711

00:28:42,713  -->  00:28:44,410
you have a network interface card,
712

712

00:28:44,410  -->  00:28:46,070
and normally you can only configure
713

713

00:28:46,070  -->  00:28:49,030
that network interface card with a single IP address
714

714

00:28:49,030  -->  00:28:51,480
because there's only one physical network interface,
715

715

00:28:51,480  -->  00:28:54,170
namely this network interface card.
716

716

00:28:54,170  -->  00:28:56,150
Now, with a virtual IP address,
717

717

00:28:56,150  -->  00:28:58,610
you can actually configure that network interface card
718

718

00:28:58,610  -->  00:29:00,500
to respond to numerous IP addresses
719

719

00:29:00,500  -->  00:29:01,610
and have them all resolved
720

720

00:29:01,610  -->  00:29:03,500
back to your physical network interface
721

721

00:29:03,500  -->  00:29:05,330
to establish the connectivity.
722

722

00:29:05,330  -->  00:29:07,770
Routers will often use virtual IP addresses
723

723

00:29:07,770  -->  00:29:10,640
to provide redundancy in their connectivity options as well.
724

724

00:29:10,640  -->  00:29:12,060
By having a single virtual IP
725

725

00:29:12,060  -->  00:29:14,110
assigned to the default gateway, for example,
726

726

00:29:14,110  -->  00:29:15,560
we can have multiple routers
727

727

00:29:15,560  -->  00:29:18,260
that can answer up on behalf of that virtual IP.
728

728

00:29:18,260  -->  00:29:19,900
This would allow us to have a primary device
729

729

00:29:19,900  -->  00:29:21,250
to use during normal conditions
730

730

00:29:21,250  -->  00:29:22,960
and alternate device that can be used
731

731

00:29:22,960  -->  00:29:24,420
when the primary device fails,
732

732

00:29:24,420  -->  00:29:27,220
so we could fail over to that secondary device.
733

733

00:29:27,220  -->  00:29:28,750
We'll talk more about this concept
734

734

00:29:28,750  -->  00:29:30,270
when we start digging into routers
735

735

00:29:30,270  -->  00:29:32,060
and covering concepts like redundancy.
736

736

00:29:32,060  -->  00:29:32,930
But for right now,
737

737

00:29:32,930  -->  00:29:34,540
I just wanted to introduce you to the concept
738

738

00:29:34,540  -->  00:29:36,480
that virtual IP addresses exist
739

739

00:29:36,480  -->  00:29:38,400
and we use them for things like redundancy
740

740

00:29:38,400  -->  00:29:40,820
and giving an interface, one physical interface,
741

741

00:29:40,820  -->  00:29:42,810
multiple different IP addresses.
742

742

00:29:42,810  -->  00:29:44,840
Now, the second concept we need to cover here
743

743

00:29:44,840  -->  00:29:46,670
is the idea of subinterfaces,
744

744

00:29:46,670  -->  00:29:48,170
which is a virtual interface
745

745

00:29:48,170  -->  00:29:50,360
that's created by dividing up one physical interface
746

746

00:29:50,360  -->  00:29:52,660
into multiple logical interfaces.
747

747

00:29:52,660  -->  00:29:53,800
This goes hand-in-hand
748

748

00:29:53,800  -->  00:29:55,740
with the concept of a virtual IP address
749

749

00:29:55,740  -->  00:29:57,550
because each of these virtual interfaces
750

750

00:29:57,550  -->  00:29:59,200
that we're going to create is going to be able
751

751

00:29:59,200  -->  00:30:01,670
to be assigned a virtual IP address as well.
752

752

00:30:01,670  -->  00:30:03,510
These subinterfaces are often used
753

753

00:30:03,510  -->  00:30:05,600
for inter-VLAN routing of traffic
754

754

00:30:05,600  -->  00:30:08,520
by creating two subinterfaces for one physical interface,
755

755

00:30:08,520  -->  00:30:10,770
and then assigning each of those subinterfaces
756

756

00:30:10,770  -->  00:30:13,520
with an IP address from the appropriate subnet.
757

757

00:30:13,520  -->  00:30:16,051
This then allows the rider to connect these two subnets
758

758

00:30:16,051  -->  00:30:17,380
or villains virtually
759

759

00:30:17,380  -->  00:30:18,213
instead of requiring us
760

760

00:30:18,213  -->  00:30:20,390
to dedicate two physical network interfaces
761

761

00:30:20,390  -->  00:30:22,960
and attaching a real patch cable between them.
762

762

00:30:22,960  -->  00:30:23,793
All right.
763

763

00:30:23,793  -->  00:30:26,820
I know that was a ton of information in this long video.
764

764

00:30:26,820  -->  00:30:28,810
So if I went too fast for you,
765

765

00:30:28,810  -->  00:30:31,380
please watch this lesson a second time.
766

766

00:30:31,380  -->  00:30:33,050
There is a lot of important information
767

767

00:30:33,050  -->  00:30:36,020
about IPv4 addressing that you just have to know.
768

768

00:30:36,020  -->  00:30:37,340
It is critical that you understand
769

769

00:30:37,340  -->  00:30:39,210
the different classes of IP addresses,
770

770

00:30:39,210  -->  00:30:40,760
the public and private IPs,
771

771

00:30:40,760  -->  00:30:42,350
and when each of these are used,
772

772

00:30:42,350  -->  00:30:44,690
as well as the different special IP addresses that we have
773

773

00:30:44,690  -->  00:30:47,233
such as the loopback, APIPA and others.
