IPv6 Compatibility Addresses

IPv6 provides a set of compatibility addresses that help users migrate from IPv4 to IPv6 and these are IPv4-compatible, IPv4-mapped, 6to4 and Teredo addresses.

IPv4-Compatible Address

An IPv4-compatible address consists of an initial colon-hexadecimal notation and an ending dotted decimal notation as we find in IPv4. For example, 0:0:0:0:0:0:w.x.y.z or ::w.x.y.z, the last four octets represent an IPv4 address. IPv4-compatible addresses are used by hosts that are communicating with IPv6 over an IPv4 infrastructure. When an IPv4-compatible address is used as an IPv6 destination, the IPv6 traffic is automatically encapsulated with an IPv4 header.

IPv4-Mapped Address

The IPv4-mapped address has the last block of the colon-hexadecimal part set to ffff when compared to an IPv4-compatible type address. For example, 0:0:0:0:0:ffff:w.x.y.z or ::ffff:w.x.y.z, the last four octets represent an IPv4 address. The IPv4-mapped address is used to map IPv4 devices that are not compatible with IPv6 into the IPv6 address space.

6to4 Address

The 6to4 address is intended for temporary use as to facilitate the transition from the initial mixed environments to the full native IPv6 connectivity. Therefore, it has some limitations such as, cannot be used to connect IPv4-only hosts to IPv6-only hosts. A 6to4 address enables IPv6 packets to be transmitted over the IPv4 Internet or network without the need to configure explicit tunnels. Also 6to4 hosts can communicate over an IPv6 Internet and hence, users using their existing IPv4 connection can connect to the IPv6 Internet. It consists of 2002:<first two bytes of the IPv4 address>:<second two bytes of the IPv4 address>::/16

Teredo Address

Teredo is a tunneling protocol and it was designed for IPv6 connectivity to nodes that are located behind IPv6 unaware NAT devices. It defines a way of encapsulating IPv6 packets within IPv4 UDP datagrams that can be routed through NAT devices and on the IPv4 Internet.

Teredo is intended for temporary use, all IPv6 hosts should use native IPv6 connectivity. 6to4, the most common IPv6 over IPv4 tunneling protocol, requires the tunnel endpoint to have a public IPv4 address. However, many hosts are currently attached to the IPv4 Internet through one or several NAT devices, usually because of IPv4 address shortage. In such a situation, the only available public IPv4 address is assigned to the NAT device, and the 6to4 tunnel endpoint needs to be implemented on the NAT device itself. Teredo alleviates this problem by encapsulating IPv6 packets within UDP/IPv4 datagrams, which most NATs can forward properly.

A Teredo address consists of a 32 bit Teredo prefix (2001::/32). The prefix is followed by the IPv4 public address of the Teredo server that assisted in the configuration of the address. The next 16 bits are reserved for Teredo flags while the subsequent 16 bits store a version of the external UDP port. The final 32 bits store a version of the external public IPv4 address.