One document matched: draft-ietf-behave-v6v4-xlate-23.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 toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>
<rfc obsoletes="2765" category="std" docName="draft-ietf-behave-v6v4-xlate-23"
ipr="pre5378Trust200902">
<front>
<title abbrev="IPv4/IPv6 Translation">IP/ICMP Translation
Algorithm</title>
<author fullname="Xing Li" initials="X." role="" 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 10-62785983</phone>
<email>xing@cernet.edu.cn</email>
</address>
</author>
<author fullname="Congxiao Bao" initials="C." role="" 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 10-62785983</phone>
<email>congxiao@cernet.edu.cn</email>
</address>
</author>
<author fullname="Fred Baker" initials="F.J." role=""
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="2010" />
<area>Transport</area>
<workgroup>behave</workgroup>
<abstract>
<t>
<!-- This document forms a replacement of the Stateless IP/ICMP
Translation Algorithm (SIIT) described in RFC 2765. The algorithm
translates between IPv4 and IPv6 packet headers (including ICMP
headers). -->
This document describes the Stateless IP/ICMP
Translation Algorithm (SIIT), which translates
between IPv4 and IPv6 packet headers (including ICMP
headers). This document obsoletes RFC2765.
</t>
</abstract>
</front>
<middle>
<section anchor="introduction" title="Introduction and Motivation">
<t>This document is a product of the 2008-2010 effort to define a
replacement for NAT-PT <xref target="RFC2766"></xref>.
It is directly derivative from
Erik Nordmark's
"Stateless IP/ICMP Translation Algorithm (SIIT)"
<xref target="RFC2765"></xref>, which provides
stateless translation between IPv4 <xref
target="RFC0791"></xref> and IPv6 <xref target="RFC2460"></xref>, and
between ICMPv4 <xref target="RFC0792"></xref> and ICMPv6 <xref
target="RFC4443"></xref>.
This document obsoletes RFC2765 <xref target="RFC2765"></xref>.
The changes from RFC2765 <xref target="RFC2765"></xref>
are listed in <xref target="changes"/>.
</t>
<t>
Readers of this document are expected to have read and understood the
framework described in
<xref target="I-D.ietf-behave-v6v4-framework"></xref>.
Implementations of this IPv4/IPv6 translation specification MUST also
support the address translation algorithms in
<xref target="I-D.ietf-behave-address-format"></xref>.
Implementations MAY also support
stateful translation
<xref target="I-D.ietf-behave-v6v4-xlate-stateful"></xref>.
</t>
<section anchor="translation-model" title="IPv4-IPv6 Translation Model">
<t>The translation model consists of two or more network domains
connected by one or more IP/ICMP translators (XLATs) as shown in Figure 1.
</t>
<figure anchor="cloud1" title="IPv4-IPv6 Translation Model">
<artwork align="center"><![CDATA[
--------- ---------
// \\ // \\
/ +----+ \
| |XLAT| | XLAT: IP/ICMP
| IPv4 +----+ IPv6 | Translator
| Domain | | Domain |
| | | |
\ | | /
\\ // \\ //
-------- ---------
]]></artwork>
</figure>
<t>
The scenarios of the translation model are discussed in
<xref target="I-D.ietf-behave-v6v4-framework"></xref>.
</t>
</section>
<section anchor="applicability" title="Applicability and Limitations">
<t>
This document specifies the
translation algorithms between IPv4 packets and IPv6 packets.
</t>
<t>
As with
<xref target="RFC2765"></xref>,
the translating function specified in this document does not
translate any IPv4 options and it does not translate IPv6 extension headers
except fragmentation header.
</t>
<t>
The issues and algorithms in the translation of datagrams
containing
TCP segments are described in
<xref target="RFC5382"></xref>.
</t>
<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
in the Internet
and will not be translated by the IP/ICMP
translator. -->
Fragmented IPv4 UDP packets that do not contain a UDP checksum (i.e.,
the UDP checksum field is zero) are not of significant use in the
Internet and in general will not be translated by the IP/ICMP translator.
However, when the translator is configured to forward the packet
without a UDP checksum, the fragmented IPv4 UDP packets will be translated.
</t>
<t>
Fragmented ICMP/ICMPv6 packets will not be translated by the IP/ICMP translator.
</t>
<t>
The IP/ICMP header translation
specified in this document is consistent with requirements of
multicast IP/ICMP headers.
However IPv4 multicast
addresses
<xref target="RFC5771"></xref>
cannot be mapped to IPv6 multicast addresses
<xref target="RFC3307"></xref>
based on the unicast mapping rule
<xref target="I-D.ietf-behave-address-format"></xref>.
</t>
</section>
<section anchor="mode" title="Stateless vs. Stateful Mode">
<t>An IP/ICMP translator has two possible modes of operation:
stateless and stateful
<xref target="I-D.ietf-behave-v6v4-framework"></xref>.
In both cases, we assume that a system (a node or an application) 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
and hence are forced to have their communications translated.</t>
<t>In the stateless mode, a specific IPv6 address range will represent IPv4 systems (IPv4-converted addresses),
and the IPv6 systems have addresses (IPv4-translatable addresses) that can be algorithmically
mapped to a subset of the service provider's IPv4 addresses.
Note that
IPv4-translatable addresses is a subset of IPv4-converted addresses.
In general, there is no need to concern
oneself with translation tables, as the IPv4 and
IPv6 counterparts are algorithmically related.
</t>
<t>In the stateful mode, a specific IPv6 address range will represent IPv4 systems (IPv4-converted addresses),
but the IPv6 systems may use any IPv6
addresses <xref target="RFC4291"></xref> except in that range.
In this case, a translation table is required to bind the IPv6 systems' addresses to the IPv4 addresses maintained in the translator.
</t>
<t>
The address translation mechanisms for the stateless and the stateful translations are defined in
<xref target="I-D.ietf-behave-address-format"></xref>.
</t>
</section>
<section anchor="PMTU" title="Path MTU Discovery and Fragmentation">
<t>
Due to the different sizes of the IPv4 and IPv6 header, which are 20+ octets and 40
octets respectively, handling the maximum packet size is critical for the operation
of the IPv4/IPv6 translator. There are three mechanisms to handle this issue:
path MTU discovery (PMTUD), fragmentation, and transport-layer negotiation such as
the TCP MSS option
<xref target="RFC0879"></xref>.
Note that the translator MUST behave as a router, i.e.
the translator MUST send a "Packet Too Big" error message or fragment the packet when the packet size exceeds
the MTU of the next hop interface.
</t>
<t>
"Don't Fragment", ICMP "Packet Too Big", and packet fragmentation are discussed
in <xref target="v4tov6"/> and <xref target="v6tov4"/> of this document.
The reassembling of fragmented packets in the stateful translator is discussed in
<xref target="I-D.ietf-behave-v6v4-xlate-stateful"/>,
since it requires state maintenance in the translator.
</t>
</section>
</section>
<section anchor="changes" title="Changes from RFC2765">
<t>
The changes from RFC2765 are the following:
<list style="numbers">
<t>
Redescribing the network model to map to present and projected usage.
The scenarios, applicability and limitations originally presented in RFC2765
<xref target="RFC2765"></xref>
are moved to
framework document
<xref target="I-D.ietf-behave-v6v4-framework"></xref>.
</t>
<t>
Moving the address format to the address format document
<xref target="I-D.ietf-behave-address-format"></xref>,
to coordinate with other documents on the topic.
</t>
<t>
Describing the header translation for the stateless and stateful operations.
The details of the session database and mapping table
handling of the stateful translation is in stateful translation document
<xref target="I-D.ietf-behave-v6v4-xlate-stateful"></xref>.
</t>
<t>
Having refined the header translation, fragmentation handling,
ICMP translation and ICMP error translation in IPv4 to IPv6 direction,
as well as in IPv6 to IPv4 direction.
</t>
<t>
Adding more discussion on transport-layer header translation.
</t>
<t>
Adding <xref target="ipv6-fragment"/> for "IPv6 Fragment Processing".
</t>
<t>
Adding <xref target="icmp6-tbg"/> for "Special Considerations for ICMPv6 Packet Too Big".
</t>
<t>
Having updated <xref target="Security"/> for "Security Considerations".
</t>
<t>
Adding <xref target="Appendix"/> "Stateless translation workflow example".
</t>
</list>
</t>
</section>
<section anchor="conventions" title="Conventions">
<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"></xref>.
</t>
</section>
<section anchor="v4tov6" title="Translating from IPv4 to IPv6">
<t>
When an IP/ICMP translator receives an IPv4 datagram addressed to a
destination towards the IPv6 domain, it translates the IPv4 header of
that packet into an IPv6 header. The original IPv4 header on the
packet is removed and replaced by an IPv6 header and the transport
checksum updated as needed, if that transport is supported by the
translator. The data portion of the packet is left
unchanged. The IP/ICMP translator then forwards the packet based on
the IPv6 destination address.
</t>
<figure anchor="v4v6xlat" title="IPv4-to-IPv6 Translation">
<artwork align="center"><![CDATA[
+-------------+ +-------------+
| IPv4 | | IPv6 |
| Header | | Header |
+-------------+ +-------------+
| Transport | | Fragment |
| Layer | ===> | Header |
| Header | | (if needed) |
+-------------+ +-------------+
| | | Transport |
~ Data ~ | Layer |
| | | Header |
+-------------+ +-------------+
| |
~ Data ~
| |
+-------------+
]]></artwork>
</figure>
<t>
Path MTU discovery is mandatory in IPv6 but it is optional in IPv4.
IPv6 routers never fragment a packet - only the sender can do
fragmentation.
</t>
<t>When an IPv4 node performs path MTU discovery (by setting the Don't Fragment (DF) bit
in the header), path MTU discovery can operate end-to-end, i.e., across
the translator. In this case either IPv4 or IPv6 routers (including the translator) might send back
ICMP "Packet Too Big" messages to the sender. When the IPv6 routers send
these ICMPv6 errors they will pass through a translator that will
translate the ICMPv6 error to a form that the IPv4 sender can understand.
As a result, an IPv6 fragment header is only included if the IPv4 packet
is already fragmented.</t>
<!-- <t>
However, when the IPv4 sender does not set the Don't Fragment (DF) bit, the
translator MUST 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 packets, since that is the
minimum IPv6 MTU. Also, when the IPv4 sender does not set the DF bit
the translator MUST always include an IPv6 fragment
header to indicate that the sender allows fragmentation.
</t> -->
<t>
However, when the IPv4 sender does not set the Don't Fragment (DF)
bit, the translator MUST ensure that the packet does not exceed the
path MTU on the IPv6 side. This is done by fragmenting the IPv4
packet (with fragmentation headers) so that it fits in 1280-byte
IPv6 packets, since that is the minimum IPv6 MTU. The IPv6
fragmentation header has been shown to cause operational
difficulties in practice due to limited firewall fragmentation
support, etc.. In an environment where the network
owned/operated by the same entity that owns/operates the translator,
the translator MAY provide a configuration function for the network
administrator to adjust the threshold of the minimum IPv6 MTU to
a value that reflects the real value of the minimum IPv6 MTU in
the network (greater than 1280-byte). This will help reduce the
chance of including the fragmentation header in the packets.
</t>
<t>
When the IPv4 sender does not set the DF bit
the translator SHOULD always include an IPv6 fragment header to
indicate that the sender allows fragmentation. The translator
MAY provide a configuration function that allows the translator
not to include the fragmentation header for the non-fragmented
IPv6 packets.
</t>
<t>The rules in <xref target="header46"/> ensure that when packets are fragmented, either by
the sender or by IPv4 routers, the low-order 16 bits of the fragment
identification are carried end-to-end, ensuring that packets are correctly
reassembled. In addition, the rules in <xref target="header46"/> 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 translation as defined below. Note that ICMPv4 packets require special
handling in order to translate the content of ICMPv4 error messages and
also to add the ICMPv6 pseudo-header checksum.</t>
<t>
The translator SHOULD make sure that the packets belonging to the
same flow leave the translator in the same order in which they
arrived.
</t>
<section anchor="header46"
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 packet MUST be fragmented so the
resulting IPv6 packet (with Fragment header added to each fragment)
will be less than or equal to 1280 bytes. For example, if the packet
is fragmented prior to the translation, 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 flag is not set and the IPv4 packet will result in an IPv6
packet larger than 1280 bytes, the packet SHOULD be fragmented so the
resulting IPv6 packet (with Fragment header added to each fragment)
will be less than or equal to 1280 bytes. For example, if the packet
is fragmented prior to the translation, the IPv4 packets should 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 translator MAY provide a configuration function
for the network administrator to adjust the threshold of the minimum
IPv6 MTU to a value greater than 1280-byte if the real value of the
minimum IPv6 MTU in the network is known to the administrator.
The resulting fragments are then translated
independently using the logic described below.
</t>
<t>
If the DF bit is set and the MTU of the next-hop interface is less than the
total length value of the IPv4 packet plus 20, the translator MUST send an ICMPv4 "Fragmentation Needed" error message
to the IPv4 source address.
</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 equal to zero) then the translator SHOULD NOT
add a Fragment header to the resulting 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 (TOS) octet. 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 support an
administratively-configurable option to ignore the IPv4 TOS and always
set the IPv6 traffic class (TC) to zero.
In addition,
if the translator is at an administrative boundary, the filtering
and update considerations of <xref target="RFC2475"></xref> may be
applicable.
</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:">
For ICMPv4 (1) changed to ICMPv6 (58), otherwise protocol field MUST be copied from IPv4 header.
</t>
<t hangText="Hop Limit:">The hop limit is derived from the TTL value in the 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)
MUST check for zero and send the ICMPv4 "TTL Exceeded" or ICMPv6 "Hop Limit
Exceeded" error.</t>
<t hangText="Source Address:">
The IPv4-converted address derived from the IPv4 source address per
<xref target="I-D.ietf-behave-address-format"/>
Section 2.1.
<vspace
blankLines="1" /> If the translator gets an illegal source address (e.g. 0.0.0.0, 127.0.0.1, etc.), the translator SHOULD silently drop the packet
(as discussed in Section 5.3.7 of
<xref target="RFC1812"></xref>).
<vspace blankLines="1" />
</t>
<t hangText="Destination Address:">In the stateless mode, which is to
say that if the IPv4 destination address is within a range of configured
IPv4 stateless translation prefix, the IPv6 destination address is
the IPv4-translatable address derived from the IPv4 destination address
per <xref target="I-D.ietf-behave-address-format"/> Section 2.1.
A workflow example of stateless translation is shown in <xref target="Appendix"/> of this document.
<vspace
blankLines="1" /> In the stateful mode, which is to say that if the
IPv4 destination address is not within the range of any configured IPv4 stateless
translation prefix, the IPv6 destination address and
corresponding transport-layer destination port are derived from
the Binding Information Bases (BIBs) reflecting current session state in the
translator as described in <xref target="I-D.ietf-behave-v6v4-xlate-stateful"/>.
<vspace blankLines="1" />
</t>
</list></t>
<t>
If any IPv4 options are present in the IPv4 packet, the IPv4 options
MUST be ignored and the packet translated normally; there is no
attempt to translate the options.
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 a 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:">
For ICMPv4 (1) changed to ICMPv6 (58), otherwise protocol field MUST be 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="icmp46"
title="Translating ICMPv4 Headers into ICMPv6 Headers">
<t>All ICMPv4 messages that are to be translated require that the ICMPv6
checksum field be calculated as part of the translation since ICMPv6,
unlike ICMPv4, has a pseudo-header checksum just like UDP and TCP.</t>
<t>In addition, all ICMPv4 packets MUST have the Type value translated
and, for ICMPv4 error messages, the included IP header also MUST be
translated.</t>
<t>The actions needed to translate various ICMPv4 messages are as follows: <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 values 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 ICMPv6. 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 IP/ICMP translators
those packets SHOULD also be silently dropped.</t>
<t hangText=" ICMPv4 error messages:"><list style="hanging">
<t hangText="Destination Unreachable (Type 3):">
Translate the Code field as
described below, set the Type field to 1, and adjust
the ICMP checksum both to take the type/code change into account
and to include the ICMPv6 pseudo-header.
<vspace blankLines="1" /> Translate the Code field as
follows:
<list style="hanging">
<t hangText="Code 0, 1 (Net, host unreachable):">Set
Code value to 0 (no route to destination).</t>
<t hangText="Code 2 (Protocol unreachable):">Translate
to an ICMPv6 Parameter Problem (Type 4, Code value 1) and
make the Pointer point to the IPv6 Next Header
field.</t>
<t hangText="Code 3 (Port unreachable):">Set Code value 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 value
set to 0. The MTU field MUST be adjusted for the
difference between the IPv4 and IPv6 header sizes,
i.e. minimum(advertised
MTU+20, MTU_of_IPv6_nexthop, (MTU_of_IPv4_nexthop)+20).
Note that if the IPv4 router set the MTU field to zero,
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>
See also the requirements in <xref target="icmp6-tbg"/>.
</t>
<t hangText="Code 5 (Source route failed):">Set Code value
to 0 (No route to destination). Note that this error
is unlikely since source routes are not
translated.</t>
<t hangText="Code 6, 7, 8:">Set Code value to 0 (No route to
destination).</t>
<t
hangText="Code 9, 10 (Communication with destination host administratively prohibited):">Set
Code value to 1 (Communication with destination
administratively prohibited)
</t>
<t hangText="Code 11, 12:">Set Code value to 0 (no route to
destination).</t>
<t hangText="Code 13 (Communication Administratively Prohibited):">Set Code value to 1 (Communication with destination administratively prohibited).
</t>
<t hangText="Code 14 (Host Precedence Violation):">Silently drop.
</t>
<t hangText="Code 15 (Precedence cutoff in effect):">Set Code value to 1 (Communication with destination administratively prohibited).
</t>
<t hangText="Other Code values:">Silently drop.</t>
</list></t>
<t hangText="Redirect (Type 5):">Single hop message.
Silently drop.</t>
<t hangText="Alternative Host Address (Type 6):">
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, and adjust the ICMP checksum both to
take the type change into account and to include the ICMPv6
pseudo-header. The Code field is unchanged.</t>
<t hangText="Parameter Problem (Type 12):">Set the Type
field to 4, and adjust the ICMP checksum both to
take the type/code change into account and to include the ICMPv6
pseudo-header.
<vspace blankLines="1" /> Translate the Code field as
follows:
<list style="hanging">
<t hangText="Code 0 (Pointer indicates the error):">
Set the Code value to 0 (Erroneous header field encountered) and update the pointer as defined in Figure 3
(If the Original IPv4 Pointer Value is not listed or the Translated IPv6 Pointer
Value is listed as "n/a", silently drop the packet).
</t>
<t hangText="Code 1 (Missing a required option):">
Silently drop
</t>
<t hangText="Code 2 (Bad length):">
Set the Code value to 0 (Erroneous header field encountered) and update the pointer as defined in Figure 3
(If the Original IPv4 Pointer Value is not listed or the Translated IPv6 Pointer
Value is listed as "n/a", silently drop the packet).
</t>
<t hangText="Other Code values:">
Silently drop
</t>
</list>
</t>
<t hangText="Unknown ICMPv4 types:">Silently drop.
</t>
<t>
<figure anchor="appendix-461" title="Pointer value for translating from IPv4 to IPv6">
<artwork align="center"><![CDATA[
| Original IPv4 Pointer Value | Translated IPv6 Pointer Value |
+--------------------------------+--------------------------------+
| 0 | Version/IHL | 0 | Version/Traffic Class |
| 1 | Type Of Service | 1 | Traffic Class/Flow Label |
| 2,3 | Total Length | 4 | Payload Length |
| 4,5 | Identification | n/a | |
| 6 | Flags/Fragment Offset | n/a | |
| 7 | Fragment Offset | n/a | |
| 8 | Time to Live | 7 | Hop Limit |
| 9 | Protocol | 6 | Next Header |
|10,11| Header Checksum | n/a | |
|12-15| Source Address | 8 | Source Address |
|16-19| Destination Address | 24 | Destination Address |
+--------------------------------+--------------------------------+
]]></artwork>
</figure>
</t>
<t hangText="ICMP Error Payload:">
If the received ICMPv4 packet contains an ICMPv4 Extension
<xref target="RFC4884"></xref>,
the translation of the ICMPv4 packet will cause the ICMPv6 packet to change length.
When this occurs, the ICMPv6 Extension length attribute MUST be adjusted accordingly
(e.g., longer due to the translation from IPv4 to IPv6).
If the ICMPv4 Extension exceeds the maximum size of an ICMPv6 message on the outgoing
interface, the ICMPv4 extension SHOULD be simply truncated.
For extensions not defined in
<xref target="RFC4884"></xref>,
the translator passes the extensions
as opaque bit strings and those containing IPv4 address literals will not have
those addresses translated to IPv6 address literals; this may cause problems
with processing of those ICMP extensions.
</t>
</list></t>
</list></t>
</list></t>
</section>
<section anchor="error46"
title="Translating ICMPv4 Error Messages into ICMPv6">
<t>There are some differences between the ICMPv4 and the ICMPv6 error
message formats as detailed above. The ICMP error
messages containing the packet in error MUST
be translated just like a normal IP packet.
If the translation of this "packet in error" changes the length of
the datagram, the Total
Length field in the outer IPv6 header MUST 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 invoking the function
that translated the outer IP headers. This process MUST stop at the first embedded
header and drop the packet if it contains more.
</t>
</section>
<section anchor="sending-icmp4" title="Generation of ICMPv4 Error Message">
<t>
If the IPv4 packet is discarded, then the translator SHOULD be able to send back an ICMPv4 error message to the original sender of the packet,
unless the discarded packet is itself an ICMPv4 message.
The ICMPv4 message, if sent, has a Type value of 3 (Destination Unreachable) and a Code value of 13 (Communication Administratively Prohibited),
unless otherwise specified in this document or in
<xref target="I-D.ietf-behave-v6v4-xlate-stateful"></xref>.
The translator SHOULD allow an administrator to configure whether the ICMPv4 error messages are sent, rate-limited, or not sent.
</t>
</section>
<section anchor="transport46" title="Transport-layer Header Translation">
<t>
If the address translation algorithm is not checksum neutral
(Section 4.1 of
<xref target="I-D.ietf-behave-address-format"></xref>),
the recalculation
and updating of the transport-layer headers which contain pseudo
headers needs to be performed. Translators MUST do this for TCP
and ICMP packets and for UDP packets that contain a UDP checksum
(i.e. the UDP checksum field is not zero).
</t>
<t>
For UDP packets that do not contain a UDP checksum
(i.e. the UDP checksum field is zero), the translator
SHOULD provide a configuration function to
allow:
<list style="numbers">
<t>
Dropping the packet and generating a system management
event specifying at least the IP addresses and port numbers of the
packet.
</t>
<t>
Calculating an IPv6 checksum and forward the packet
(which has performance implications).
<vspace blankLines="1" />
A stateless translator cannot compute the
UDP checksum of fragmented packets, so when a stateless 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.
<vspace blankLines="1" />
For stateful translator,
the handling of fragmented UDP IPv4 packets with a zero checksum is
discussed in
<xref target="I-D.ietf-behave-v6v4-xlate-stateful"></xref>),
Section 3.1.
</t>
<!-- <t>
Forwarding the packet
without a UDP checksum.
<vspace blankLines="1" />
A stateless translator can translate fragmented UDP IPv4 packet under this condition.
</t> -->
</list>
</t>
<t>
Other transport protocols (e.g., DCCP) are OPTIONAL to support. In
order to ease debugging and troubleshooting, translators MUST forward
all transport protocols as described in the "Next Header" step of <xref target="header46"/>.
</t>
</section>
<section anchor="when46" title="Knowing When to Translate">
<t>
If the IP/ICMP translator also provides normal forwarding function, and the destination IPv4 address is reachable by a
more specific route without translation, the translator MUST forward it
without translating it. Otherwise, when an IP/ICMP translator
receives an IPv4 datagram addressed to an IPv4 destination representing a host in the IPv6
domain, the packet MUST be translated to IPv6.
</t>
</section>
</section>
<section anchor="v6tov4" title="Translating from IPv6 to IPv4">
<t>When an IP/ICMP translator receives an IPv6 datagram addressed to a
destination towards the IPv4 domain, it translates the IPv6 header of
the received IPv6 packet into an IPv4 header.
The
original IPv6 header on the packet is removed and replaced by an IPv4
header.
Since the ICMPv6 <xref target="RFC4443"></xref>,
TCP <xref target="RFC0793"></xref>,
UDP <xref target="RFC0768"></xref> and
DCCP <xref target="RFC4340"></xref>
headers
contain checksums that cover the IP header,
if the address mapping algorithm is not checksum-neutral,
the checksum MUST be evaluated before translation and the ICMP and transport-layer headers MUST be updated.
The
data portion of the packet is left unchanged. The IP/ICMP translator
then forwards the packet based on the IPv4 destination address. </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 affect the translation. An
IPv6 link has to have an MTU of 1280 bytes or greater. The corresponding
limit for IPv4 is 68 bytes.
Path MTU Discovery across a translator relies on ICMP
Packet Too Big messages being received and processed by IPv6
hosts, including an ICMP Packet Too Big that indicates the MTU
is less than the IPv6 minimum MTU. This requirement is
described in Section 5 of
<xref target="RFC2460"></xref>
(for IPv6's 1280 octet
minimum MTU) and Section 5 of
<xref target="RFC1883"></xref>
(for IPv6's previous
576 octet minimum MTU).
</t>
<t>
In an environment where an ICMPv4 Packet Too Big message is
translated to an ICMPv6 Packet Too Big messages, and the ICMPv6
Packet Too Big message is successfully delivered to and correctly
processed by the IPv6 hosts (e.g., a network owned/operated by
the same entity that owns/operates the translator), the translator
can rely on IPv6 hosts sending subsequent packets to the same
IPv6 destination with IPv6 fragment headers. In such an
environment, when the translator receives an IPv6 packet with a
fragmentation header, the translator SHOULD generate the IPv4
packet with a cleared Don't Fragment bit, and with its
identification value from the IPv6 fragment header, for
all of the IPv6 fragments (MF=0 or MF=1).
</t>
<t>
In an environment where an ICMPv4 Packet Too Big message
are filtered (by a network firewall or
by the host itself) or not correctly processed by the IPv6 hosts,
the IPv6 host will never generate an IPv6 packet with the IPv6
fragment header. In such an environment, the translator SHOULD
set the IPv4 Don't Fragment bit. While setting the Don't Fragment
bit may create PMTUD black holes
<xref target="RFC2923"></xref>
if there are IPv4 links
smaller than 1260 octets, this is considered safer than
causing IPv4 reassembly errors
<xref target="RFC4963"></xref>.
</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 translation as defined below. Note that ICMPv6 packets require special
handling in order to translate the contents of ICMPv6 error messages and
also to remove the ICMPv6 pseudo-header checksum.</t>
<t>
The translator SHOULD make sure that the packets belonging to the
same flow leave the translator in the same order in which they
arrived.
</t>
<section anchor="header64"
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. In addition, if the translator is
at an administrative boundary, the filtering and update
considerations of <xref target="RFC2475"></xref> may be
applicable.</t>
<t hangText="Total Length:">Payload length value from IPv6 header,
plus the size of the IPv4 header.</t>
<t hangText="Identification:">
All zero.
In order to avoid black holes caused by ICMPv4 filtering or non
<xref target="RFC2460"></xref>
compatible IPv6 hosts (a workaround discussed in <xref target="icmp6-tbg"/>),
the translator MAY provide a function such as if the packet size
is equal to or smaller than 1280 bytes and greater than 88 bytes,
generate the identification value. The translator SHOULD provide
a method for operators to enable or disable this function.
</t>
<t hangText="Flags:">
The More Fragments flag is set to zero. The Don't
Fragments flag is set to one.
In order to avoid black holes caused by ICMPv4 filtering or non
<xref target="RFC2460"></xref>
compatible IPv6 hosts (a workaround discussed in <xref target="icmp6-tbg"/>),
the translator
MAY provide a function such as if the packet size is equal to or smaller than
1280 bytes and greater than 88 bytes, the Don't Fragments (DF) flag
is set to zero, otherwise the Don't Fragments (DF) flag is set to one.
The translator SHOULD provide a method for operators to enable or
disable this function.
</t>
<t hangText="Fragment Offset:">All zeros.</t>
<t hangText="Time to Live:">
Time to Live is derived from Hop Limit value in 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) MUST check for zero and send the ICMPv4 "TTL Exceeded" or ICMPv6 "Hop Limit
Exceeded" error.</t>
<t hangText="Protocol:">
The IPv6-Frag (44) header is handled as discussed in
<xref target="ipv6-fragment"/>.
ICMPv6 (58) is changed to ICMPv4 (1), and the
payload is translated as discussed in <xref target="icmp64"/>.
The IPv6
headers HOPOPT (0), IPv6-Route (43), and IPv6-Opts (60) are skipped
over during processing as they have no meaning in IPv4. For the
first 'next header' that does not match one of the cases above, its
next header value (which contains the transport protocol number) is
copied to the protocol field in the IPv4 header. This means that
all transport protocols are translated.
<list style="hanging">
<t hangText="Note:">
Some translated protocols will fail at the receiver
for various reasons: some are known to fail when
translated (e.g., IPsec AH (51)), and others will fail
checksum validation if the address translation is not
checksum neutral
<xref target="I-D.ietf-behave-address-format"></xref>
and the translator does not update the transport
protocol's checksum (because the translator doesn't
support recalculating the checksum for that
transport protocol, see <xref target="transport64"/>).
</t>
</list>
</t>
<t hangText="Header Checksum:">Computed once the IPv4 header has
been created.</t>
<t hangText="Source Address:">In the stateless mode, which is to say
that if the IPv6 source address is within the range of a configured
IPv6 translation prefix, the IPv4 source address is derived from the
IPv6 source address
per <xref target="I-D.ietf-behave-address-format"/> Section 2.1.
Note that the original IPv6 source address is an IPv4-translatable address.
A workflow example of stateless translation is shown in Appendix of this document.
If the translator only supports stateless mode and
if the IPv6 source address is not within the range of configured IPv6
prefix(es),
the translator SHOULD drop the packet and respond with an ICMPv6 Type=1, Code=5 (Destination
Unreachable, Source address failed ingress/egress policy).
<vspace blankLines="1" /> In the
stateful mode, which is to say that if the IPv6 source address is
not within the range of any configured IPv6 stateless translation prefix, the IPv4
source address and transport-layer source port corresponding to
the IPv4-related IPv6 source address and source port are derived
from the Binding
Information Bases (BIBs) as described in <xref target="I-D.ietf-behave-v6v4-xlate-stateful"/>.
<vspace blankLines="1" />
In stateless and stateful modes, if the translator gets an illegal source address (e.g. ::1,
etc.), the translator SHOULD silently drop the packet.
</t>
<t hangText="Destination Address:">
The IPv4 destination address is derived from the
IPv6 destination address of the datagram being translated
per <xref target="I-D.ietf-behave-address-format"/> Section 2.1.
Note that the original IPv6 destination address is an IPv4-converted address.
</t>
</list></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>
<section anchor="ipv6-fragment" title="IPv6 Fragment Processing">
<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 IPv4 More Fragments (MF) flag is copied from the M
flag in the IPv6 Fragment header. The IPv4 Don't Fragments (DF)
flag is cleared (set to zero) allowing this packet to be further
fragmented by IPv4 routers.
</t>
<t hangText="Fragment Offset:">
Copied from the Fragment Offset field of the
IPv6 Fragment header.
</t>
<t hangText="Protocol:">
For ICMPv6 (58) changed to ICMPv4 (1), otherwise
skip extension headers, Next Header field copied from the last IPv6 header.
</t>
</list></t>
<t>
If a translated packet with DF set to 1 will be larger than the MTU of
the next-hop interface, then the translator MUST drop the packet and send
the ICMPv6 "Packet Too Big" (Type 2/Code 0) error message to the IPv6
host with an adjusted MTU in the ICMPv6 message.
</t>
</section>
</section>
<section anchor="icmp64"
title="Translating ICMPv6 Headers into ICMPv4 Headers">
<t>
If a non-checksum neutral translation address is being used,
ICMPv6 messages MUST have their ICMPv4 checksum field be updated
as part of the translation since ICMPv6 (unlike ICMPv4) includes a
pseudo-header in the checksum just like UDP and TCP.
</t>
<t>In addition all ICMP packets MUST have the Type value translated
and, for ICMP error messages, the included IP header also MUST be translated.
Note that the IPv6 addresses in the IPv6 header may not
be IPv4-translatable addresses and there will be no corresponding
IPv4 addresses representing this IPv6 address.
In this case, the translator can do stateful translation.
A mechanism by which the translator can instead do
stateless translation of this address is left for future work.
</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 values to 8 and 0, 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, and adjust the ICMP checksum both to
take the type/code change into account and to exclude the ICMPv6
pseudo-header. <vspace blankLines="1" /> Translate the Code field as follows:
<list style="hanging">
<t hangText="Code 0 (no route to destination):">Set Code value
to 1 (Host unreachable).</t>
<t
hangText="Code 1 (Communication with destination administratively prohibited):">Set
Code value to 10 (Communication with destination host
administratively prohibited).</t>
<t hangText="Code 2 (Beyond scope of source address):">Set
Code value to 1 (Host unreachable). Note that this error is very
unlikely since an IPv4-translatable source address is typically
considered to have global scope.</t>
<t hangText="Code 3 (Address unreachable):">Set Code value to 1
(Host unreachable).</t>
<t hangText="Code 4 (Port unreachable):">Set Code value to 3
(Port unreachable).</t>
<t hangText="Other Code values:">
Silently drop.
</t>
</list></t>
<t hangText="Packet Too Big (Type 2):">Translate to an ICMPv4
Destination Unreachable (Type 3) with Code value equal to 4,
and
adjust the ICMPv4 checksum both to take the type change into
account and to exclude the ICMPv6 pseudo-header. The MTU field MUST 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, i.e. minimum(advertised MTU-20, MTU_of_IPv4_nexthop, (MTU_of_IPv6_nexthop)-20).
</t>
<t>
See also the requirements in <xref target="icmp6-tbg"/>.
</t>
<t hangText="Time Exceeded (Type 3):">Set the Type value to 11,
and
adjust the ICMPv4 checksum both to take the type change into
account and to exclude the ICMPv6 pseudo-header.
The
Code field is unchanged.</t>
<t hangText="Parameter Problem (Type 4):"> Translate the Type and Code field as follows,
and
adjust the ICMPv4 checksum both to take the type/code change into
account and to exclude the ICMPv6 pseudo-header.
<vspace blankLines="1" /> Translate the Code field as
follows:
<list style="hanging">
<t hangText="Code 0 (Erroneous header field encountered):">
Set Type 12, Code 0 and update the pointer as defined in Figure 6 (If the Original
IPv6 Pointer Value is not listed or the Translated
IPv4 Pointer Value is listed as "n/a", silently drop the packet).
</t>
<t hangText="Code 1 (Unrecognized Next Header type encountered):">
Translate this to an
ICMPv4 protocol unreachable (Type 3, Code 2).
</t>
<t hangText="Code 2 (Unrecognized IPv6 option encountered):">
Silently drop.
</t>
</list>
</t>
<t hangText="Unknown error messages:">Silently drop.</t>
<t>
<figure anchor="appendix-462" title="Pointer Value for translating from IPv6 to IPv4">
<artwork align="center"><![CDATA[
| Original IPv6 Pointer Value | Translated IPv4 Pointer Value |
+--------------------------------+--------------------------------+
| 0 | Version/Traffic Class | 0 | Version/IHL, Type Of Ser |
| 1 | Traffic Class/Flow Label | 1 | Type Of Service |
| 2,3 | Flow Label | n/a | |
| 4,5 | Payload Length | 2 | Total Length |
| 6 | Next Header | 9 | Protocol |
| 7 | Hop Limit | 8 | Time to Live |
| 8-23| Source Address | 12 | Source Address |
|24-39| Destination Address | 16 | Destination Address |
+--------------------------------+--------------------------------+
]]></artwork>
</figure>
</t>
<t hangText="ICMP Error Payload:">
If the received ICMPv6 packet contains an ICMPv6 Extension
<xref target="RFC4884"></xref>,
the translation of the ICMPv6 packet will cause the ICMPv4 packet
to change length. When this occurs, the ICMPv6 Extension length
attribute MUST be adjusted accordingly (e.g., shorter due to the
translation from IPv6 to IPv4).
For extensions not defined in
<xref target="RFC4884"></xref>,
the translator passes the extensions as opaque bit strings and
those containing IPv6 address literals will not have those
addresses translated to IPv4 address literals; this may
cause problems with processing of those ICMP extensions.
</t>
</list></t>
</list></t>
</section>
<section anchor="error64"
title="Translating ICMPv6 Error Messages into ICMPv4">
<t>There are some differences between the ICMPv4 and the ICMPv6 error
message formats as detailed above. The ICMP error
messages containing the packet in error MUST
be translated just like a normal IP packet. 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 MUST 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 invoking
the function that translated the outer IP headers.
This process MUST stop at first embedded header and drop the packet
if it contains more.
Note that the IPv6 addresses in the IPv6 header may not
be IPv4-translatable addresses and there will be no corresponding
IPv4 addresses.
In this case, the translator can do stateful translation.
A mechanism by which the translator can instead do
stateless translation is left for future work.
</t>
</section>
<section anchor="sending-icmp6" title="Generation of ICMPv6 Error Message">
<t>
If the IPv6 packet is discarded, then the translator SHOULD send back an ICMPv6 error message to the original sender of the packet,
unless the discarded packet is itself an ICMPv6 message.
</t>
<t>If the ICMPv6 error message is being sent because the IPv6 source
address is not an IPv4-translatable address and the translator is stateless, the ICMPv6
message, if sent, MUST have a Type value of 1 and Code value of 5 (Source
address failed ingress/egress policy). In other cases,
the ICMPv6 message MUST have a Type value of 1 (Destination Unreachable) and a Code value of 1 (Communication with destination administratively prohibited),
unless otherwise specified in this document or
<xref target="I-D.ietf-behave-v6v4-xlate-stateful"/>.
The translator SHOULD allow an administrator to configure whether the ICMPv6 error messages are sent, rate-limited, or not sent.
</t>
</section>
<section anchor="transport64" title="Transport-layer Header Translation">
<t>
If the address translation algorithm is not checksum neutral
(Section 4.1 of
<xref target="I-D.ietf-behave-address-format"/>),
the
recalculation and updating of the transport-layer headers which
contain pseudo headers need to be performed. Translators MUST do this for TCP, UDP
and ICMP.
</t>
<!-- <t>
For UDP, if an IPv6 UDP packet arrives with a 0 checksum, a UDP
checksum SHOULD NOT be generated for that IPv4 packet. Otherwise,
the translator SHOULD recalculate and update the transport-layer checksum.
The translator MAY have a configuration option permitting it to zero
the UDP checksum in some or all traffic.
</t> -->
<t>
Other transport protocols (e.g., DCCP) are OPTIONAL to support.
In order to ease debugging and troubleshooting, translators MUST
forward all transport protocols as described in the "Protocol" step
of <xref target="header64"/>.
</t>
</section>
<section anchor="when64" title="Knowing When to Translate">
<t>
If the IP/ICMP translator also provides a normal forwarding function,
and the destination address is reachable by a
more specific route without translation, the router MUST forward it
without translating it. When an IP/ICMP translator receives an IPv6
datagram addressed to an IPv6 address representing a host in the IPv4 domain, the
IPv6 packet MUST be translated to IPv4.
</t>
</section>
</section>
<section anchor="icmp6-tbg" title="Special Considerations for ICMPv6 Packet Too Big">
<t>
Two recent studies analyzed the behavior of IPv6-capable web
servers on the Internet and found that approximately 95% responded
as expected to an IPv6 Packet Too Big that indicated MTU=1280, but
only 43% responded as expected to an IPv6 Packet Too Big that
indicated an MTU < 1280. It is believed firewalls violating Section
4.3.1 of <xref target="RFC4890"></xref>
are at fault. These failures will both cause
Path MTU Discovery (PMTUD) black holes
<xref target="RFC2923"></xref>.
Unfortunately the
translator cannot improve the failure rate of the first case (MTU = 1280),
but the translator can improve the failure rate of the second case
(MTU < 1280). There are two approaches to resolving the problem with
sending ICMPv6 messages indicating an MTU < 1280. It SHOULD
be possible to configure a translator for either of the two
approaches.
</t>
<t>
The first approach is to constrain the deployment of the IPv6/IPv4
translator by observing that four of the scenarios intended for
stateless IPv6/IPv4 translators do not have IPv6 hosts on the
Internet (Scenarios 1, 2, 5 and 6 described in
<xref target="I-D.ietf-behave-v6v4-framework"/>,
which refer to "An IPv6
network"). In these scenarios IPv6 hosts, IPv6 host-based
firewalls, and IPv6 network firewalls can be administered in
compliance with Section 4.3.1 of
<xref target="RFC4890"></xref>
and therefore avoid the
problem witnessed with IPv6 hosts on the Internet.
</t>
<t>
The second approach is necessary if the translator has IPv6 hosts,
IPv6 host-based firewalls, or IPv6 network firewalls that do not
(or cannot) comply with Section 5 of
<xref target="RFC2460"></xref>
-- such as IPv6
hosts on the Internet. This approach requires the translator to
do the following:
<list style="numbers">
<t>
in the IPv4 to IPv6 direction: if the MTU value of
ICMPv4 Packet Too Big messages is less than 1280, change it
to 1280. This is intended to cause the IPv6 host and IPv6
firewall to process the ICMP PTB message and generate
subsequent packets to this destination with an IPv6
fragmentation header.
<vspace blankLines="1" />
Note: Based on recent studies, this is effective for
95% of IPv6 hosts on the Internet.
<vspace blankLines="1" />
</t>
<t>
in the IPv6 to IPv4 direction:
<list style="letters">
<t>
if there is a Fragment header in the IPv6 packet,
the last 16 bits of its value MUST be used for the
IPv4 identification value.
</t>
<t>
if there is no Fragment header in the IPv6 packet:
<list style="letters">
<t>
if the packet is less than or equal to 1280 bytes:
<list style="symbols">
<t>
the translator SHOULD set DF to 0 and generate
an IPv4 identification value.
</t>
<t>
To avoid the problems described in [RFC4963], it
is RECOMMENDED the translator maintain 3-tuple
state for generating the IPv4 identification value.
</t>
</list>
</t>
<t>
if the packet is greater than 1280 bytes, the
translator SHOULD set the IPv4 DF bit to 1.
</t>
</list>
</t>
</list>
</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 that are used
to make the packets reach the translator.</t>
<t>
There are potential issues that might arise by deriving an IPv4 address from
an IPv6 address - particularly addresses like broadcast or loopback addresses
and the non IPv4-translatable IPv6 addresses, etc. The
<xref target="I-D.ietf-behave-address-format"/>
addresses these issues.
</t>
<!-- <t>As the Authentication Header <xref target="RFC4302"></xref> is
specified to include the IPv4 Identification field and the translating
function is not able to always preserve the Identification field, it
is not possible for an IPv6 endpoint to verify the 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 MUST be able to generate an inner IPv4 header when
transmitting packets and remove such an IPv4 header when receiving
packets.</t> -->
<t>
As with network address translation of IPv4 to IPv4, the IPsec
Authentication Header
<xref target="RFC4302"></xref>
cannot be used across an IPv6
to IPv4 translator.
</t>
<t>
As with network address translation of IPv4 to IPv4, packets with
tunnel mode ESP can be translated since tunnel mode ESP does not
depend on header fields prior to the ESP header. Similarly,
transport mode ESP will fail with IPv6 to IPv4 translation
unless checksum neutral addresses are used. In both cases,
the IPsec ESP endpoints will normally detect the presence of
the translator and encapsulate ESP in UDP packets
<xref target="RFC3948"></xref>.
</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 Alexey Melnikov, Andrew Sullivan, Andrew
Yourtchenko, Brian Carpenter, Dan Wing, Dave Thaler, David Harrington, Ed Jankiewicz,
Hiroshi Miyata, Iljitsch van Beijnum, Jari Arkko, Jerry Huang,
John Schnizlein, Jouni Korhonen, Kentaro Ebisawa,
Kevin Yin, Magnus Westerlund, Marcelo Bagnulo Braun, Margaret Wasserman, Masahito Endo,
Phil Roberts, Philip Matthews, Reinaldo Penno, Remi Denis-Courmont, Remi Despres,
Sean Turner, Senthil Sivakumar,
Simon Perreault, Stewart Bryant, Tim Polk, Tero Kivinen and
Zen Cao.</t>
</section>
<section anchor="Appendix" title="Appendix: Stateless translation workflow example">
<t>
A stateless translation workflow example is depicted in the following figure. The
documentation address blocks 2001:db8::/32
<xref target="RFC3849"></xref>,
192.0.2.0/24 and 198.51.100.0/24
<xref target="RFC5737"></xref>
are used in this example.
<figure anchor="work-flow-example">
<artwork align="center"><![CDATA[
+--------------+ +--------------+
| IPv4 network | | IPv6 network |
| | +-------+ | |
| +----+ |-----| XLAT |---- | +----+ |
| | H4 |-----| +-------+ |--| H6 | |
| +----+ | | +----+ |
+--------------+ +--------------+
]]></artwork>
</figure>
</t>
<t>
A translator (XLAT) connects the IPv6 network to the IPv4 network.
This XLAT uses the Network Specific Prefix (NSP) 2001:db8:100::/40
defined in
<xref target="I-D.ietf-behave-address-format"/>
to represent IPv4 addresses
in the IPv6 address space (IPv4-converted addresses) and to represent
IPv6 addresses (IPv4-translatable addresses) in the IPv4 address space.
In this example, 192.0.2.0/24 is the IPv4 block of the corresponding IPv4-translatable
addresses.
</t>
<t>
Based on the address mapping rule, the IPv6 node H6 has an
IPv4-translatable IPv6 address 2001:db8:1c0:2:21::
(address mapping from 192.0.2.33). The IPv4 node H4 has
IPv4 address 198.51.100.2.
</t>
<t>
The IPv6 routing is configured in such a way that the
IPv6 packets addressed to a destination address in
2001:db8:100::/40 are routed to the IPv6 interface of the XLAT.
</t>
<t>
The IPv4 routing is configured in such a way that the
IPv4 packets addressed to a destination address in
192.0.2.0/24 are routed to the IPv4 interface of the XLAT.
</t>
<section anchor="h6" title="H6 establishes communication with H4">
<t>
The steps by which H6 establishes communication with H4 are:
<list style="numbers">
<t>
H6 performs the destination address mapping, so the IPv4-converted
address 2001:db8:1c6:3364:200:: is formed from 198.51.100.2 based on
the address mapping algorithm
<xref target="I-D.ietf-behave-address-format"/>.
</t>
<t>
H6 sends a packet to H4. The packet is sent from a source address
2001:db8:1c0:2:21:: to a destination address 2001:db8:1c6:3364:200::.
</t>
<t>
The packet is routed to the IPv6 interface of the XLAT
(since IPv6 routing is configured that way).
</t>
<t>
The XLAT receives the packet and performs the following actions:
<list style="symbols">
<t>
The XLAT translates the IPv6 header into an IPv4 header using
the IP/ICMP Translation Algorithm defined in this document.
</t>
<t>
The XLAT includes 192.0.2.33 as source address in the packet
and 198.51.100.2 as destination address in the packet.
Note that 192.0.2.33 and 198.51.100.2 are extracted directly from
the source IPv6 address 2001:db8:1c0:2:21:: (IPv4-translatable address)
and destination IPv6 address 2001:db8:1c6:3364:200::
(IPv4-converted address) of the received IPv6 packet that is
being translated.
</t>
</list>
</t>
<t>
The XLAT sends the translated packet out its IPv4 interface
and the packet arrives at H4.
</t>
<t>
H4 node responds by sending a packet with destination
address 192.0.2.33 and source address 198.51.100.2.
</t>
<t>
The packet is routed to the IPv4 interface of the XLAT
(since IPv4 routing is configured that way). The XLAT
performs the following operations:
<list style="symbols">
<t>
The XLAT translates the IPv4 header into an IPv6 header
using the IP/ICMP Translation Algorithm defined in this
document.
</t>
<t>
The XLAT includes 2001:db8:1c0:2:21:: as destination
address in the packet and 2001:db8:1c6:3364:200::
as source address in the packet. Note that 2001:db8:1c0:2:21::
and 2001:db8:1c6:3364:200:: are formed directly from the destination
IPv4 address 192.0.2.33 and source IPv4 address 198.51.100.2 of
the received IPv4 packet that is being translated.
</t>
</list>
</t>
<t>
The translated packet is sent out the IPv6 interface to H6.
</t>
</list>
</t>
<t>
The packet exchange between H6 and H4 continues until
the session is finished.
</t>
</section>
<section anchor="h4" title="H4 establishes communication with H6">
<t>
The steps by which H4 establishes communication with H6 are:
<list style="numbers">
<t>
H4 performs the destination address mapping,
so 192.0.2.33 is formed from IPv4-translatable address
2001:db8:1c0:2:21:: based on the address mapping algorithm <xref target="I-D.ietf-behave-address-format"/>.
</t>
<t>
H4 sends a packet to H6. The packet is sent from a source
address 198.51.100.2 to a destination address 192.0.2.33.
</t>
<t>
The packet is routed to the IPv4 interface of the XLAT
(since IPv4 routing is configured that way).
</t>
<t>
The XLAT receives the packet and performs the following actions:
<list style="symbols">
<t>
The XLAT translates the IPv4 header into an IPv6 header using
the IP/ICMP Translation Algorithm defined in this document.
</t>
<t>
The XLAT includes 2001:db8:1c6:3364:200:: as source address
in the packet and 2001:db8:1c0:2:21:: as destination address
in the packet. Note that 2001:db8:1c6:3364:200::
(IPv4-converted address) and 2001:db8:1c0:2:21::
(IPv4-translatable address) are obtained directly from
the source IPv4 address 198.51.100.2 and destination IPv4
address 192.0.2.33 of the received IPv4 packet that
is being translated.
</t>
</list>
</t>
<t>
The XLAT sends the translated packet out its IPv6 interface
and the packet arrives at H6.
</t>
<t>
H6 node responds by sending a packet with destination
address 2001:db8:1c6:3364:200:: and source
address 2001:db8:1c0:2:21::.
</t>
<t>
The packet is routed to the IPv6 interface of the
XLAT (since IPv6 routing is configured that way).
The XLAT performs the following operations:
<list style="symbols">
<t>
The XLAT translates the IPv6 header into an IPv4
header using the IP/ICMP Translation Algorithm
defined in this document.
</t>
<t>
The XLAT includes 198.51.100.2 as destination address in the packet
and 192.0.2.33 as source address in the packet.
Note that 198.51.100.2 and 192.0.2.33 are formed directly from
the destination IPv6 address 2001:db8:1c6:3364:200:: and
source IPv6 address 2001:db8:1c0:2:21:: of the received
IPv6 packet that is being translated.
</t>
</list>
</t>
<t>
The translated packet is sent out the IPv4 interface to H4.
</t>
</list>
</t>
<t>
The packet exchange between H4 and H6 continues until the session finished.
</t>
</section>
</section>
</middle>
<back>
<!-- references split to informative and normative -->
<references title="Normative References">
<?rfc include="reference.RFC.0768" ?>
<?rfc include="reference.RFC.0791" ?>
<?rfc include="reference.RFC.0792" ?>
<?rfc include="reference.RFC.0793" ?>
<?rfc include="reference.RFC.2119" ?>
<?rfc include="reference.RFC.1812" ?>
<?rfc include="reference.RFC.1883" ?>
<?rfc include="reference.RFC.2460" ?>
<?rfc include="reference.RFC.2765" ?>
<?rfc include="reference.RFC.4340" ?>
<?rfc include="reference.RFC.4291" ?>
<?rfc include="reference.RFC.4443" ?>
<?rfc include="reference.RFC.5382" ?>
<?rfc include="reference.RFC.4884" ?>
<?rfc include="reference.RFC.5771" ?>
<?rfc include="reference.RFC.3948" ?>
<?rfc include="reference.I-D.ietf-behave-v6v4-xlate-stateful" ?>
<?rfc include="reference.I-D.ietf-behave-address-format" ?>
</references>
<references title="Informative References">
<?rfc include="reference.I-D.ietf-behave-v6v4-framework" ?>
<?rfc include="reference.RFC.0879" ?>
<?rfc include="reference.RFC.1191" ?>
<?rfc include="reference.RFC.2474" ?>
<?rfc include="reference.RFC.2475" ?>
<?rfc include="reference.RFC.2710" ?>
<?rfc include="reference.RFC.2923" ?>
<?rfc include="reference.RFC.3307" ?>
<?rfc include="reference.RFC.3590" ?>
<?rfc include="reference.RFC.3810" ?>
<?rfc include="reference.RFC.3849" ?>
<?rfc include="reference.RFC.4890" ?>
<?rfc include="reference.RFC.5737" ?>
<?rfc include="reference.RFC.2766" ?>
<?rfc include="reference.RFC.4302" ?>
<?rfc include="reference.RFC.4963" ?>
</references>
</back>
</rfc>
| PAFTECH AB 2003-2026 | 2026-04-23 15:53:33 |