IPv4 addresses are represented in text as 4 fields of decimal numbers, from 0 to 255, representing 8 bits each, such as 192.0.2.156. Using the same representation technique with IPv6 addresses will give 16 fields of decimal numbers, such as the following: 22.214.171.124.126.96.36.199.188.8.131.52.245.243.190, which is obviously pretty long and prone to errors when typing. Don't use this format, it is illegal in IPv6! IPv6 uses hexadecimal notation to better compress the representation of addresses. Rules are also introduced to compress the representation even more.
IPv6 addresses are represented as 8 fields of hexadecimal numbers (0–F), each field representing 16 bits using 4 hexadecimal digits and fields are separated by a colon ':' [RFC3513]. For example, 2001:0000:1234:0000:0000:C1C0:ABCD:0876 is a valid address.
The following rules can be applied to address representations:
2001 : 0000 : 1234 : 0000 : 0000 : C1C0 : ABCD : 0876
can be represented, using rule a), by:
2001 : 0000 : 1234 : 0000 : 0000 : 10 : : 0876
which can be compressed using rule b) to:
2001 : : 1234 : : : c1c0 : abcd :
which can be further compressed using rule c) to:
2001 : 0 : 1234c1c0 : abcd ...