IPv6 prefixes are represented much as in IPv4, with the following format:
IPv6-address/prefix
The IPv6-address portion is a valid IPv6 address. The prefix portion is the number of leftmost contiguous bits that represent the prefix. You use the double colon only once in the representation. An example of an IPv6 prefix is 200C:001b:1100:0:0:0:0:0/40, and this address could be condensed to 200C:1b:1100::/40.
For another example, look at these representations of the 60-bit prefix 2001000000000ab0:
2001:0000:0000:0ab0:0000:0000:0000:0000/60
2001:0000:0000:0ab0:0:0:0:0/60
2001:0000:0000:ab0::/60
2001:0:0:ab0::/60
The rules for address representation are still valid when using a prefix. The following is not a valid representation of the preceding prefix:
2001:0:0:ab0/60
The preceding representation is missing the trailing double colon:
2001::ab0/60
The preceding representation expands to 2001:0:0:0:0:0:0:0ab0, which is not the prefix 2001:0000:0000:0ab0::/60.
When representing an IPv6 host address with its subnet prefix, you combine the two. For example, the IPv6 address 2001:0000:0000:0ab0:001c:1bc0:08ba:1c9a in subnet prefix 2001:0000:0000:0ab0::/60 is represented as follows:
2001:0000:0000:0ab0:001c:1bc0:08ba:1c9a/60
IPv6 Address Scope Types and Address Allocations
This section covers the major types of IPv6 addresses. IPv4 addresses are unicast, multicast, or broadcast. IPv6 maintains each of these address functions, except that the IPv6 address types are defined a little differently. A special “all-nodes” IPv6 multicast address handles the broadcast function. IPv6 also introduces the anycast address type.
Also important to understand are the IPv6 address allocations. Sections of the IPv6 address space are reserved for particular functions, which are covered in this section. To provide you with a full understanding of address types, the following sections describe each one.
IPv6 Address Allocations
The leading bits of an IPv6 address can define the IPv6 address type or other reservations. These leading bits are of variable lengths and are called the format prefix (FP). Table 2-3 shows the allocation of address prefixes. The IPv6 address space was delegated to IANA. You can find current IPv6 allocations at https://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.xhtml. Many prefixes are still unassigned.
Table 2-3 IPv6 Prefix Allocation
Binary Prefix | Hexadecimal/Prefix | Allocation |
0000 0000 | 0000::/8 | Unspecified, loopback, IPv4-compatible |
0000 0001 | 0100::/8 | Reserved, 0100::/64 reserved for discard-only address block |
0000 001 | 0200:/7 | Reserved by IETF |
0000 010 | 0400::/6 | Reserved, deprecated use for Internetwork Packet Exchange (IPX) allocation |
0000 1 | 0800::/5 | Reserved by IETF |
0001 | 1000::/4 | Reserved by IETF |
001 | 2000::/3 | Global unicast address; IANA unicast address assignments are limited within this range |
010 | 4000::/3 | Reserved by IETF |
011 | 6000::/3 | Reserved by IETF |
100 | 8000::/3 | Reserved for geographic-based unicast addresses |
101 | A000::/3 | Reserved by IETF |
110 | C000::/3 | Reserved by IETF |
1110 | E000::/3 | Reserved by IETF |
1111 0 | F000::/5 | Reserved by IETF |
1111 10 | F800::/6 | Reserved by IETF |
1111 110 | FC00::/7 | Unique local unicast |
1111 1110 0 | FE00::/9 | Reserved by IETF |
1111 1110 10 | FE80:/10 | Link-local unicast addresses |
1111 1110 11 | FEC0::/10 | Unassigned; was site-local unicast addresses (deprecated) |
1111 1111 | FF00::/8 | Multicast addresses |
An unspecified address is all 0s: 0:0:0:0:0:0:0:0. It signifies that an IPv6 address is not specified for the interface. Unspecified addresses are not forwarded by an IPv6 router.
The IPv6 loopback address is 0:0:0:0:0:0:0:1. This address is similar to the IPv4 loopback address 127.0.0.1.