1
00:00:00,090 --> 00:00:01,800
In this lesson we're going to discuss

2
00:00:01,800 --> 00:00:04,110
IPv4 address types.

3
00:00:04,110 --> 00:00:06,510
Now in IPv4, there are several different ways

4
00:00:06,510 --> 00:00:08,250
to classify our addresses,

5
00:00:08,250 --> 00:00:10,800
including by whether they're public or private addresses,

6
00:00:10,800 --> 00:00:12,960
whether they're loopback or localhost addresses,

7
00:00:12,960 --> 00:00:14,880
and whether they're an APIPA address.

8
00:00:14,880 --> 00:00:16,230
Let's take a look at each of these.

9
00:00:16,230 --> 00:00:17,820
First, we need to talk about the difference

10
00:00:17,820 --> 00:00:21,000
between a public and a private IPv4 address.

11
00:00:21,000 --> 00:00:22,590
A public IPv4 address,

12
00:00:22,590 --> 00:00:24,600
also known as a routable IP address,

13
00:00:24,600 --> 00:00:25,890
is a unique IP address

14
00:00:25,890 --> 00:00:27,870
assigned to each device on the internet

15
00:00:27,870 --> 00:00:30,240
that allows it to communicate with other devices globally

16
00:00:30,240 --> 00:00:31,233
using IPv4.

17
00:00:32,790 --> 00:00:36,450
The IPv4 system uses a 32-bit address scheme

18
00:00:36,450 --> 00:00:40,620
that allows for a total of about 4.3 billion IP addresses.

19
00:00:40,620 --> 00:00:42,270
These addresses are typically written

20
00:00:42,270 --> 00:00:44,100
in a dotted decimal notation,

21
00:00:44,100 --> 00:00:45,840
and they're divided into four octets

22
00:00:45,840 --> 00:00:48,540
that are separated by those dots or periods.

23
00:00:48,540 --> 00:00:53,540
For example, 66.51.24.12 is a public IPv4 address.

24
00:00:55,710 --> 00:00:58,140
Now, these public or routable IP addresses

25
00:00:58,140 --> 00:00:59,460
must be leased or purchased

26
00:00:59,460 --> 00:01:00,990
from your internet service provider

27
00:01:00,990 --> 00:01:03,540
because they're globally managed by ICANN, which is

28
00:01:03,540 --> 00:01:06,600
the Internet Corporation for Assigned Names and Numbers.

29
00:01:06,600 --> 00:01:09,900
So if you want a public IP address assigned to your network

30
00:01:09,900 --> 00:01:11,190
so that you can host a web server

31
00:01:11,190 --> 00:01:13,800
for your company or a Minecraft server for your kids,

32
00:01:13,800 --> 00:01:16,770
you're going to have to lease or purchase that IP address.

33
00:01:16,770 --> 00:01:18,300
Now, because ICANN is responsible

34
00:01:18,300 --> 00:01:20,790
for all of the IP addresses across the globe,

35
00:01:20,790 --> 00:01:22,470
this is a lot to deal with.

36
00:01:22,470 --> 00:01:25,080
So they created five regional internet registries,

37
00:01:25,080 --> 00:01:28,140
or RIRs to be able to assist them,

38
00:01:28,140 --> 00:01:29,940
and these are the folks who are going to be responsible

39
00:01:29,940 --> 00:01:31,830
for managing the public IP addresses

40
00:01:31,830 --> 00:01:33,930
for different regions of the world.

41
00:01:33,930 --> 00:01:35,370
If you're in North America,

42
00:01:35,370 --> 00:01:38,370
you're going to be using a A-R-I-N or ARIN.

43
00:01:38,370 --> 00:01:39,840
If you're in Latin America.

44
00:01:39,840 --> 00:01:43,380
you're going to be using L-A-C-N-I-C or LACNIC.

45
00:01:43,380 --> 00:01:44,730
If you're in Africa,

46
00:01:44,730 --> 00:01:48,030
you're going to be using A-F-N-I-C or AFNIC.

47
00:01:48,030 --> 00:01:49,950
If you're in the Asia Pacific region,

48
00:01:49,950 --> 00:01:52,173
you're going to be using A-P-N-I-C or APNIC.

49
00:01:53,160 --> 00:01:56,340
And if you're in Europe, you're going to be using R-I-P-E,

50
00:01:56,340 --> 00:01:58,050
also known as RIPE.

51
00:01:58,050 --> 00:02:00,900
Now since my company is located here in the United States,

52
00:02:00,900 --> 00:02:02,610
when we want a public IP address,

53
00:02:02,610 --> 00:02:04,950
we will ask our internet service provider for one

54
00:02:04,950 --> 00:02:06,330
and they'll assign one to us

55
00:02:06,330 --> 00:02:08,789
and then insure us properly registered with ARIN

56
00:02:08,789 --> 00:02:10,110
because ARIN is responsible

57
00:02:10,110 --> 00:02:12,480
for all the publicly routable IP addresses

58
00:02:12,480 --> 00:02:14,700
inside the North American region.

59
00:02:14,700 --> 00:02:16,800
Now, most of the IP addresses you're going to use

60
00:02:16,800 --> 00:02:18,180
inside your own networks,

61
00:02:18,180 --> 00:02:19,320
you're not going to need one of these

62
00:02:19,320 --> 00:02:21,510
publicly routable IP addresses

63
00:02:21,510 --> 00:02:23,280
because each of these public IP addresses

64
00:02:23,280 --> 00:02:25,770
actually costs money each month for you to lease.

65
00:02:25,770 --> 00:02:28,920
And so instead, you may choose to use a private IP instead

66
00:02:28,920 --> 00:02:31,050
for your internal network devices.

67
00:02:31,050 --> 00:02:34,380
A private IPv4 address is a non-internet routable

68
00:02:34,380 --> 00:02:36,840
IP address used within a local network

69
00:02:36,840 --> 00:02:38,040
that allows for the communication

70
00:02:38,040 --> 00:02:40,050
between devices within that network

71
00:02:40,050 --> 00:02:42,780
without using a public IP address.

72
00:02:42,780 --> 00:02:45,450
Now, since these private IP addresses are not accessible

73
00:02:45,450 --> 00:02:48,810
over the internet, they can be used by anyone, at any time,

74
00:02:48,810 --> 00:02:51,900
but only within their own local area networks.

75
00:02:51,900 --> 00:02:54,390
This is why these IPs are not routable

76
00:02:54,390 --> 00:02:56,640
because there is no central authority like ICANN

77
00:02:56,640 --> 00:02:58,350
who's controlling who's using them

78
00:02:58,350 --> 00:03:00,660
and in which networks they're being used.

79
00:03:00,660 --> 00:03:02,520
In fact, if you look at the IP address

80
00:03:02,520 --> 00:03:04,230
of your computer right this minute,

81
00:03:04,230 --> 00:03:06,570
I bet that you're using an IP address that starts

82
00:03:06,570 --> 00:03:11,570
with either a 10, a 172, or 192 as its first octet.

83
00:03:11,580 --> 00:03:12,540
You don't believe me?

84
00:03:12,540 --> 00:03:14,880
Go ahead and pause the video and you can check.

85
00:03:14,880 --> 00:03:15,750
If you don't know how to check,

86
00:03:15,750 --> 00:03:17,370
I'll tell you how to do it right now.

87
00:03:17,370 --> 00:03:18,780
If you're on Windows 11,

88
00:03:18,780 --> 00:03:21,660
I want you to hold down your Windows key and press S,

89
00:03:21,660 --> 00:03:24,750
then type in CMD, and press Enter.

90
00:03:24,750 --> 00:03:29,220
Next, type in ipconfig and hit Enter.

91
00:03:29,220 --> 00:03:32,220
Now look on your screen and see your IP address.

92
00:03:32,220 --> 00:03:35,670
Does it start with a 10, a 172, or a 192?

93
00:03:35,670 --> 00:03:37,110
I bet you it does.

94
00:03:37,110 --> 00:03:38,100
Now, if you're on a Mac

95
00:03:38,100 --> 00:03:40,410
and you're watching this video over a wireless network,

96
00:03:40,410 --> 00:03:43,230
you can do this even easier to check your IP address.

97
00:03:43,230 --> 00:03:45,330
Simply go ahead and press down the Option Key

98
00:03:45,330 --> 00:03:48,000
on your keyboard and then click on that wifi icon

99
00:03:48,000 --> 00:03:50,340
in the top right corner of your menu bar.

100
00:03:50,340 --> 00:03:52,230
Look down under your wireless network name

101
00:03:52,230 --> 00:03:54,540
and you're going to see your IP address, again,

102
00:03:54,540 --> 00:03:59,040
I bet you your starts with a 10, a 172, or a 192.

103
00:03:59,040 --> 00:04:01,440
Now, am I a magician that I can guess your IP address

104
00:04:01,440 --> 00:04:02,820
magically over the internet?

105
00:04:02,820 --> 00:04:04,260
Well, not really.

106
00:04:04,260 --> 00:04:05,640
You see, those three values

107
00:04:05,640 --> 00:04:08,610
are part of what we call the private IP ranges.

108
00:04:08,610 --> 00:04:10,620
This includes something like 10 dot something,

109
00:04:10,620 --> 00:04:12,030
dot something, dot something.

110
00:04:12,030 --> 00:04:15,390
or 172.16 dot something, dot something

111
00:04:15,390 --> 00:04:19,260
or 192.168.1 dot something.

112
00:04:19,260 --> 00:04:21,060
If you're using a private IP

113
00:04:21,060 --> 00:04:24,150
and I said they are not routable or usable on the internet,

114
00:04:24,150 --> 00:04:25,950
how are you actually connecting to my servers

115
00:04:25,950 --> 00:04:27,240
to watch this video right now

116
00:04:27,240 --> 00:04:29,190
because you have a private IP?

117
00:04:29,190 --> 00:04:30,300
Now, that's a great question

118
00:04:30,300 --> 00:04:32,190
and I'm really glad that you asked it.

119
00:04:32,190 --> 00:04:34,080
Now, the way this works is by using something

120
00:04:34,080 --> 00:04:36,480
known as network address translation.

121
00:04:36,480 --> 00:04:39,150
Network address translation, or NAT,

122
00:04:39,150 --> 00:04:40,680
is a method used in networking

123
00:04:40,680 --> 00:04:42,930
that allows a single device, like a router,

124
00:04:42,930 --> 00:04:44,820
to act as an agent between the internet,

125
00:04:44,820 --> 00:04:46,140
or the public network,

126
00:04:46,140 --> 00:04:48,000
and a local or private network

127
00:04:48,000 --> 00:04:50,160
to remap your private IP addresses

128
00:04:50,160 --> 00:04:52,050
into a single public IP address

129
00:04:52,050 --> 00:04:54,030
and then back again to facilitate

130
00:04:54,030 --> 00:04:56,340
the communication between those two devices

131
00:04:56,340 --> 00:04:59,460
and to conserve the global IP address space.

132
00:04:59,460 --> 00:05:01,860
Essentially, whenever your computer wants to access

133
00:05:01,860 --> 00:05:03,780
a resource on the internet, like our website

134
00:05:03,780 --> 00:05:05,310
at diontraining.com,

135
00:05:05,310 --> 00:05:07,470
your computer's going to reach out to your network's router

136
00:05:07,470 --> 00:05:09,900
using its internal private IP address.

137
00:05:09,900 --> 00:05:12,870
This router will then conduct a network address translation

138
00:05:12,870 --> 00:05:16,170
to change your private IP address into a public IP address

139
00:05:16,170 --> 00:05:19,530
on the other side of the router and an associated port.

140
00:05:19,530 --> 00:05:21,450
Then it will make the request to the web server

141
00:05:21,450 --> 00:05:22,710
on your behalf,

142
00:05:22,710 --> 00:05:24,810
when the data comes back from that web server,

143
00:05:24,810 --> 00:05:26,220
your router's going to receive it

144
00:05:26,220 --> 00:05:29,190
and translate it from that public IP address and port

145
00:05:29,190 --> 00:05:31,230
back into your local private IP address

146
00:05:31,230 --> 00:05:33,780
and forward that traffic back to your system.

147
00:05:33,780 --> 00:05:35,250
Now, there's a lot more to understand

148
00:05:35,250 --> 00:05:38,220
with network address translation, also known as NAT,

149
00:05:38,220 --> 00:05:40,350
but we're going to save that for a separate lesson

150
00:05:40,350 --> 00:05:42,180
to fully cover everything you need to know

151
00:05:42,180 --> 00:05:44,190
about network address translation.

152
00:05:44,190 --> 00:05:46,050
But for now, I just want you to realize

153
00:05:46,050 --> 00:05:50,010
that it converts or translates a private IP into a public IP

154
00:05:50,010 --> 00:05:52,770
and then back again on behalf of your system.

155
00:05:52,770 --> 00:05:53,970
Now for the exam

156
00:05:53,970 --> 00:05:56,250
and your real life role as a network technician,

157
00:05:56,250 --> 00:05:57,960
it's going to be really important to memorize

158
00:05:57,960 --> 00:06:00,480
the ranges for the private IP addresses.

159
00:06:00,480 --> 00:06:03,180
These ranges are defined in the request for comments

160
00:06:03,180 --> 00:06:05,010
1918.

161
00:06:05,010 --> 00:06:07,200
Now a request for comments, or RFC,

162
00:06:07,200 --> 00:06:08,700
is a formal publication

163
00:06:08,700 --> 00:06:12,660
from the Internet Engineering Task Force known as the IETF.

164
00:06:12,660 --> 00:06:15,000
These RFCs are authored by individuals

165
00:06:15,000 --> 00:06:16,590
or groups of computer scientists

166
00:06:16,590 --> 00:06:18,840
who want to document new technologies or standards

167
00:06:18,840 --> 00:06:20,160
that they're proposing.

168
00:06:20,160 --> 00:06:22,740
In the case of RFC 1918,

169
00:06:22,740 --> 00:06:24,750
it was used to document how organizations

170
00:06:24,750 --> 00:06:27,720
could conduct address allocation for private intranet,

171
00:06:27,720 --> 00:06:29,460
which we now call intranets

172
00:06:29,460 --> 00:06:32,700
by using private or non-routable IP addresses.

173
00:06:32,700 --> 00:06:36,660
In RFC 1918, there are specific ranges of private IPs

174
00:06:36,660 --> 00:06:40,650
described for class A, class B, and class C networks.

175
00:06:40,650 --> 00:06:42,720
If you're working with a class A address,

176
00:06:42,720 --> 00:06:45,270
anything that starts with a 10 in the first octet

177
00:06:45,270 --> 00:06:47,730
is going to be considered a private IP.

178
00:06:47,730 --> 00:06:52,050
This includes the entire range of IPs from 10.0.0.0

179
00:06:52,050 --> 00:06:56,010
all the way up to 10.255.255.255,

180
00:06:56,010 --> 00:06:59,670
for a total of 16.7 million IP addresses,

181
00:06:59,670 --> 00:07:01,560
that are private and available for use

182
00:07:01,560 --> 00:07:04,380
at any time you want inside of your networks.

183
00:07:04,380 --> 00:07:06,270
If you're working with a class B address,

184
00:07:06,270 --> 00:07:07,440
anytime you see something that starts

185
00:07:07,440 --> 00:07:10,860
with a 172.16, dot something, dot something,

186
00:07:10,860 --> 00:07:13,620
going all the way up to 172.31,

187
00:07:13,620 --> 00:07:15,150
dot something, dot something,

188
00:07:15,150 --> 00:07:18,270
this is considered to be in the private IP range as well.

189
00:07:18,270 --> 00:07:21,420
Now this includes just over 1 million IP addresses

190
00:07:21,420 --> 00:07:25,410
or 16 times 256 times 256.

191
00:07:25,410 --> 00:07:27,720
Now, these class B private IP ranges

192
00:07:27,720 --> 00:07:29,820
are actually the hardest ones for you to memorize,

193
00:07:29,820 --> 00:07:30,900
and for this reason,

194
00:07:30,900 --> 00:07:33,660
the exam writers love to ask you questions about them,

195
00:07:33,660 --> 00:07:35,340
so keep those in mind.

196
00:07:35,340 --> 00:07:37,650
Now, if you're looking at class C addresses,

197
00:07:37,650 --> 00:07:40,440
anything that starts with a 192.168 dot something,

198
00:07:40,440 --> 00:07:43,950
dot something, is going to be a private IP.

199
00:07:43,950 --> 00:07:48,390
This includes the entire range of 192.168.0.0,

200
00:07:48,390 --> 00:07:52,620
all the way up to 192.168.255.255,

201
00:07:52,620 --> 00:07:57,620
which gives us 65,536 private IP addresses for us to use.

202
00:07:57,750 --> 00:07:59,910
Now, I want you to commit these ranges to memory,

203
00:07:59,910 --> 00:08:01,500
write them down in your notes.

204
00:08:01,500 --> 00:08:03,510
Remember, class A is pretty easy.

205
00:08:03,510 --> 00:08:05,100
Anything with a 10 in the front

206
00:08:05,100 --> 00:08:08,310
is going to be a private IP in the class A range.

207
00:08:08,310 --> 00:08:10,200
Class C is also pretty easy.

208
00:08:10,200 --> 00:08:12,930
Anything that starts with 192.168

209
00:08:12,930 --> 00:08:15,510
is going to be a private class C address.

210
00:08:15,510 --> 00:08:18,510
But class B, that's where most of my students struggle

211
00:08:18,510 --> 00:08:20,190
because it's a little bit odd.

212
00:08:20,190 --> 00:08:21,630
It contains anything that starts

213
00:08:21,630 --> 00:08:24,570
with 172.16 dot something, dot something,

214
00:08:24,570 --> 00:08:27,990
all the way up to 172.31 dot something, dot something,

215
00:08:27,990 --> 00:08:30,600
which is essentially 16 class B ranges,

216
00:08:30,600 --> 00:08:31,890
all sitting next to each other,

217
00:08:31,890 --> 00:08:33,690
but they kind of start out in this weird place

218
00:08:33,690 --> 00:08:38,400
in the middle of the 172 range by doing 172.16

219
00:08:38,400 --> 00:08:41,100
up to 172.31.

220
00:08:41,100 --> 00:08:43,799
So on test day, CompTIA may try to trick you

221
00:08:43,799 --> 00:08:47,280
and say, which of these addresses is not a private IP?

222
00:08:47,280 --> 00:08:48,207
And then they'll give you something like

223
00:08:48,207 --> 00:08:51,570
172.12 dot something, dot something.

224
00:08:51,570 --> 00:08:53,580
Now this IP looks like a private IP

225
00:08:53,580 --> 00:08:55,260
because it starts with 172,

226
00:08:55,260 --> 00:09:00,227
but it isn't because it's not between 172.16 and 172.31.

227
00:09:01,380 --> 00:09:03,300
So it's actually a public IP

228
00:09:03,300 --> 00:09:05,250
because it's outside of that range.

229
00:09:05,250 --> 00:09:07,290
So be really careful when you're seeing an address

230
00:09:07,290 --> 00:09:08,940
that starts with 172

231
00:09:08,940 --> 00:09:11,970
because it has to be within 172.16

232
00:09:11,970 --> 00:09:13,767
dot something, dot something up to

233
00:09:13,767 --> 00:09:16,770
172.31 dot something, dot something.

234
00:09:16,770 --> 00:09:19,380
to be a private class B IP.

235
00:09:19,380 --> 00:09:21,690
any of the other 172 dot something, dot something,

236
00:09:21,690 --> 00:09:22,860
dot something addresses

237
00:09:22,860 --> 00:09:24,990
will be considered a public IP,

238
00:09:24,990 --> 00:09:27,240
so don't get that wrong on the exam.

239
00:09:27,240 --> 00:09:29,610
Next, we need to take a look at some special types

240
00:09:29,610 --> 00:09:31,980
of IP addresses known as the loopback

241
00:09:31,980 --> 00:09:33,840
or localhost addresses.

242
00:09:33,840 --> 00:09:36,630
Now, the loopback address, also known as the localhost,

243
00:09:36,630 --> 00:09:38,070
is a specialized IP address

244
00:09:38,070 --> 00:09:42,450
that is always assigned as 127.0.0.1.

245
00:09:42,450 --> 00:09:45,450
Now all the way back in 1986 when this was created,

246
00:09:45,450 --> 00:09:47,370
the developers weren't really worried about wasting

247
00:09:47,370 --> 00:09:51,600
IP addresses because there were 4.3 billion IPv4 addresses.

248
00:09:51,600 --> 00:09:53,430
So they simply went ahead and dedicated

249
00:09:53,430 --> 00:09:58,430
the entire 127.0.0.0/8 range, or 16.7 million IPs

250
00:10:00,330 --> 00:10:02,790
to be used as the internet host loopback address,

251
00:10:02,790 --> 00:10:05,040
also known as our localhost.

252
00:10:05,040 --> 00:10:06,630
Now, the loopback address is used

253
00:10:06,630 --> 00:10:08,160
so that any higher level protocol

254
00:10:08,160 --> 00:10:10,410
can send data back to the host itself

255
00:10:10,410 --> 00:10:12,750
without going out to a switch or router.

256
00:10:12,750 --> 00:10:15,360
Essentially, this creates a loopback to the host,

257
00:10:15,360 --> 00:10:16,770
and it's often used for troubleshooting

258
00:10:16,770 --> 00:10:18,570
and testing your network protocol software

259
00:10:18,570 --> 00:10:20,160
on a given system.

260
00:10:20,160 --> 00:10:22,320
Now, because of the way the standard was defined,

261
00:10:22,320 --> 00:10:25,380
anything that starts with a 127 in the first octet

262
00:10:25,380 --> 00:10:27,660
is going to be treated as a loopback address.

263
00:10:27,660 --> 00:10:29,610
But almost always you're going to see this written

264
00:10:29,610 --> 00:10:33,690
as 127.0.0.1 for this purpose.

265
00:10:33,690 --> 00:10:36,990
That means the other 16.7 million IPs

266
00:10:36,990 --> 00:10:39,300
inside the 127 dot something, dot something,

267
00:10:39,300 --> 00:10:40,320
dot something range,

268
00:10:40,320 --> 00:10:42,387
are really simply wasted as part of this loopback

269
00:10:42,387 --> 00:10:44,640
or localhost range.

270
00:10:44,640 --> 00:10:46,860
Now you've heard me call the loopback IP address

271
00:10:46,860 --> 00:10:50,280
of 127.0.0.1, the localhost,

272
00:10:50,280 --> 00:10:52,020
and almost every computer in the world,

273
00:10:52,020 --> 00:10:55,410
if you type in the word localhost inside of your computer,

274
00:10:55,410 --> 00:10:57,240
your local DNS settings are going to resolve

275
00:10:57,240 --> 00:11:00,450
that back to 127.0.0.1.

276
00:11:00,450 --> 00:11:02,400
If you want to go into your command line right now

277
00:11:02,400 --> 00:11:07,020
and type in ping localhost, or ping 127.0.0.1,

278
00:11:07,020 --> 00:11:09,000
you're going to get the exact same results

279
00:11:09,000 --> 00:11:11,340
because localhost is the human readable name

280
00:11:11,340 --> 00:11:15,720
for the IP address of 127.0.0.1.

281
00:11:15,720 --> 00:11:17,790
Now, there's another special IP address range

282
00:11:17,790 --> 00:11:21,120
you need to be aware of, and this is called APIPA.

283
00:11:21,120 --> 00:11:24,060
Now APIPA, spelled A-P-I-P-A,

284
00:11:24,060 --> 00:11:26,460
is the automatic private IP addresses,

285
00:11:26,460 --> 00:11:29,070
and these APIPA addresses are dynamically assigned

286
00:11:29,070 --> 00:11:30,360
by your operating system

287
00:11:30,360 --> 00:11:33,150
whenever the network's DHCP server is unavailable

288
00:11:33,150 --> 00:11:35,730
and an IP address was not already statically assigned

289
00:11:35,730 --> 00:11:40,730
to your system, the APIPA range is 169.254.0.0

290
00:11:41,370 --> 00:11:46,370
and it goes all the way up to 169.254.255.255,

291
00:11:46,410 --> 00:11:50,610
which consists of 65,536 possible APIPA addresses

292
00:11:50,610 --> 00:11:52,050
that you can use.

293
00:11:52,050 --> 00:11:54,300
Now, basically anytime you see an IP address

294
00:11:54,300 --> 00:11:58,170
reported as 169.254, dot something, dot something.

295
00:11:58,170 --> 00:11:59,670
This means your device was unable

296
00:11:59,670 --> 00:12:02,610
to complete the DHCP request and assignment process,

297
00:12:02,610 --> 00:12:03,960
and because that device isn't getting

298
00:12:03,960 --> 00:12:06,870
a normal private IP from our network using DHCP,

299
00:12:06,870 --> 00:12:08,520
it's going to simply choose one at random

300
00:12:08,520 --> 00:12:10,710
from the APIPA range instead.

301
00:12:10,710 --> 00:12:12,720
Now, when your workstation first boots up,

302
00:12:12,720 --> 00:12:14,850
it's going to attempt to get a dynamic IP address

303
00:12:14,850 --> 00:12:16,950
using the DHCP protocol.

304
00:12:16,950 --> 00:12:21,150
It goes through a four step process known as DORA, D-O-R-A.

305
00:12:21,150 --> 00:12:24,960
This stands for Discover, Offer, Request, and Acknowledge.

306
00:12:24,960 --> 00:12:25,860
Now if something goes wrong

307
00:12:25,860 --> 00:12:28,080
with this DHCP negotiation process,

308
00:12:28,080 --> 00:12:30,060
the system won't be able to get an IP address

309
00:12:30,060 --> 00:12:31,620
from the DHCP server.

310
00:12:31,620 --> 00:12:34,140
Now, if this happened, your computer would just crash

311
00:12:34,140 --> 00:12:36,540
because it would keep trying over and over and over again

312
00:12:36,540 --> 00:12:37,950
and nothing would happen.

313
00:12:37,950 --> 00:12:40,470
So what the brilliant engineers of the Internet Task Force

314
00:12:40,470 --> 00:12:42,810
did was create this special range of IPs

315
00:12:42,810 --> 00:12:45,600
called APIPA to overcome this challenge.

316
00:12:45,600 --> 00:12:47,790
Basically, it says if you have a workstation

317
00:12:47,790 --> 00:12:50,730
that can't get a DHCP assignment for a dynamic IP address,

318
00:12:50,730 --> 00:12:52,290
within a certain amount of time,

319
00:12:52,290 --> 00:12:55,380
that workstation will just give up and pick its own address

320
00:12:55,380 --> 00:12:59,430
from this special APIPA range of 169.254 dot something,

321
00:12:59,430 --> 00:13:00,480
dot something.

322
00:13:00,480 --> 00:13:02,160
So if you ever find a computer

323
00:13:02,160 --> 00:13:03,720
that cannot connect to the internet,

324
00:13:03,720 --> 00:13:06,330
the first thing you should check is its IP address.

325
00:13:06,330 --> 00:13:09,210
You can do this using ipconfig on Windows Systems,

326
00:13:09,210 --> 00:13:13,140
ifconfig on Mac Systems or ip on Linux Systems.

327
00:13:13,140 --> 00:13:16,530
If you see an IP address that starts with 169.254,

328
00:13:16,530 --> 00:13:17,940
dot something, dot something,

329
00:13:17,940 --> 00:13:20,190
then you know it's a DHCP problem

330
00:13:20,190 --> 00:13:22,140
and you need to check the DHCP server

331
00:13:22,140 --> 00:13:23,430
to make sure it's working properly

332
00:13:23,430 --> 00:13:25,380
and handing out private IP addresses

333
00:13:25,380 --> 00:13:28,680
from the class A, class B, or class C range.

334
00:13:28,680 --> 00:13:30,150
Now, that's as deep as we need to go

335
00:13:30,150 --> 00:13:31,980
into DHCP for right now,

336
00:13:31,980 --> 00:13:35,010
but we will come back to DHCP later on in its own lesson

337
00:13:35,010 --> 00:13:36,930
to dive much deeper into how it works

338
00:13:36,930 --> 00:13:39,150
and the kind of information it can provide your computer

339
00:13:39,150 --> 00:13:42,270
in addition to that dynamically assigned IP address.

340
00:13:42,270 --> 00:13:44,400
All right, I know that was a ton of information

341
00:13:44,400 --> 00:13:46,710
in this video and if I went too fast for you,

342
00:13:46,710 --> 00:13:48,300
I do recommend that you go ahead

343
00:13:48,300 --> 00:13:50,670
and watch this video a second time.

344
00:13:50,670 --> 00:13:52,590
There is so much important information in here

345
00:13:52,590 --> 00:13:55,140
that you need to know as a good network technician

346
00:13:55,140 --> 00:13:56,580
and for the exam.

347
00:13:56,580 --> 00:13:58,650
So remember, when you're trying to understand

348
00:13:58,650 --> 00:14:00,360
IPv4 address types,

349
00:14:00,360 --> 00:14:02,670
it's really important that you recognize the distinctions

350
00:14:02,670 --> 00:14:05,520
between public and private IPv4 addresses,

351
00:14:05,520 --> 00:14:07,153
as well as the special ranges like loopback,

352
00:14:07,153 --> 00:14:09,690
localhost, and APIPA addresses.

353
00:14:09,690 --> 00:14:11,640
Now, public IPv4 addresses

354
00:14:11,640 --> 00:14:14,310
are unique global identifiers that are needed for devices

355
00:14:14,310 --> 00:14:15,930
to communicate over the internet.

356
00:14:15,930 --> 00:14:18,390
And these public IP addresses are managed by ICANN

357
00:14:18,390 --> 00:14:20,130
and its regional bodies.

358
00:14:20,130 --> 00:14:21,930
Private IP addresses on the other hand,

359
00:14:21,930 --> 00:14:23,850
are only used within our local networks

360
00:14:23,850 --> 00:14:25,800
and they allow for internal communication

361
00:14:25,800 --> 00:14:28,080
without being directly exposed to the internet.

362
00:14:28,080 --> 00:14:29,460
This helps us save money

363
00:14:29,460 --> 00:14:30,720
and it also helps us to preserve

364
00:14:30,720 --> 00:14:33,150
the limited public IP version four address space

365
00:14:33,150 --> 00:14:34,950
that is available today.

366
00:14:34,950 --> 00:14:36,630
The loopback or localhost address

367
00:14:36,630 --> 00:14:37,980
is used for internal testing

368
00:14:37,980 --> 00:14:40,050
of your device's network protocols.

369
00:14:40,050 --> 00:14:43,080
The loopback or localhost address is usually just going to use

370
00:14:43,080 --> 00:14:46,680
127.0.0.1 as its IP address,

371
00:14:46,680 --> 00:14:49,320
but the entire 127 dot something, dot something,

372
00:14:49,320 --> 00:14:52,339
dot something range is actually reserved for loopback

373
00:14:52,339 --> 00:14:53,670
and localhost use.

374
00:14:53,670 --> 00:14:56,220
The automatic private IP address, or APIPA,

375
00:14:56,220 --> 00:14:58,290
is a fallback for network configurations

376
00:14:58,290 --> 00:14:59,940
whenever DHCP fails,

377
00:14:59,940 --> 00:15:01,980
but they are considered to be private IPs

378
00:15:01,980 --> 00:15:04,140
and not routable over the internet.

379
00:15:04,140 --> 00:15:06,780
If you see a device has been assigned an APIPA address,

380
00:15:06,780 --> 00:15:08,910
you should check its network connectivity first,

381
00:15:08,910 --> 00:15:10,320
and if that's working properly,

382
00:15:10,320 --> 00:15:12,660
you then need to go on to check the DHCP server

383
00:15:12,660 --> 00:15:14,613
to make sure it's reachable and online.

