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 that node's interfaces' unicast addresses can be usedas an identifier for the node. A single interface can be assigned multiple IPv6 addresses of any type.
The three types of IPv6 addresses are: unicast, anycast, and multicast.
Unicast addresses identify a single interface.
Anycast addresses identify a set of interfaces in such a way that a packet sent to an anycast address is delivered to a member of the set.
Multicast addresses identify a group of interfaces in such a way that a packet sent to a multicast address is delivered to all of the interfaces in the group.
IPv6 has no broadcast addresses: multicast addresses took over.
IPv6 supports addresses that are four times the number of bits as IPv4 addresses (128 vs. 32). This is 4 billion times 4 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 addressspace usage, thus reducing the number of available addresses. Nonetheless, IPv6 provides enough address space to last into the foreseeable future.
The leading bits in the address specify the type of IPv6 address. The variable-length field containing 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 NSAP (Network Service Access Point) addresses, IPX (Internetwork Packet Exchange Protocol) addresses, and neutral-interconnect addresses. The remainderof 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 becausethey are allocated out of the unicast address space.
Approximately fifteen percent of the address space is initially allocated. The remaining 85% is reserved for future use.
Unicast Addresses
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
Aggregate global unicast addresses are used for global communication. They are similar in function to IPv4 addresses under CIDR (classless interdomain routing). 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 |
Where:
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 assigned a TLA ID to create an addressing hierarchy and to identifysites.
The SLA ID field is used by an individual organization to create its own local addressing hierarchy and to identify subnets. This 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 InterfaceID is used to identify interfaces on a link. They are required to be unique on that link. They can also be unique over a broader scope. In many cases, an interface identifier is the same or is based on the interface's link-layer address.
Local-Use Addresses
A local-use address is a unicast address that has only local routability scope (within the subnet or within a subscriber network), and can have a local or global uniqueness scope. These addresses are intended for use inside of a site for plug and play local communication andfor bootstrapping up to the use of global addresses.
Two types of local-use unicast addresses are defined. These are link-local and site-local. The Link-Local-Use is for use on a single link and 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 | n bits | 118-n bits |
1111111010 | 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 | n bits | m bits | 118-(n+m) bits |
1111111011 | Subnet ID | Interface ID |
For both types of local-use addresses, the interface ID is an identifier that must be unique in the domain in which it is being used. In most cases these will use a node's IEEE-802 48 bit address. The Subnet ID identifies a specific subnet in a site. The combination of the Subnet ID and the interfaceID to form a local-use address allows a large private internet to be constructed without any other address allocation.
Local-use addresses allow organizations that are not yet connected to the global Internet to operate without the need to request an address prefix from the global Internet address space. If the organization later connects to the global Internet, it can use its Subnet ID and Interface ID in combinationwith a global prefix (for example, Registry ID + Provider ID + Subscriber ID) to create a global address. This is a significant improvement over IPv4, which requires sites that use private (non-global) IPv4 addresses to manually renumber when they connect to the Internet. IPv6 automatically does the renumbering.
IPv6 Addresses With Embedded IPv4 Addresses
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 addressis called an IPv4-compatible IPv6 address and its 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. It is mainly used internally within the implementation of applications, APIs, and the operating system. This type of address is calledan IPv4-mapped IPv6 address and its 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 |
Anycast Addresses
An IPv6 anycast address is an address that is assigned to more than one interface (typically belonging to different nodes), where a packet sent to an anycast address is routed to the nearest interface having that address, according to the routing protocol's measure of distance.
Anycast addresses, when used as part of a route sequence, permit a node to select which of several Internet service providers it wants to carry its traffic. This capability is sometimes called source selected policies. You implement this by configuring anycast addresses to identifythe set of routers belonging to Internet service providers (for example, one anycast address per Internet service provider). You can use these anycast addresses as intermediate addresses in an IPv6 routing header, to cause a packet to be delivered by a particular provider or sequence of providers. Youcan also use anycast addresses to identify the set of routers attached to a particular subnet or the set of routers providing 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, that is, turning it into an anycastaddress, you must explicitly configure the nodes to which the address is assigned in order to know that it is an anycast address.
Multicast Addresses
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 4 flags: 0,0,0,T.
The high-order 3 flags are reserved and must be initialized to 0.
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.
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.