IPv6 stands for Internet Protocol Version 6.
It is a 128-bit address.
This is a much larger address than
our traditional IPv4 addresses.
And one of the reasons we created
IPv6 is so that we could have many, many more
addresses available.
You can see 340 undecillion addresses.
That's a lot of addresses.
If there are 6.8 billion people, they all
could have this many addresses for each individual person.
So based on that, you can see that IPv6
is designed to handle our addressing needs well
into the future.
If we were to take all 128-bits and draw it out,
it looks something like this.
One thing that's very different with IPv6 versus IPv4,
is instead of expressing the addresses in decimal,
we talk about IPv6 addresses in hexadecimal.
So you'll not only see the numbers zero through nine,
you also see the letters a through f
combined in that for a total number of 16
characters in hexadecimal.
And you can see here is an IPv6 address,
fe80::5d18:652:cffd:8f52.
It seems like a very complicated address.
So let's break it down a little bit
and give you an understanding of exactly how an IPv6 address is
structured.
Although, it looks a little different,
it is exactly the same as working with an IPv4 address.
It's just a much longer address, and it
has a different way of expressing it in hexadecimal.
The double colons that we have here
are signifying that there are zeroes in that spot.
So we're going to extend this out.
And if we were to look at the uncompressed version
of an IPv6 address, it's actually this one-- fe80,
a bunch of zeroes.
And then you can finally see the numbers added up there
near the end of this.
We'll talk about IPv6 compression
and how you can figure that out in just a moment.
If you finally do take those hexadecimal numbers
and you write them out in binary,
this is what it looks like.
So you can see here are all 128 of those IPv6 bits all
written out.
We've separated out this address into 16-bit sections,
and we've separated each of those sections with a colon.
So you can see here's 116-bit section.
Here's another.
You could also express this as a 2 bytes section.
You may hear people refer to it as a 2 octets session.
Total, we've got 16 full bytes that we
can use in an IPv6 address for that total of 128 bits.
As you can tell with IPv6, it's a much bigger address,
it has a different type of numbering system,
and it's a little bit more difficult to remember
just the number or the IPv6 address of a device.
With IPv4 it was a lot easier.
We could remember 192.168.1.1.
That's the IPv6 address of a server.
This might be the IPv6 address of the same server.
It's not quite as straightforward.
And because of that, we're going to rely a lot more on our DNS.
We can simply refer to those servers
by name instead of having to remember
the entire IPv6 address.
We don't generally do a lot of subnetting
in IPv6, because we have so many addresses available.
There's really no need to separate it down
into smaller pieces to try to conserve address space like we
did with IPv4.
Because of that, you'll generally
see IPv6 addresses having a 64-bit subnet mask.
You'll see it written with a /64.
That means the first 64 bits will be the network address
and then you have all 64 bits after that
to use as host addresses.
You're probably not going to have
a subnet that uses all of those bits just for hosts.
But because you have so many addresses available,
we don't have to worry about that subnetting
and we can keep it very simple by just separating it
right in the middle and having 64 bits for the network
and 64 bits for the host.
In our previous example, there was a double colon
in the IPv6 address.
That's because that was a compressed IPv6 address.
There were sections of zeroes and we replaced those sections
of zeroes with simply a double colon
so that the IPv6 address would be a little bit easier to read.
If there are leading zeroes in a section of an address,
you get rid of the leading zeroes
as well to compress the address down even further.
Let's do an example of this.
We'll start with an IPv6 address.
Here it is the fe80.
There's a bunch of zeroes.
Here some other numbers in the address.
It;s a nice long address and we want to compress it.
The first thing we'll do is we'll remove anything
that has a leading zero.
So we know there's a leading zero here with the 00a7.
There's also one leading zero here with the 08d5.
So if we remove that, we've really
got rid of all the leading zeroes in these three
sections and the two leading zeroes here,
and we got rid of this leading zero
to make this a little bit easier to read.
Now as you can see here, we do have
a section where there is simply a 0 a 0 and a 0 altogether.
We can simplify that even further by taking those groups,
and it has to be two or more groups
to really be useful here, and replacing that
with a double colon.
That means our number now simplifies to fe80.
There's our double colon.
We're skipping all of those zeroes
and then we're bringing down the rest of what we have here.
So that gives us a final IPv6 address
of fe80::cabc:c800:a7:8d5.
And although, that still is a very long address,
it's not something that you could easily remember.
It is much easier to view certainly much
easier than the fully listed IPv6 address
that we have at the top.
One thing to keep in mind you can only
replace this leading set of zeroes
is grouping of zeroes with a double colon one time
in an address.
You can't do that more than once or you won't know exactly how
many zeroes it's replacing.
So you would only be able to perform the double colon once.
Even if there were other groups of zeroes
later on in the address, you still
would not be able to replace them.
You have to choose one or the other
and only have one set of double colons.
Let's perform another practice of a compression.
We'll do exactly the same process
we did in our last example.
Here's our nice long IPv6 address with the eight
different sections.
You can see even here there are a large number
of zeroes and some leading zeroes
on a number of these sections.
We're going to get rid of all the leading zeroes.
So this simplifies it down quite a bit.
But we do have this section right in the middle, where
we have four zeroes in a row.
We can replace every single one of them with the double colon.
So when we bring that down, you can
see that it is simplifying this quite a bit.
So we've gone through this very long address to the top.
We've compressed it down and the final address is
2000:bb0::a0:2., a much simpler way talking about this very
long address.
And if you're reading or writing or even viewing
this in your operating system, you'll
see this compressed address used most often,
instead of writing out this very long IPv6 address.