One document matched: draft-baker-behave-v4v6-translation-00.xml
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- Some of the more generally applicable PIs that most I-Ds might want to use -->
<!-- Try to enforce the ID-nits conventions and DTD validity -->
<?rfc strict='yes' ?>
<!-- Items used when reviewing the document -->
<?rfc comments='no' ?>
<!-- Controls display of <cref> elements -->
<?rfc inline='no' ?>
<!-- When no, put comments at end in comments section,
otherwise, put inline -->
<?rfc editing='no' ?>
<!-- When yes, insert editing marks: editing marks consist of a
string such as <29> printed in the blank line at the
beginning of each paragraph of text. -->
<!-- Create Table of Contents (ToC) and set some options for it.
Note the ToC may be omitted for very short documents,but idnits insists on a ToC
if the document has more than 15 pages. -->
<?rfc toc='yes'?>
<?rfc tocompact='yes'?>
<!-- If 'yes' eliminates blank lines before main section entries. -->
<?rfc tocdepth='3'?>
<!-- Sets the number of levels of sections/subsections... in ToC -->
<!-- Choose the options for the references.
Some like symbolic tags in the references (and citations) and others prefer
numbers. The RFC Editor always uses symbolic tags.
The tags used are the anchor attributes of the references. -->
<?rfc symrefs='yes'?>
<?rfc sortrefs='yes' ?>
<!-- If 'yes', causes the references to be sorted in order of tags.
This doesn't have any effect unless symrefs is "yes" also. -->
<!-- These two save paper: Just setting compact to 'yes' makes savings by not starting each
main section on a new page but does not omit the blank lines between list items.
If subcompact is also "yes" the blank lines between list items are also omitted. -->
<?rfc compact='yes' ?>
<?rfc subcompact='no' ?>
<!-- end of list of popular I-D processing instructions -->
<!-- end of list of processing instructions -->
<rfc category="info" docName="draft-baker-behave-v4v6-translation-00"
ipr="full3978">
<front>
<title abbrev="IPv4/IPv6 Translation">IP/ICMP Translation
Algorithm</title>
<author fullname="Xing Li" initials="X." role="editor" surname="Li">
<organization>CERNET Center/Tsinghua University</organization>
<address>
<postal>
<street>Room 225, Main Building, Tsinghua University</street>
<city>Beijing</city>
<code>100084</code>
<region></region>
<country>China</country>
</postal>
<phone>+86 62785983</phone>
<email>xing@cernet.edu.cn</email>
</address>
</author>
<author fullname="Congxiao Bao" initials="C." role="editor" surname="Bao">
<organization>CERNET Center/Tsinghua University</organization>
<address>
<postal>
<street>Room 225, Main Building, Tsinghua University</street>
<city>Beijing</city>
<code>100084</code>
<region></region>
<country>China</country>
</postal>
<phone>+86 62785983</phone>
<email>congxiao@cernet.edu.cn</email>
</address>
</author>
<author fullname="Fred Baker" initials="F.J." role="editor"
surname="Baker">
<organization>Cisco Systems</organization>
<address>
<postal>
<street></street>
<city>Santa Barbara</city>
<code>93117</code>
<region>California</region>
<country>USA</country>
</postal>
<phone>+1-408-526-4257</phone>
<email>fred@cisco.com</email>
</address>
</author>
<date year="2008" />
<area>Internet</area>
<workgroup>behave</workgroup>
<abstract>
<t>This document specifies an update to the Stateless IP/ICMP
Translation Algorithm (SIIT) described in RFC 2765. The algorithm
translates between IPv4 and IPv6 packet headers (including ICMP
headers).</t>
<t>This specification addresses both a stateful and a stateless mode. In
the stateful mode, translation state is maintained between IPv4
address/transport/port tuples and IPv6 address/transport/port tuples,
enabling IPv6 systems to open sessions with IPv4 systems. In the
stateless mode, translation information is carried in the address
itself, permitting both IPv4->IPv6 and IPv6->IPv4 session
establishment with neither state nor configuration in the translator.
The choice of operational mode is made by the operator deploying the
network and is critical to the operation of the applications using
it.</t>
<t>Significant issues exist in the stateful mode that are not addressed
in this document, related to the maintenance of the translation tables.
This document confines itself to the actual translation.</t>
</abstract>
<note title="Acknowledgement of previous work">
<t>This document is a product of the 2008-2009 effort to define a
replacement for NAT-PT. It is an update to and directly derivative from
Erik Nordmark's <xref target="RFC2765"></xref>, which similarly provides
both stateless and stateful translation between <xref
target="RFC0791">IPv4</xref> and <xref target="RFC2460">IPv6</xref>, and
between <xref target="RFC0792">ICMPv4</xref> and <xref
target="RFC4443">ICMPv6</xref>. The original document was a product of
the NGTRANS working group. Some text had been extracted from an old
Internet Draft titled "IPAE: The SIPP Interoperability and Transition
Mechanism" authored by R. Gilligan, E. Nordmark, and B. Hinden.</t>
<t>The changes in this document reflect five components:<list
style="numbers">
<t>Updating references</t>
<t>Redescribing the network model to map to present and projected
usage</t>
<t>Moving the address format to the framework document, to
coordinate with other drafts on the topic</t>
<t>Some changes in ICMP.</t>
<t>Description of both stateful and stateless operation.</t>
</list></t>
</note>
<!--
<note title='Foreword'>
</note>
-->
<!--
<note title='Requirements Language'>
<t>The key words "MUST", "MUST NOT",
"REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED",
"MAY", and "OPTIONAL" in this document are to be
interpreted as described in <xref target="RFC2119">RFC 2119</xref>.
</t>
</note>
-->
<!--
<?rfc needLines='10' ?>
<texttable anchor='table_example' title='A Very Simple Table'>
<preamble>Tables use ttcol to define column headers and widths.
Every cell then has a "c" element for its content.</preamble>
<ttcol align='center'>ttcol #1</ttcol>
<ttcol align='center'>ttcol #2</ttcol>
<c>c #1</c> <c>c #2</c>
<c>c #3</c> <c>c #4</c>
<c>c #5</c> <c>c #6</c>
<postamble>which is a very simple example.</postamble>
</texttable>
-->
</front>
<middle>
<!--
<t>There are multiple list styles: 'symbols', 'letters', 'numbers',
'hanging', 'format', etc.</t>
<t>
<list style='symbols'>
<t>First bullet</t>
<t>Second bullet</t>
</list>
</t>
-->
<!--
<figure anchor='xml_happy' title='Figure N'>
<artwork align='center'>
<![CDATA[
ASCII artwork goes here...
]]>
</artwork>
</figure>
-->
<section anchor="section1" title="Introduction and Motivation">
<t>An understanding of the framework presented in <xref
target="FRAMEWORK"></xref> is presumed in this document. With that
remark...</t>
<t>The transition mechanisms specified in <xref target="RFC4213"></xref>
handle the case of dual IPv4/IPv6 hosts interoperating with both dual
hosts and IPv4-only hosts, which is needed early in the transition to
IPv6. The dual hosts are assigned both an IPv4 and one or more IPv6
addresses. The number of available globally unique IPv4 addresses will
become smaller and smaller as the Internet grows; we expect that there
will be a desire to take advantage of the large IPv6 address and not
require that every new Internet node have a permanently assigned IPv4
address.</t>
<t>There are several different scenarios where there might be IPv6-only
hosts that need to communicate with IPv4-only hosts. These IPv6 hosts
might be IPv4-capable, i.e. include an IPv4 implementation but not be
assigned an IPv4 address, or they might not even include an IPv4
implementation. Examples include:<list style="symbols">
<t>A completely new network with new devices that all support IPv6.
In this case it might be beneficial to not have to configure the
routers within the new network to route IPv4 since none of the hosts
in the new network are configured with IPv4 addresses. But these new
IPv6 devices might occasionally need to communicate with some IPv4
nodes out on the Internet.</t>
<t>An existing network where a large number of IPv6 devices are
added. The IPv6 devices might have both an IPv4 and an IPv6 protocol
stack but there is not enough global IPv4 address space to give each
one of them a permanent IPv4 address. In this case it is more likely
that the routers in the network already route IPv4 and are upgraded
to dual routers.</t>
</list></t>
<t>However, there are other potential solutions in this area: <list
style="symbols">
<t>If there is no IPv4 routing inside the network i.e., the cloud
that contains the new devices, some possible solutions are to either
use the translators specified in this document at the boundary of
the cloud, or to use Application Layer Gateways (ALG) on dual nodes
at the cloud's boundary. The ALG solution is less flexible in that
it is application protocol specific and it is also less robust since
an ALG box is likely to be a single point of failure for a
connection using that box.</t>
<t>Otherwise, if IPv4 routing is supported inside the cloud and the
implementations support both IPv6 and IPv4 it might suffice to have
a mechanism for allocating a temporary address IPv4 and use IPv4 end
to end when communicating with IPv4-only nodes. However, it would
seem that such a solution would require the pool of temporary IPv4
addresses to be partitioned across all the subnets in the cloud
which would either require a larger pool of IPv4 addresses or result
in cases where communication would fail due to no available IPv4
address for the node's subnet.</t>
</list></t>
<t>This document specifies an algorithm that is one of the components
needed to make IPv6-only nodes interoperate with IPv4-only nodes.</t>
<t>The IPv4 address will be used as an IPv4-translated IPv6 address as
specified in <xref target="FRAMEWORK"></xref> and the packets will
travel through an IP/ICMP translator that will translate the packet
headers between IPv4 and IPv6 and translate the addresses in those
headers between IPv4 addresses on one side and IPv4-translated or
IPv4-mapped IPv6 addresses on the other side. There is provision for
both stateless and stateful mappings. Translated IPv4 addresses will
always use the mapped format; the source address of an IPv6 datagram
translated from IPv4 will always use the mapped form. The use of the
mapped form in the IPv6 network is, however, at the administration's
discretion. Three obvious models emerge: <list style="symbols">
<t>All systems in the IPv6 domain use IPv4-mapped addresses, which
enables stateless translation for all systems in all cases and makes
all systems directly accessible by the IPv4 domain,</t>
<t>No systems in the IPv6 domain use IPv4-mapped addresses, which is
a lot like IPv4 NAT behavior and prevents all IPv4 systems from
accessing servers in the IPv6 domain, or</t>
<t>Some systems in the IPv6 domain (probably servers or dominant
peers in peer-to-peer applications) use IPv4-mapped addresses, which
means that those systems so addressed are accessible as servers by
systems in the IPv4 domain but others not usable as servers
accessible by the IPv4 domain.</t>
</list></t>
<t>This specification does not cover the mechanisms used for assignment
of IPv4-mapped addresses to IPv6 nodes or their registration in the DNS.
One might expect IPv4-mapped addresses to be allocated by mechanisms
similar to and derived from similar tools in IPv4 networks.</t>
<t>The figures below show how the IP/ICMP Translation algorithm is used
in networks that use translation. We show three cases, that of a single
translator, that of multiple translators, and that of a domain that has
both stateless and stateful translation.</t>
<figure anchor="subnet"
title="Using translation for a single interchange point">
<artwork align="center"><![CDATA[
-------- --------
// IPv4 \\ // IPv6 \\
/ Domain \ / Domain \
/ +----+ +--+ \
| |XLAT| |S2| | Sn: Servers
| +--+ +----+ +--+ | Hn: Clients
| |S1| +----+ |
| +--+ |DNS | +--+ | XLAT: V4/V6 NAT
\ +--+ +----+ |H2| / DNS: DNS Server
\ |H1| / \ +--+ /
\\ +--+ // \\ //
-------- --------
]]></artwork>
</figure>
<t><xref target="subnet"></xref> shows a routing domain in which IPv4 is
implemented (whether IPv4-only or dual stack) and another domain in
which only IPv6 routing, and potentially only IPv6-only hosts, are
implemented. There is a translator on the boundary between them, and a
DNS server that can serve on both sides of the translator. The
translator advertises an IPv4 route for the prefix mapped into IPv6
addresses in the IPv4 domain, and an IPv6 route for its prefix mapping
the IPv4 routing domain into the IPv6 domain. <list style="symbols">
<t>If H2 decides to connect to S1, it asks the DNS server for a AAAA
record, and sends its datagram to the IPv6 address in the response.
Unknown to it, routing takes it to a translator, which emits an IPv4
datagram into the IPv4 domain.</t>
<t>If H1 seeks access to S2, it similarly asks the DNS server for an
A record and is given the IPv4 address of S2. Routing takes its data
to the translator, which emits an IPv6 datagram into the IPv6
domain.</t>
<t>If H1 seeks S1, is obviously gets S1's IPv4 address and
communicates with it directly; in the same way, if H2 seeks S2, it
gets the AAAA record and communicates directly with S2 even if the
address it chooses happens to be a mapped IPv4 address.</t>
</list></t>
<t>By extension, one could imagine a case in which S2 has an IPv4-mapped
address and H2 has a general IPv6 address - any legal IPv6 address other
than one that the translator recognizes as an IPv4-mapped address. In
this case, should S2 (an IPv6 device using an IPv4-mapped address)
access an IPv4 system, the behavior is as previously described. However,
should H2 seek to access S1, the behavior is similar to the familiar
IPv4 NAT; the translator saves H2's address and source port number and
an overlay IPv4 address and source port number in a database, and <list
style="symbols">
<t>for datagrams traveling H2->S1, translates the source address
and port according to the defined translation, and</t>
<t>for datagrams traveling S1->H2, translates the destination
address and port according to the defined translation.</t>
</list> A stateful mapping of this kind requires appropriate handling
of port numbers and checksums, and of creation and deletion of state, as
described in <xref target="I-D.bagnulo-behave-nat64"></xref>.</t>
<figure anchor="cloud"
title="Using translation with multiple interchange points">
<artwork align="center"><![CDATA[
-------- --------
// IPv4 \\ // IPv6 \\
/ Domain \ / Domain \
/ +----+ +--+ \
| |XLAT| |S3| | Sn: Servers
| +--+ +----+ +--+ | Hn: Clients
| |S1| +----+ |
| +--+ |DNS | +--+ | XLAT: V4/V6 NAT
\ +--+ +----+ |H3| / DNS: DNS Server
\ |H1| / \ +--+ /
\ +--+ / \ /
/ \ / \
/ +----+ \
| +--+ |XLAT| +--+ |
| |S2| +----+ |S4| |
| +--+ +----+ +--+ |
| +--+ |DNS | +--+ |
\ |H2| +----+ |H4| /
\ +--+ / \ +--+ /
\\ // \\ //
-------- --------
]]></artwork>
</figure>
<t><xref target="cloud"></xref> similarly shows a routing domain in
which IPv4 is implemented (whether IPv4-only or dual stack) and another
domain in which only IPv6 routing, and potentially only IPv6-only hosts,
are implemented. The difference from <xref target="subnet"></xref> is
that there are more than one translation point on the boundary between
them, and more than one DNS server. As in the previous case, each
translator advertises an IPv4 route for the prefix mapped into IPv6
addresses in the IPv4 domain, and an IPv6 route for its prefix mapping
the IPv4 routing domain into the IPv6 domain. If these are run by the
same administration, they are likely to use the same prefix. They could
also use different prefixes at the network administration's option, and
if they have different administrations they likely would - and might
apply various policies to such routing. <list style="symbols">
<t>If H4 decides to connect to S1 or S2, it asks the DNS server for
a AAAA record, and sends its datagram to the IPv6 address in the
response. Unknown to it, routing takes it to a translator, which
emits an IPv4 datagram into the IPv4 domain. If the prefixes used by
the translators are the same, the choice of translator is
immaterial; if they are different, routing will take it to the right
translator.</t>
<t>If H1 seeks access to S3 or S4, it similarly asks the DNS server
for an A record and is given the relevant IPv4 address. Routing
similarly takes its data to one of the translators, which emits an
IPv6 datagram into the IPv6 domain.</t>
<t>If H1 seeks S1 or S2, is obviously gets the IPv4 address and
communicates with it directly; in the same way, if H4 seeks S3 or
S4, it gets the AAAA record and communicates directly with it even
if the address it chooses happens to be a mapped IPv4 address.</t>
</list></t>
<t>In both cases, if the "IPv4 network" is in fact dual stack and
contains dual stack hosts, direct IPv6 connectivity is precisely that -
direct. There is no translation even if the addresses used are mapped
IPv4 addresses, because the routing is provided by more specific
prefixes; the only datagrams translated are those that follow the more
general route to the translator.</t>
<t>The protocol translators are assumed to fit around some piece of
topology that includes some IPv6-only nodes and that may also include
IPv4 nodes as well as dual nodes. There has to be a translator on each
path used by routing the "translatable" packets in and out of this cloud
to ensure that such packets always get translated. This does not require
a translator at every physical connection between the cloud and the rest
of the Internet since the routing can be used to deliver the packets to
the translator.</t>
<t>The IPv6-only node communicating with an IPv4 node through a
translator will see an IPv4-mapped address for the peer and use an
IPv4-translatable address for its local address for that communication.
When the IPv6-only node sends packets the IPv4-mapped address indicates
that the translator needs to translate the packets. When the IPv4 node
sends packets those will translated to have the IPv4-translatable
address as a destination; it is not possible to use an IPv4-mapped or an
IPv4-compatible address as a destination since that would either route
the packet back to the translator (for the IPv4-mapped address) or make
the packet be encapsulated in IPv4 (for the IPv4-compatible address).
Thus this specification introduces the new notion of an
IPv4-translatable address.</t>
<section anchor="section1.1" title="Applicability and Limitations">
<t>The use of this translation algorithm assumes that the IPv6 network
is somehow well connected i.e. when an IPv6 node wants to communicate
with another IPv6 node there is an IPv6 path between them. Various
tunneling schemes exist that can provide such a path, but those
mechanisms and their use is outside the scope of this document.</t>
<!--The IPv6 protocol <xref target="RFC2460"></xref> has been designed
so that the TCP and UDP pseudo-header checksums are not affected by
the translations specified in this document, thus the translator does
not need to modify normal TCP and UDP headers. The only exceptions are
unfragmented IPv4 UDP packets which need to have a UDP checksum
computed since a pseudo-header checksum is required for UDP in IPv6.
Also, <xref target="RFC4443">ICMPv6</xref> include a pseudo-header
checksum but it is not present in <xref target="RFC0792">ICMPv4</xref>
thus the checksum in ICMP messages need to be modified by the
translator. In addition, ICMP error messages contain an IP header as
part of the payload thus the translator need to rewrite those parts of
the packets to make the receiver be able to understand the included IP
header. However, all of the translator's operations, including path
MTU discovery, are stateless in the sense that the translator operates
independently on each packet and does not retain any state from one
packet to another. This allows redundant translator boxes without any
coordination and a given TCP connection can have the two directions of
packets go through different translator boxes.-->
<t>The translating function as specified in this document does not
translate any IPv4 options and it does not translate IPv6 routing
headers, hop-by-hop extension headers, or destination options headers.
It could be possible to define a translation between source routing in
IPv4 and IPv6. However such a translation would not be semantically
correct due to the slight differences between the IPv4 and IPv6 source
routing. Also, the usefulness of source routing when going through a
header translator might be limited since all the IPv6-only routers
would need to have an IPv4-translated IPv6 address since the IPv4-only
node will send a source route option containing only IPv4
addresses.</t>
<t><xref target="RFC5382"></xref> describes the issues and algorithms
in the translation of datagrams containing TCP segments. The
considerations of that document are applicable in this case as
well.</t>
<t>At first sight it might appear that the IPsec functionality <xref
target="RFC4301"></xref><xref target="RFC4302"></xref><xref
target="RFC4303"></xref> can not be carried across the translator.
However, since the translator does not modify any headers above the
logical IP layer (IP headers, IPv6 fragment headers, and ICMP
messages) packets encrypted using ESP in Transport-mode can be carried
through the translator. [Note that this assumes that the key
management can operate between the IPv6-only node and the IPv4-only
node.] The AH computation covers parts of the IPv4 header fields such
as IP addresses, and the identification field (fields that are either
immutable or predictable by the sender) <xref
target="RFC4302"></xref>. While the translation algorithm is specified
so that those IPv4 fields can be predicted by the IPv6 sender it is
not possible for the IPv6 receiver to determine the value of the IPv4
Identification field in packets sent by the IPv4 node. Thus as the
translation algorithm is specified in this document it is not possible
to use end-to-end AH through the translator.</t>
<t>For ESP Tunnel-mode to work through the translator the IPv6 node
would have to be able to both parse and generate "inner" IPv4 headers
since the inner IP will be encrypted together with the transport
protocol.</t>
<t>Thus in practise, only ESP transport mode is relatively easy to
make work through a translator, unless an ESP tunnel is explicitly
carrying IPv4 inner and IPv6 outer headers.</t>
<t>IPv4 multicast addresses can not be mapped to IPv6 multicast
addresses. For instance, 224.1.2.3 is an IPv4 multicast address, but
an IPv6 address mapped to general IPv4 addresses and containing that
value is not an IPv6 multicast address. While the IP/ICMP header
translation aspect of this memo in theory works for multicast packets
this address mapping limitation makes it impossible to apply the
techniques in this memo for multicast traffic.</t>
</section>
<section anchor="section1.2" title="Assumptions">
<t>The IPv6 nodes using the translator must have an IPv4-translated
IPv6 address while it is communicating with IPv4-only nodes.</t>
<!--The use of the algorithm assumes that there is an IPv4 address pool
used to generate IPv4-translated addresses. Routing needs to be able
to route any IPv4 packets, whether generated "outside" or "inside" the
translator, destined to addresses in this pool towards the translator.
This implies that the address pool can not be assigned to subnets but
must be separated from the IPv4 subnets used on the "inside" of the
translator.-->
<t>Fragmented IPv4 UDP packets that do not contain a UDP checksum
(i.e. the UDP checksum field is zero) are not of significant use over
wide-areas in the Internet and will not be translated by the
translator. An <xref target="Miller">informal trace</xref> in the
backbone showed that out of 34,984,468 IP packets there were 769
fragmented UDP packets with a zero checksum. However, all of them were
due to malicious or broken behavior; a port scan and first fragments
of IP packets that are not a multiple of 8 bytes.</t>
</section>
<section anchor="prefix-stateless" title="Stateless vs Stateful Mode">
<t>The translator has two possible modes of operation: stateless and
stateful. In both cases, we assume that a system that has an IPv4
address but not an IPv6 address is communicating with a system that
has an IPv6 address but no IPv4 address, or that the two systems do
not have contiguous routing connectivity in either domain and hence
are forced to have their communications translated.</t>
<t>In the stateless mode, one system has an IPv4 address and one has
an address of the form specified in <xref target="FRAMEWORK"></xref>,
which is explicitly mapped to an IPv4 address. In this mode, there is
no need to concern oneself with port translation or translation
tables, as the IPv4 and IPv6 counterparts are algorithmically
related.</t>
<t>In the stateful mode, the system with the IPv4 address will be
represented by that same address type, but the IPv6 system may use any
<xref target="RFC4291"></xref> address except one in that range. In
this case, a translation table is required.</t>
</section>
<section anchor="section1.3" title="Impact Outside the Network Layer">
<t>The potential existence of IP/ICMP translators is already taken
care of from a protocol perspective in <xref target="RFC2460"></xref>.
However, an IPv6 node that wants to be able to use translators needs
some additional logic in the network layer.</t>
<t>The network layer in an IPv6-only node, when presented by the
application with either an IPv4 destination address or an IPv4-mapped
IPv6 destination address, is likely to drop the packet and return some
error message to the application. In order to take advantage of
translators such a node should instead send an IPv6 packet where the
destination address is the IPv4-mapped address and the source address
is the node's temporarily assigned IPv4-translated address. If the
node does not have a temporarily assigned IPv4-translated address it
should acquire one using mechanisms that are not discussed in this
document.</t>
<t>Note that the above also applies to a dual IPv4/IPv6 implementation
node which is not configured with any IPv4 address.</t>
<t>There are no extra changes needed to applications to operate
through a translator beyond what applications already need to do to
operate on a dual node. The applications that have been modified to
work on a dual node already have the mechanisms to determine whether
they are communicating with an IPv4 or an IPv6 peer. Thus if the
applications need to modify their behavior depending on the type of
the peer, such as ftp determining whether to fallback to using the
PORT/PASV command when EPRT/EPSV fails (as specified in <xref
target="RFC2428"></xref>), they already need to do that when running
on dual nodes and the presence of translators does not add anything.
For example, when using the socket API <xref target="RFC3493"></xref>
the applications know that the peer is IPv6 if they get an AF_INET6
address from the name service and the address is not an IPv4-mapped
address (i.e., IN6_IS_ADDR_V4MAPPED returns false). If this is not the
case, i.e., the address is AF_INET or an IPv4-mapped IPv6 address, the
peer is IPv4.</t>
<t>One way of viewing the translator, which might help clarify why
applications do not need to know that a translator is used, is to look
at the information that is passed from the transport layer to the
network layer. If the transport passes down an IPv4 address (whether
or not is in the IPv4-mapped encoding) this means that at some point
there will be IPv4 packets generated. In a dual node the generation of
the IPv4 packets takes place in the sending node. In an IPv6-only node
conceptually the only difference is that the IPv4 packet is generated
by the translator - all the information that the transport layer
passed to the network layer will be conveyed to the translator in some
form. That form just "happens" to be in the form of an IPv6
header.</t>
</section>
</section>
<section anchor="section2" title="Terminology">
<t>This documents uses the terminology defined in <xref
target="RFC2460"></xref> and <xref target="RFC4213"></xref> with these
clarifications: <list style="hanging">
<t hangText="IPv4 capable node:">A node which has an IPv4 protocol
stack. In order for the stack to be usable the node must be assigned
one or more IPv4 addresses.</t>
<t hangText="IPv4 enabled node:">A node which has an IPv4 protocol
stack and is assigned one or more IPv4 addresses. Both IPv4-only and
IPv6/IPv4 nodes are IPv4 enabled.</t>
<t hangText="IPv6 capable node:">A node which has an IPv6 protocol
stack. In order for the stack to be usable the node must be assigned
one or more IPv6 addresses.</t>
<t hangText="IPv6 enabled node:">A node which has an IPv6 protocol
stack and is assigned one or more IPv6 addresses. Both IPv6-only and
IPv6/IPv4 nodes are IPv6 enabled.</t>
</list></t>
</section>
<section anchor="section2.2" title="Requirements">
<t>The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,
SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this
document, are to be interpreted as described in <xref
target="RFC2119"></xref>.</t>
</section>
<section anchor="section3" title="Translating from IPv4 to IPv6">
<t>When an IPv4-to-IPv6 translator receives an IPv4 datagram addressed
to a destination that lies outside of the attached IPv4 island, it
translates the IPv4 header of that packet into an IPv6 header. It then
forwards the packet based on the IPv6 destination address. The original
IPv4 header on the packet is removed and replaced by an IPv6 header.
Except for ICMP packets the transport layer header and data portion of
the packet are left unchanged.</t>
<figure anchor="v4v6xlat" title="IPv4-to-IPv6 Translation">
<artwork align="center"><![CDATA[
+-------------+ +-------------+
| IPv4 | | IPv6 |
| Header | | Header |
+-------------+ +-------------+
| Transport | | Fragment |
| Layer | ===> | Header |
| Header | |(not always) |
+-------------+ +-------------+
| | | Transport |
~ Data ~ | Layer |
| | | Header |
+-------------+ +-------------+
| |
~ Data ~
| |
+-------------+
]]></artwork>
</figure>
<t>One of the differences between IPv4 and IPv6 is that in IPv6 path MTU
discovery is mandatory but it is optional in IPv4. This implies that
IPv6 routers will never fragment a packet - only the sender can do
fragmentation.</t>
<t>When the IPv4 node performs path MTU discovery (by setting the DF bit
in the header) the path MTU discovery can operate end-to-end i.e. across
the translator. In this case either IPv4 or IPv6 routers might send back
ICMP "packet too big" messages to the sender. When these ICMP errors are
sent by the IPv6 routers they will pass through a translator which will
translate the ICMP error to a form that the IPv4 sender can understand.
In this case an IPv6 fragment header is only included if the IPv4 packet
is already fragmented.</t>
<t>However, when the IPv4 sender does not perform path MTU discovery the
translator has to ensure that the packet does not exceed the path MTU on
the IPv6 side. This is done by fragmenting the IPv4 packet so that it
fits in 1280 byte IPv6 packet since IPv6 guarantees that 1280 byte
packets never need to be fragmented. Also, when the IPv4 sender does not
perform path MTU discovery the translator MUST always include an IPv6
fragment header to indicate that the sender allows fragmentation. That
is needed should the packet pass through an IPv6-to-IPv4 translator.</t>
<t>The above rules ensure that when packets are fragmented either by the
sender or by IPv4 routers that the low-order 16 bits of the fragment
identification is carried end-end to ensure that packets are correctly
reassembled. In addition, the rules use the presence of an IPv6 fragment
header to indicate that the sender might not be using path MTU discovery
i.e. the packet should not have the DF flag set should it later be
translated back to IPv4.</t>
<t>Other than the special rules for handling fragments and path MTU
discovery the actual translation of the packet header consists of a
simple mapping as defined below. Note that ICMP packets require special
handling in order to translate the content of ICMP error message and
also to add the ICMP pseudo-header checksum.</t>
<section anchor="section3.1"
title="Translating IPv4 Headers into IPv6 Headers">
<t>If the DF flag is not set and the IPv4 packet will result in an
IPv6 packet larger than 1280 bytes the IPv4 packet MUST be fragmented
prior to translating it. Since IPv4 packets with DF not set will
always result in a fragment header being added to the packet the IPv4
packets must be fragmented so that their length, excluding the IPv4
header, is at most 1232 bytes (1280 minus 40 for the IPv6 header and 8
for the Fragment header). The resulting fragments are then translated
independently using the logic described below.</t>
<t>If the DF bit is set and the packet is not a fragment (i.e., the MF
flag is not set and the Fragment Offset is zero) then there is no need
to add a fragment header to the packet. The IPv6 header fields are set
as follows: <list style="hanging">
<t hangText="Version:">6</t>
<t hangText="Traffic Class:">By default, copied from IP Type Of
Service and Precedence field (all 8 bits are copied). According to
<xref target="RFC2474"></xref> the semantics of the bits are
identical in IPv4 and IPv6. However, in some IPv4 environments
these fields might be used with the old semantics of "Type Of
Service and Precedence". An implementation of a translator SHOULD
provide the ability to ignore the IPv4 "TOS" and always set the
IPv6 traffic class to zero.</t>
<t hangText="Flow Label:">0 (all zero bits)</t>
<t hangText="Payload Length:">Total length value from IPv4 header,
minus the size of the IPv4 header and IPv4 options, if
present.</t>
<t hangText="Next Header:">Protocol field copied from IPv4
header</t>
<t hangText="Hop Limit:">TTL value copied from IPv4 header. Since
the translator is a router, as part of forwarding the packet it
needs to decrement either the IPv4 TTL (before the translation) or
the IPv6 Hop Limit (after the translation). As part of
decrementing the TTL or Hop Limit the translator (as any router)
needs to check for zero and send the ICMPv4 or ICMPv6 "ttl
exceeded" error.</t>
<t hangText="Source Address:">The the address is derived from the
IPv4 address as specified in <xref target="FRAMEWORK"></xref>.</t>
<t hangText="Destination Address:">In stateless mode, which is to
say that if the IPv4 destination address is within the range of
the stateless translation prefix described in <xref
target="prefix-stateless"></xref>, the address is derived from the
IPv4 address as specified in <xref target="FRAMEWORK"></xref>.
<vspace blankLines="1" /> In stateful mode, which is to say that
if the IPv4 destination address is among the statefully-translated
addresses, the IPv6 address and transport layer destination port
corresponding to the IPv4 destination address and source port are
derived from the database reflecting current session state in the
translator.</t>
</list></t>
<t>If IPv4 options are present in the IPv4 packet, they are ignored
i.e., there is no attempt to translate them. However, if an unexpired
source route option is present then the packet MUST instead be
discarded, and an ICMPv4 "destination unreachable/source route failed"
(Type 3/Code 5) error message SHOULD be returned to the sender.</t>
<t>If there is need to add a fragment header (the DF bit is not set or
the packet is a fragment) the header fields are set as above with the
following exceptions: <list style="hanging">
<t hangText="IPv6 fields:"><list style="hanging">
<t hangText="Payload Length:">Total length value from IPv4
header, plus 8 for the fragment header, minus the size of the
IPv4 header and IPv4 options, if present.</t>
<t hangText="Next Header:">Fragment Header (44).</t>
</list></t>
<t hangText="Fragment header fields:"><list style="hanging">
<t hangText="Next Header:">Protocol field copied from IPv4
header.</t>
<t hangText="Fragment Offset:">Fragment Offset copied from the
IPv4 header.</t>
<t hangText="M flag">More Fragments bit copied from the IPv4
header.</t>
<t hangText="Identification">The low-order 16 bits copied from
the Identification field in the IPv4 header. The high-order 16
bits set to zero.</t>
</list></t>
</list></t>
</section>
<section anchor="section3.2" title="Translating UDP over IPv4">
<t>If a UDP packet has a zero UDP checksum then a valid checksum must
be calculated in order to translate the packet. A stateless translator
can not do this for fragmented packets but [MILLER] indicates that
fragmented UDP packets with a zero checksum appear to only be used for
malicious purposes. Thus this is not believed to be a noticeable
limitation.</t>
<t>When a translator receives the first fragment of a fragmented UDP
IPv4 packet and the checksum field is zero the translator SHOULD drop
the packet and generate a system management event specifying at least
the IP addresses and port numbers in the packet. When it receives
fragments other than the first it SHOULD silently drop the packet,
since there is no port information to log.</t>
<t>When a translator receives an unfragmented UDP IPv4 packet and the
checksum field is zero the translator MUST compute the missing UDP
checksum as part of translating the packet. Also, the translator
SHOULD maintain a counter of how many UDP checksums are generated in
this manner.</t>
</section>
<section anchor="section3.3"
title="Translating ICMPv4 Headers into ICMPv6 Headers">
<t>All ICMP messages that are to be translated require that the ICMP
checksum field be updated as part of the translation since ICMPv6
unlike ICMPv4 has a pseudo-header checksum just like UDP and TCP.</t>
<t>In addition all ICMP packets need to have the Type value translated
and for ICMP error messages the included IP header also needs
translation.</t>
<t>The actions needed to translate various ICMPv4 messages are: <list
style="hanging">
<t hangText="ICMPv4 query messages:"><list style="hanging">
<t hangText="Echo and Echo Reply (Type 8 and Type 0)">Adjust
the type to 128 and 129, respectively, and adjust the ICMP
checksum both to take the type change into account and to
include the ICMPv6 pseudo-header.</t>
<t
hangText="Information Request/Reply (Type 15 and Type 16)">Obsoleted
in ICMPv4 Silently drop.</t>
<t
hangText="Timestamp and Timestamp Reply (Type 13 and Type 14)">Obsoleted
in ICMPv6 Silently drop.</t>
<t
hangText="Address Mask Request/Reply (Type 17 and Type 18)">Obsoleted
in ICMPv6 Silently drop.</t>
<t hangText="ICMP Router Advertisement (Type 9)">Single hop
message. Silently drop.</t>
<t hangText="ICMP Router Solicitation (Type 10)">Single hop
message. Silently drop.</t>
<t hangText="Unknown ICMPv4 types">Silently drop.</t>
<t hangText="IGMP messages:">While the MLD messages <xref
target="RFC2710"></xref><xref target="RFC3590"></xref><xref
target="RFC3810"></xref> are the logical IPv6 counterparts for
the IPv4 IGMP messages all the "normal" IGMP messages are
single-hop messages and should be silently dropped by the
translator. Other IGMP messages might be used by multicast
routing protocols and, since it would be a configuration error
to try to have router adjacencies across IPv4/IPv6 translators
those packets should also be silently dropped.</t>
<t hangText=" ICMPv4 error messages:"><list style="hanging">
<t hangText="Destination Unreachable (Type 3)">For all
that are not explicitly listed below set the Type to 1.
<vspace blankLines="1" /> Translate the code field as
follows: <list style="hanging">
<t hangText="Code 0, 1 (net, host unreachable):">Set
Code to 0 (no route to destination).</t>
<t hangText="Code 2 (protocol unreachable):">Translate
to an ICMPv6 Parameter Problem (Type 4, Code 1) and
make the Pointer point to the IPv6 Next Header
field.</t>
<t hangText="Code 3 (port unreachable):">Set Code to 4
(port unreachable).</t>
<t
hangText="Code 4 (fragmentation needed and DF set):">Translate
to an ICMPv6 Packet Too Big message (Type 2) with code
0. The MTU field needs to be adjusted for the
difference between the IPv4 and IPv6 header sizes.
Note that if the IPv4 router did not set the MTU field
i.e. the router does not implement <xref
target="RFC1191"></xref>, then the translator must use
the plateau values specified in <xref
target="RFC1191"></xref> to determine a likely path
MTU and include that path MTU in the ICMPv6 packet.
(Use the greatest plateau value that is less than the
returned Total Length field.)</t>
<t hangText="Code 5 (source route failed):">Set Code
to 0 (no route to destination). Note that this error
is unlikely since source routes are not
translated.</t>
<t hangText="Code 6,7:">Set Code to 0 (no route to
destination).</t>
<t hangText="Code 8:">Set Code to 0 (no route to
destination).</t>
<t
hangText="Code 9, 10 (communication with destination host administratively prohibited):">Set
Code to 1 (communication with destination
administratively prohibited)</t>
<t hangText="Code 11, 12:">Set Code to 0 (no route to
destination).</t>
</list></t>
<t hangText="Redirect (Type 5)">Single hop message.
Silently drop.</t>
<t hangText="Source Quench (Type 4)">Obsoleted in ICMPv6
Silently drop.</t>
<t hangText="Time Exceeded (Type 11)">Set the Type field
to 3. The Code field is unchanged.</t>
<t hangText="Parameter Problem (Type 12)">Set the Type
field to 4. The Pointer needs to be updated to point to
the corresponding field in the translated include IP
header.</t>
</list></t>
</list></t>
</list></t>
</section>
<section anchor="section3.4"
title="Translating ICMPv4 Error Messages into ICMPv6">
<t>There are some differences between the IPv4 and the IPv6 ICMP error
message formats as detailed above. In addition, the ICMP error
messages contain the IP header for the packet in error which needs to
be translated just like a normal IP header. The translation of this
"packet in error" is likely to change the length of the datagram thus
the Payload Length field in the outer IPv6 header might need to be
updated.</t>
<figure anchor="v4v6icmp" title="IPv4-to-IPv6 ICMP Error Translation">
<artwork align="center"><![CDATA[
+-------------+ +-------------+
| IPv4 | | IPv6 |
| Header | | Header |
+-------------+ +-------------+
| ICMPv4 | | ICMPv6 |
| Header | | Header |
+-------------+ +-------------+
| IPv4 | ===> | IPv6 |
| Header | | Header |
+-------------+ +-------------+
| Partial | | Partial |
| Transport | | Transport |
| Layer | | Layer |
| Header | | Header |
+-------------+ +-------------+
]]></artwork>
</figure>
<t>The translation of the inner IP header can be done by recursively
invoking the function that translated the outer IP headers.</t>
</section>
<section anchor="section3.5" title="Knowing when to Translate">
<t>The translator is assumed to know the pool(s) of IPv4 address that
are used to represent the internal IPv6-only nodes. If the translator
is implemented in a router providing both translation and normal
forwarding, and the address is reachable by a more specific route
without translation, the router should forward it without translating
it. In general, however, if the IPv4 destination field contains an
address that falls in these configured sets of prefixes the packet
needs to be translated to IPv6.</t>
</section>
</section>
<section anchor="section4" title="Translating from IPv6 to IPv4">
<t>When an IPv6-to-IPv4 translator receives an IPv6 datagram addressed
to an IPv4-mapped IPv6 address, it translates the IPv6 header of that
packet into an IPv4 header. It then forwards the packet based on the
IPv4 destination address. The original IPv6 header on the packet is
removed and replaced by an IPv4 header. Except for ICMP packets the
transport layer header and data portion of the packet are left
unchanged.</t>
<figure anchor="v6v4xlat" title="IPv6-to-IPv4 Translation">
<artwork align="center"><![CDATA[
+-------------+ +-------------+
| IPv6 | | IPv4 |
| Header | | Header |
+-------------+ +-------------+
| Fragment | | Transport |
| Header | ===> | Layer |
|(if present) | | Header |
+-------------+ +-------------+
| Transport | | |
| Layer | ~ Data ~
| Header | | |
+-------------+ +-------------+
| |
~ Data ~
| |
+-------------+
]]></artwork>
</figure>
<t>There are some differences between IPv6 and IPv4 in the area of
fragmentation and the minimum link MTU that effect the translation. An
IPv6 link has to have an MTU of 1280 bytes or greater. The corresponding
limit for IPv4 is 68 bytes. Thus, unless there were special measures, it
would not be possible to do end-to-end path MTU discovery when the path
includes an IPv6-to-IPv4 translator since the IPv6 node might receive
ICMP "packet too big" messages originated by an IPv4 router that report
an MTU less than 1280. However, <xref target="RFC2460"></xref> requires
that IPv6 nodes handle such an ICMP "packet too big" message by reducing
the path MTU to 1280 and including an IPv6 fragment header with each
packet. This allows end-to-end path MTU discovery across the translator
as long as the path MTU is 1280 bytes or greater. When the path MTU
drops below the 1280 limit the IPv6 sender will originate 1280 byte
packets that will be fragmented by IPv4 routers along the path after
being translated to IPv4.</t>
<t>The only drawback with this scheme is that it is not possible to use
PMTU to do optimal UDP fragmentation (as opposed to completely avoiding
fragmentation) at sender since the presence of an IPv6 Fragment header
is interpreted that is it OK to fragment the packet on the IPv4 side.
Thus if a UDP application wants to send large packets independent of the
PMTU, the sender will only be able to determine the path MTU on the IPv6
side of the translator. If the path MTU on the IPv4 side of the
translator is smaller then the IPv6 sender will not receive any ICMP
"too big" errors and can not adjust the size fragments it is
sending.</t>
<t>Other than the special rules for handling fragments and path MTU
discovery the actual translation of the packet header consists of a
simple mapping as defined below. Note that ICMP packets require special
handling in order to translate the content of ICMP error message and
also to add the ICMP pseudo-header checksum.</t>
<section anchor="section4.1"
title="Translating IPv6 Headers into IPv4 Headers">
<t>If there is no IPv6 Fragment header the IPv4 header fields are set
as follows: <list style="hanging">
<t hangText="Version:">4</t>
<t hangText="Internet Header Length:">5 (no IPv4 options)</t>
<t hangText="Type of Service (TOS) Octet:">By default, copied from
the IPv6 Traffic Class (all 8 bits). According to <xref
target="RFC2474"></xref> the semantics of the bits are identical
in IPv4 and IPv6. However, in some IPv4 environments these bits
might be used with the old semantics of "Type Of Service and
Precedence". An implementation of a translator SHOULD provide the
ability to ignore the IPv6 traffic class and always set the IPv4
TOS Octet to a specified value.</t>
<t hangText="Total Length:">Payload length value from IPv6 header,
plus the size of the IPv4 header.</t>
<t hangText="Identification:">All zero.</t>
<t hangText="Flags:">The More Fragments flag is set to zero. The
Don't Fragments flag is set to one.</t>
<t hangText="Fragment Offset:">All zero.</t>
<t hangText="Time to Live:">Hop Limit value copied from IPv6
header. Since the translator is a router, as part of forwarding
the packet it needs to decrement either the IPv6 Hop Limit (before
the translation) or the IPv4 TTL (after the translation). As part
of decrementing the TTL or Hop Limit the translator (as any
router) needs to check for zero and send the ICMPv4 or ICMPv6 "ttl
exceeded" error.</t>
<t hangText="Protocol:">Next Header field copied from IPv6
header.</t>
<t hangText="Header Checksum:">Computed once the IPv4 header has
been created.</t>
<t hangText="Source Address:">In stateless mode, which is to say
that if the IPv6 source address is within the range of the
stateless translation prefix described in <xref
target="prefix-stateless"></xref>, the address format is derived
from the IPv4 address as specified in <xref
target="FRAMEWORK"></xref>. <vspace blankLines="1" /> In stateful
mode, which is to say that if the IPv6 source address is not of
the form described in <xref target="FRAMEWORK"></xref>, the IPv4
source address and transport layer source port corresponding to
the IPv6 source address and source port are derived from the
database reflecting current session state in the translator as
described in <xref target="I-D.bagnulo-behave-nat64"></xref>.</t>
<t hangText="Destination Address:">IPv6 packets that are
translated have an IPv4-mapped destination address. Thus the
address is derived from the IPv6 address as specified in <xref
target="FRAMEWORK"></xref>.</t>
</list></t>
<t>If any of an IPv6 hop-by-hop options header, destination options
header, or routing header with the Segments Left field equal to zero
are present in the IPv6 packet, they are ignored i.e., there is no
attempt to translate them. However, the Total Length field and the
Protocol field would have to be adjusted to "skip" these extension
headers.</t>
<t>If a routing header with a non-zero Segments Left field is present
then the packet MUST NOT be translated, and an ICMPv6 "parameter
problem/ erroneous header field encountered" (Type 4/Code 0) error
message, with the Pointer field indicating the first byte of the
Segments Left field, SHOULD be returned to the sender.</t>
<t>If the IPv6 packet contains a Fragment header the header fields are
set as above with the following exceptions: <list style="hanging">
<t hangText="Total Length:">Payload length value from IPv6 header,
minus 8 for the Fragment header, plus the size of the IPv4
header.</t>
<t hangText="Identification:">Copied from the low-order 16-bits in
the Identification field in the Fragment header.</t>
<t hangText="Flags:">The More Fragments flag is copied from the M
flag in the Fragment header. The Don't Fragments flag is set to
zero allowing this packet to be fragmented by IPv4 routers.</t>
<t hangText="Fragment Offset:">Copied from the Fragment Offset
field in the Fragment Header.</t>
<t hangText="Protocol:">Next Header value copied from Fragment
header.</t>
</list></t>
</section>
<section anchor="section4.2"
title="Translating ICMPv6 Headers into ICMPv4 Headers">
<t>All ICMP messages that are to be translated require that the ICMP
checksum field be updated as part of the translation since ICMPv6
unlike ICMPv4 has a pseudo-header checksum just like UDP and TCP.</t>
<t>In addition all ICMP packets need to have the Type value translated
and for ICMP error messages the included IP header also needs
translation.</t>
<t>The actions needed to translate various ICMPv6 messages are: <list
style="hanging">
<t hangText="ICMPv6 informational messages:"><list style="hanging">
<t
hangText="Echo Request and Echo Reply (Type 128 and 129)">Adjust
the type to 0 and 8, respectively, and adjust the ICMP
checksum both to take the type change into account and to
exclude the ICMPv6 pseudo-header.</t>
<t
hangText="MLD Multicast Listener Query/Report/Done (Type 130, 131, 132)">Single
hop message. Silently drop.</t>
<t
hangText="Neighbor Discover messages (Type 133 through 137)">Single
hop message. Silently drop.</t>
<t hangText="Unknown informational messages">Silently
drop.</t>
</list></t>
<t hangText="ICMPv6 error messages:"><list style="hanging">
<t hangText="Destination Unreachable (Type 1)">Set the Type
field to 3. Translate the code field as follows: <list
style="hanging">
<t hangText="Code 0 (no route to destination):">Set Code
to 1 (host unreachable).</t>
<t
hangText="Code 1 (communication with destination administratively prohibited):">Set
Code to 10 (communication with destination host
administratively prohibited).</t>
<t hangText="Code 2 (beyond scope of source address):">Set
Code to 1 (host unreachable). Note that this error is very
unlikely since the IPv4-translatable source address is
considered to have global scope.</t>
<t hangText="Code 3 (address unreachable):">Set Code to 1
(host unreachable).</t>
<t hangText="Code 4 (port unreachable):">Set Code to 3
(port unreachable).</t>
</list></t>
<t hangText="Packet Too Big (Type 2)">Translate to an ICMPv4
Destination Unreachable with code 4. The MTU field needs to be
adjusted for the difference between the IPv4 and IPv6 header
sizes taking into account whether or not the packet in error
includes a Fragment header.</t>
<t hangText="Time Exceeded (Type 3)">Set the Type to 11. The
Code field is unchanged.</t>
<t hangText="Parameter Problem (Type 4)">If the Code is 1
translate this to an ICMPv4 protocol unreachable (Type 3, Code
2). Otherwise set the Type to 12 and the Code to zero. The
Pointer needs to be updated to point to the corresponding
field in the translated include IP header.</t>
<t hangText="Unknown error messages">Silently drop.</t>
</list></t>
</list></t>
</section>
<section anchor="section4.3"
title="Translating ICMPv6 Error Messages into ICMPv4">
<t>There are some differences between the IPv4 and the IPv6 ICMP error
message formats as detailed above. In addition, the ICMP error
messages contain the IP header for the packet in error which needs to
be translated just like a normal IP header. The translation of this
"packet in error" is likely to change the length of the datagram thus
the Total Length field in the outer IPv4 header might need to be
updated.</t>
<figure anchor="v6v4icmp" title="IPv6-to-IPv4 ICMP Error Translation">
<artwork align="center"><![CDATA[
+-------------+ +-------------+
| IPv6 | | IPv4 |
| Header | | Header |
+-------------+ +-------------+
| ICMPv6 | | ICMPv4 |
| Header | | Header |
+-------------+ +-------------+
| IPv6 | ===> | IPv4 |
| Header | | Header |
+-------------+ +-------------+
| Partial | | Partial |
| Transport | | Transport |
| Layer | | Layer |
| Header | | Header |
+-------------+ +-------------+
]]></artwork>
</figure>
<t>The translation of the inner IP header can be done by recursively
invoking the function that translated the outer IP headers.</t>
</section>
<section anchor="section4.4" title="Knowing when to Translate">
<t>If the translator is implemented in a router providing both
translation and normal forwarding, and the address is reachable by a
more specific route without translation, the router should forward it
without translating it. Otherwise, when the translator receives an
IPv6 packet with an IPv4-mapped destination address the packet will be
translated to IPv4.</t>
</section>
</section>
<section anchor="section5" title="Implications for IPv6-Only Nodes">
<t>An IPv6-only node which works through an IPv4/IPv6 translator needs
some modifications beyond a normal IPv6-only node.</t>
<t>As specified in <xref target="section1.3"></xref> the application
protocols need to handle operation on a dual stack node. In addition the
protocol stack needs to be able to: <list style="symbols">
<t>Determine when an IPv4-translatable address needs to be allocated
and the allocation needs to be refreshed/renewed. This can
presumably be done without involving the applications by e.g.
handling this under the socket API. For instance, when the connect
or sendto socket calls are invoked they could check if the
destination is an IPv4-mapped address and in that case
allocate/refresh the IPv4-translatable address.</t>
<t>Ensure, as part of the source address selection mechanism, that
when the destination address is an IPv4-mapped address the source
address MUST be an IPv4-translatable address. And an IPv4-
translatable address MUST NOT be used with other forms of IPv6
destination addresses.</t>
<t>Should the peer have AAAA/A6 address records the application (or
resolver) SHOULD never fall back to looking for A address records
even if communication fails using the available AAAA/A6 records. The
reason for this restriction is to prevent traffic between two IPv6
nodes (which AAAA/A6 records in the DNS) from accidentally going
through IPv4/IPv6 translation twice; from IPv6 to IPv4 and to IPv6
again. It is considered preferable to instead signal a failure to
communicate to the application. The only case in which
IPv6/IPv4/IPv6 translation makes sense is when no other route
exists.</t>
</list></t>
</section>
<section anchor="IANA" title="IANA Considerations">
<t>This memo adds no new IANA considerations.</t>
<t>Note to RFC Editor: This section will have served its purpose if it
correctly tells IANA that no new assignments or registries are required,
or if those assignments or registries are created during the RFC
publication process. From the author's perspective, it may therefore be
removed upon publication as an RFC at the RFC Editor's discretion.</t>
</section>
<section anchor="Security" title="Security Considerations">
<t>The use of stateless IP/ICMP translators does not introduce any new
security issues beyond the security issues that are already present in
the IPv4 and IPv6 protocols and in the routing protocols which are used
to make the packets reach the translator.</t>
<t>As the Authentication Header <xref target="RFC4302"></xref> is
specified to include the IPv4 Identification field and the translating
function not being able to always preserve the Identification field, it
is not possible for an IPv6 endpoint to compute AH on received packets
that have been translated from IPv4 packets. Thus AH does not work
through a translator.</t>
<t>Packets with ESP can be translated since ESP does not depend on
header fields prior to the ESP header. Note that ESP transport mode is
easier to handle than ESP tunnel mode; in order to use ESP tunnel mode
the IPv6 node needs to be able to generate an inner IPv4 header when
transmitting packets and remove such an IPv4 header when receiving
packets.</t>
</section>
<section anchor="Acknowledgements" title="Acknowledgements">
<t>This is under development by a large group of people. Those who have
posted to the list during the discussion include Andrew Sullivan, Andrew
Yourtchenko, Brian Carpenter, Dan Wing, Ed Jankiewicz, Fred Baker,
Hiroshi Miyata, Iljitsch van Beijnum, John Schnizlein, Kevin Yin, Magnus
Westerlund, Marcelo Bagnulo Braun, Margaret Wasserman, Masahito Endo,
Phil Roberts, Philip Matthews, Remi Denis-Courmont, Remi Despres, and
Xing Li.</t>
</section>
</middle>
<back>
<!-- references split to informative and normative -->
<references title="Normative References">
<?rfc include='reference.RFC.0791' ?>
<?rfc include='reference.RFC.0792' ?>
<?rfc include='reference.RFC.2119' ?>
<?rfc include='reference.RFC.2460' ?>
<?rfc include='reference.RFC.2765' ?>
<?rfc include='reference.RFC.4291' ?>
<?rfc include='reference.RFC.4443' ?>
<?rfc include='reference.RFC.5382' ?>
<reference anchor="FRAMEWORK">
<front>
<title>Framework for IPv4/IPv6 Translation -
baker-behave-v4v6-framework</title>
<author fullname="Fred Baker" initials="F." surname="Baker">
<organization></organization>
</author>
<date month="October" year="2008" />
</front>
</reference>
<?rfc include='reference.I-D.bagnulo-behave-nat64'?>
</references>
<references title="Informative References">
<?rfc include='reference.RFC.1112' ?>
<?rfc include='reference.RFC.1191' ?>
<?rfc include='reference.RFC.1981' ?>
<?rfc include='reference.RFC.2428' ?>
<?rfc include='reference.RFC.2474' ?>
<?rfc include='reference.RFC.2710' ?>
<?rfc include='reference.RFC.3493' ?>
<?rfc include='reference.RFC.3590' ?>
<?rfc include='reference.RFC.3810' ?>
<?rfc include='reference.RFC.4213' ?>
<?rfc include='reference.RFC.4301' ?>
<?rfc include='reference.RFC.4302' ?>
<?rfc include='reference.RFC.4303' ?>
<?rfc include='reference.RFC.4821' ?>
<?rfc include='reference.RFC.4861' ?>
<?rfc include='reference.I-D.petithuguenin-behave-stun-pmtud' ?>
<reference anchor="Miller">
<front>
<title>Email to the ngtrans mailing list</title>
<author fullname="Miller" initials="G" surname="Miller">
<organization></organization>
</author>
<date day="26" month="March" year="1999" />
</front>
</reference>
<!--
-->
</references>
</back>
</rfc>
| PAFTECH AB 2003-2026 | 2026-04-24 01:37:37 |