An IPv6 hextet is a 16-bit group, conventionally written as four hexadecimal digits. An IPv6 address contains eight hextets separated by colons, producing 128 bits. Hextet is the common informal term; hexadectet is more precise, while quartet is another usage. section 20.3.2
Figure 20.3 An IPv6 address written in hexadecimal and binary. The prefix length is /64, meaning that the first half (64 bits) of the address is the network portion, and the second half (64 bits) is the host portion.
Use the address-and-binary figure to see how eight hexadecimal hextets represent 128 bits and how a /64 divides the address into network and host portions. section 20.3.2
Apply these rules when reading or abbreviating hextets:
- Remove leading zeros from a hextet: 0db8 becomes db8, 0020 becomes 20, and 0000 becomes 0. Do not remove trailing zeros. section 20.3.3
- Replace two or more consecutive all-zero hextets with a double colon (::). Use the double colon only once in an address. section 20.3.3
- Read the first four hextets of a /64 address as the network portion and the final four as the host portion. section 20.3.2
Abbreviating an IPv6 address
The full address 2001:0db8:0000:0000:002f:0001:0000:34bd becomes 2001:db8::2f:1:0:34bd by removing leading zeros and replacing consecutive zero hextets with ::. A common /64 prefix is written 2001:db8:1:2::/64. section 20.3.3 section 20.6
