How to Simplify Shorten and Compress IPv6 Addresses

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.


Somehow we need to further shorten and simplify IPv6 addresses to use it with more ease in our day-to-day life. IPv6 addresses often contain consecutive zeros.

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.

• Omit leading zeros: For simplifying and shortening lengthy IPv6 Address, we can omit the leading zeros in any 16-bit IPv6 Address blocks.

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.


Related Tutorials
Limitations of IPv4
IPv6 History and related RFCs
IPv6 Features
Differences Between IPv4 and IPv6
Unicast, Multicast and Anycast - Types of communication in IPv6
IPv6 Datagram Header Format
Comparison between IPv4 Header and IPv6 Header
Introduction to IPv6 Addressing
What is prefix and prefix length in IPv6, Similarity between IPv4 subnet mask and IPv6 prefix
IPv6 Address formats
How to Simplify Shorten and Compress IPv6 Addresses
Types of IPv6 Addresses, Global Unicast, Link-local, Multicast, Anycast, Loopback addresses
Global Unicast IPv6 Addresses, Global Unicast IPv6 Address prefix, format and range
Different methods to assign a Global Unicast IPv6 address to an interface
What are IEEE EUI-64 based Global Unicast IPv6 addresses
How to configure Static Global Unicast IPv6 Address in a Cisco Router Interface
How to configure EUI-64 based Global Unicast IPv6 Address in a Cisco Router Interface
How to configure static Global Unicast IPv6 Address in a Windows Server
What is SLAAC - Stateless Address Auto-configuration in IPv6
How SLAAC works in IPv6