Saturday, May 19, 2007

IPv4 to IPv6 Translation Mechanisms

There are two approaches to the transition, which may be applicable in different phases of the process: Dual-stack (all nodes implement both IPv4 and IPv6) and IPv6-only combined with translation. The former requires no special IPv6 architecture besides connectivity. The latter, in practice, requires some mechanisms to access IPv4-only services which are bound to be used for quite a while yet.

Here, the major translation mechanisms are very briefly introduced. These could be divided in two: those that work in the network or in the node itself.

TCP/UDP Relay

TCP/UDP relay works as a transport-level relay between IPv6 and IPv4: IPv6 node connects to a published address (e.g. in DNS) consisting of the network prefix and IPv4 address embedded in the last bits, e.g. ``3ffe:ffff::0b0c:0d0e'' for ``11.12.13.14''. This way, the TCP connection or a UDP stream is established first to a port of an IPv6 address, and all the payload of the protocol is relayed to the IPv4 address in a separate connection from the relay.

TCP/UDP relay can also be used as a full-fledged protocol translator like NAT-PT (see below) with a DNS proxy placed between the hosts and the DNS server. The advantage compared to NAT-PT is that nothing needs to be done on the direct path toward the destination (i.e. the router).

A disadvantage, in some scenarios, is that all the IPv6 traffic seems to originate from one IPv4 address of the from the relay; this can be bad from e.g. statistics point-of-view; this is common to NAT-PT and other mechanisms, of course.

Another disadvantage is that usually only the headers are translated; if addresses are transported in the payload (as e.g. some videoconferencing or VoIP applications do), they cannot be translated because the translator cannot know how to perform the operation for every possible protocol. Such a translation would require mechanisms similar to ALG; but if an algorithm is available for IPv4 NAT's, it could be reasonably well adopted to IPv6 too.

NAT-PT

Network Address Translation - Protocol Translation (NAT-PT) uses Stateless IP/ICMP Translation algorithm in a stateful manner. It uses the same address mapping as TCP/UDP relay, but DNS proxying is done transparently on the wire by inspecting DNS queries with IPv4 'A' records and rewriting the replies to be IPv6 'AAAA' records to point at the NAT-PT translator (see fig. below for an example of DNS proxying and translator; with NAT-PT DNS proxying is done on the router). The disadvantage is that all the packets need to go through the same device; in practice this is not a problem if e.g. an xDSL router performs this translation.

There are numerous problems with NAT-PT's DNS proxying mechanism: for example, with DNS queries that return both A and AAAA, or those that are done over native IPv6 transport

No comments: