IPv6 Addressing
IPv6 uses a 128-bit addressing model. This creates a much larger address space than IPv4 addresses, which are made up of 32 bits. IPv6 addresses also contain a scope field that categorizes what types of applications are suitable for the address. IPv6 does not support broadcast addresses, but instead uses multicast addresses to serve this role. In addition, IPv6 also defines a new type of address called anycast.
This section discusses the following topics that provide background information about IPv6 addressing:
Address Representation
IPv6 addresses consist of 8 groups of 16-bit hexadecimal values separated by colons (:). The IPv6 address format is as follows:
aaaa:aaaa:aaaa:aaaa:aaaa:aaaa:aaaa:aaaa
aaaais a 16-bit hexadecimal value, andais a 4-bit hexadecimal value. Following is an example of an actual IPv6 address:3FFE:0000:0000:0001:0200:F8FF:FE75:50DFYou can omit the leading zeros, as shown:
3FFE:0:0:1:200:F8FF:FE75:50DF
You can compress 16-bit groups of zeros to "::", as shown here, but only once per address:3FFE::1:200:F8FF:FE75:50DFAddress Types
There are three types of IPv6 addresses:
- Unicast—For a single interface.
- Multicast—For a set of interfaces on the same physical medium. A packet is sent to all of the interfaces associated with the address.
- Anycast—For a set of interfaces on different physical mediums. A packet is sent to only one of the interfaces associated with this address, not to all the interfaces.
Address Scope
IPv6 addresses have scope, which identifies the application suitable for the address. Unicast and multicast addresses support scoping.
Unicast addresses support two types of scope: global scope and local scope. There are two types of local scope: link-local addresses and site-local addresses. Link-local unicast addresses are used within a single network link. The first 10 bits of the prefix identify the address as a link-local address. Link-local addresses cannot be used outside a network link. Site-local unicast addresses are used within a site or intranet. A site consists of multiple network links, and site-local addresses identify nodes inside the intranet. Site-local addresses cannot be used outside the site.
Multicast addresses support 16 different types of scope, including node, link, site, organization, and global scope. A four-bit field in the prefix identifies the scope.
Address Structure
Unicast addresses identify a single interface. The address consists of n bits for the prefix, and 128-n bits for the interface ID.
Multicast addresses identify a set of interfaces. The address is made up of the first 8 bits of all ones, a 4-bit flags field, a 4-bit scope field, and a 112-bit group ID:
11111111 |flgs|scop|group IDThe first octet of ones identifies the address as a multicast address. The flags field identifies whether the multicast address is a well-known address or a transient multicast address. The scope field identifies the scope of the multicast address. The 112-bit group ID identifies the multicast group.
Similar to multicast addresses, anycast addresses identify a set of interfaces. However, packets are sent to only one of the interfaces, not to all interfaces. Anycast addresses are allocated from the normal unicast address space and cannot be distinguished from a unicast address in format. Therefore, each member of an anycast group must be configured to recognize certain addresses as anycast addresses.