Instructor: In this lesson,
we're going to introduce the concepts surrounding IPv6,
or Internet Protocol version 6.
So up to this point,
we've really just talked about IPv4,
but one of the problems that we have with IPv4
is that it's limited in its address space.
This is because there are only 32 bits
that make up an IPv4 address,
giving us only 4.2 billion possible address combinations.
Now, I know 4.2 billion sounds like a whole lot of IPs,
but when we took out entire portions of things,
for things like APIPA addresses, local host addresses,
private IPs, and then there was a huge amount of waste
before we even started to use subnetting,
this led to a big issue,
and we began to start running out of network addresses
inside of IPv4.
This is known as address exhaustion, and it is a real thing.
In fact, in November of 2019,
RIPE NCC, the Regional Internet Registry
for Europe, West Asia, and the former USSR, and NASA,
they have already exhausted
its entire pool of IPv4 addresses.
Luckily though, the Internet Engineering Task Force,
or IETF, had already started looking into the future
and they developed IPv6
as a standard all the way back in 1995
with an RFC that documented their vision for IPv6,
which they termed IP Next Generation or IPNG.
Now you see, IPv6 is actually a huge improvement over IPv4
in terms of the number of addresses available.
Instead of using a 32-bit address like we do in IPv4,
IPv6 is going to use 128-bit address.
This is going to give you a much larger address space.
In fact, it's going to give you a possibility
of 340 undecillion IP addresses.
That is enough IP addresses
for every man, woman, and child on the planet.
This is two to the 128th power.
In fact, there are many, many IP addresses
for each man, woman, and child on the planet
because there are so many IP addresses available.
Now, you might be wondering to yourself,
hey, we went from IPv4 to IPv6.
What happened to version 5?
Why did we jump straight to version 6?
Well, version 5 was created, but it was never fully adopted
as an official protocol or standard.
And therefore, it never went into production.
Instead, a lot of those concepts
that were developed under version 5,
because it was an experimental protocol,
were then brought into IPv6
when it became an official standard.
So let's talk about the benefits of IPv6.
One of the biggest benefits
is that much larger address space
because of those 128-bit addresses.
In addition to that,
IPv6 also increased the efficiency of our networks
by removing IPv4's broadcast data flow type.
Now, IPv6 is also more secure
because there is no packet or datagram fragmentation
within the IPv6 standard.
There's also no maximum transmission units
for discovery within each session unlike IPv4
which contain an MTU with a certain size for each packet.
In IPv4, if I sent you a packet
that was larger than your maximum transmission unit size,
it would actually fragment that
and send it over the network.
And then when it reached its destination,
it would be reassembled and read.
This was actually a security risk.
It also required extra processing
and it could actually slow down your networks
because it become in a very inefficient way of doing things
in our modern networks
with higher internet connection speeds.
So with IPv6, they decided to do away
with fragmentation completely.
Now, in addition to providing all of these new benefits,
the creators of IPv6 were also very smart
and realized that IPv6 to be embraced and accepted fully,
it would have to be backwards compatible with IPv4
and allow both IPv6 and IPv4 to coexist on the same network.
After all, it was already late in 1990s
when IPv6 was being developed and released
and lots of computer networks
were already fielded all over the globe.
So it would not be feasible
for us to simply change over everything in a single day.
Think about it like the current migration
we're going through from gas-powered
to electric-powered vehicles.
This is happening throughout the entire 2020s
and into 2030s.
Now, this would be an impossible thing for us to say,
hey, everybody on January 1st, 2025,
no one can use gas-powered vehicles anymore.
All of them will be replaced
with electric vehicles as of that date.
If a government tried to do that,
they'd probably have a revolution on their hands
because so many people already own gas-powered cars
and spent a ton of money and investing into those cars
and infrastructure to support them.
Now, for that reason, we're not going to simply replace
all gas-powered cars overnight.
Instead, there's going to be this slow transition
from gas power to electric that goes on by 2030
or maybe 2040 as more and more of the newer cars
sold in the world will be sold as electric
and they'll stop selling gas-powered vehicles.
Well, the exact same thing is going on with IPv6.
So IPv6 allows for both IPv4 and IPv6
to coexist on the same networks
and the equipment that runs these networks
becomes known as dual stack,
which simply means they can run
both IPv4 protocols and IPv6 protocols
on the same network devices simultaneously.
With dual stack devices, if a client supports IPv6,
the router switch would prefer to use IPv6
and will talk under that method.
Now, if a device is not able to support IPv6,
it flips itself back and says,
okay, I'll talk to you using the older IPv4 protocol.
This way, I can still support you.
Another method that we use is known as tunneling.
This is where IPv6 is going to be tunneled over an IPv4 device.
This allows your older IPv4 routers
to still carry IPv6 traffic.
IPv6 is essentially going to be tunneled
as a mechanism for encapsulating the IPv6 packets
within IPv4 headers and carrying this IPv6 data
over those IPv4 routers
and other infrastructure that already exists.
It does this by creating a point-to-point tunnel
between the source and destination,
and then encapsulating that information.
This allows isolated IPv6 clients and servers
to be able to communicate without needing to upgrade
all of the routers and switch infrastructure
that still uses IPv4 that may exist between them.
Now, one day, we may eventually see IPv4 retired fully.
But so far, it hasn't happened.
And personally, I'm not holding my breath.
From some articles I've read,
predictions are that IPv4 will remain with us
until at least 2040, so you're going to have to know
how to work with both IPv4 and IPv6
for the foreseeable future as a network technician.
Another benefit of IPv6 is that it has a simplified header.
So instead of those 12 fields that we had in IPv4,
we only have five fields in IPv6,
making it a slimmed down header
that is a lot more efficient to send over our networks.
So you may be wondering,
what does an IPv6 header look like?
Well, I'm going to show it to you, but please realize,
you don't need to memorize this for the exam.
Instead, this is just to show you the different fields
that were in IPv4, which is on top,
versus IPv6, which is on bottom.
And now you could see how much more simple
IPv6 really is over IPv4.
All right, let's get back to some things
that you do need to understand for the exam.
Like, what does an IPv6 address actually look like?
Well, I already said that it's 128 bits in length,
so that means it would have 128 ones or zeros
if we wrote it out in binary,
and that seems like a really bad idea to me,
so we're not going to do that.
Now, we could use dotted decimal notation
like we did in IPv4,
but that still will be a lot of octets to write out
because we would need 16 octets to represent all 128 bits.
So to solve this problem,
the IETF decided that we should use
hexadecimal digits instead.
You see, hexadecimal is base-16,
which you may or may not remember
from your high school algebra classes.
Now, in hexadecimal,
each hexadecimal digit is actually four bits.
And this is going to allow us to represent an IPv6 address
by combining four hexadecimal digits together
to make up what we call a segment.
Now, a segment is going to have 16 bits in it.
This is represented by those four hexadecimal digits.
And then we're going to add a colon
and then we're going to keep adding segments
until we get up to 128 bits,
which is going to take eight segments,
each of those having four hexadecimal digits each.
This gives me a total of 32 hexadecimal digits,
which is still pretty long.
Now, with 128 bits being represented in an IPv6 address,
this means we will have no more than 32 hexadecimal digits
inside of all these segments.
Now, why did I say no more than 32 digits in length
for the total of these eight segments?
Why wouldn't it just be 32 hexadecimal digits
because 32 digits times four bits per digit
would give us 128 bits?
Well, this is because IPv6 actually allows us
to use a shorthand to be able to simplify
our very long IPv6 addresses.
Now, the rules of shorthand are really important
because you could see exam questions on these.
So if you have four zeros for a segment,
you can actually put one zero there instead
and drop those leading zeros.
For example, let's pretend I have a really long IPv6 address
of 2018:0000:0000:0000:0000:0000:4815:54ae.
Using the simple rule,
I can replace all those segments that have multiple zeros
with a single zero.
This would give me 2018:0:0:0:0:0:4815:54ae.
All right, this reduced my number of hexadecimal digits
down from 32 to just 17, so it's about half the length.
We're getting better, but I'm not going to stop there.
There's another rule I can use
in the world of IPv6 shorthand.
This rule says that if there are multiple segments
that all have zeros in them
and no other hexadecimal digits are being represented there,
I can summarize that by using a double colon
and take out all those zeros.
Now, this rule is special
because you can only do the double colon thing one time
inside an IPv6 address.
So using my double colon rule,
I can summarize 2018:0:0:0:0:0:4815:54ae
into removing all those five sets of zeros
and replacing them with a double colon
and getting myself 2018::4815::54ae.
So I went from 32 hexadecimal digits
down to 17 hexadecimal digits
and now I'm down from 17 digits
all the way down to 12 digits,
much smaller, much easier to work with.
You could see how this shorthand is really helpful.
So how are you going to recognize an IPv6 address
versus an IPv4 address?
Well, the first way is by looking at what IPv4 is.
IPv4 is always going to use the dotted decimal notation
using four octets.
Now, IPv6, on the other hand,
is going to use colons between its numbers
and it's going to be written in hexadecimal.
All right, now, one of the questions
you might see on test day
is to identify an IPv6 address when you see one.
For example, you might get a question like,
which of the following is an IPv6 address?
This will be a fair question to ask you.
You're going to get some options like 192.168.1.1,
which we know isn't it because that's an IPv4 address.
You're going to get 12:34:56:78:90:AB
or 1234::5678::90AB.
So wait a minute, those last two I just said,
they're really similar, aren't they?
Yes, but only one of those is a valid IPv6 address.
Do you know which one it is?
Because most students get confused here.
Now, the second option here is actually not an IPv6 address.
Instead, it's a MAC address.
Remember, MAC addresses,
which are a Layer 2 physical addresses,
are always going to have 12 hexadecimal digits
and separated by colons.
Usually, they're going to be written
as six groups of two digits each
and each of those are going to be separated by a single colon.
An IPv6 address, on the other hand, should always be written
in segments of four digits each,
and they should always have 16 segments
unless you see a double colon.
In this example, we have a double colon
between the first and second segment in our third option.
So this is a good shorthand that we can use
and we identify that it was an IPv6 address
because we removed all the zeros
between the first and second segment inside this address.
So if you count up something
that looks like an IPv6 address,
and it has 12, exactly 12 hexadecimal digits
separated by single colons,
and you don't see a double colon anywhere,
that is a MAC address, not an IPv6 address.
Otherwise, if it looks something like this
and includes hexadecimal digits,
it's going to be an IPv6 address on exam day.
For the exam, you just need to be able to recognize
what an IPv6 address looks like,
and you should be able to summarize one down
by taking out zeros and consolidating them
using that double colon trick.
If you can do these two things,
you're going to be fine for IPv6 addressing on exam day.
Now, when it comes to IPv6 addressing,
there are three different address types that you can use:
unicast addresses, multicast addresses,
and anycast addresses.
One of the interesting things about IPv6
that really distinguishes it from IPv4
is that we can assign multiple IPv6 addresses
to a single interface on a client.
And these assignments can be a mixture
of any of these three different types:
unicast, multicast, and anycast.
So even if you only have one network interface card
on your workstation or laptop,
you could have multiple IPv6 addresses
and different types of IPv6 addresses
assigned to that one card.
Unicast addresses are going to be used
to identify a single interface.
These are broken down into globally-routed unicast addresses
and link-local addresses.
A globally-routed unicast address
is similar to what we have as a public address with IPv4
using unicast A, B, and C class addresses.
Now, in IPv6, a globally-routed unicast address
is always going to start out
with its first segment containing 2000-3999.
Now, if you see 2000-3999 as your first segment,
this means it's a globally-routed unicast address.
For example, the IPv6 address
of 2584:0db8:8583:1234:5678:882e:0370:7334
would be globally-routed as a unicast address
because its first segment contains 2584,
which is between 2000 and 3999.
Now, a link-local address, on the other hand,
also called a local use address,
is used like a private IP address was in IPv4.
A link-local address in IPv6
can only be used on a local area network
and it always is going to begin with FE80 as its first segment
within an IPv6 address.
Now, whenever an IPv6 system starts up,
it's going to actually create a link-local address
for each IPv6 interface on that system,
even if a globally-routable address
was already manually configured
or obtained through a configuration protocol like DHCP.
To do this, it's going to use something known as SLAAC,
the stateless address auto-configuration or S-L-A-A-C.
With stateless auto-configuration,
the host does not need to obtain addresses
or other configuration information
from a centralized server like DHCP.
Instead, it can actually independently assign itself
a link-local address,
test the uniqueness of that link-local address,
assign the link-local address to itself,
contact the router and provide direction to the node
about how to proceed with the auto-configuration.
And it can even configure the global unicast address
that it wants to use.
We're going to come back to this concept in just a few minutes
as we dive a bit deeper into it
as we start to talk about EUI-64
and the neighbor discovery protocol,
since both of these processes are used
with the stateless address auto-configuration protocol
known as SLAAC.
Next, we have multicast addresses.
Now, multicast addresses are used
to identify a group of interfaces
so that a packet can be sent to a multicast address
and then be delivered to all the interfaces within a group.
In IPv6, a multicast address will always contain FF
as the first two digits within the first segment.
If you see FF at the beginning of an IPv6 address,
remember its multicast.
The final type of address we have
is known as an anycast address.
Anycast addresses are used to identify a set of interfaces
so that a packet can be sent to any member of a set.
Anycast addresses are actually allocated
from the unicast address space.
So there's really no way to determine
if an IPv6 address is unicast or anycast
just by looking at the IPv6 address.
Now, when you're looking at multicast or link-local,
you have a very easy way to do this,
but you don't have an easy way
to figure out unicast versus anycast.
All right, let's go back
and talk a little bit more about SLAAC,
the stateless address auto-configuration process.
Now, as I said, in IPv6,
there is an auto-configuration process known as SLAAC,
and we use this to discover the current network
that the interface is located on
and then allow it to select its own host ID
based on its MAC address using a process known as EUI-64.
Now, this EUI-64 or Extended Unique Identifier process
will allow a host to assign itself a unique
64-bit IPv6 interface identifier called EUI-64.
Now, this EUI-64 format address
is obtained by using the interface's 48-bit MAC address.
The MAC address is first separated into two 24-bit portions.
The first half of the MAC address is going to contain the OUI,
or the Organizational Unique Identifier.
And the second half is going to contain
the specific network interface card.
Now, in between those,
we're going to shove a 16-bit hexadecimal value of FFFE.
This way, I can take 24 bits, 16 bits, and 24 bits
and put them together to get a 64-bit EUI address.
Now, this gives you the 64 bits that you're going to need
to identify your interface on that network.
Then the interface will use auto-discovery
to determine the network it is on
and add the network portion of the IPv6 address,
which is going to be the first 64 bits inside of our addresses.
Now, we're going to put that first 64 bits
to represent the network in front of the 64 bits
from the EUI-64 address we created from our MAC address
to create a unicast globally-routable IPv6 address
that we can now use.
So you can see how all this works together
using that MAC address
to create this globally-routable address.
Now, DHCP can also be used within IPv6
if you prefer to use it.
If you do, you're going to have to use the DHCPv6 protocol.
This would allow you to have DHCP
automatically assign things from a DHCPv6 server.
But since the auto-configuration process with EUI-64
is already built into the IPv6 protocol by default,
you really don't need to use DHCPv6.
But if you do want to use DHCPv6, you can,
and it will allow you to assign
what addresses each interface is going to get
instead of allowing them to use
the auto-configuration protocol of SLAAC.
Now, as I said, IPv6 will choose its own address
based on its MAC address by default,
then it's going to use this thing known as NDP
or the neighbor discovery protocol
to learn about the other Layer 2 addresses on the network
based on their MAC addresses
and then it will pick its own host ID.
Now for the exam, you don't need to know NDP in depth,
but you should understand that NDP,
this neighbor discovery protocol, is used in IPv6
and it takes a lot of the functions
from router advertisement and neighbor discovery
and handles them for you.