In this lesson, we're going to discuss
Internet Protocol version six addressing.
Now, up until this point,
we've really just talked about IP version four,
including how to subnet it,
but one of the problems we have with IPv4
is its limited address space.
Remember, an IPv4 address only has 32 bits
of addressable space,
which gives us about 4.3 billion addresses.
Now, I know that sounds like a lot of IP addresses,
but when you start taking out entire portions
for things like APIPA addresses,
the local host or loop back addresses,
and the private IP addresses,
and there's this huge amount of waste that happened
before we started to have subnetting available to us,
and so we started running out
of network addresses in IP version four.
This is known as address exhaustion, and it's a real thing.
In fact, in November, 2019, RIPE NCC,
which is the regional internet registry for Europe,
West Asia and the former USSR,
announced that they have exhausted its entire pool
of IP version four addresses.
Now, luckily for us though,
the Internet Engineering Task Force, or IETF,
had already started looking into the future,
and they came up with the IPv6 standard all the way back
in December of 1995 with an RFC
that documented their vision for IPv6,
which they termed IP Next Generation, or IP NG.
You see, IP version six is actually a huge improvement
over Internet Protocol version four
in terms of the number of addresses available.
This is because instead of using a 32-bit address,
like we use in IPv4,
we actually use a 128-bit address in IP version six.
This gives us the possibility
of 340 undecillion IP addresses,
and that is enough IP addresses for every man, woman,
and child on the planet,
in fact, many, many IP addresses for each one of those.
You may be asking, "What about version five?
What happened to that?
Why did we go from four to six?"
Well, version five was created,
but it was never fully accepted
as an official protocol or standard,
and therefore it never went into our production networks.
Instead, a lot of the concepts from version five
actually came forward into version six,
because version five was just treated
as an experimental protocol.
So now that we understand that we're in version six,
what are some of the benefits of IP version six?
Well, one of the biggest benefits
is that much larger address space that we just talked about
because of the 128-bit addresses.
In addition to that, IP version six also increases
the efficiency of our network
by removing IPv4's broadcast data flow type.
IPv6 is also considered to be more secure,
because there is no packet or datagram fragmentation
within the standard.
There are also no maximum transmission units
for discovery within each session,
unlike IPv4, which contained an MTU
with a certain size for each packet,
like 1500 bytes by default,
or 9,000 bytes if you're using jumbo frames.
In fact, back in IP version four,
if you had a larger packet size like 2,000 bytes,
but your MTU could only allow 1500 bytes,
it would actually fragment those packets
before sending them over the network.
Then when it got to the other end,
the destination would then reassemble them.
The problem with this is it requires extra processing
by that receiving end,
and this actually slows down your network
and becomes an extremely inefficient way to do things,
especially in our modern networks,
with our faster internet connections
and our larger data sizes that we're trying to transfer.
So IP version six just said,
"No more fragmentation, it's gone."
Another benefit of IP version six
is that it has a simplified header.
So instead of having 12 fields,
like we had in IP version four,
we only have five fields inside of IP version six,
giving us this slimmed down header
that's a lot more efficient to send over the network.
So you may be wondering
what does an IP version six header look like?
Well, I'm going to show it to you here,
but please realize you do not need
to memorize this for the exam.
This is just to show you the different fields
that were in IPv4, which is on the top,
versus IPv6, which is on the bottom,
and you can see how much simpler IP version six really is.
Alright, let's get back to some things
that we need to understand for the exam.
For example, what does an IP version six address
even look like?
Well, remember I said it's 128 binary digits
or bits in length,
so that means it will be a 128 ones or zeros
if we wrote the whole thing out in binary,
and that seems like a really bad idea,
'cause there's a lot of chances for human error there.
Now, what we could do is we could use
a dotted decimal notation like we did in IPv4,
but the problem with that
is we'd still have a lot of octets to write out
because we would need 16 octets instead of four octets
to represent all 128 bits of an IP version six address.
So to solve this,
the Internet Engineering Task Force came up with a new idea
and they decided we're going to use hexadecimal digits instead.
You see, hexadecimal is base 16,
and you may or not remember this
back from your high school algebra classes,
in hexadecimal notation,
each hexadecimal digit is actually four bits,
and this allows us to represent an IPv6 address
by combining four hexadecimal digits together
to make up a segment,
and each segment gives us 16 bits,
and then we add a colon.
And we keep adding segments until we get to our total length
of 128 bits being represented by eight segments
of four hexadecimal digits each
for a total of 32 digits,
which is still pretty long,
but it gives us that 128 bits that we needed
by using 32 hexadecimal digits.
Remember, a hexadecimal digit can represent anything
from 0, one, two, three, four, five,
six, seven, eight, nine,
and then A, B, C, D, E and F
to represent the numbers 10 through 15.
So each single hexadecimal digit can be anything
from zero to 15 in our decimal equivalent.
Now, when we have 128 bits represented in an IPv6 address,
it's going to be no more than 32 hexadecimal digits.
Did you catch what I just said there?
I said no more than 32 digits in length.
Now, why wouldn't it just be 32 hexadecimal digits,
because 32 times four bits each
would give us 128 total bits?
Well, this is because IP version six allows us
to use a shorthand notation
to simplify writing out these very long IPv6 addresses.
Now, these rules for the shorthand
are going to be really important,
so I you study them and learn them for the exam,
because you might get a question on them.
Now, if you have four zeros for a segment,
you can actually just put one zero down
instead of all those leading zeros.
They're going to get dropped.
For example, let's pretend
I have a really long IP version six address
of 2018:0000:0000:0000:0000:0000:4815:54ae.
Now, that's the 32 hexadecimal digits.
Now, using the simple rule I just gave you,
we can take away all the leading zeros
and remove any series of zeros
and replace them with a single zero.
So this now gives me the shortened version
of 2018:0:0:0:0:0:4815:54ae.
Now, this does reduce my number of hexadecimal characters
from the 32 I started with down to just 17 characters,
so about half as long.
Now, that's pretty good,
but there's another rule that I can use
in the world of IPv6 shorthand
that can help me reduce this even further.
Now, this rule says that if you have multiple segments
that have just zeros
and no other hexadecimal digits represented,
you can summarize that by using a double colon.
Now, this rule is special
because you can only use this double colon thing one time
inside your address.
So, using the double colon rule,
I can summarize all five sets of zeros into a double colon,
and it will look like 2018::4815:54ae.
Now, that is really good,
because I went from 32 hexadecimal digits down to 17,
and now I'm down all the way to 12 hexadecimal digits.
You could see how using the shorthand
is pretty darn helpful.
So how can you recognize an IP version six address versus
an IP version four address?
Well, IP version four
is always going to use dotted octet notation
or dotted decimal notation in those four octets.
So that means you're going to be looking for dots
and not colons,
and you're going to be looking for numbers from zero to 255,
and there should be no letters in there,
like A, B, C, D, E, or F,
like you would see in hexadecimal.
On the other hand, when you're looking at IP version six,
you're going to be using hexadecimal digits,
which includes numbers and the letters A through F,
as well as colons to separate them
into groups of four or less.
Alright, to drive this point home,
let's take a look at a sample question
you may see on the exam.
Which of the following is an IP version six address?
Now, this is a fair question to ask,
and you'll get a couple of options.
For our use case, I'm just going to give you three.
Option A, 192.168.1.1.
Option B, 12:34:56:78:90:AB.
Or 1234::5678:90AB.
Now let's see,
first, we can just knock out A, right,
because A is clearly an IP version four address.
We know that because it's got decimal numbers and dots
and there are no colons and no letters.
But the second two, B and C,
both look like they could be an IP version six address.
So how do we tell which one is and which one isn't?
Well, the second one here is not an IP version six address.
This is actually a MAC address,
and the way you can remember this is that MAC addresses
are always going to have 12 hexadecimal digits
and they're always going to be separated by colons.
Now, these 12 hexadecimal digits
will be grouped in pairs of two.
So for the second one, you see 12:34:56:78:90:AB,
and that tells me that is a MAC address
because it is six groupings of two separated by a colon.
Now, the last one is an IP version six address,
and one of the other things here that gives this away
is not just the fact that we have some number of digits
between zero and 32 that are hexadecimal,
but we're also using colons
and we're grouping things based on fours,
and you're seeing a double colon there,
which is used as that shorthand in IPv6.
These are the clues you're looking for
when trying to identify an IPv6 address.
Make sure you're looking for hexadecimal,
make sure you're looking for groups of four or less,
and make sure you're looking for any double colons,
because if you see that, it's a dead giveaway
that this is an IP version six address.
Alright, now that we've covered what the address looks like,
let's talk about the different address types
that you may come across with IP version six,
and there's really three of them.
These are unicast addresses, multicast addresses,
and anycast addresses.
Now, one of the interesting things about IP version six
versus IP version four is that in IP version six
you can actually assign a single interface on a client
with multiple different IP version six addresses,
and these assignments can be a mixture
of the three different types,
unicast, multicast, and anycast.
So even if you only have one network interface card
in your workstation,
you can actually have multiple IP version six addresses,
and you can have different types
of IP version six addresses too assigned on that one card.
Now, when we talk about a unicast address,
unicast address are used to identify a single interface.
These are broken down into globally-routed unicast addresses
and link-local addresses.
Now, a globally-routed unicast address
is similar to what we had in IP version four
when we talked about unicast class A, B, and C addresses.
In IP version six,
a globally-routed unicast address
will always begin with 2000, all the way up to 3999.
This will be your first segment
inside your IP version six address.
For example, if you see the IP version six address
of 2584:0db8:8583:1234:5678:882e:0370:7334,
this is a globally-routed unicast address
because that first segment, which was 2584,
is between 2000 and 3999 when you're reading it
as a hexadecimal number.
Now, a link-local address,
which is also known as a local use address,
is very much like a private IP inside of IP version four.
A link-local address can only be used
on your local area network,
and it will always have FE80 as its first segment
in the IP version six address.
Now, whenever an IP version six system starts up itself,
it's automatically going to create a link-local address
for each IP version six interface on that system,
even if a globally-routable address
was already manually configured or obtained
through a configuration protocol like DHCP.
Now, to do this, it's going to use something known
as a Stateless Address Autoconfiguration, or SLAAC.
With stateless auto configuration,
The host doesn't need to obtain addresses
or other configuration information
from a centralized server,
and instead it can 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,
provide direction to the node
on how to proceed with auto configuration,
and 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 as we talk about EUI-64
and the Neighbor Discovery Protocol,
because both of these processes
are going to be used with SLAAC,
the Stateless Address Autoconfiguration Protocol.
The next type of address we have
is what's known as a multicast address.
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 inside of the group.
In IP version six, a multicast address
will always contain FF as the first two digits
within the first segment.
So if you see FF at the beginning
of an IP version six address,
remember, this is a multicast address.
The final type we have
is what's 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.
We're going to talk more about how an anycast works
as we cover IP version six data flows in a separate lesson,
but anycast addresses are actually allocated
from the unicast address space,
so there's really no way to determine
if an IP version six is unicast or anycast
just by looking at the IP version six address on it.
Alright, now let's go back and talk a little bit more about
the Stateless Address Autoconfiguration, or SLAAC process.
In IP version six,
there's an autoconfiguration process known as SLAAC
that's use to discover the current network
that an interface is located on,
and select its own host ID based on its MAC address
using the EUI-64 process.
This EUI, or Extended Unique Identifier process,
will allow a host to assign itself
a unique 64-bit IP version six interface identifier called
an EUI-64.
Now, the IPv6 EUI-64 format is obtained using
the interface's 48-bit MAC address.
The MAC address is first separate into two 24-bit portions.
The first half of the MAC address contains the OUI,
or the Organizationally Unique Identifier,
and the second one is going to contain
the specific network interface card identifier.
Then we're going to put a 16-bit hexadecimal value of FFFE
that we're going to insert between these two 24-bits
to create the 64-bit EUI address.
Now, this gives you the 64-bits that you would need
to identify your interface on a network,
and then the interface uses the auto discovery
to determine the network that it's on
and add the network portion of the IP version six address,
which is the first 64 bits,
to the front of this EUI-64 address
that we just created from its own MAC address
to create a unique unicast, globally-routable IPv6 address
that it's going to be able to use.
Now, DHCP can be used with IPv6 if you prefer,
by using something known as the DHCPv6 protocol.
This would allow you
to have a DHCP server automatically assign things
from a DHCP version six server,
but since the autoconfiguration process with EUI-64
is already built into the IPv6 protocol by default,
you really don't need to use DHCP version six.
If you do decide you want to use DHCP version six though,
you can use this to assign
what addresses each interface is going to get.
As I said though, in IPv6,
we're usually going to choose its own address
based on its MAC address by default,
and this uses something known as NDP,
or the Neighbor Discovery Protocol,
to learn more about the Layer 2 addresses on the network
based on their MAC addresses,
and then pick its own host ID based on that.
So let's explore the Neighbor Discovery Protocol for a bit.
The Neighbor Discovery Protocol
is used to learn the Layer 2 addresses
that are on a given network.
NDP will perform router solicitation,
router advertisement, neighbor solicitation,
neighbor advertisement, and redirection.
Router solicitation is when your client is going to send
a message to locate the routers on its network,
because it has to figure out what the default gateway is
so it has a way to get out of your network
and onto the internet.
Routers can do advertisement over NDP as well,
and say, "Hey, I'm a router.
I'm over here.
You can solicit me.
I'm right here. Come to me."
Neighbor solicitation is where your IPv6 starts going around
and saying, "What other nodes are on this network?"
This allows your interface to try to determine
what link-layer addresses or Layer 2 addresses are out there
so it can learn them and know how to talk to them directly.
Neighbor advertisement is just like
the router advertisement,
but it happens with your neighbors.
These are the other clients saying,
"Hey, I'm over here.
I'm a printer. I can do this."
Or, "Hey, I'm over here.
I'm a file server. I can do this for you."
And that way, you know who's there
and what they have to offer.
Finally, we have redirection,
and this is where the routers can inform the host
of better first hop routers
to increase the efficiency of your network over time.
For example, if I'm sitting here in Orlando, Florida,
and I think my best first hop router is going to be in New York
to get over to California,
that may not be the most efficient route for me to use.
Instead, there could be another router sitting
in Atlanta, Georgia,
that might tell me it's a better first hop by saying,
"Hey, I'm actually closer to you.
You should talk to me.
Don't go all the way to New York to get to California.
Come to me first. I'll handle it for you.
It's just a simple redirection."
Now, for the exam, you don't need to know NDP in depth,
but you should understand the concept of NDP
and how it's used in IP version six,
and how it takes a lot of the functions
from Layer 2 and Layer 3 of the OSI model
for router advertisement and neighbor discovery,
and it handles all of those for you.
Now, when it comes to the exam,
I want you to remember a couple of key things
for IP version six.
First, IP version six has 128 bits of addressable space
inside of it,
as opposed to the 32 bits that we had in IP version four.
Second, when you're dealing with IP version six,
you can use a shorthand to shorten your addresses down,
and that way you can take four zeros and make them one zero,
or sets of zeros,
and use a double colon to collapse those all down
and make it shorter for you to write.
Third, every time you're looking at an IPv6 address,
you should remember that it's written in hexadecimal,
not in decimal.
This means you're going to have numbers zero through nine
and letters A through F.
And then the last thing I want you to remember
is that we have three different types of IPv6 address types.
These are unicast addresses, multicast addresses,
and anycast addresses.