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, including how to compress IPv6 addresses efficiently.
Several online tools and command-line utilities are available to compress IPv6 address formats, including ipv6calc, sipcalc, and various web-based IPv6 compressors. Most modern operating systems also include built-in commands like PowerShell’s Compress-IPv6Address cmdlet to automatically compress IPv6 addresses.
When documenting network configurations, using compressed IPv6 address notation saves space, reduces typing errors, and makes configurations more readable. It’s particularly valuable when managing large networks with multiple IPv6 addresses or when creating network diagrams.
Yes, DNS records support compressed IPv6 address formats. Most DNS servers automatically handle both compressed and uncompressed formats, though it’s recommended to use consistent notation throughout your DNS infrastructure for easier management and troubleshooting.
While it’s generally beneficial to compress IPv6 address notation, some legacy systems or applications might require fully expanded addresses. Additionally, when teaching or learning IPv6 addressing, using uncompressed formats can help better understand the address structure.
The compression of IPv6 addresses is purely for human readability and has no impact on network performance. Internally, networking devices always process IPv6 addresses in their full 128-bit format, regardless of how they’re displayed in configurations.