18.1.2 Address notation
An IPv6 address is 128 bits. The notation is as follows:
-
In hexadecimal notation, an IPv6 address is written as eight 16-bit groups, each separated by a colon.
Example: 3ffe:0501:0811:ff02:0000:08ff:fe8b:3090
-
You can omit leading 0s in each of the individual blocks in hexadecimal notation.
Example: 3ffe:501:811:ff02:0:8ff:fe8b:3090
-
You can replace consecutive blocks of 0s with two colons (::). However, only one such replacement is allowed.
Example: You can change the full IPv6 address on the left to the format on the right:
fe80:0000:0000:0000:0000:0000:0000:3090 -> fe80::3090
Example: Only one set of two colons is permitted.
fe80:0000:0000:0000:0000:0000:0000:3090 -> fe80::0::3090 (incorrect)
-
You can use the following formats to specify an address and the prefix length:
-
IPv6 address/prefix length
-
IPv6 address prefixlen prefix-length
The prefix length indicates in decimal the number of bits from the leftmost end of an address that are used for the prefix.
-