IPv6 Address Notation
Internet Protocol version 6 (IPv6) addresses consist of eight groups of hexadecimal quartets separated by colons.
For example: 2001:4860:0000:2001:0000:0000:0000:0068
Fortunately, you can shorten IPv6 addresses by eliminating zeros. There are two rules that you must follow when condensing an IPv6 address.
First, you can use ::
to indicate you removed one or more groups of four consecutive zeros (0000). The final shorthand address can only contain one set of double colons. Using this rule alone, we can condense our example address to: 2001:4860:0000:2001
::
0068
The second rule lets you make this address shorter. Now, you can remove any leading zeros in a group until the group starts with something other than zero, or is the final numeral left as a placeholder for the group.
Starting with our previous example:
2001:4860:0000:2001::0068
2001:4860:000:2001::068
2001:4860:00:2001::68
2001:4860:0:2001::68
Notice that in each line we stripped away the leading zero from each section. The section of zeros that were separated from the other groups of zeros is now notated as a single zero (because IPv6 only allows a single set of double colons).
For more information, see What is IPv6?