IPv6 Address formats
In this lesson, we will learn the format of an IPv6 address.
IPv6 address format
The IPv6 address size is 128 bits. IPv6 addresses are represented in hexadecimals. The 128-bit address is divided in to 16-bits, and each 16-bit block is converted to a 4-digit hexadecimal number and separated by colons. This type of representation is called colon hexadecimal. The format of IPv6 address is xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx where each x is a hexadecimal digit representing four binary bits or a nibble. IPv6 addresses range from 0000:0000:0000:0000:0000:0000:0000:0000 to ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff.
How to simplify an IPv6 address
An IPv6 address is a 128-bit number, which can be very hard to handle during day-to-day use. There must be some ways to shorten and simplify IPv6 addresses. An IPv6 address can be simplified by the following two methods.
• Omit leading zeros: Omit the leading zeros in any 16-bits. For example, IPv6 address 2001:0DB8:0000:0000:0022:F376:FF3B:AC99 may be written as 2001:DB8:0:0:22:F376:FF3B:AC99.
• Double colons: Use double colons (::) in place of a series of contiguous hexadecimal zeros. For example, The above address can be further simplified as 2001:DB8::22:F376:FF3B:AC99. Note that the entire contiguous blocks must be zeros.
Please note that the double colons rule for shortening an IPv6 address can be applied only once in an IPv6 address. If double colons rule is applied more than once in an IPv6 address, there will be an ambiguity related with how many zeros are shortened under each double colon.
Hence, if the double colons rule for shortening an IPv6 address is applied more than once in an IPv6 address, the original IPv6 address cannot be recreated from the shorted form of that IPv6 address.
Written by Jajish Thomas.
Last updated on 14th May, 2024.