3.7. Special Addresses
There are a number of special addresses that we need to discuss. The first part of the IPv6 address space with the prefix of 0000 0000 is reserved. Out of this prefix, special addresses have been defined as follows:
The next sections describe different types of addresses that have been specified to be used with different transition mechanisms. These virtual interfaces are called pseudo-interfaces . A description of the transition mechanisms can be found in Chapter 10.
3.7.1. IPv6 Addresses with Embedded IPv4 Addresses
Because the transition to IPv6 will be gradual, two special types of addresses have been defined for backward compatibility with IPv4. Both are described in RFC 4291:
Figure 3-2 shows the format of both these addresses.
Figure 3-2. Format of IPv6 addresses with an embedded IPv4 address
The two addresses are pretty much the same. The only difference is the 16 bits in the middle. When they are set to 0, the address is an IPv4-compatible IPv6 address; if these bits are set to 1, it is an IPv4-mapped IPv6 address.
3.7.2. 6to4 Addresses
The IANA has permanently assigned a 13-bit TLA identifier for 6to4 operations within the global unicast address range (001). 6to4 is one of the mechanisms defined to let IPv6 hosts or networks communicate over an IPv4-only infrastructure. I describe 6to4 in Chapter 10, and is specified in RFC 3056. The 6to4 TLA identifier is 0x0002. The address format is shown in Figure 3-3.
Figure 3-3. Format of the 6to4 address
The prefix has a total length of 48 bits. The IPv4 address in the prefix must be a public IPv4 address and is represented in hexadecimal notation. For instance, if you configure an interface for 6to4 with an IPv4 address of 126.96.36.199, the 6to4 address is 2002:3e02:5473::/48. Through this interface, all IPv6 hosts on this link can tunnel their packets over the IPv4 infrastructure.
3.7.3. ISATAP addresses
The Intra-Site Automatic Tunnel Addressing Protocol (ISATAP) is an automatic tunneling mechanism specified in RFC 4214. It is designed for dual stack nodes that are separated by an IPv4-only infrastructure. It treats the IPv4 network as one large link-layer network and allows those dual stack nodes to automatically tunnel between themselves using any format of IPv4 address. Windows XP includes an implementation of ISATAP. ISATAP uses a type identifier of 0xFE for specifying an IPv6 address with an embedded IPv4 address. The format of an ISATAP address is shown in Figure 3-4.
Figure 3-4. Format of the ISATAP address
The first 64 bits follow the format of the global unicast address. IANA owns the IEEE Organizationally Unique Identifier (OUI) 00-00-5E and specifies the EUI-48 format interface identifier assignments within that OUI. Within the first 16 bits, a type identifier shows whether the IPv4 address is from the private range (0000) or a globally unique address (0200). The next eight bits contain a type identifier to indicate that this is an IPv6 address with an embedded IPv4 address. The type identifier is 0xFE. The last 32 bits contain the embedded IPv4 address, which can be written in dotted decimal notation or in hexadecimal representation.
Assume we have a host with an IPv4 address of 192.168.0.1 and the host is assigned a 64-bit prefix of 2001:DB8:510:200::/64. The ISATAP address for this host is 2001:DB8:510:200:0:5EFE:192.168.0.1. Alternatively, you can use the hexadecimal representation for the IPv4 address, in which case the address is written 2001:DB8:510:200:0:5EFE:C0A8:1. The link-local address for this host is FE80::5EFE:192.168.0.1.
3.7.4. Teredo Addresses
Teredo is a mechanism designed to provide IPv6 connectivity to hosts that sit behind one or more NATs. This is done by tunneling the IPv6 packet within UDP. The mechanism consists of Teredo clients, servers, and relays. The Teredo relays are IPv6 routers sitting between the Teredo service and the native IPv6 network. Teredo is specified in RFC 4380. As many private Internet users are sitting behind NATs, it is expected that this service will be common until ISPs have upgraded to native IPv6 services.
A Teredo address has the format shown in Figure 3-5.
Figure 3-5. Format of the Teredo address
The prefix has a length of 32 bits. The global Teredo IPv6 Service Prefix is 2001:0000:/32. The server IPv4 address field has a length of 32 bits and contains the IPv4 address of a Teredo server. The flags field has 16 bits and specifies the type of address and NAT in use. The 16-bit port field contains the mapped UDP port of the Teredo service on the client and the client IPv4 address field contains the mapped IPv4 address of the client. In this format, both the mapped UDP port and the mapped IPv4 address of the client are obfuscated: each bit in the address and port number is reversed.