IPv4 mapped address

From Wikipedia, the free encyclopedia

IPv4 mapped IPv6 addresses constitute a special class of IPv6 addresses. Such an IPv6 address has its first 80 bits set to zero, the next 16 set to one, while its last 32 bits represents an IPv4 address. For example, ::ffff:c000:280 is the mapped IPv6 address for 192.0.2.128.

Contents

[edit] Notation

As a special exception to IPv6 addresses notation, IPv4 mapped addresses are commonly represented with their last 32 bits notated as an IPv4 address. As such, ::ffff:c000:280 would typically be notated ::ffff:192.0.2.128 instead.

[edit] Usage

IPv4 mapped addresses are normally used by the IP stack to represent IPv4 addresses to IPv6 applications. It allows the transparent use of transport layer protocols (TCP or UDP) over IPv4 through the IPv6 networking API. It is therefore considered an IPv6 transition mechanism for dual-stack hosts.

The big advantage of this mechanism is in allowing a server application to only use a single listening socket to handle connections from client via both IPv6 and IPv4 protocols. In that case, IPv6 clients will be handled as usual, and IPv4 clients appear as IPv6 clients with an adequate mapped IPv6 address. It can also be used to establish IPv4 connections actively with an IPv6 socket, but that feature is rather rarely used.

While the actual packets on the network will be IPv4, the logical connection will be presented as an IPv6 one to the application.

[edit] Limitations

Because of the significant internal differences between IPv4 and IPv6 at the network layer, some of the lower level functionality that may be exposed by the IPv6 stack might not work with IPv4 mapped addresses, if there is no direct translation to IPv4.

Many common IPv6 stacks do not support this mechanism, either because the IPv6 and IPv4 are separate (Microsoft Windows XP/2000/2003), or because of security concerns (NetBSD, OpenBSD, FreeBSD). On these operating systems, it is necessary to open a separate socket for each IP protocol that is to be supported.

[edit] See also

In other languages