When learning IPv6 addressing, one of the first things that people notice is that it is much more complex to look at than the previous IPv4 addresses; this is compounded by the fact that a single address can be notated in a number of different ways and still refers to the same device. This article takes a look at IPv6 notation, how a single IPv6 address can be notated in a number of different ways, and how to expand and compress them correctly.
An IPv6 address has a total of 128 bits that are represented in hexadecimal form, using 8 – 4 hex character groupings. Figure 1 below shows a fully expanded IPv6 address:
There are two ways that an IPv6 address can be additionally compressed: compressing leading zeros and substituting a group of consecutive zeros with a single double colon (::). Both of these can be used in any number of combinations to notate the same address. It is important to note that the double colon (::) can only be used once within a single IPv6 address notation. Figure 2 below shows what the same address shown in Figure 1 would look like if the leading zeros were removed.
To notate the number of bits to mask with an IPv4 address, a decimal subnet mask or a CIDR notation was used. For example, to notate an IPv4 C class network range, the subnet address, 172.16.1.0, plus an additional subnet mask, 255.255.255.0 (or /24), were placed and configured together to notate the network range from 172.16.1.0 through 172.16.1.255.
For IPv6, the decimal subnet mask is not used anymore, and only a CIDR notation is used. Figure 5 shows an example of a 64 bit network prefix:
The main stumbling block for most individuals starting to learn IPv6 is getting over looking at a large number of hexadecimal numbers. IPv6 addresses and subnetting work the same as with IPv4 address when converted to binary, and anyone familiar with IPv4 binary addressing and subnetting should be able to understand these IPv6 concepts.