At first glance,
IPv6 addresses may seem strange and different to what we're used to.
In this video, I'm going to simplify things. By the end,
this IPv6 address will make total sense.
Let's start
by comparing an IPv4 and IPv6 address.
IPv4 addresses have four groups of numbers,
while IPv6 has eight
These numbers are separated by dots
in IPv4 or colons in IPv6.
The decimal numbers in IPv4
can range from zero to 255.
The hexadecimal numbers in IPv6
range from zero to FFFF
we need to talk about the difference between decimal and hexadecimal
before we go any further.
For most of our lives we've been comfortable using
decimal numbers to count.
Decimal numbers have ten digits, zero through to nine.
Every number we make is based on these ten digits
If we
start counting from zero, we get to nine.
Then what do we do?
We had a one to the front, then
start counting again.
We do the same when we reach 99
and the pattern continues.
When we learned binary, we learned another way of counting.
This time there were only two digits, zero and one, which are the building
blocks of all binary numbers as we decimal to make bigger numbers.
We add more and more numbers to the front
We can see that binary and decimal
are just two different ways of counting things
Hexadecimal is yet another way of counting.
This time we have sixteen digits, zero through to F
as we count up we go past nine.
The 'number' after nine is A.
Then comes B, C, and so on.
F is equivalent to 15 in decimal.
What happens if we want to count past F?
Well, the same ideas decimal.
We add a new column to the front and keep going.
This is where it gets a little confusing.
This is not ten
in decimal, this is 16 in hexadecimal.
In many cases, hex numbers are shown as starting
with 0x or ending with h.
This is just to make clear that this is a
hexadecimal number not a decimal number
We don't do that with IPv6 addresses though.
We know they are always in hexadecimal because well,
those are clearly IPv6 addresses
Sometimes we will need to convert between decimal, hex, and binary.
You can try to do that in your head if you really want to,
but it's much easier just to use a calculator
For example, the windows calculator shown here has programmer mode.
We can easily type in a number and convert back and forth.
In fact,
he's a really good opportunity to try it out for yourself.
If we look at this
IP address, it seems shockingly complicated.
Fortunately, there's a trick to simplify this address.
We'll start with what we know.
There are eight groups of numbers separated by colon symbols.
Each 16 bit block of numbers is written in hexadecimal.
You'll see that some of the 16 bit groups begin with zeros.
For our first trick, we can omit any leading zeros in each group.
Immediately, this starts getting simpler.
Next, if we see a few groups of zeros in a row, we can shorten these too.
In its place, we can just put a double colon.
And this really makes things a lot simpler.
Let's take a look at this example.
How can we simplify this address?
First, find the leading zeros and remove them.
Next, compress any groups of zeros.
Ah, but here we have two groups.
So what do we do?
The rule is that we can only compress one group of zeros, not both.
So we we'll compress the leftmost group.
That's much simpler.
See IPv6 is getting easier already.
The best way to get comfortable is to practice.
So try out these examples
Despite IPv6's many improvements.
A lot still remains the same.
We still have a concept of network and host portions of an address.
The network portion is usually called a subnet,
but the correct term is now prefix. In practice,
both terms are fine.
I'm sure you will recognize the subnet mask at the end too.
You may be more familiar with the old dotted decimal notation.
Well, that's old fashioned and not used with IPv6 anymore.
We always use the CIDR format now,
although technically it's now called the prefix length.
The entire IPv6 address is 128 bits long.
In this example, the prefix length is 64 bits,
which is exactly half of the IP address.
While we can use any prefix length that we want to,
/64 has become the standard prefix length for most of our subnets.
And this is not just my recommendation.
This is official advice which you can find in RC 7421,
A /64 allows
about 18 quintillion addresses per subnet.
That's huge, but that's just the way IPv6 works.
If you see an address with a /128 prefix length,
this is a host address they're commonly used on loopback interfaces.
This is the equivalent of a /32 IPv4.
When we use a point-to-point WAN link,
we may use a /127 prefix length.
I've worked with a few different service providers
somewhat to use /127 on the WAN, while others prefer /64.
Really either is fine.
Take note that a /127
only allows two host addresses.
This means that there is no need for a network and broadcast address.
This is the same as IPv4 /31 addresses.
You might also notice that when we write a network address,
we can simply end it with a double colon.
And the same is true when we write a host address.
We can start it with a double colon.
This is nothing fancy.
It's just a nice, neat way to write it out.
It helps keep our documentation tidy.
Here's an interesting question.
You have a list of IPs and subnets.
See if you can line them up to the letters in the topology
If we put IPv4 and IPv6 headers next to each other,
we can immediately see that the IPv6 header is much bigger.
The obvious reason for this is that IPv6
addresses are four times the size of IPv4.
If we dig deeper into the two header types
we can see that, although bigger, IPv6 is much simpler.
There are fewer mandatory fields.
Even so, they can optionally have extra extension headers if they are needed.
Next, we need to consider the various types of IPv6 addresses.
The next video looks at global unicast addresses,
local addresses, anycast addresses and more.