IPv6 addresses are 128 bit binary numbers (represented in hexadecimal format), which are so lengthy and difficult handle in our day-to-day life. Consider a situation where you need to ping to an IPv6 address 2001:0db8:0000:000b:0000:0000:0000:001A to check the network connectivity.
Just think about the pain in typing all those IPv6 address hexadecimal characters in any shell prompt, each time when you need to check the connectivity between two computers.
Methods to simplify an IPv6 address
We can further simplify, shorten and compress IPv6 Addresses using following methods.
Consider the IPv6 Address 2001:0db8:0000:000b:0000:0000:0000:001A as an example.
For example, in IPv6 address 2001:0db8:0000:000b:0000:0000:0000:001A the leading zeros are marked as 2001:0db8:0000:000b:0000:0000:0000:001A.
After removing the leading zeros, the IPv6 Address quoted above can be written as 2001:db8:0:b:0:0:0:1A
• Compress consecutive hexadecimal fields of zeros using Double colon: IPv6 addresses can be further simplified by using double colons (::) in place of a series of consecutive hexadecimal zeros.
For above example 2001:db8:0:b:0:0:0:1A, we have a series of three consecutive fields of hexadecimal zeros as marked 2001:db8:0:b:0:0:0:1A.
We can further simplify and shorten the above IPv6 Address as 2001:db8:0:b::1A.
Note that compressing and shortening a series of consecutive fields of hexadecimal zeros in an IPv6 Address is possible ONLY once. If you compress a series of consecutive fields of hexadecimal zeros twice in an IPv6 Address, it will be impossible to identify how many zeros and compressed in each double colon (::).
Written by Jajish Thomas.
Last updated on 2nd September, 2023.