-: IPv6 addressing. 2 2
In this lesson, we're going to introduce the concept 3 3
surrounding IPv6 or Internet Protocol version six. 4 4
So up to this point, we've really just talked 5 5
about IPv4 including how to subnet it, 6 6
but one of the problems that we have with IPv4 7 7
is that it's limited in its address space. 8 8
This is because there are only 32 bits 9 9
that make up an IPv4 address, 10 10
giving us only 4.2 billion possible address combinations. 11 11
Now I know 4.2 billion sounds like a whole lot of IPs, 12 12
but when we took out entire portions of things 13 13
for things like IP put addresses, 14 14
local host addresses, private IPs 15 15
and then there was a huge amount of waste 16 16
before you even started to use subnetting, 17 17
this led to a big issue and we began to start running 18 18
out of network addresses inside of IPv4. 19 19
This is known as address exhaustion and it is a real thing. 20 20
In fact, in November of 2019, 21 21
RIPE NCC, the Regional Internet Registry for Europe, 22 22
West Asia and the former USSR, 23 23
announced they have already exhausted 24 24
its entire pool of IPv4 addresses. 25 25
Luckily though, the Internet Engineering Task Force or IETF 26 26
had already started looking into the future 27 27
and they developed IPv6 as a standard 28 28
all the way back in 1995 29 29
with an RFC that documented their vision for IPv6 30 30
which they termed IP Next Generation or IPng. 31 31
Now you see IPv6 is actually a huge improvement over IPv4 32 32
in terms of the number of addresses available. 33 33
Instead of using a 32-bit address like we do in IPv4, 34 34
IPv6 going to use 128-bit address. 35 35
This is going to give you a much larger address space. 36 36
In fact, it's going to give you a possibility 37 37
of 340 undecillion IP addresses. 38 38
That is enough IP addresses for every man, 39 39
woman and child on the planet. 40 40
This is two to the 128th power. 41 41
In fact, there are many, many IP addresses 42 42
for each man, woman and child on the planet 43 43
because there are so many IP addresses available. 44 44
Now you might be wondering to yourself, 45 45
hey, we went from IPv4 to IPv6. 46 46
What happened to version five? 47 47
Why did we jump straight to version six? 48 48
Well version five was created, 49 49
but it was never fully adopted as an official protocol 50 50
or standard and therefore it never went into production. 51 51
Instead, a lot of those concepts that were developed 52 52
under version five because it was an experimental protocol, 53 53
were then brought into IPv6 54 54
when it became an official standard. 55 55
So let's talk about the benefits of IPv6. 56 56
One of the biggest benefits 57 57
is that much larger address space 58 58
because of the 128-bit addresses. 59 59
In addition to that, 60 60
IPv6 also increased the efficiency of our networks 61 61
by removing IPv4's broadcast data flow type. 62 62
Now IPv6 is also more secure 63 63
because there is no packet or datagram fragmentation 64 64
within the IPv6 standard. 65 65
There's also no maximum transmission units 66 66
for discovery within each session 67 67
unlike IPv4 which contained an MTU 68 68
with a certain size for each packet. 69 69
In IPv4, if I sent you a packet that was larger 70 70
than your maximum transmission unit size, 71 71
it would actually fragment that 72 72
and send it over the network. 73 73
And then when it reached its destination, 74 74
it would be reassembled and read. 75 75
This was actually a security risk. 76 76
It also required extra processing 77 77
and it could actually slow down your networks 78 78
because it become a very inefficient way of doing things 79 79
in our modern networks 80 80
with higher internet connection speeds. 81 81
So with IPv6, they decided to do away 82 82
with fragmentation completely. 83 83
Now in addition to providing all of these new benefits, 84 84
the creators of IPv6 were also very smart 85 85
and realized that IPv6, to be embraced and accepted fully, 86 86
it would have to be backwards compatible with IPv4 87 87
and allow both IPv6 and IPv4 to coexist on the same network. 88 88
After all, it was already late in 1990s 89 89
when IPv6 was being developed and released 90 90
and lots of computer networks 91 91
were already feel it all over the globe. 92 92
So it would not be feasible 93 93
for us to simply change over everything in a single day. 94 94
Think about it like the current migration 95 95
we're going through 96 96
from gas powered to electric power vehicles. 97 97
This is happening throughout the entire 2020s 98 98
and into 2030s. 99 99
Now this would be an impossible thing for us to say, 100 100
hey, everybody on January 1st 2025, 101 101
no one can use gas powered vehicles anymore. 102 102
All of them we'll replace with electric vehicles 103 103
as of that date. 104 104
If a government tried to do that, 105 105
they'd probably have a revolution on their hands 106 106
because so many people already own gas powered cars 107 107
and spent a ton of money and investing into those cars 108 108
and infrastructure to support them. 109 109
Now for that reason, we're not going to simply replace 110 110
all gas powered cars overnight. 111 111
Instead, there's going to be this slow transition 112 112
from gas power to electric that goes on by 2030 113 113
or maybe 2040 as more and more of the newer cars 114 114
sold in the world will be sold as electric 115 115
and they'll stop selling gas power vehicles. 116 116
Well the exact same thing is going on with IPv6. 117 117
So IPv6 allows for both IPv4 and IPv6 118 118
to co-exist on the same networks 119 119
and the equipment that runs these networks 120 120
becomes known as dual stack which simply means 121 121
they can run both IPv4 protocols and IPv6 protocols 122 122
on the same network devices simultaneously. 123 123
With dual stack devices, if a client supports IPv6, 124 124
the router or switch would prefer to use IPv6 125 125
and we'll talk under that method. 126 126
Now if a device is not able to support IPv6, 127 127
it flips itself back and says, 128 128
okay, I'll talk to you using the older IPv4 protocol. 129 129
This way I can still support you. 130 130
Another method that we use is known as tunneling. 131 131
This is where IPv6 is going to be tunneled over an IPv4 device. 132 132
This allows your older IPv4 routers 133 133
to still carry IPv6 traffic. 134 134
IPv6 is essentially going to be tunneled as a mechanism 135 135
for encapsulating the IPv6 packets within IPv4 headers 136 136
and carrying this IPv6 data over those IPv4 routers 137 137
and other infrastructure that already exists. 138 138
It does this by creating a point-to-point tunnel 139 139
between the source and destination 140 140
and then encapsulating that information. 141 141
This allows isolated IPv6 clients and servers 142 142
to be able to communicate without needing to upgrade 143 143
all of the routers and switch infrastructure 144 144
that still uses IPv4 that may exist between them. 145 145
Now one day we may eventually see IPv4 retired fully, 146 146
but so far it hasn't happened and personally, 147 147
I'm not holding my breath. 148 148
From some articles I've read, predictions are that IPv4 149 149
will remain with us until at least 2040 150 150
so you're going to have to know how to work with both 151 151
IPv4 and IPv6 for the foreseeable future 152 152
as a network technician. 153 153
Another benefit of IPv6 is that it has a simplified header. 154 154
So instead of those 12 fields that we had in IPv4, 155 155
we only have five fields in IPv6 156 156
making it a slimmed down header 157 157
that is a lot more efficient to send over our networks. 158 158
So you may be wondering what does an IPv6 header look like. 159 159
Well I'm going to show it to you, but please realize 160 160
you don't need to memorize this for the exam. 161 161
Instead, this is just to show you the different fields 162 162
that were in IPv4 which is on top 163 163
versus IPv6 which is on bottom. 164 164
And now you can see how much more simple 165 165
IPv6 really is over IPv4. 166 166
Alright, let's get back to some things 167 167
that you do need to understand for the exam. 168 168
Like what does an IPv6 address actually look like. 169 169
Well I already said that it's 128 bits in length 170 170
so that means it would have 128 ones or zeros 171 171
if we wrote it out in binary 172 172
and that seems like a really bad idea to me. 173 173
So we're not going to do that. 174 174
Now we could use dotted decimal notation 175 175
like we did an IPv4, 176 176
but that still will be a lot of octets to write out 177 177
because we would need 16 octets to represent all 128 bits. 178 178
So to solve this problem, the IETF 179 179
decided that we should use hexadecimal digits instead. 180 180
You see, hexadecimal is base 16 181 181
which you may or may not remember from your high school 182 182
algebra classes. 183 183
Now in hexadecimal, each hexadecimal digit 184 184
is actually four bits and this is going to allow us 185 185
to represent an IPv6 address 186 186
by combining four hexadecimal digits together 187 187
to make up what we call a segment. 188 188
Now a segment is going to have 16 bits in it. 189 189
This is represented by those four hexadecimal digits 190 190
and then we're going to add a colon 191 191
and then we're going to keep adding segments 192 192
until we get up to 128 bits 193 193
which is going to take eight segments, 194 194
each of those having four hexadecimal digits each. 195 195
This gives me a total of 32 hexadecimal digits 196 196
which is still pretty long. 197 197
Now with 128 bits being represented in an IPv6 address, 198 198
this means we will have no more than 32 hexadecimal digits 199 199
inside of all these segments. 200 200
Now why did I say no more than 32 digits in length 201 201
for the total of these eight segments? 202 202
Why wouldn't it just be 32 hexadecimal digits 203 203
because 32 digits times four bits per digit 204 204
would give us 128 bits? 205 205
Well this is because IPv6 actually allows us to use 206 206
a shorthand to be able to simplify 207 207
our very long IPv6 addresses. 208 208
Now the rules of shorthand are really important 209 209
because you could see exam questions on these. 210 210
So if you have four zeros for a segment, 211 211
you can actually put one zero there instead 212 212
and drop those leading zeros. 213 213
For example, let's pretend I have a really long IPv6 address 214 214
of 2018:0000:0000:0000:0000:0000:4815:54ae. 215 215
Using this simple rule, I can replace all those segments 216 216
that have multiple zeros with a single zero. 217 217
This would give me 2018:0:0:0:0:0:4815:54ae. 218 218
Alright, this reduced my number of hexadecimal digits 219 219
down from 32 to just 17 so it's about half the length. 220 220
We're getting better, but I'm not going to stop there. 221 221
There's another rule I can use 222 222
in the world of IPv6 shorthand. 223 223
This rule says that if there are multiple segments 224 224
that all have zeros in them 225 225
and no other hex digits are being represented there, 226 226
I can summarize that by using a double colon 227 227
and take out all those zeros. 228 228
Now this rule is special because you can only do 229 229
the double colon thing one time inside an IPv6 address. 230 230
So using my double colon rule, I can summarize 231 231
232 2018:0:0:0:0:0:4815:54ae 232 233
into removing all those five sets of zeros 233 234
and replacing them with a double colon 234 235
and getting myself 2018::4815:54ae. 235 236
So I went from 32 hexadecimal digits 236 237
down to 17 hexadecimal digits. 237 238
and now I'm down from 17 digits 238 239
all the way down to 12 digits. 239 240
Much smaller, much easier to work with. 240 241
You can see how this shorthand is really helpful. 241 242
So how are you going to recognize an IPv6 address 242 243
versus an IPv4 address? 243 244
Well the first way is by looking at what IPv4 is. 244 245
IPv4 is always going to use the dotted decimal notation 245 246
using four octets. 246 247
Now IPv6 on the other hand 247 248
is going to use colons between its numbers 248 249
and it's going to be written in hexadecimal. 249 250
Alright, now one of the questions you might see on test day 250 251
is to identify an IPv6 address when you see one. 251 252
For example, you might get a question like 252 253
which of the following is an IPv6 address? 253 254
This would be a fair question to ask you. 254 255
You're going to get some options like 192.168.1.1 255 256
which we know isn't it because that's an IPv4 address. 256 257
You're going to get 12:34:56:78:90:AB or 1234::5678:90AB. 257 258
So wait a minute, those last two I just said, 258 259
they're really similar, aren't they? 259 260
Yes, but only one of those is a valid IPv6 address. 260 261
Do you know which one it is? 261 262
Because most students get confused here. 262 263
Now the second option here is actually not an IPv6 address. 263 264
Instead it's a MAC address. 264 265
Remember, MAC addresses which are a layer two 265 266
physical addresses are always going to have 266 267
12 hexadecimal digits and separated by colons. 267 268
Usually they're going to be written as six groups 268 269
of two digits each and each of those are going to be separated 269 270
by a single colon. 270 271
An IPv6 address on the other hand, 271 272
should always be written in segments of four digits each 272 273
and they should always have 16 segments 273 274
unless you see a double colon. 274 275
In this example, we have a double colon 275 276
between the first and second segment in our third option. 276 277
So this is a good shorthand that we can use 277 278
and we identify that it was an IPv6 address 278 279
because we removed all the zeros 279 280
between the first and second segment inside this address. 280 281
So if you count up something that looks like an IPv6 address 281 282
and it has 12, exactly 12 hexadecimal digits 282 283
separated by single colons 283 284
and you don't see a double colon anywhere, 284 285
that is a MAC address, not an IPv6 address. 285 286
Otherwise if it looks something like this 286 287
and includes hexadecimal digits, 287 288
it's going to be an IPv6 address on exam day. 288 289
For the exam, you just need to be able to recognize 289 290
what an IPv6 address looks like 290 291
and you should be able to summarize one down 291 292
by taking out zeros and consolidating them 292 293
using that double colon trick. 293 294
If you can do these two things, you're going to be fine 294 295
for IPv6 addressing on exam day. 295 296
Now when it comes to IPv6 addressing, 296 297
there are three different address types that you can use, 297 298
unicast addresses, multicast addresses 298 299
and anycast addresses. 299 300
One of the interesting things about IPv6 300 301
that really distinguishes it from IPv4 301 302
is that we can assign multiple IPv6 addresses 302 303
to a single interface on a client 303 304
and these assignments can be a mixture 304 305
of any of these three different types, 305 306
unicast, multicast and anycast. 306 307
So even if you only have one network interface card 307 308
on your workstation or laptop, 308 309
you could have multiple IPv6 addresses 309 310
and different types of IPv6 addresses 310 311
assigned to that one card. 311 312
Unicast addresses are going to be used to identify 312 313
a single interface. 313 314
These are broken down into globally-routed unicast addresses 314 315
and link-local addresses. 315 316
A globally-routed unicast address 316 317
is similar to what we have as a public address with IPv4 317 318
using unicast A, B and C class addresses. 318 319
Now in IPv6, a globally-routed unicast address 319 320
is always going to start out with its first segment 320 321
containing 2000 to 3999. 321 322
Now if you see 2000 to 3999 as your first segment, 322 323
this means it's a globally-routed unicast address. 323 324
For example, the IPv6 address 324 325
of 25A40DB885A3123456788A2E03707334 325 326
would be globally-routable as a unicast address 326 327
because its first segment contains 25A4 327 328
which is between 2000 and 3099. 328 329
Now a link-local address on the other hand, 329 330
also called a local use address, 330 331
is used like a private IP address was in IPv4. 331 332
A link-local address in IPv6 can only be used 332 333
on a local area network and it always is going to begin 333 334
with FE80 as its first segment within an IPv6 address. 334 335
Now whenever an IPv6 system starts up, 335 336
it's going to actually create a link-local address 336 337
for each IPv6 interface on that system 337 338
even if a globally-routable address 338 339
was already manually configured or obtained 339 340
through a configuration protocol like DHCP. 340 341
To do this, it's going to use something known as SLAAC, 341 342
the Stateless Address Auto Configuration or SLAAC. 342 343
With stateless auto configuration, 343 344
the host does not need to obtain addresses 344 345
or other configuration information 345 346
from a centralized server like DHCP. 346 347
Instead, it can actually independently assign itself 347 348
a link-local address, test the uniqueness 348 349
of that link-local address, 349 350
assign the link-local address to itself, 350 351
contact the router and provide direction to the node 351 352
about how to proceed with the auto configuration 352 353
and it can even configure the global unicast address 353 354
that it wants to use. 354 355
We're going to come back to this concept in just a few minutes 355 356
as we dive a bit deeper into it as we start to talk 356 357
about EUI-64 and the Neighbor Discovery Protocol 357 358
since both of these processes 358 359
are used with the stateless address auto configuration 359 360
protocol known as SLAAC. 360 361
Next we have multicast addresses. 361 362
Now multicast addresses are used to identify 362 363
a group of interfaces so that a packet can be sent 363 364
to a multicast address and then be delivered 364 365
to all the interfaces within a group. 365 366
In IPv6, a multicast address will always contain FF 366 367
as the first two digits within the first segment. 367 368
If you see FF at the beginning of an IPv6 address, 368 369
remember, it's multicast. 369 370
The final type of address we have 370 371
is known as an anycast address. 371 372
Anycast addresses are used to identify a set of interfaces 372 373
so that a packet can be sent to any member of a set. 373 374
We're going to talk more about how anycast works 374 375
when we cover IPv6 data flows in a separate video. 375 376
Anycast addresses are actually allocated 376 377
from the unicast address space 377 378
so there's really no way to determine if an IPv6 address 378 379
is unicast or anycast just by looking at the IPv6 address. 379 380
Now when you're looking at multicast or link-local, 380 381
you have a very easy way to do this, 381 382
but you don't have an easy way 382 383
to figure out unicast versus anycast. 383 384
Alright, let's go back and talk a little bit more 384 385
about SLAAC, 385 386
the stateless address auto configuration process. 386 387
Now as I said, in IPv6, 387 388
there is an auto configuration process known as SLAAC 388 389
and we use this to discover the current network 389 390
that the interface is located on 390 391
and then allow it to select its own host ID 391 392
based on its MAC address using a process known as EUI-64. 392 393
Now this EUI-64 or Extended Unique Identifier process 393 394
will allow a host to assign itself a unique 64-bit 394 395
IPv6 interface identifier called EUI-64. 395 396
Now this EUI-64 format address 396 397
is obtained by using the interface's 48-bit MAC address. 397 398
The MAC address is first separated into two 24-bit portions. 398 399
The first half of the MAC address is going to contain 399 400
the OUI or the Organizational Unique Identifier 400 401
and the second half is going to contain 401 402
the specific network interface card. 402 403
Now in between those, we're going to shove a 16-bit 403 404
hexadecimal value of FFFE. 404 405
This way I can take 24 bits, 16 bits and 24 bits 405 406
and put together to get a 64-bit EUI address. 406 407
Now this gives you the 64 bits that you're going to need 407 408
to identify your interface on that network. 408 409
Then the interface will use auto discovery 409 410
to determine the network it is on 410 411
and add the network portion of the IPv6 address 411 412
which is going to be the first 64 bits 412 413
inside of our addresses. 413 414
Now we're going to put that first 64 bits 414 415
to represent the network in front of the 64 bits 415 416
from the EUI-64 address we created from our MAC address 416 417
to create a unicast globally-routable IPv6 address 417 418
that we can now use. 418 419
So you can see how all this works together 419 420
using that MAC address 420 421
to create this globally-routable address. 421 422
Now DHCP can also be used within IPv6 422 423
if you prefer to use it. 423 424
If you do, you're going to have to use 424 425
the DHCP version six protocol. 425 426
This would allow you to have DHCP 426 427
automatically assign things from a DHCP version six server. 427 428
But since the auto configuration process with EUI-64 428 429
is already built into the IPv6 protocol by default, 429 430
you really don't need to use DHCP version six. 430 431
But if you do want to use DHCP version six, 431 432
you can and it will allow you to assign 432 433
what addresses each interface is going to get 433 434
instead of allowing them 434 435
to use the auto configuration protocol of SLAAC. 435 436
Now as I said, IPv6 will choose its own address 436 437
based on its MAC address by default. 437 438
Then it's going to use this thing known as NDP 438 439
or the Neighbor Discovery Protocol 439 440
to learn about the other layer two addresses on the network 440 441
based on their MAC addresses 441 442
and then it will pick its own host ID. 442 443
Let's talk a little bit more about NDP, 443 444
that Neighbor Discovery Protocol. 444 445
NDP is used to perform router solicitation, 445 446
router advertisement, neighbor solicitation, 446 447
neighbor advertisement and redirection. 447 448
Router solicitation is when your client 448 449
is going to send a message 449 450
to locate the routers on its network 450 451
because it has to figure out what the default gateway is 451 452
that everyone's using so it can get out of that network 452 453
and onto the internet. 453 454
Routers can also do advertisements over NDP. 454 455
Essentially they're going to say, 455 456
hey, I'm the router, I'm over here. 456 457
You guys can solicit me and ask me questions. 457 458
Neighbor solicitation is where your IPv6 458 459
starts going around and saying, 459 460
hey, what other nodes are on this network 460 461
and they ask their neighbors or other devices. 461 462
This allows your interface to try to determine 462 463
what link layer addresses or layer two addresses 463 464
are out there so it can learn from them 464 465
and figure out how to talk to them directly. 465 466
Now neighbor advertisement is like router advertisement, 466 467
but it happens with your neighbors. 467 468
Those clients start saying, hey, hey, I'm over here. 468 469
These are all the different services that I offer. 469 470
You should come talk to me. 470 471
Finally, we have redirection 471 472
which is where routers can inform the hosts 472 473
that there are better first-hop router options out there 473 474
to increase the efficiencies of your network. 474 475
For example, if I'm sitting in San Juan, Puerto Rico 475 476
and my computer thinks the best first-hop router 476 477
is for me to get to New York and then go over to California, 477 478
this may not be the most efficient route for me, 478 479
but it probably works. 479 480
Now another router in Florida might go, hey, you know what? 480 481
I'm actually a better first-hop router for you. 481 482
I can save you some time. So I'm closer. 482 483
Come talk to me and I'll send your information 483 484
all the way over to California faster for you 484 485
than that guy up in New York can. 485 486
This is the idea of redirection. 486 487
Essentially the router says I'm better and faster. 487 488
Use me instead. 488 489
Now for the exam, you don't need to know NDP in depth, 489 490
but you should understand that NDP, 490 491
this Neighbor Discovery Protocol, 491 492
is used in IPv6 and it takes a lot of the functions 492 493
from layer two and layer three of the OSI model 493 494
for router advertisement and neighbor discovery 494 495
and handles them for you.