IPv6 addresses are 128 bits long and are identifiers for individual interfaces and sets of interfaces. IPv6 addresses of all types are assigned to interfaces, not nodes (hosts and routers). Because each interface belongs to a single node, any of the unicast addresses of that node's interfaces' can be used as an identifier for the node. A single interface can be assigned multiple IPv6 addresses of any type.
IPv6 addresses consist of the following types: unicast, anycast, and multicast.
Unicast addresses identify a single interface.
Anycast addresses identify a set of interfaces. A packet that is sent to an anycast address is delivered to a member of the set.
Multicast addresses identify a group of interfaces. A packet that is sent to a multicast address is delivered to all of the interfaces in the group.
In IPv6, multicast addresses replace broadcast addresses.
IPv6 supports addresses that are four times the number of bits as IPv4 addresses (128 in contrast to 32). Thus, the number of potential addresses is four billion times four billion times the size of the IPv4 address space. Realistically, the assignment and routing of addresses requires the creation of hierarchies that reduce the efficiency of address space usage. Consequently, the reduction in efficiency reduces the number of available addresses. Nonetheless, IPv6 provides enough address space for the foreseeable future.
The leading bits in the address specify the type of IPv6 address. The variable-length field that contains these leading bits is called the format prefix (FP). The following table shows the initial allocation of these prefixes.
Table 14–1 Format Prefix Allocations
Allocation |
Prefix (Binary) |
Fraction of Address Space |
---|---|---|
Reserved |
0000 0000 |
1/256 |
Unassigned |
0000 0001 |
1/256 |
Reserved for NSAP Allocation |
0000 001 |
1/128 |
Reserved for IPX Allocation |
0000 010 |
1/128 |
Unassigned |
0000 011 |
1/128 |
Unassigned |
0000 1 |
1/32 |
Unassigned |
0001 |
1/16 |
Aggregate Global Unicast Address |
001 |
1/8 |
Unassigned |
010 |
1/8 |
Unassigned |
011 |
1/8 |
Reserved for Neutral-Interconnect-Based Unicast Addresses |
100 |
1/8 |
Unassigned |
101 |
1/8 |
Unassigned |
110 |
1/8 |
Unassigned |
1110 |
1/16 |
Unassigned |
1111 0 |
1/32 |
Unassigned |
1111 10 |
1/64 |
Unassigned |
1111 110 |
1/128 |
Unassigned |
1111 1110 0 |
1/512 |
Link Local Use Addresses |
1111 1110 10 |
1/1024 |
Site Local Use Addresses |
1111 1110 11 |
1/1024 |
Multicast Addresses |
1111 1111 |
1/256 |
The allocations support the direct allocation of aggregate global unicast addresses, local-use addresses, and multicast addresses. Space is reserved for Network Service Access Point (NSAP) addresses, Internetwork Packet Exchange Protocol (IPX) addresses, and neutral-interconnect addresses. The remainder of the address space is unassigned for future use. This remaining address space can be used for expansion of existing use (for example, additional aggregate global unicast addresses) or new uses (for example, separate locators and identifiers). Notice that anycast addresses are not shown here because anycast addresses are allocated out of the unicast address space.
Approximately 15 percent of the address space is initially allocated. The remaining 85 percent is reserved for future use.
IPv6 unicast address assignment consists of the following forms:
Aggregate global unicast address
Neutral-interconnect unicast address
NSAP address
IPX hierarchical address
Site-local-use address
Link-local-use address
IPv4-capable host address
Additional address types can be defined in the future.
Aggregate global unicast addresses are used for global communication. These addresses are similar in function to IPv4 addresses under classless interdomain routing (CIDR). The following table shows their format.
Table 14–2 Aggregate Global Unicast Addresses Format
3 bits |
13 bits |
8 bits |
24 bits |
16 bits |
64 bits |
FP |
TLA ID |
RES |
NLA ID |
SLA ID |
Interface ID |
FP |
Format Prefix (001) |
TLA ID |
Top-Level Aggregation identifier |
RES |
Reserved for future use |
NLA ID |
Next-Level Aggregation identifier |
SLA ID |
Site-Level Aggregation identifier |
INTERFACE ID |
Interface identifier |
The first 48 bits represent the public topology. The next 16 bits represent the site topology.
The first 3 bits identify the address as an aggregate global unicast address. The next field, TLA ID, is the top level in the routing hierarchy. The next 8 bits are reserved for future use. The NLA ID field is used by organizations that are assigned a TLA ID to create an addressing hierarchy and to identify sites.
The SLA ID field is used by an individual organization to create its own local addressing hierarchy and to identify subnets. Use of the SLA ID field is analogous to subnets in IPv4 except that each organization has a much greater number of subnets. The 16–bit SLA ID field supports 65,535 individual subnets. The Interface ID is used to identify interfaces on a link. The Interface ID must be unique on that link. The Interface ID can also be unique over a broader scope. In many instances, an interface identifier is the same or is based on the interface's link-layer address.
A local-use address is a unicast address that has only local routability scope. A local-use address can only be used within the subnet or within a subscriber network. These addresses are intended for use inside of a site for plug and play local communication and for bootstrap operations for the use of global addresses.
The two types of local-use unicast addresses are link-local and site-local. The Link-Local-Use is for use on a single link. The Site-Local-Use is for use on a single site. The following table shows the Link-Local-Use address format.
Table 14–3 Link-Local-Use Addresses Format
10 bits |
54 bits |
64 bits |
1111111010 |
0 |
Interface ID |
Link-Local-Use addresses are used for addressing on a single link for purposes such as auto-address configuration.
The following table shows the Site-Local-Use address format.
Table 14–4 Site-Local-Use Addresses
10 bits |
38 bits |
16 bits |
64 bits |
1111111011 |
0 |
Subnet ID |
Interface ID |
For both types of local-use addresses, the Interface ID is an identifier that must be unique in its domain. In most instances, the identifier uses a node's IEEE-802 48–bit address. The Subnet ID identifies a specific subnet in a site. The Subnet ID and the interface ID form a local-use address. Consequently, a large private internet can be constructed without any other address allocation.
Organizations that are not yet connected to the global Internet can use local-use addresses. Local-use addresses enable organizations to operate without the need to request an address prefix from the global Internet address space. If the organization later connects to the Internet, the Subnet ID, Interface ID, and a global prefix can be used to create a global address. For example, the organization can use the Registry ID, Provider ID, and the Subscriber ID to create a global address. This enhancement is a significant improvement over IPv4. IPv4 requires sites that use private (non-global) IPv4 addresses to manually renumber when sites connect to the Internet. IPv6 automatically does the renumbering.
The IPv6 transition mechanisms include a technique for hosts and routers to tunnel IPv6 packets dynamically under IPv4 routing infrastructure. IPv6 nodes that utilize this technique are assigned special IPv6 unicast addresses that carry an IPv4 address in the low-order 32 bits. This type of address is called an IPv4-compatible IPv6 address. The address format is shown in the following table.
Table 14–5 IPv4–Compatible IPv6 Address Format
80 bits |
16 bits |
32 bits |
0000.......................................0000 |
0000 |
IPv4 Address |
A second type of IPv6 address that holds an embedded IPv4 address is also defined. This address is used to represent an IPv4 address within the IPv6 address space. This address is mainly used internally within the implementation of applications, APIs, and the operating system. This type of address is called an IPv4-mapped IPv6 address. The address format is shown in the following table.
Table 14–6 IPv4–Mapped IPv6 Address Format
80 bits |
16 bits |
32 bits |
0000..............................0000 |
FFFF |
IPv4 Address |
An IPv6 anycast address is an address that is assigned to more than one interface. Typically, the address belongs to different nodes. A packet that is sent to an anycast address is routed to the nearest interface that has that address, according to the routing protocol's measure of distance.
Anycast addresses can be used as part of a route sequence. Thus, a node can select which of several Internet service providers that the node wants to carry its traffic. This capability is sometimes called source-selected policies. You implement this capability by configuring anycast addresses to identify the set of routers that belongs to Internet service providers. For example, you can configure one anycast address per Internet service provider. You can use the anycast addresses as intermediate addresses in an IPv6 routing header. Then the packet is delivered by a particular provider or is delivered by a sequence of providers. You can also use anycast addresses to identify the set of routers that are attached to a particular subnet. You can also use anycast addresses to identify the set of routers that provide entry into a particular routing domain.
You can locate anycast addresses from the unicast address space by using any of the defined unicast address formats. Thus, anycast addresses are syntactically indistinguishable from unicast addresses. When you assign a unicast address to more than one interface, you turn the unicast address into an anycast address. However, you must explicitly configure the nodes to which the address is assigned in order to know that the address is an anycast address.
An IPv6 multicast address is an identifier for a group of interfaces. An interface can belong to any number of multicast groups. The following table shows the multicast address format.
Table 14–7 Multicast Address Format
8 bits |
4 bits |
4 bits |
112 bits |
11111111 |
FLGS |
SCOP |
Group ID |
11111111 at the start of the address identifies the address as a multicast address. FLGS is a set of four flags: 0,0,0,T.
The high-order 3 flags are reserved and must be initialized to zero.
T=0 – Indicates a permanently assigned (well-known) multicast address, assigned by the global Internet numbering authority.
T=1 – Indicates a non-permanently assigned (transient) multicast address.
SCOP is a 4-bit multicast scope value used to limit the scope of the multicast group. The following table shows the SCOP values.
Table 14–8 SCOP Values
0 |
Reserved |
8 |
Organization-local scope |
1 |
Node-local scope |
9 |
(unassigned) |
2 |
Link-local scope |
A |
(unassigned) |
3 |
(unassigned) |
B |
(unassigned) |
4 |
(unassigned) |
C |
(unassigned) |
5 |
Site-local scope |
D |
(unassigned) |
6 |
(unassigned) |
E |
Global scope |
7 |
(unassigned) |
F |
Reserved |
Group ID identifies the multicast group, either permanent or transient, within the given scope.