
The IPv6 addressing schemes
You've probably seen various network cards with IPv6 addresses, and after many years of sticking to simple four octet IP addresses, it may be a little intimidating seeing all those zeros and colons. "How the heck am I expected to remember my own IP address, let alone my entire network?",you must be thinking. Well, you probably won't remember as much, but after a few weeks of actually looking at the numbers, you'll start to see patterns, and things will make more sense. Here's an example:

The preceding screenshot is from a simple home client, and even though it should come as no surprise to you if you've been in the IT business for the past few years, the sheer amount of NICs on this computer may throw quite a curve ball. In reality, just the first interface is real, and the other three are virtual network interfaces. These NICs are there specifically to be a part of Unified Remote Access, and soon, you'll learn to love them!
Because the address space for IPv6 is so large, some measures were taken to make the addresses as readable to humans as possible. Had we used the regular 10-digit decimal system, an address would be comprised of 40 digits, which would have been quite crazy. Instead, the IETF (Internet Engineering Task Force) decided to employ the 16-digit hexadecimal system, which uses the letters A to F in addition to the digits 0 to 9. Hexadecimal notation is common with programming, and is also used in the MAC addresses. You don't really have to understand it, but do know that using it makes us able to write an IPv6 IP address with only 32 characters, so that's a 20 percent savings right there. For example, an IPv6 address could be 2002:1010:00F0:FFFF:F0C0:99AA:1000:AB00
.
The colon symbol is used simply as a visual separator, just like we use commas when writing long decimal numbers (such as 1,000,000).
To make things even easier, something else that we can do is to cut out some of the zeros. This makes the numbers hard to grasp at first, but when the time comes to type or write the number somewhere, you'll start to appreciate this measure.
The first rule of IPv6 shorthand is that you can omit any leading zeros in a group. This means that if you need to write this:
2002:0010:FF00:0CB0
You can remove the first two zeros in 0010
, and the first zero in 0CB0
. Naturally, this is not a real address, being half the size, but for our explanation, it will do. The resulting number is:
2002:10:FF00:CB0
There, we saved ourselves writing three digits. If we want to apply this to a group of four consecutive zeros, we can, but we still have to leave one zero, so the number:
2002:0000:FF00:0CB0
Will be cut to:
2002:0:FF00:CB0
The second rule is that if the number has a large group of consecutive zeros, they can all be cut and replaced with a double colon. For example, the number:
2002:1000:0000:0000:0000:FF00:A101:1800
Can be shortened to:
2002:1000::FF00:A101:1800
As you can see, we didn't cut out the three zeros in the second group. Those have to stay because they are part of the number 1000
(just like when writing regular decimal numbers, you can cut 010 to 10, but not to 1). Also, if the number has two separate groups of consecutive zeros, only one of them can be cut. In that case, the zeros that you can't completely cut out can still be shortened according to the previous rule. So the number:
2002:0000:FF00:0000:0000:0000:1001:0011
Can be cut to:
2002:0:FF00::1001:11
It's actually easier to expand shortened numbers than compress them. Let's look at the number from the previous screenshot. As you can see, Windows shows them with lower-case, and that's perfectly fine:
2001:0:4137:9e76:3494:b4:e7ee:3d10
In addition to the number itself, you will often see a %
sign on the tail of the address, followed by a number. For example:

This is referred to as interface index. You will see these interface indices on addresses that are link-local addresses, which are addresses that are automatically assigned to each active network interface. These link-local addresses have the same network prefix starting with FE80
, so to make routing possible they get assigned that extra number representing the interface identifier that the operating system assigns to each NIC.
Another thing that's important to know about IPv6 addresses is that each address is split in the middle, with the left part being the network ID and the right part being the host ID. This may come as some relief, as you no longer have to try to figure out which part of the address is the network ID and which is the host ID by using the subnet mask as you often do with IPv4.
Some organizations would still need to split their network into subnets, of course. In such a situation, the network ID (the left half of the address) may be split up further as needed (for example, three out of the four groups being the routing prefix and the fourth being the subnet ID), but that's more relevant to those who are actually upgrading their network to IPv6 and as such is beyond the scope of this book.