## Chapter 1 – Address Format

At first glance, IPv6 addresses 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 an 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 10 digits; 0 through to 9. Every number we make is based on these digits.

If we start counting from zero, we get to 9. Then what do we do? We add a ‘1’ to the front, and 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 are only two digits, 0 and 1, which are the building blocks of all binary numbers.

As with decimal, to make bigger numbers, we add more numbers to the front.

We can see that binary and decimal are just two different ways of counting things. We can easily convert back and forth if we want to.

Hexadecimal is yet another way of counting. This time we have *sixteen* digits. Zero through to ‘F’.

As we count up, we can 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’? The same as in decimal. We add a new column to the front, and keep going.

This is where is gets a little confusing… This is not *ten *in decimal. This is *sixteen *in hexadecimal.

In many cases, hex numbers are shown as starting with ‘0x’ *or* ending with ‘h’. This is just to make it clear that this is a hexadecimal number.

We don’t do that with IPv6 addresses though. We know they’re always in hexadecimal because they’re 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 want, but it’s much easier to just use a calculator.

For example, the Windows calculator shown here has a *programmer mode*. We can easily type in a number and convert back and forth.

In fact, here’s a good opportunity to try it out for yourself.

## Chapter 2 – Making It Simpler

If we look at this IP address, it seems *shockingly* complicated. There’s a lot going on here. Fortunately, there’s a trick to simplifying this address.

Let’s 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 address is getting simpler.

Next, if we see a few groups of zeros in a row, we can shorten these too. In it’s place, we can just put a double-colon! This really makes the address simpler!

Let’s take a look at this example. How can we simplify this address?

First, find the leading zeros, and remove them

Next, we can compress any groups of zeros. But here we have two groups! What do we do?

The rule here is, we can only compress one group of zeroes, not both. So, we’ll compress the left-most 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.

## Chapter 3 – Subnets and Prefixes

Despite IPv6’s many improvements, a lot still remains the same. We still have the concept of network and host portions of an address.

The network portion is usually called a subnet, but the correct term now is *prefix*. In practice, both terms are fine.

I’m sure you’ll recognise the subnet lask 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 CIDR format now. Technically, it’s now called the ‘prefix length’.

The entire IPv6 address is 128-bits long. Int his example, the prefix length is 64-bits, which is exactly half of the IP address.

While we can use any prefix length, /64 has become the ‘standard’ prefix length for most of our subnets.

This is not just my recommendation. This is official advice, which you can find in RFC 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 address in 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. Some like to use /127 on the WAN, while others prefer /64. Either is fine.

Take note, that a /127 only allows two host addresses. This means that there is no need for network and broadcast addresses.

This is the same as an IPv4 /31 address.

You might also notice that when we write a network address, we can simply end it with a double colon.

The same is true when we write a host address. We can start with a double colon.

This is nothing fancy, just a nice neat way to write it. It helps keep our documentation tidy.

Here’s an interesting quiz question… You have a list of IP’s and subnets. See you you can line them up to the letters on the topology.

## Chapter 4 – Header Format

If we put IPv4 and IPv6 headers next to each other, we can immediately see the IPv6 is much bigger.

The clear 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* added if needed.

Next, we need to consider the various types of IPv6 addresses. The next video looks global unicast addresses, local addresses, anycast addresses, and more!