IPv6 Address Prefix Representation

IPv6 address prefixes are similar to IPv4 address prefixes in classless interdomain routing (CIDR) notation.

An IPv6 address prefix is represented by the following notation:

ipv6-address/prefix-length

where

  • The ipv6-address value represents an IPv6 address using either of the notation forms listed in “IPv6 Address Representation.”

  • The prefix-length represents a decimal value that specifies the number of leftmost contiguous address bits that form the prefix.

The following examples are valid representations of the 60-bit prefix 20010DB80000CD3 (hexadecimal):

2001:0DB8:0000:CD30:0000:0000:0000:0000/60
2001:0DB8::CD30:0:0:0:0/60
2001:0DB8:0:CD30::/60

The following examples are invalid representations of the 60-bit prefix 20010DB80000CD3 (hexadecimal).

Invalid Representation

Reason

2001:0DB8:0:CD3/60

Might drop leading zeros, but not trailing zeros, within any 16-bit chunk of the address

2001:0DB8::CD30/60

Address to left of / (slash) expands to 2001:0DB8:0000:0000:0000:0000:0000:CD30

2001:0DB8::CD3/60

Address to left of / (slash) expands to 2001:0DB8:0000:0000:0000:0000:0000:0CD3

When writing both a node address and a prefix of that node address (that is, the subnet prefix of the node), the two can be combined as follows:

For example, the node address 2001:0DB8:0:CD30:123:4567:89AB:CDEF and its subnet number 2001:0DB8:0:CD30::/60 can be abbreviated as follows:

2001:0DB8:0:CD30:123:4567:89AB:CDEF/60