RFC 3142 INFORMATIONAL IPV6 · IPV4 · TRANSLATION

TRT: An IPv6-to-IPv4 Transport Relay Translator

A middle system that carries IPv6 connections out to IPv4 servers without changing anything at either end.

On rfc-editor.org ↗
PUBLISHED
June 2001
AUTHORS
J. Hagino, K. Yamamoto
STREAM
IETF
RESERVED IPV6 PREFIX
C6::/64
EXAMPLE DESTINATION ADDRESS
fec0:0:0:1::10.1.1.1
IPV6 MINIMUM MTU
1280 octets
TRAFFIC CARRIED
TCP and UDP only
PROTOCOLS THAT CANNOT CROSS
IPsec
REFERENCE IMPLEMENTATION
FAITH, in the WIDE KAME IPv6 stack
DOI
10.17487/RFC3142

RFC text

Contents
Original text · RFC Editor View on rfc-editor.org ↗
Network Working Group                                          J. Hagino
Request for Comments: 3142                                   K. Yamamoto
Category: Informational                          IIJ Research Laboratory
                                                               June 2001


               An IPv6-to-IPv4 Transport Relay Translator

Status of this Memo

   This memo provides information for the Internet community.  It does
   not specify an Internet standard of any kind.  Distribution of this
   memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (2001).  All Rights Reserved.

Abstract

   The document describes an IPv6-to-IPv4 transport relay translator
   (TRT).  It enables IPv6-only hosts to exchange {TCP,UDP} traffic with
   IPv4-only hosts.  A TRT system, which locates in the middle,
   translates {TCP,UDP}/IPv6 to {TCP,UDP}/IPv4, or vice versa.

   The memo talks about how to implement a TRT system using existing
   technologies.  It does not define any new protocols.

1.  Problem domain

   When you deploy an IPv6-only network, you still want to gain access
   to IPv4-only network resources outside, such as IPv4-only web
   servers.  To solve this problem, many IPv6-to-IPv4 translation
   technologies are proposed, mainly in the IETF ngtrans working group.
   The memo describes a translator based on the transport relay
   technique to solve the same problem.

   In this memo, we call this kind of translator "TRT" (transport relay
   translator).  A TRT system locates between IPv6-only hosts and IPv4
   hosts and translates {TCP,UDP}/IPv6 to {TCP,UDP}/IPv4, vice versa.

   Advantages of TRT are as follows:

   o  TRT is designed to require no extra modification on IPv6-only
      initiating hosts, nor that on IPv4-only destination hosts.  Some
      other translation mechanisms need extra modifications on IPv6-only
      initiating hosts, limiting possibility of deployment.

   o  The IPv6-to-IPv4 header converters have to take care of path MTU
      and fragmentation issues.  However, TRT is free from this problem.

   Disadvantages of TRT are as follows:

   o  TRT supports bidirectional traffic only.  The IPv6-to-IPv4 header
      converters may be able to support other cases, such as
      unidirectional multicast datagrams.

   o  TRT needs a stateful TRT system between the communicating peers,
      just like NAT systems.  While it is possible to place multiple TRT
      systems in a site (see Appendix A), a transport layer connection
      goes through particular, a single TRT system.  The TRT system thus
      can be considered a single point of failure, again like NAT
      systems.  Some other mechanisms, such as SIIT [Nordmark, 2000],
      use stateless translator systems which can avoid a single point of
      failure.

   o  Special code is necessary to relay NAT-unfriendly protocols.  Some
      of NAT-unfriendly protocols, including IPsec, cannot be used
      across TRT system.

   This memo assumes that traffic is initiated by an IPv6-only host
   destined to an IPv4-only host.  The memo can be extended to handle
   opposite direction, if an appropriate address mapping mechanism is
   introduced.

2.  IPv4-to-IPv4 transport relay

   To help understanding of the proposal in the next section, here we
   describe the transport relay in general.  The transport relay
   technique itself is not new, as it has been used in many of
   firewall-related products.

2.1.  TCP relay

   TCP relay systems have been used in firewall-related products.  These
   products are designed to achieve the following goals: (1) disallow
   forwarding of IP packets across a system, and (2) allow {TCP,UDP}
   traffic to go through the system indirectly.  For example, consider a
   network constructed like the following diagram.  "TCP relay system"
   in the diagram does not forward IP packet across the inner network to
   the outer network, vice versa.  It only relays TCP traffic on a
   specific port, from the inner network to the outer network, vice
   versa.  (Note:  The diagram has only two subnets, one for inner and
   one for outer.  Actually both sides can be more complex, and there
   can be as many subnets and routers as you wish.)

      destination host
        |X
      ==+=======+== outer network
                |Y
              TCP relay system
                |B
      ==+=======+== inner network
        |A
      initiating host

   When the initiating host (whose IP address is A) tries to make a TCP
   connection to the destination host (X), TCP packets are routed toward
   the TCP relay system based on routing decision.  The TCP relay system
   receives and accepts the packets, even though the TCP relay system
   does not own the destination IP address (X).  The TCP relay system
   pretends to having IP address X, and establishes TCP connection with
   the initiating host as X.  The TCP relay system then makes a another
   TCP connection from Y to X, and relays traffic from A to X, and the
   other way around.

   Thus, two TCP connections are established in the picture: from A to B
   (as X), and from Y to X, like below:

      TCP/IPv4: the initiating host (A) --> the TCP relay system (as X)
          address on IPv4 header: A -> X
      TCP/IPv4: the TCP relay system (Y) --> the destination host (X)
          address on IPv4 header: Y -> X

   The TCP relay system needs to capture some of TCP packets that is not
   destined to its address.  The way to do it is implementation
   dependent and outside the scope of this memo.

2.2.  UDP relay

   If you can recognize UDP inbound and outbound traffic pair in some
   way, UDP relay can be implemented in similar manner as TCP relay.  An
   implementation can recognize UDP traffic pair like NAT systems does,
   by recording address/port pairs onto an table and managing table
   entries with timeouts.

3.  IPv6-to-IPv4 transport relay translator

   We propose a transport relay translator for IPv6-to-IPv4 protocol
   translation, TRT.  In the following description, TRT for TCP is
   described.  TRT for UDP can be implemented in similar manner.

   For address mapping, we reserve an IPv6 prefix referred to by
   C6::/64.  C6::/64 should be a part of IPv6 unicast address space
   assigned to the site.  Routing information must be configured so that
   packets to C6::/64 are routed toward the TRT system.  The following
   diagram shows the network configuration.  The subnet marked as "dummy
   prefix" does not actually exist.  Also, now we assume that the
   initiating host to be IPv6-only, and the destination host to be
   IPv4-only.

      destination host
        |X4
      ==+=======+== outer network
                |Y4
              TRT system --- dummy prefix (C6::/64)
                |B6
      ==+=======+== inner network
        |A6
      initiating host

   When the initiating host (whose IPv6 address is A6) wishes to make a
   connection to the destination host (whose IPv4 address is X4), it
   needs to make an TCP/IPv6 connection toward C6::X4.  For example, if
   C6::/64 equals to fec0:0:0:1::/64, and X4 equals to 10.1.1.1, the
   destination address to be used is fec0:0:0:1::10.1.1.1.  The packet
   is routed toward the TRT system, and is captured by it.  The TRT
   system accepts the TCP/IPv6 connection between A6 and C6::X4, and
   communicate with the initiating host, using TCP/IPv6.  Then, the TRT
   system investigates the lowermost 32bit of the destination address
   (IPv6 address C6::X4) to get the real IPv4 destination (IPv4 address
   X4).  It makes an TCP/IPv4 connection from Y4 to X4, and forward
   traffic across the two TCP connections.

   There are two TCP connections.  One is TCP/IPv6 and another is
   TCP/IPv4, in the picture: from A6 to B6 (as C6::X4), and Y4 to X4,
   like below:

      TCP/IPv6: the initiating host (A6) --> the TRT system (as C6::X4)
          address on IPv6 header: A6 -> C6::X4
      TCP/IPv4: the TRT system (Y4) --> the destination host (X4)
          address on IPv4 header: Y4 -> X4

4.  Address mapping

   As seen in the previous section, an initiating host must use a
   special form of IPv6 address to connect to an IPv4 destination host.
   The special form can be resolved from a hostname by static address
   mapping table on the initiating host (like /etc/hosts in UNIX),
   special DNS server implementation, or modified DNS resolver
   implementation on initiating host.

5.  Notes to implementers

   TRT for UDP must take care of path MTU issues on the UDP/IPv6 side.
   The good thing is that, as we do not relay IP layer packets between
   IPv4 and IPv6, we can decide IPv6 path MTU independently from IPv4
   traffic.  A simple solution would be to always fragment packets from
   the TRT system to UDP/IPv6 side to IPv6 minimum MTU (1280 octets), to
   eliminate the need for IPv6 path MTU discovery.

   Though the TRT system only relays {TCP,UDP} traffic, it needs to
   check ICMPv6 packets destined to C6::X4 as well, so that it can
   recognize path MTU discovery messages and other notifications between
   A6 and C6::X4.

   When forwarding TCP traffic, a TRT system needs to handle urgent data
   [Postel, 1981] carefully.

   To relay NAT-unfriendly protocols [Hain, 2000] a TRT system may need
   to modify data content, just like any translators which modifies the
   IP addresses.

   Scalability issues must carefully be considered when you deploy TRT
   systems to a large IPv6 site.  Scalability parameters would be (1)
   number of connections the operating system kernel can accept, (2)
   number of connections a userland process can forward (equals to
   number of filehandles per process), and (3) number of transport
   relaying processes on a TRT system.  Design decision must be made to
   use proper number of userland processes to support proper number of
   connections.

   To make TRT for TCP more scalable in a large site, it is possible to
   have multiple TRT systems in a site.  This can be done by taking the
   following steps: (1) configure multiple TRT systems, (2) configure
   different dummy prefix to them, (3) and let the initiating host pick
   a dummy prefix randomly for load-balancing.  (3) can be implemented
   as follows; If you install special DNS server to the site, you may
   (3a) configure DNS servers differently to return different dummy
   prefixes and tell initiating hosts of different DNS servers.  Or you
   can (3b) let DNS server pick a dummy prefix randomly for load-
   balancing.  The load-balancing is possible because you will not be
   changing destination address (hence the TRT system), once a TCP
   connection is established.

   For address mapping, the authors recommend use of a special DNS
   server for large-scale installation, and static mapping for small-
   scale installation.  It is not always possible to have special
   resolver on the initiating host, and assuming it would cause
   deployment problems.

6.  Applicability statement

   Combined with a special DNS server implementation (which translates
   IPv4 addresses into IPv6), TRT systems support IPv6-to-IPv4
   translation very well.  It requires no change to existing IPv6
   clients, nor IPv4 servers, so the TRT system can be installed very
   easily to existing IPv6-capable networks.

   IPv4-to-IPv6 translation is much harder to support with any of the
   translator techniques [Yamamoto, 1998].  While it is possible to use
   TRT system for IPv4-to-IPv6 translation, it requires nontrivial
   mapping between DNS names to temporary IPv4 addresses, as presented
   in NAT-PT RFC [Tsirtsis, 2000].

   As presented in the earlier sections, TRT systems use transport layer
   (TCP/UDP) relay technique to translate IPv6 traffic to IPv4 traffic.
   It gives two major benefits: (1) the implementation of the TRT system
   can be done very simple, (2) with the TRT system path MTU discovery
   issue is easier to deal with, as we can decide IPv6 path MTU
   independently from IPv4 path MTU.  Even with the simplicity, the TRT
   system can cover most of the daily applications (HTTP, SMTP, SSH, and
   many other protocols).  For NAT-unfriendly protocols, a TRT system
   may need to modify data content, just like any translators/NATs.  As
   the TRT system reside in transport layer, it is not possible for the
   TRT system to translate protocols that are not known to the TRT
   system.

   Normally users do not want to translate DNS query/reply traffic using
   the TRT system.  Instead, it makes more sense to run standard DNS
   server, or special DNS server that helps TRT system, somewhere in the
   site IPv6 network.  There are two reasons to it:

   o  Transport issue - It is a lot easier to provide recursive DNS
      server, accessible via IPv6, than to translate DNS queries/replies
      across the TRT system.  If someone tries to ask TRT to translate
      DNS packets, the person would put C6::X (where C6 is TRT reserved
      prefix and X is an IPv4 address of a DNS server) into
      /etc/resolv.conf.  The configuration is rather complicated than we
      normally want.

   o  Payload issue - In some installation it makes more sense to
      transmit queries/replies unmodified, across the TRT system.  In
      some installation it makes more sense to translate IPv4 DNS
      queries (like queries for AAAA record) into queries for A record,
      and vice versa, to invite traffic into the TRT system.  It depends
      on the installation/configuration at the user's site.

7.  Security Considerations

   Malicious party may try to use TRT systems akin to an SMTP open relay
   [Lindberg, 1999] for traffic to IPv4 destinations, which is similar
   to circumventing ingress filtering [Ferguson, 1998] , or to achieve
   some other improper use.  TRT systems should implement some sorts of
   access control to prevent such improper usage.

   A careless TRT implementation may be subject to buffer overflow
   attack, but this kind of issue is implementation dependent and
   outside the scope of this memo.

   Due to the nature of TCP/UDP relaying service, it is not recommended
   to use TRT for protocols that use authentication based on source IP
   address (i.e., rsh/rlogin).

   A transport relay system intercepts TCP connection between two nodes.
   This may not be a legitimate behavior for an IP node.  The document
   does not try to claim it to be legitimate.

   IPsec cannot be used across a relay.

   Use of DNS proxies that modify the RRs will make it impossible for
   the resolver to verify DNSsec signatures.

References

   [Nordmark, 2000.] Nordmark, E., "Stateless IP/ICMP Translator
                     (SIIT)", RFC 2765, February 2000.

   [Postel, 1981.]   Postel, J., "Transmission Control Protocol", STD 7,
                     RFC 793 September 1981.

   [Hain, 2000.]     Hain, T., "Architectural Implications of NAT", RFC
                     2993, November 2000.

   [Yamamoto, 1998]  K. Yamamoto, A. Kato, M Sumikawa, and J. Murai,
                     "Deployment and Experiences of WIDE 6bone", in
                     Proceedings of INET98, 1998.

   [Tsirtsis, 2000.] Tsirtsis, G. and P. Srisuresh, "Network Address
                     Translation - Protocol Translation (NAT-PT)", RFC
                     2766, February 2000.

   [Lindberg, 1999.] Lindberg, G., "Anti-Spam Recommendations for SMTP
                     MTAs", RFC 2505, February 1999.

   [Ferguson, 1998.] Ferguson, P. and D. Senie, "Network Ingress
                     Filtering: Defeating Denial of Service Attacks
                     which employ IP Source Address Spoofing", RFC 2267,
                     January 1998.

Appendix A. Operational experiences

   WIDE KAME IPv6 stack implements TRT for TCP, called "FAITH".  The
   implementation came from WIDE Hydrangea IPv6 stack, which is one of
   ancestors of the KAME IPv6 stack.

   The FAITH code has been available and operational for more than 5
   years.  The implementation has been used at WIDE research group
   offsite meeting, and IETF ipngwg 1999 Tokyo interim meeting.  At the
   latter occasion, we configured IPv6-only terminal network cluster
   just like we do in IETF meetings, and used a TRT system to support
   more than 100 IPv6 hosts on the meeting network to connect to outside
   IPv4 hosts.  From statistics we gathered SSH, FTP, HTTP, and POP3 are
   the most popular protocol we have relayed.  The implementation was
   also used in the terminal cluster IPv6 network at IETF48, IETF49 and
   IETF50.

   The source code is available as free software, bundled in the KAME
   IPv6 stack kit.

   Special DNS server implementations are available as "newbie" DNS
   server implementation by Yusuke DOI, and "totd" DNS proxy server from
   University of Tromso (Norway).

Acknowledgements

   The authors would like to thank people who were involved in
   implementing KAME FAITH translator code, including Kei-ichi SHIMA and
   Munechika SUMIKAWA.

Authors' Addresses

   Jun-ichiro itojun HAGINO
   Research Laboratory, Internet Initiative Japan Inc.
   Takebashi Yasuda Bldg.,
   3-13 Kanda Nishiki-cho,
   Chiyoda-ku, Tokyo 101-0054, JAPAN

   Phone: +81-3-5259-6350
   Fax:   +81-3-5259-6351
   EMail: itojun@iijlab.net


   Kazu YAMAMOTO
   Research Laboratory, Internet Initiative Japan Inc.
   Takebashi Yasuda Bldg.,
   3-13 Kanda Nishiki-cho,
   Chiyoda-ku, Tokyo 101-0054, JAPAN

   Phone: +81-3-5259-6350
   Fax:   +81-3-5259-6351
   EMail: kazu@iijlab.net

Full Copyright Statement

   Copyright (C) The Internet Society (2001).  All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Acknowledgement

   Funding for the RFC Editor function is currently provided by the
   Internet Society.

ISO Plain Language

On this page
PROBLEMAn IPv6-only network still needs to reach IPv4-only resources outside it, such as IPv4-only web servers on the wider Internet.
MECHANISMA transport relay translator sits in the middle and carries two connections instead of one: it accepts the IPv6 connection from the client and opens an IPv4 connection to the server, forwarding bytes between them. The client reaches the IPv4 server through an IPv6 address built from a reserved prefix and the server's IPv4 address.
THE CATCHNothing at either end has to change, and the translator sidesteps path MTU problems. The cost is that it is stateful, acts as a single point of failure, and cannot carry IPsec. The memo is Informational.

§1The Problem and the Proposal

When you deploy an IPv6-only network, you still want to gain access to IPv4-only network resources outside it, such as IPv4-only web servers. Many IPv6-to-IPv4 translation technologies have been proposed, mainly in the IETF ngtrans working group. The memo describes a translator based on the transport relay technique that solves the same problem, and calls it TRT, a transport relay translator. A TRT system locates between IPv6-only hosts and IPv4 hosts and translates {TCP,UDP}/IPv6 to {TCP,UDP}/IPv4, or vice versa.

The advantages are that TRT is designed to require no extra modification on IPv6-only initiating hosts, nor on IPv4-only destination hosts, whereas some other translation mechanisms need extra modifications on the initiating hosts, which limits the possibility of deployment. And the IPv6-to-IPv4 header converters have to take care of path MTU and fragmentation issues, while TRT is free from this problem.

The disadvantages are that TRT supports bidirectional traffic only, whereas the header converters may be able to support other cases such as unidirectional multicast datagrams. TRT needs a stateful TRT system between the communicating peers, just like NAT systems, and a transport layer connection goes through one particular TRT system, so it can be considered a single point of failure, again like NAT systems. Some other mechanisms, such as SIIT, use stateless translator systems which can avoid a single point of failure. Special code is also necessary to relay NAT-unfriendly protocols, and some of those, including IPsec, cannot be used across a TRT system.

The memo assumes that traffic is initiated by an IPv6-only host destined to an IPv4-only host, and says it can be extended to handle the opposite direction if an appropriate address mapping mechanism is introduced.

The translator sits between the two worlds and carries the traffic itself instead of rewriting the addresses in each packet. That is why neither end has to be modified, and why the fragmentation problems that come with rewriting headers do not arise.

WHAT THE TRANSLATOR GAINS AND WHAT IT COSTS
  • No host changesNeither the IPv6 client nor the IPv4 server has to be modified.
  • No path MTU problemThe translator never rewrites an IP header, so it does not have to deal with fragmentation.
  • Bidirectional onlyUnidirectional multicast datagrams are not supported.
  • StatefulEach connection passes through one translator, which is a single point of failure, like a NAT.
  • No IPsecIPsec cannot be used across a relay.

§2The Transport Relay Technique

The transport relay technique is not new; it has been used in many firewall-related products. TCP relay systems have been used to achieve two goals: disallow forwarding of IP packets across a system, and allow {TCP,UDP} traffic to go through the system indirectly. In the diagram the relay system does not forward IP packets across the inner network to the outer network or the reverse; it only relays TCP traffic on a specific port from the inner network to the outer network and back.

When the initiating host, whose IP address is A, tries to make a TCP connection to the destination host X, TCP packets are routed toward the relay system based on a routing decision. The relay system receives and accepts the packets even though it does not own the destination IP address X. It pretends to have IP address X and establishes a TCP connection with the initiating host as X. It then makes another TCP connection from Y to X, and relays traffic from A to X and the other way around.

Two TCP connections are therefore established: from A to the relay system acting as X, with the addresses on the IPv4 header going from A to X, and from the relay system acting as Y to the destination host X, with the addresses going from Y to X. The relay system needs to capture TCP packets that are not destined to its address; how it does that is implementation dependent and outside the scope of the memo.

For UDP, if you can recognize the inbound and outbound traffic pair in some way, a UDP relay can be implemented in a similar manner. An implementation can recognize the pair as NAT systems do, by recording address and port pairs onto a table and managing table entries with timeouts.

The technique comes from firewalls that let selected connections through without forwarding the packets themselves. The middle system pretends to be the far end for the first connection and opens a second one to the real destination, then copies bytes between them.

§3The Translator and Its Address Mapping

For address mapping, the memo reserves an IPv6 prefix referred to as C6::/64. It should be part of the IPv6 unicast address space assigned to the site, and routing information must be configured so that packets to C6::/64 are routed towards the TRT system. The subnet marked as a dummy prefix does not actually exist.

When the initiating host, whose IPv6 address is A6, wishes to make a connection to the destination host, whose IPv4 address is X4, it needs to make a TCP/IPv6 connection towards C6::X4. If C6::/64 equals fec0:0:0:1::/64 and X4 equals 10.1.1.1, the destination address to be used is fec0:0:0:1::10.1.1.1. The packet is routed towards the TRT system and captured by it. The TRT system accepts the TCP/IPv6 connection between A6 and C6::X4 and communicates with the initiating host using TCP/IPv6. It then investigates the lowermost 32 bits of the destination address to get the real IPv4 destination X4, makes a TCP/IPv4 connection from Y4 to X4, and forwards traffic across the two connections.

There are two TCP connections: one in IPv6 from A6 to the TRT system as C6::X4, with the addresses on the IPv6 header going from A6 to C6::X4, and one in IPv4 from the TRT system as Y4 to the destination host X4, with the addresses going from Y4 to X4.

An initiating host must use this special form of IPv6 address to reach an IPv4 destination host, and the memo says the form can be resolved from a hostname by a static address mapping table on the initiating host, like /etc/hosts in UNIX, by a special DNS server implementation, or by a modified DNS resolver implementation on the initiating host.

The client is told to address the IPv4 server through a reserved IPv6 prefix: the prefix followed by the server's IPv4 address. The translator reads the last four bytes of that address, learns which IPv4 server is really wanted, and opens the IPv4 connection to it.

THE TWO CONNECTIONS AS THE MEMO DESCRIBES THEM
Connections through a TRT system
   TCP/IPv6: the initiating host (A6) --> the TRT system (as C6::X4)
       address on IPv6 header: A6 -> C6::X4
   TCP/IPv4: the TRT system (Y4) --> the destination host (X4)
       address on IPv4 header: Y4 -> X4
THE TWO CONNECTIONS A TRT SYSTEM CARRIES, ILLUSTRATIVE, NOT FROM THE RFC
IPv6 clientTRT systemIPv4 server
  1. TCP/IPv6 to C6::X4The client opens an IPv6 connection to the reserved prefix followed by the server's IPv4 address.
  2. TCP/IPv6 acceptedThe translator accepts the connection and talks to the client in IPv6.
  3. TCP/IPv4 from Y4 to X4The translator reads the lowermost 32 bits of the destination and opens an IPv4 connection to the real server.
  4. TCP/IPv4 dataThe server replies on the IPv4 connection.
  5. Forwarded dataThe bytes are copied across the two connections.

§5Notes to Implementers

TRT for UDP must take care of path MTU issues on the UDP and IPv6 side. Because no IP layer packets are relayed between IPv4 and IPv6, the IPv6 path MTU can be decided independently of IPv4 traffic. A simple solution is to always fragment packets from the TRT system to the UDP and IPv6 side to the IPv6 minimum MTU of 1280 octets, which eliminates the need for IPv6 path MTU discovery.

Although the TRT system only relays {TCP,UDP} traffic, it needs to check ICMPv6 packets destined to C6::X4 as well, so that it can recognize path MTU discovery messages and other notifications between A6 and C6::X4. When forwarding TCP traffic, a TRT system needs to handle urgent data carefully. To relay NAT-unfriendly protocols, a TRT system may need to modify data content, just like any translator which modifies IP addresses.

Scalability must be considered carefully when deploying TRT systems to a large IPv6 site. The scalability parameters are the number of connections the operating system kernel can accept, the number of connections a userland process can forward, which equals the number of file handles per process, and the number of transport relaying processes on a TRT system. Design decisions must be made about the proper number of userland processes to support the proper number of connections.

To make TRT for TCP more scalable in a large site, multiple TRT systems can be used. The steps are to configure multiple TRT systems, configure a different dummy prefix for each of them, and let the initiating host pick a dummy prefix randomly for load balancing. That last step can be implemented by installing a special DNS server in the site, configuring DNS servers differently to return different dummy prefixes and telling initiating hosts of different DNS servers, or letting the DNS server pick a dummy prefix randomly. Load balancing is possible because the destination address, and therefore the TRT system, does not change once a TCP connection is established. For address mapping the authors recommend a special DNS server for large-scale installation and static mapping for small-scale installation, since it is not always possible to have a special resolver on the initiating host and assuming it would cause deployment problems.

For UDP, the translator should simply split outgoing packets to the smallest size IPv6 allows, which removes the need for path MTU discovery. It also has to watch ICMPv6 messages and handle TCP urgent data correctly. A large site should run several translators with different prefixes and let the client pick one at random.

§6Applicability

Combined with a special DNS server implementation, which translates IPv4 addresses into IPv6, TRT systems support IPv6-to-IPv4 translation very well. It requires no change to existing IPv6 clients nor IPv4 servers, so the TRT system can be installed very easily into existing IPv6-capable networks.

IPv4-to-IPv6 translation is much harder to support with any of the translator techniques. While it is possible to use a TRT system for it, it requires nontrivial mapping between DNS names and temporary IPv4 addresses, as presented in the NAT-PT RFC.

TRT systems use the transport layer relay technique to translate IPv6 traffic to IPv4 traffic, which gives two major benefits: the implementation of the TRT system can be done very simple, and the path MTU discovery issue is easier to deal with, because the IPv6 path MTU can be decided independently of the IPv4 path MTU. Even with that simplicity the TRT system can cover most of the daily applications, namely HTTP, SMTP, SSH and many other protocols. For NAT-unfriendly protocols a TRT system may need to modify data content, just like any translator or NAT. And because the TRT system resides in the transport layer, it is not possible for it to translate protocols that are not known to it.

Users normally do not want to translate DNS query and reply traffic using the TRT system. It makes more sense to run a standard DNS server, or a special DNS server that helps the TRT system, somewhere in the site's IPv6 network. There are two reasons. On transport, it is a lot easier to provide a recursive DNS server accessible via IPv6 than to translate DNS queries and replies across the TRT system; putting C6::X into /etc/resolv.conf, where C6 is the TRT reserved prefix and X is the IPv4 address of a DNS server, is rather more complicated than people normally want. On payload, in some installations it makes more sense to transmit queries and replies unmodified across the TRT system, and in others it makes more sense to translate IPv4 DNS queries, such as queries for AAAA records, into queries for A records and back, to invite the traffic into the TRT system. It depends on the installation and configuration at the user's site.

With a DNS server that hands out the right IPv6 addresses, this works well for the everyday protocols: web, mail and remote shell. DNS lookups are better left outside the translator, and protocols the translator does not know about cannot be carried at all.

§7Security Considerations

A malicious party may try to use TRT systems like an SMTP open relay for traffic to IPv4 destinations, which is similar to circumventing ingress filtering, or to achieve some other improper use. TRT systems should implement some sort of access control to prevent such improper usage.

A careless TRT implementation may be subject to buffer overflow attack, though that kind of issue is implementation dependent and outside the scope of the memo. Because of the nature of a TCP and UDP relaying service, it is not recommended to use TRT for protocols that use authentication based on the source IP address, such as rsh and rlogin. A transport relay system intercepts a TCP connection between two nodes, which may not be a legitimate behaviour for an IP node, and the memo does not try to claim that it is.

IPsec cannot be used across a relay. And the use of DNS proxies that modify the resource records makes it impossible for the resolver to verify DNSSEC signatures.

The translator is an open door unless it is restricted, so it needs access control. It breaks any protocol that checks the sender's IP address, and it breaks IPsec altogether. A DNS proxy that rewrites answers also breaks DNSSEC checking.

§7References