We know the IPv6 address size is 128 bits.
The preferred IPv6 address representation is: x:x:x:x:x:x:x:x, where each x is the hexadecimal values of the
eight 16-bit pieces of the address. IPv6 addresses range from 0000:0000:0000:0000:0000:0000:0000:0000
to ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff.
In addition to this preferred format, IPv6 addresses might
be specified in two other shortened formats:
Omit leading zeros
Specify
IPv6 addresses by omitting leading zeros. For example, IPv6 address 2302:0000:0000:0000:0005:0000:300c:326b
can be written as 2302:0:0:0:5:0:300c:326b
OR,
Double colon
Specify
IPv6 addresses by using double colons (::) in place of a series of zeros. For
example, IPv6 address 2302:0:0:0:5:0:300c:326b
can be written as 2302::5:0:300c:326b
Mind
it,
Double
colons can be used only once in an IP address. So if you write the above
address like below:
2302::5::300c:326b. ## This
is wrong. Because of double colon appears twice here.
The loopback Address:
IPv4 Format- 127.0.0.1/8
IPv6 Format- ::1/128
We will discuss about the address type of IPv6 in next post.