IPv6 Address Representation

The two conventional forms for representing IPv6 addresses are as follows:

  • The first and preferred form of IPv6 address is represented as

    x:x:x:x:x:x:x:x
    				

    The variable <x> represents one to four hexadecimal digits of the eight 16-bit pieces of the address.

    For example

    ABCD:EF01:2345:6789:ABCD:EF01:2345:6789
    
    2001:DB8:0:0:8:800:200C:417A
    
    Note: It is not necessary to write the leading zeros in an individual field, but there must be at least one numeral in every field (except for the syntax described in the following case).
  • A second form of IPv6 address uses a special syntax for compressing zeros. This form can be useful because some IPv6 addresses contain long strings of zero-bits.

    The syntax uses double colons (::) to indicate one or more sets of 16 bits of zeros. The double colons can be used only once to compress leading or trailing zeros in an address.

    For example

    The following addresses...

    Can be represented as...

    2001:DB8:0:0:8:800:200C:417A (a unicast address)

    2001:DB8::8:800:200C:417A

    FF01:0:0:0:0:0:0:101 (a multicast address)

    FF01::101

    0:0:0:0:0:0:0:1 (the loopback address)

    ::1

    0:0:0:0:0:0:0:0 (the unspecified address)

    ::