## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

## Format of an Address

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: 134.109.89.132.123.192.111.222.9.101.167.189.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.

### Text Representation of Addresses

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:

• (a) Letters are case-insensitive. For example, ‘AB09’ equals ‘ab09’.
• (b) Leading zeros in a field are optional. For example, ‘00c1’ equals ‘c1’.
• (c) Successive fields of ‘0’ are represented as ‘::’, but only once in an address.1

For example,

2001 : 0000 : 1234 : 0000 : 0000 : C1C0 : ABCD : 0876

can be represented, using rule a), by:

2001 : 0000 : 1234 : 0000 : 0000 : c1c0 : abcd : 0876

which can be compressed using rule b) to:

2001 : 0 : 1234 : 0 : 0 : c1c0 : abcd : 876

which can be further compressed using rule c) to:

2001 : 0 : 1234::c1c0 : abcd ...

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required