Internet Engineering Task Force (IETF) X. Li Request for Comments: 6145 C. Bao Obsoletes: 2765 CERNET Center/Tsinghua Category: Standards Track University ISSN: 2070-1721 F. Baker Cisco Systems April 2011
Internet Engineering Task Force (IETF) X. Li Request for Comments: 6145 C. Bao Obsoletes: 2765 CERNET Center/Tsinghua Category: Standards Track University ISSN: 2070-1721 F. Baker Cisco Systems April 2011
IP/ICMP Translation Algorithm
IP/ICMP转换算法
Abstract
摘要
This document describes the Stateless IP/ICMP Translation Algorithm (SIIT), which translates between IPv4 and IPv6 packet headers (including ICMP headers). This document obsoletes RFC 2765.
本文档描述了无状态IP/ICMP转换算法(SIIT),该算法在IPv4和IPv6数据包头(包括ICMP头)之间进行转换。本文件淘汰了RFC 2765。
Status of This Memo
关于下段备忘
This is an Internet Standards Track document.
这是一份互联网标准跟踪文件。
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.
本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 5741第2节。
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc6145.
有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc6145.
Copyright Notice
版权公告
Copyright (c) 2011 IETF Trust and the persons identified as the document authors. All rights reserved.
版权所有(c)2011 IETF信托基金和确定为文件作者的人员。版权所有。
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。
This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.
本文件可能包含2008年11月10日之前发布或公开的IETF文件或IETF贡献中的材料。控制某些材料版权的人员可能未授予IETF信托允许在IETF标准流程之外修改此类材料的权利。在未从控制此类材料版权的人员处获得充分许可的情况下,不得在IETF标准流程之外修改本文件,也不得在IETF标准流程之外创建其衍生作品,除了将其格式化以RFC形式发布或将其翻译成英语以外的其他语言。
Table of Contents
目录
1. Introduction and Motivation . . . . . . . . . . . . . . . . . 3 1.1. IPv4-IPv6 Translation Model . . . . . . . . . . . . . . . 3 1.2. Applicability and Limitations . . . . . . . . . . . . . . 3 1.3. Stateless vs. Stateful Mode . . . . . . . . . . . . . . . 4 1.4. Path MTU Discovery and Fragmentation . . . . . . . . . . . 5 2. Changes from RFC 2765 . . . . . . . . . . . . . . . . . . . . 5 3. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 6 4. Translating from IPv4 to IPv6 . . . . . . . . . . . . . . . . 6 4.1. Translating IPv4 Headers into IPv6 Headers . . . . . . . . 7 4.2. Translating ICMPv4 Headers into ICMPv6 Headers . . . . . . 10 4.3. Translating ICMPv4 Error Messages into ICMPv6 . . . . . . 13 4.4. Generation of ICMPv4 Error Message . . . . . . . . . . . . 14 4.5. Transport-Layer Header Translation . . . . . . . . . . . . 14 4.6. Knowing When to Translate . . . . . . . . . . . . . . . . 15 5. Translating from IPv6 to IPv4 . . . . . . . . . . . . . . . . 15 5.1. Translating IPv6 Headers into IPv4 Headers . . . . . . . . 17 5.1.1. IPv6 Fragment Processing . . . . . . . . . . . . . . . 19 5.2. Translating ICMPv6 Headers into ICMPv4 Headers . . . . . . 20 5.3. Translating ICMPv6 Error Messages into ICMPv4 . . . . . . 22 5.4. Generation of ICMPv6 Error Messages . . . . . . . . . . . 23 5.5. Transport-Layer Header Translation . . . . . . . . . . . . 24 5.6. Knowing When to Translate . . . . . . . . . . . . . . . . 24 6. Special Considerations for ICMPv6 Packet Too Big . . . . . . . 24 7. Security Considerations . . . . . . . . . . . . . . . . . . . 25 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 26 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 26 9.1. Normative References . . . . . . . . . . . . . . . . . . . 26 9.2. Informative References . . . . . . . . . . . . . . . . . . 28 Appendix A. Stateless Translation Workflow Example . . . . . . . 30 A.1. H6 Establishes Communication with H4 . . . . . . . . . . . 30 A.2. H4 Establishes Communication with H6 . . . . . . . . . . . 32
1. Introduction and Motivation . . . . . . . . . . . . . . . . . 3 1.1. IPv4-IPv6 Translation Model . . . . . . . . . . . . . . . 3 1.2. Applicability and Limitations . . . . . . . . . . . . . . 3 1.3. Stateless vs. Stateful Mode . . . . . . . . . . . . . . . 4 1.4. Path MTU Discovery and Fragmentation . . . . . . . . . . . 5 2. Changes from RFC 2765 . . . . . . . . . . . . . . . . . . . . 5 3. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 6 4. Translating from IPv4 to IPv6 . . . . . . . . . . . . . . . . 6 4.1. Translating IPv4 Headers into IPv6 Headers . . . . . . . . 7 4.2. Translating ICMPv4 Headers into ICMPv6 Headers . . . . . . 10 4.3. Translating ICMPv4 Error Messages into ICMPv6 . . . . . . 13 4.4. Generation of ICMPv4 Error Message . . . . . . . . . . . . 14 4.5. Transport-Layer Header Translation . . . . . . . . . . . . 14 4.6. Knowing When to Translate . . . . . . . . . . . . . . . . 15 5. Translating from IPv6 to IPv4 . . . . . . . . . . . . . . . . 15 5.1. Translating IPv6 Headers into IPv4 Headers . . . . . . . . 17 5.1.1. IPv6 Fragment Processing . . . . . . . . . . . . . . . 19 5.2. Translating ICMPv6 Headers into ICMPv4 Headers . . . . . . 20 5.3. Translating ICMPv6 Error Messages into ICMPv4 . . . . . . 22 5.4. Generation of ICMPv6 Error Messages . . . . . . . . . . . 23 5.5. Transport-Layer Header Translation . . . . . . . . . . . . 24 5.6. Knowing When to Translate . . . . . . . . . . . . . . . . 24 6. Special Considerations for ICMPv6 Packet Too Big . . . . . . . 24 7. Security Considerations . . . . . . . . . . . . . . . . . . . 25 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 26 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 26 9.1. Normative References . . . . . . . . . . . . . . . . . . . 26 9.2. Informative References . . . . . . . . . . . . . . . . . . 28 Appendix A. Stateless Translation Workflow Example . . . . . . . 30 A.1. H6 Establishes Communication with H4 . . . . . . . . . . . 30 A.2. H4 Establishes Communication with H6 . . . . . . . . . . . 32
This document is a product of the 2008-2010 effort to define a replacement for NAT-PT [RFC2766] (which was changed to Historic status when [RFC4966] was published in 2007). It is directly derived from Erik Nordmark's "Stateless IP/ICMP Translation Algorithm (SIIT)" [RFC2765], which provides stateless translation between IPv4 [RFC0791] and IPv6 [RFC2460], and between ICMPv4 [RFC0792] and ICMPv6 [RFC4443]. This document obsoletes RFC 2765 [RFC2765]. The changes from RFC 2765 [RFC2765] are listed in Section 2.
This document is a product of the 2008-2010 effort to define a replacement for NAT-PT [RFC2766] (which was changed to Historic status when [RFC4966] was published in 2007). It is directly derived from Erik Nordmark's "Stateless IP/ICMP Translation Algorithm (SIIT)" [RFC2765], which provides stateless translation between IPv4 [RFC0791] and IPv6 [RFC2460], and between ICMPv4 [RFC0792] and ICMPv6 [RFC4443]. This document obsoletes RFC 2765 [RFC2765]. The changes from RFC 2765 [RFC2765] are listed in Section 2.
Readers of this document are expected to have read and understood the framework described in [RFC6144]. Implementations of this IPv4/IPv6 translation specification MUST also support the address translation algorithms in [RFC6052]. Implementations MAY also support stateful translation [RFC6146].
本文件的读者应已阅读并理解[RFC6144]中所述的框架。此IPv4/IPv6转换规范的实现还必须支持[RFC6052]中的地址转换算法。实现还可以支持状态转换[RFC6146]。
The translation model consists of two or more network domains connected by one or more IP/ICMP translators (XLATs) as shown in Figure 1.
翻译模型由一个或多个IP/ICMP转换器(XLAT)连接的两个或多个网络域组成,如图1所示。
--------- --------- // \\ // \\ / +----+ \ | |XLAT| | XLAT: IP/ICMP | IPv4 +----+ IPv6 | Translator | Domain | | Domain | | | | | \ | | / \\ // \\ // -------- ---------
--------- --------- // \\ // \\ / +----+ \ | |XLAT| | XLAT: IP/ICMP | IPv4 +----+ IPv6 | Translator | Domain | | Domain | | | | | \ | | / \\ // \\ // -------- ---------
Figure 1: IPv4-IPv6 Translation Model
图1:IPv4-IPv6转换模型
The scenarios of the translation model are discussed in [RFC6144].
翻译模型的场景在[RFC6144]中讨论。
This document specifies the translation algorithms between IPv4 packets and IPv6 packets.
本文档指定IPv4数据包和IPv6数据包之间的转换算法。
As with [RFC2765], the translating function specified in this document does not translate any IPv4 options, and it does not translate IPv6 extension headers except the Fragment Header.
与[RFC2765]一样,本文档中指定的转换函数不会转换任何IPv4选项,也不会转换除片段头之外的IPv6扩展头。
The issues and algorithms in the translation of datagrams containing TCP segments are described in [RFC5382].
[RFC5382]中描述了包含TCP段的数据报翻译中的问题和算法。
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.
不包含UDP校验和的分段IPv4 UDP数据包(即UDP校验和字段为零)在Internet中没有重要用途,通常不会被IP/ICMP转换器翻译。但是,当转换器配置为转发不带UDP校验和的数据包时,将转换分段的IPv4 UDP数据包。
Fragmented ICMP/ICMPv6 packets will not be translated by the IP/ICMP translator.
IP/ICMP转换器不会翻译零碎的ICMP/ICMPv6数据包。
The IP/ICMP header translation specified in this document is consistent with requirements of multicast IP/ICMP headers. However, IPv4 multicast addresses [RFC5771] cannot be mapped to IPv6 multicast addresses [RFC3307] based on the unicast mapping rule [RFC6052].
本文档中指定的IP/ICMP标头翻译与多播IP/ICMP标头的要求一致。但是,无法根据单播映射规则[RFC6052]将IPv4多播地址[RFC5771]映射到IPv6多播地址[RFC3307]。
An IP/ICMP translator has two possible modes of operation: stateless and stateful [RFC6144]. 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.
IP/ICMP转换器有两种可能的操作模式:无状态和有状态[RFC6144]。在这两种情况下,我们假设具有IPv4地址但没有IPv6地址的系统(节点或应用程序)正在与具有IPv6地址但没有IPv4地址的系统通信,或者这两个系统没有连续的路由连接,因此被迫转换其通信。
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 are 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.
在无状态模式下,特定IPv6地址范围将表示IPv4系统(IPv4转换地址),IPv6系统具有可通过算法映射到服务提供商IPv4地址子集的地址(IPv4可翻译地址)。请注意,IPv4可翻译地址是IPv4转换地址的子集。一般来说,不需要关心转换表,因为IPv4和IPv6对应项在算法上是相关的。
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 [RFC4291] 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.
在有状态模式下,特定IPv6地址范围将表示IPv4系统(IPv4转换的地址),但IPv6系统可以使用除该范围外的任何IPv6地址[RFC4291]。在这种情况下,需要转换表将IPv6系统的地址绑定到转换器中维护的IPv4地址。
The address translation mechanisms for the stateless and the stateful translations are defined in [RFC6052].
[RFC6052]中定义了无状态和有状态转换的地址转换机制。
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 Maximum Segment Size (MSS) option [RFC0879]. 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.
由于IPv4和IPv6报头的大小不同,分别为20+个八位字节和40个八位字节,因此处理最大数据包大小对于IPv4/IPv6转换器的操作至关重要。有三种机制来处理此问题:路径MTU发现(PMTUD)、分段和传输层协商,如TCP最大段大小(MSS)选项[RFC0879]。请注意,转换器必须充当路由器,即当数据包大小超过下一跳接口的MTU时,转换器必须发送数据包过大错误消息或对数据包进行分段。
Don't Fragment, ICMP Packet Too Big, and packet fragmentation are discussed in Sections 4 and 5 of this document. The reassembling of fragmented packets in the stateful translator is discussed in [RFC6146], since it requires state maintenance in the translator.
本文档第4节和第5节讨论了不要分段、ICMP数据包太大和数据包分段。[RFC6146]中讨论了有状态转换器中碎片数据包的重新组装,因为它需要转换器中的状态维护。
The changes from RFC 2765 are the following:
RFC 2765的变化如下:
1. Redescribing the network model to map to present and projected usage. The scenarios, applicability, and limitations originally presented in RFC 2765 [RFC2765] are moved to the framework document [RFC6144].
1. 重新描述网络模型以映射到当前和预计的使用情况。最初在RFC 2765[RFC2765]中提出的场景、适用性和限制已移至框架文档[RFC6144]。
2. Moving the address format to the address format document [RFC6052], to coordinate with other documents on the topic.
2. 将地址格式移动到地址格式文档[RFC6052],以与主题上的其他文档协调。
3. 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 the stateful translation document [RFC6146].
3. 描述无状态和有状态操作的头转换。有状态转换的会话数据库和映射表处理的详细信息见有状态转换文档[RFC6146]。
4. Having refined the header translation, fragmentation handling, ICMP translation and ICMP error translation in the IPv4-to-IPv6 direction, as well as the IPv6-to-IPv4 direction.
4. 在IPv4-to-IPv6方向以及IPv6-to-IPv4方向上改进了标头转换、碎片处理、ICMP转换和ICMP错误转换。
5. Adding more discussion on transport-layer header translation.
5. 添加有关传输层标头转换的更多讨论。
6. Adding Section 5.1.1 for "IPv6 Fragment Processing".
6. 增加第5.1.1节“IPv6片段处理”。
7. Adding Section 6 for "Special Considerations for ICMPv6 Packet Too Big".
7. 增加第6节“ICMPv6数据包过大的特殊注意事项”。
8. Updating Section 7 for "Security Considerations".
8. 更新第7节“安全考虑”。
9. Adding Appendix A "Stateless translation workflow example".
9. 添加附录A“无状态翻译工作流示例”。
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 [RFC2119].
本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照[RFC2119]中所述进行解释。
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 is 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.
当IP/ICMP转换器接收到发往IPv6域的目标的IPv4数据报时,它会将该数据包的IPv4报头转换为IPv6报头。数据包上的原始IPv4标头将被删除并替换为IPv6标头,并且传输校验和将根据需要更新(如果转换器支持该传输)。数据包的数据部分保持不变。然后,IP/ICMP转换器根据IPv6目标地址转发数据包。
+-------------+ +-------------+ | IPv4 | | IPv6 | | Header | | Header | +-------------+ +-------------+ | Transport- | | Fragment | | Layer | ===> | Header | | Header | | (if needed) | +-------------+ +-------------+ | | | Transport- | ~ Data ~ | Layer | | | | Header | +-------------+ +-------------+ | | ~ Data ~ | | +-------------+
+-------------+ +-------------+ | IPv4 | | IPv6 | | Header | | Header | +-------------+ +-------------+ | Transport- | | Fragment | | Layer | ===> | Header | | Header | | (if needed) | +-------------+ +-------------+ | | | Transport- | ~ Data ~ | Layer | | | | Header | +-------------+ +-------------+ | | ~ Data ~ | | +-------------+
Figure 2: IPv4-to-IPv6 Translation
图2:IPv4到IPv6的转换
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.
路径MTU发现在IPv6中是必需的,但在IPv4中是可选的。IPv6路由器从不对数据包进行碎片化——只有发送方可以进行碎片化。
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
当IPv4节点执行路径MTU发现时(通过在标头中设置不分段(DF)位),路径MTU发现可以端到端操作,即跨转换器。在这种情况下,IPv4或IPv6路由器(包括转换器)可能会向发送方发回过大的ICMP数据包消息。当IPv6路由器发送这些ICMPv6错误时,它们将通过一个将
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.
将ICMPv6错误转换为IPv4发送方可以理解的格式。因此,仅当IPv4数据包已被分段时,才会包含IPv6片段头。
However, when the IPv4 sender does not set the 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 Fragment Headers) so that it fits in 1280-byte IPv6 packets, since that is the minimum IPv6 MTU. The IPv6 Fragment 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 bytes). This will help reduce the chance of including the Fragment Header in the packets.
但是,当IPv4发送方未设置DF位时,转换器必须确保数据包不超过IPv6端的路径MTU。这是通过对IPv4数据包(带有片段头)进行分段来实现的,这样它就可以容纳1280字节的IPv6数据包,因为这是最小的IPv6 MTU。由于防火墙碎片支持有限等原因,IPv6碎片头在实践中会导致操作困难。在网络由拥有/操作转换器的同一实体拥有/操作的环境中,转换器可以为网络管理员提供配置功能,以将最小IPv6 MTU的阈值调整为反映网络中最小IPv6 MTU的实际值(大于1280字节)的值。这将有助于减少在数据包中包含片段头的机会。
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 Fragment Header for the non-fragmented IPv6 packets.
当IPv4发送方未设置DF位时,转换器应始终包含IPv6片段头,以指示发送方允许分段。转换器可以提供配置功能,允许转换器不包括非分段IPv6分组的分段报头。
The rules in Section 4.1 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 Section 4.1 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).
第4.1节中的规则确保当数据包被发送方或IPv4路由器分割时,片段标识的低阶16位被端到端地传送,确保数据包被正确地重新组装。此外,第4.1节中的规则使用IPv6片段头的存在来指示发送方可能未使用路径MTU发现(即,如果数据包稍后被翻译回IPv4,则不应设置DF标志)。
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.
除了处理片段和路径MTU发现的特殊规则外,数据包头的实际翻译包括以下定义的简单翻译。请注意,为了翻译ICMPv4错误消息的内容并添加ICMPv6伪报头校验和,ICMPv4数据包需要特殊处理。
The translator SHOULD make sure that the packets belonging to the same flow leave the translator in the same order in which they arrived.
翻译器应确保属于同一流的数据包以它们到达的相同顺序离开翻译器。
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
如果未设置DF标志,并且IPv4数据包将导致IPv6数据包大于1280字节,则该数据包应分段,以便生成的IPv6数据包(每个分段添加分段标头)将小于或等于1280字节。例如,如果数据包
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.
如果在转换之前已分段,则应分段IPv4数据包,使其长度(不包括IPv4标头)最多为1232字节(IPv6标头为1280减去40,片段标头为8)。如果管理员知道网络中最小IPv6 MTU的实际值,转换器可以为网络管理员提供配置功能,以将最小IPv6 MTU的阈值调整为大于1280字节的值。然后使用下面描述的逻辑独立地翻译生成的片段。
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.
如果设置了DF位且下一跳接口的MTU小于IPv4数据包的总长度值加20,则转换器必须向IPv4源地址发送ICMPv4“需要碎片”错误消息。
If the DF bit is set and the packet is not a fragment (i.e., the More Fragments (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:
如果设置了DF位且数据包不是片段(即未设置更多片段(MF)标志且片段偏移量等于零),则转换器不应向生成的数据包添加片段头。IPv6标头字段设置如下:
Version: 6
版本:6
Traffic Class: By default, copied from the IP Type Of Service (TOS) octet. According to [RFC2474], 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 [RFC2475] may be applicable.
流量类别:默认情况下,从IP服务类型(TOS)八位字节复制。根据[RFC2474],在IPv4和IPv6中,位的语义是相同的。但是,在某些IPv4环境中,这些字段可能与“服务类型和优先级”的旧语义一起使用。转换器的实现应支持一个管理上可配置的选项,以忽略IPv4 TOS,并始终将IPv6流量类(TC)设置为零。此外,如果翻译人员处于管理边界,则[RFC2475]的过滤和更新注意事项可能适用。
Flow Label: 0 (all zero bits)
流标签:0(所有零位)
Payload Length: Total length value from the IPv4 header, minus the size of the IPv4 header and IPv4 options, if present.
有效负载长度:IPv4标头的总长度值减去IPv4标头和IPv4选项(如果存在)的大小。
Next Header: For ICMPv4 (1), it is changed to ICMPv6 (58); otherwise, the protocol field MUST be copied from the IPv4 header.
下一个标题:对于ICMPv4(1),它更改为ICMPv6(58);否则,必须从IPv4标头复制协议字段。
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.
跃点限制:跃点限制源自IPv4标头中的TTL值。由于转换器是路由器,作为转发数据包的一部分,它需要减少IPv4 TTL(转换前)或IPv6跃点限制(转换后)。作为减少TTL或跃点限制的一部分,转换器(作为任何路由器)必须检查零并发送ICMPv4“TTL超出”或ICMPv6“跃点限制超出”错误。
Source Address: The IPv4-converted address derived from the IPv4 source address per [RFC6052], Section 2.3.
源地址:根据[RFC6052]第2.3节从IPv4源地址派生的IPv4转换地址。
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 [RFC1812]).
如果翻译器获得非法源地址(例如,0.0.0.0、127.0.0.1等),翻译器应自动丢弃数据包(如[RFC1812]第5.3.7节所述)。
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 [RFC6052], Section 2.3. A workflow example of stateless translation is shown in Appendix A of this document.
目标地址:在无状态模式下,也就是说,如果IPv4目标地址在配置的IPv4无状态转换前缀范围内,则IPv6目标地址是根据[RFC6052]第2.3节从IPv4目标地址派生的IPv4可转换地址。无状态翻译的工作流示例如本文档附录A所示。
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 [RFC6146].
在有状态模式下(也就是说,如果IPv4目标地址不在任何配置的IPv4无状态转换前缀的范围内),IPv6目标地址和相应的传输层目标端口将从绑定信息库(BIB)派生在转换器中反映当前会话状态,如[RFC6146]所述。
If any IPv4 options are present in the IPv4 packet, they 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.
如果IPv4数据包中存在任何IPv4选项,则必须忽略这些选项并正常转换数据包;没有人试图转换这些选项。但是,如果存在未过期的源路由选项,则必须丢弃数据包,并且应将ICMPv4“目的地不可访问,源路由失败”(类型3,代码5)错误消息返回给发送方。
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:
如果需要添加片段标头(未设置DF位或数据包是片段),则标头字段的设置如上所述,但以下例外情况除外:
IPv6 fields:
IPv6字段:
Payload Length: Total length value from the IPv4 header, plus 8 for the Fragment Header, minus the size of the IPv4 header and IPv4 options, if present.
有效负载长度:IPv4标头的总长度值,加上片段标头的8,减去IPv4标头的大小和IPv4选项(如果存在)。
Next Header: Fragment Header (44).
下一个标题:片段标题(44)。
Fragment Header fields:
片段头字段:
Next Header: For ICMPv4 (1), it is changed to ICMPv6 (58); otherwise, the protocol field MUST be copied from the IPv4 header.
下一个标题:对于ICMPv4(1),它更改为ICMPv6(58);否则,必须从IPv4标头复制协议字段。
Fragment Offset: Fragment Offset copied from the IPv4 header.
片段偏移量:从IPv4标头复制的片段偏移量。
M flag: More Fragments bit copied from the IPv4 header.
M标志:从IPv4标头复制了更多位碎片。
Identification: The low-order 16 bits copied from the Identification field in the IPv4 header. The high-order 16 bits set to zero.
标识:从IPv4报头中的标识字段复制的低阶16位。将高阶16位设置为零。
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.
所有要翻译的ICMPv4消息都要求ICMPv6校验和字段作为翻译的一部分进行计算,因为ICMPv6与ICMPv4不同,它与UDP和TCP一样具有伪报头校验和。
In addition, all ICMPv4 packets MUST have the Type translated and, for ICMPv4 error messages, the included IP header also MUST be translated.
此外,所有ICMPv4数据包必须转换类型,对于ICMPv4错误消息,还必须转换包含的IP头。
The actions needed to translate various ICMPv4 messages are as follows:
翻译各种ICMPv4消息所需的操作如下:
ICMPv4 query messages:
ICMPv4查询消息:
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.
Echo和Echo Reply(类型8和类型0):分别将类型值调整为128和129,并调整ICMP校验和,以考虑类型更改并包括ICMPv6伪头。
Information Request/Reply (Type 15 and Type 16): Obsoleted in ICMPv6. Silently drop.
信息请求/回复(类型15和类型16):在ICMPv6中被淘汰。静静地落下。
Timestamp and Timestamp Reply (Type 13 and Type 14): Obsoleted in ICMPv6. Silently drop.
时间戳和时间戳回复(类型13和类型14):在ICMPv6中被淘汰。静静地落下。
Address Mask Request/Reply (Type 17 and Type 18): Obsoleted in ICMPv6. Silently drop.
地址掩码请求/应答(类型17和类型18):在ICMPv6中被淘汰。静静地落下。
ICMP Router Advertisement (Type 9): Single-hop message. Silently drop.
ICMP路由器广告(类型9):单跳消息。静静地落下。
ICMP Router Solicitation (Type 10): Single-hop message. Silently drop.
ICMP路由器请求(类型10):单跳消息。静静地落下。
Unknown ICMPv4 types: Silently drop.
未知的ICMPv4类型:静默删除。
IGMP messages: While the Multicast Listener Discovery (MLD) messages [RFC2710] [RFC3590] [RFC3810] 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
IGMP消息:虽然多播侦听器发现(MLD)消息[RFC2710][RFC3590][RFC3810]是IPv4 IGMP消息的逻辑IPv6对应项,但所有“正常”IGMP消息都是单跳消息,应该由转换器无声地丢弃。其他IGMP消息可能由
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.
多播路由协议,并且,由于试图在IP/ICMP转换器之间建立路由器邻接将是一个配置错误,因此这些数据包也应该被静默地丢弃。
ICMPv4 error messages:
ICMPv4错误消息:
Destination Unreachable (Type 3): Translate the Code as described below, set the Type to 1, and adjust the ICMP checksum both to take the type/code change into account and to include the ICMPv6 pseudo-header.
无法到达目的地(类型3):按如下所述翻译代码,将类型设置为1,并调整ICMP校验和,以考虑类型/代码更改并包括ICMPv6伪标头。
Translate the Code as follows:
将代码翻译如下:
Code 0, 1 (Net Unreachable, Host Unreachable): Set the Code to 0 (No route to destination).
代码0,1(无法访问网络,无法访问主机):将代码设置为0(没有到目标的路由)。
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.
代码2(无法访问协议):转换为ICMPv6参数问题(类型4,代码1),并使指针指向IPv6下一个标头字段。
Code 3 (Port Unreachable): Set the Code to 4 (Port unreachable).
代码3(端口不可访问):将代码设置为4(端口不可访问)。
Code 4 (Fragmentation Needed and DF was Set): Translate to an ICMPv6 Packet Too Big message (Type 2) with Code 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 [RFC1191], then the translator MUST use the plateau values specified in [RFC1191] 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.)
代码4(需要分段且已设置DF):转换为代码设置为0的ICMPv6数据包太大消息(类型2)。MTU字段必须根据IPv4和IPv6报头大小之间的差异进行调整,即最小值(播发的MTU+20,MTU of_IPv6_nexthop,(MTU of_IPv4_nexthop)+20)。请注意,如果IPv4路由器将MTU字段设置为零,即路由器未实现[RFC1191],则转换器必须使用[RFC1191]中指定的平台值来确定可能的路径MTU,并将该路径MTU包括在ICMPv6数据包中。(使用小于返回的总长度字段的最大平台值。)
See also the requirements in Section 6.
另见第6节中的要求。
Code 5 (Source Route Failed): Set the Code to 0 (No route to destination). Note that this error is unlikely since source routes are not translated.
代码5(源路由失败):将代码设置为0(没有到目标的路由)。请注意,由于未转换源路由,因此不太可能出现此错误。
Code 6, 7, 8: Set the Code to 0 (No route to destination).
代码6、7、8:将代码设置为0(没有到目的地的路线)。
Code 9, 10 (Communication with Destination Host Administratively Prohibited): Set the Code to 1 (Communication with destination administratively prohibited).
代码9、10(与目标主机的通信被行政禁止):将代码设置为1(与目标主机的通信被行政禁止)。
Code 11, 12: Set the Code to 0 (No route to destination).
代码11、12:将代码设置为0(没有到目的地的路线)。
Code 13 (Communication Administratively Prohibited): Set the Code to 1 (Communication with destination administratively prohibited).
代码13(通信管理禁止):将代码设置为1(与目标通信管理禁止)。
Code 14 (Host Precedence Violation): Silently drop.
代码14(主机优先级冲突):自动删除。
Code 15 (Precedence cutoff in effect): Set the Code to 1 (Communication with destination administratively prohibited).
代码15(生效的优先切断):将代码设置为1(与目标的通信被行政禁止)。
Other Code values: Silently drop.
其他代码值:静默删除。
Redirect (Type 5): Single-hop message. Silently drop.
重定向(类型5):单跳消息。静静地落下。
Alternative Host Address (Type 6): Silently drop.
备用主机地址(类型6):自动删除。
Source Quench (Type 4): Obsoleted in ICMPv6. Silently drop.
源淬火(类型4):在ICMPv6中被淘汰。静静地落下。
Time Exceeded (Type 11): Set the Type to 3, and adjust the ICMP checksum both to take the type change into account and to include the ICMPv6 pseudo-header. The Code is unchanged.
超出时间(类型11):将类型设置为3,并调整ICMP校验和,以考虑类型更改并包括ICMPv6伪标头。代码保持不变。
Parameter Problem (Type 12): Set the Type to 4, and adjust the ICMP checksum both to take the type/code change into account and to include the ICMPv6 pseudo-header.
参数问题(类型12):将类型设置为4,并调整ICMP校验和,以考虑类型/代码更改并包括ICMPv6伪标头。
Translate the Code as follows:
将代码翻译如下:
Code 0 (Pointer indicates the error): Set the Code 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.)
代码0(指针指示错误):将代码设置为0(遇到错误的头字段),并按照图3中的定义更新指针。(如果原始IPv4指针值未列出,或转换后的IPv6指针值列为“n/a”,则以静默方式丢弃数据包。)
Code 1 (Missing a required option): Silently drop.
代码1(缺少必需的选项):自动删除。
Code 2 (Bad length): Set the Code 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.)
代码2(错误长度):将代码设置为0(遇到错误的头字段),并按照图3中的定义更新指针。(如果原始IPv4指针值未列出,或转换后的IPv6指针值列为“n/a”,则以静默方式丢弃数据包。)
Other Code values: Silently drop.
其他代码值:静默删除。
Unknown ICMPv4 types: Silently drop.
未知的ICMPv4类型:静默删除。
+--------------------------------+--------------------------------+ | 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 | +--------------------------------+--------------------------------+
+--------------------------------+--------------------------------+ | 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 | +--------------------------------+--------------------------------+
Figure 3: Pointer Value for Translating from IPv4 to IPv6
图3:用于从IPv4转换到IPv6的指针值
ICMP Error Payload: If the received ICMPv4 packet contains an ICMPv4 Extension [RFC4884], 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 [RFC4884], 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.
ICMP错误有效负载:如果收到的ICMPv4数据包包含ICMPv4扩展[RFC4884],ICMPv4数据包的转换将导致ICMPv6数据包更改长度。出现这种情况时,必须相应地调整ICMPv6扩展长度属性(例如,由于从IPv4到IPv6的转换而变长)。如果ICMPv4扩展超出传出接口上ICMPv6消息的最大大小,则只需截断ICMPv4扩展。对于[RFC4884]中未定义的扩展,转换器将扩展作为不透明位字符串传递,而包含IPv4地址文本的扩展将不会将这些地址转换为IPv6地址文本;这可能会导致处理这些ICMP扩展时出现问题。
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
如上所述,ICMPv4和ICMPv6错误消息格式之间存在一些差异。包含出错数据包的ICMP错误消息必须像正常IP数据包一样进行翻译。如果此“错误数据包”的翻译更改了
length of the datagram, the Total Length field in the outer IPv6 header MUST be updated.
数据报的长度,必须更新外部IPv6标头中的总长度字段。
+-------------+ +-------------+ | IPv4 | | IPv6 | | Header | | Header | +-------------+ +-------------+ | ICMPv4 | | ICMPv6 | | Header | | Header | +-------------+ +-------------+ | IPv4 | ===> | IPv6 | | Header | | Header | +-------------+ +-------------+ | Partial | | Partial | | Transport- | | Transport- | | Layer | | Layer | | Header | | Header | +-------------+ +-------------+
+-------------+ +-------------+ | IPv4 | | IPv6 | | Header | | Header | +-------------+ +-------------+ | ICMPv4 | | ICMPv6 | | Header | | Header | +-------------+ +-------------+ | IPv4 | ===> | IPv6 | | Header | | Header | +-------------+ +-------------+ | Partial | | Partial | | Transport- | | Transport- | | Layer | | Layer | | Header | | Header | +-------------+ +-------------+
Figure 4: IPv4-to-IPv6 ICMP Error Translation
图4:IPv4到IPv6 ICMP错误转换
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 embedded headers.
内部IP头的转换可以通过调用转换外部IP头的函数来完成。此进程必须在第一个嵌入头处停止,如果数据包包含更多嵌入头,则丢弃该数据包。
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 of 3 (Destination Unreachable) and a Code of 13 (Communication Administratively Prohibited), unless otherwise specified in this document or in [RFC6146]. The translator SHOULD allow an administrator to configure whether the ICMPv4 error messages are sent, rate-limited, or not sent.
如果IPv4数据包被丢弃,那么转换器应该能够将ICMPv4错误消息发送回数据包的原始发送者,除非丢弃的数据包本身是ICMPv4消息。除非本文件或[RFC6146]中另有规定,否则ICMPv4消息(如果发送)的类型为3(无法到达目的地),代码为13(行政禁止通信)。转换器应允许管理员配置ICMPv4错误消息是已发送、速率受限还是未发送。
If the address translation algorithm is not checksum neutral (see Section 4.1 of [RFC6052]), the recalculation and updating of the transport-layer headers that contain pseudo-headers need 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).
如果地址转换算法不是校验和中性的(参见[RFC6052]第4.1节),则需要重新计算和更新包含伪报头的传输层报头。对于TCP和ICMP数据包以及包含UDP校验和的UDP数据包(即UDP校验和字段不为零),转换器必须执行此操作。
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:
对于不包含UDP校验和的UDP数据包(即UDP校验和字段为零),转换器应提供配置功能,以允许:
1. Dropping the packet and generating a system management event that specifies at least the IP addresses and port numbers of the packet.
1. 丢弃数据包并生成系统管理事件,该事件至少指定数据包的IP地址和端口号。
2. Calculating an IPv6 checksum and forwarding the packet (which has performance implications).
2. 计算IPv6校验和并转发数据包(这会影响性能)。
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 that specifies at least the IP addresses and port numbers in the packet.
无状态转换器无法计算分段数据包的UDP校验和,因此当无状态转换器接收到分段UDP IPv4数据包的第一个片段且校验和字段为零时,转换器应丢弃数据包并生成一个系统管理事件,该事件至少指定数据包中的IP地址和端口号。
For a stateful translator, the handling of fragmented UDP IPv4 packets with a zero checksum is discussed in [RFC6146]), Section 3.1.
对于有状态转换器,[RFC6146]第3.1节讨论了使用零校验和处理分段UDP IPv4数据包。
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 Section 4.1.
其他传输协议(如DCCP)是可选的。为了简化调试和故障排除,翻译人员必须转发第4.1节“下一个标题”步骤中描述的所有传输协议。
If the IP/ICMP translator also provides a 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.
如果IP/ICMP转换器还提供正常的转发功能,并且目标IPv4地址可以通过更具体的路由访问而无需翻译,则转换器必须转发而无需翻译。否则,当IP/ICMP转换器接收到一个IPv4数据报,该数据报发往表示IPv6域中主机的IPv4目标时,该数据包必须转换为IPv6。
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 [RFC4443], TCP [RFC0793], UDP [RFC0768], and DCCP [RFC4340] 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
当IP/ICMP转换器接收到指向IPv4域的目标的IPv6数据报时,它将接收到的IPv6数据包的IPv6报头转换为IPv4报头。数据包上的原始IPv6标头将被删除并替换为IPv4标头。由于ICMPv6[RFC4443]、TCP[RFC0793]、UDP[RFC0768]和DCCP[RFC4340]报头包含覆盖IP报头的校验和,如果地址映射算法不是校验和中性的,则必须在转换和ICMP及传输层之前评估校验和
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.
必须更新标题。数据包的数据部分保持不变。然后,IP/ICMP转换器根据IPv4目标地址转发数据包。
+-------------+ +-------------+ | IPv6 | | IPv4 | | Header | | Header | +-------------+ +-------------+ | Fragment | | Transport | | Header | ===> | Layer | |(if present) | | Header | +-------------+ +-------------+ | Transport | | | | Layer | ~ Data ~ | Header | | | +-------------+ +-------------+ | | ~ Data ~ | | +-------------+
+-------------+ +-------------+ | IPv6 | | IPv4 | | Header | | Header | +-------------+ +-------------+ | Fragment | | Transport | | Header | ===> | Layer | |(if present) | | Header | +-------------+ +-------------+ | Transport | | | | Layer | ~ Data ~ | Header | | | +-------------+ +-------------+ | | ~ Data ~ | | +-------------+
Figure 5: IPv6-to-IPv4 Translation
图5:IPv6到IPv4的转换
There are some differences between IPv6 and IPv4 (in the areas 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 [RFC2460] (for IPv6's 1280-octet minimum MTU) and Section 5 of [RFC1883] (for IPv6's previous 576-octet minimum MTU).
IPv6和IPv4之间存在一些影响转换的差异(在碎片和最小链路MTU方面)。IPv6链路的MTU必须为1280字节或更大。IPv4的相应限制为68字节。跨转换器的路径MTU发现依赖于IPv6主机接收和处理的ICMP数据包过大消息,包括表明MTU小于IPv6最小MTU的ICMP数据包过大。[RFC2460]第5节(适用于IPv6的1280个八位字节最小MTU)和[RFC1883]第5节(适用于IPv6以前的576个八位字节最小MTU)中描述了此要求。
In an environment where an ICMPv4 Packet Too Big message is translated to an ICMPv6 Packet Too Big message, 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 Fragment 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).
在将ICMPv4数据包过大消息转换为ICMPv6数据包过大消息的环境中,ICMPv6数据包过大消息成功传送到IPv6主机并由IPv6主机正确处理(例如,拥有/操作转换器的同一实体拥有/操作的网络),转换器可以依靠IPv6主机使用IPv6片段头将后续数据包发送到同一IPv6目标。在这种环境中,当转换器接收到带有片段头的IPv6数据包时,转换器应为所有IPv6片段(MF=0或MF=1)生成带有清除的“不分段”位的IPv4数据包,以及来自IPv6片段头的标识值。
In an environment where an ICMPv4 Packet Too Big message is 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 [RFC2923] if there are IPv4 links smaller than 1260 octets, this is considered safer than causing IPv4 reassembly errors [RFC4963].
如果ICMPv4数据包过大消息被过滤(由网络防火墙或主机本身过滤)或未被IPv6主机正确处理,IPv6主机将永远不会生成带有IPv6片段头的IPv6数据包。在这样的环境中,转换器应该设置IPv4不分段位。如果存在小于1260个八位字节的IPv4链路,则设置“不分段”位可能会创建PMTUD黑洞[RFC2923],这被认为比导致IPv4重新组装错误[RFC4963]更安全。
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.
除了处理片段和路径MTU发现的特殊规则外,数据包头的实际翻译包括以下定义的简单翻译。请注意,ICMPv6数据包需要特殊处理,以便转换ICMPv6错误消息的内容,并删除ICMPv6伪报头校验和。
The translator SHOULD make sure that the packets belonging to the same flow leave the translator in the same order in which they arrived.
翻译器应确保属于同一流的数据包以它们到达的相同顺序离开翻译器。
If there is no IPv6 Fragment Header, the IPv4 header fields are set as follows:
如果没有IPv6片段头,则IPv4头字段设置如下:
Version: 4
版本:4
Internet Header Length: 5 (no IPv4 options)
Internet标头长度:5(无IPv4选项)
Type of Service (TOS) Octet: By default, copied from the IPv6 Traffic Class (all 8 bits). According to [RFC2474], 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 [RFC2475] may be applicable.
服务类型(TOS)八位字节:默认情况下,从IPv6流量类复制(全部8位)。根据[RFC2474],在IPv4和IPv6中,位的语义是相同的。但是,在某些IPv4环境中,这些位可能与“服务类型和优先级”的旧语义一起使用。转换器的实现应提供忽略IPv6流量类的能力,并始终将IPv4 TOS八位字节设置为指定值。此外,如果翻译人员处于管理边界,则[RFC2475]的过滤和更新注意事项可能适用。
Total Length: Payload length value from the IPv6 header, plus the size of the IPv4 header.
总长度:IPv6标头的有效负载长度值加上IPv4标头的大小。
Identification: All zero. In order to avoid black holes caused by ICMPv4 filtering or non-[RFC2460]-compatible IPv6 hosts (a workaround is discussed in Section 6), the translator MAY provide a function to generate the identification value if the packet size is greater than 88 bytes and less than or equal to 1280 bytes.
标识:全部为零。为了避免ICMPv4过滤或非[RFC2460]兼容IPv6主机造成的黑洞(第6节讨论了解决方法),如果数据包大小大于88字节且小于或等于1280字节,转换器可以提供生成标识值的功能。
The translator SHOULD provide a method for operators to enable or disable this function.
转换器应为操作员提供启用或禁用此功能的方法。
Flags: The More Fragments flag is set to zero. The Don't Fragment (DF) flag is set to one. In order to avoid black holes caused by ICMPv4 filtering or non-[RFC2460]-compatible IPv6 hosts (a workaround is discussed in Section 6), the translator MAY provide a function as follows. If the packet size is greater than 88 bytes and less than or equal to 1280 bytes, it sets the DF flag to zero; otherwise, it sets the DF flag to one. The translator SHOULD provide a method for operators to enable or disable this function.
标志:更多碎片标志设置为零。不分段(DF)标志设置为1。为了避免ICMPv4过滤或非[RFC2460]兼容IPv6主机造成的黑洞(第6节讨论了解决方法),转换器可以提供如下功能。如果数据包大小大于88字节且小于或等于1280字节,则将DF标志设置为零;否则,它将DF标志设置为1。转换器应为操作员提供启用或禁用此功能的方法。
Fragment Offset: All zeros.
片段偏移:全部为零。
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.
生存时间:生存时间源自IPv6标头中的跃点限制值。由于转换器是路由器,作为转发数据包的一部分,它需要减少IPv6跃点限制(转换之前)或IPv4 TTL(转换之后)。作为减少TTL或跃点限制的一部分,转换器(作为任何路由器)必须检查零并发送ICMPv4“TTL超出”或ICMPv6“跃点限制超出”错误。
Protocol: The IPv6-Frag (44) header is handled as discussed in Section 5.1.1. ICMPv6 (58) is changed to ICMPv4 (1), and the payload is translated as discussed in Section 5.2. 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.
协议:IPv6 Frag(44)头的处理如第5.1.1节所述。将ICMPv6(58)更改为ICMPv4(1),并按照第5.2节中的讨论转换有效负载。IPv6头HOPOPT(0)、IPv6路由(43)和IPv6选项(60)在处理过程中被跳过,因为它们在IPv4中没有任何意义。对于与上述情况之一不匹配的第一个“下一个标头”,其下一个标头值(包含传输协议编号)将复制到IPv4标头中的协议字段。这意味着所有传输协议都被转换。
Note: Some translated protocols will fail at the receiver for various reasons: some are known to fail when translated (e.g., IPsec Authentication Header (51)), and others will fail checksum validation if the address translation is not checksum neutral [RFC6052] 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 Section 5.5).
注意:一些翻译后的协议在接收器处会因各种原因而失败:一些协议在翻译时会失败(例如,IPsec身份验证头(51)),如果地址翻译不是校验和中立的[RFC6052],并且转换器不会更新传输协议的校验和,则其他协议的校验和验证会失败(因为转换器不支持重新计算该传输协议的校验和;请参阅第5.5节)。
Header Checksum: Computed once the IPv4 header has been created.
标头校验和:创建IPv4标头后计算。
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 [RFC6052], Section 2.3. Note that the
源地址:在无状态模式下(也就是说,如果IPv6源地址在配置的IPv6转换前缀范围内),IPv4源地址根据[RFC6052]第2.3节从IPv6源地址派生。请注意
original IPv6 source address is an IPv4-translatable address. A workflow example of stateless translation is shown in Appendix A 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 "Destination Unreachable, Source address failed ingress/egress policy" (Type 1, Code 5).
原始IPv6源地址是IPv4可翻译地址。无状态翻译的工作流示例如本文档附录A所示。如果转换器仅支持无状态模式,并且IPv6源地址不在配置的IPv6前缀范围内,则转换器应丢弃数据包并使用ICMPv6“目标不可访问,源地址失败的入口/出口策略”(类型1,代码5)进行响应。
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 [RFC6146].
在有状态模式下,也就是说,如果IPv6源地址不在任何配置的IPv6无状态转换前缀的范围内,则与IPv4相关的IPv6源地址和源端口对应的IPv4源地址和传输层源端口从绑定信息库(BIB)派生,如中所述[RFC6146]。
In stateless and stateful modes, if the translator gets an illegal source address (e.g., ::1, etc.), the translator SHOULD silently drop the packet.
在无状态和有状态模式下,如果翻译器获得非法的源地址(例如::1等),翻译器应该默默地丢弃数据包。
Destination Address: The IPv4 destination address is derived from the IPv6 destination address of the datagram being translated per [RFC6052], Section 2.3. Note that the original IPv6 destination address is an IPv4-converted address.
目标地址:IPv4目标地址源自根据[RFC6052]第2.3节翻译的数据报的IPv6目标地址。请注意,原始IPv6目标地址是经过IPv4转换的地址。
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.
如果存在具有非零段左字段的路由报头,则不得翻译数据包,并且应将ICMPv6“遇到参数问题/错误报头字段”(类型4,代码0)错误消息(指针字段指示段左字段的第一个字节)返回给发送方。
If the IPv6 packet contains a Fragment Header, the header fields are set as above with the following exceptions:
如果IPv6数据包包含片段标头,则标头字段的设置如上所述,但以下例外情况除外:
Total Length: Payload length value from IPv6 header, minus 8 for the Fragment Header, plus the size of the IPv4 header.
Total Length:IPv6标头的有效负载长度值,片段标头减去8,再加上IPv4标头的大小。
Identification: Copied from the low-order 16 bits in the Identification field in the Fragment Header.
标识:从片段头中标识字段的低位16位复制。
Flags: The IPv4 More Fragments (MF) flag is copied from the M flag in the IPv6 Fragment Header. The IPv4 Don't Fragment (DF) flag is cleared (set to zero), allowing this packet to be further fragmented by IPv4 routers.
标志:IPv4更多片段(MF)标志从IPv6片段头中的M标志复制而来。IPv4不分段(DF)标志被清除(设置为零),允许IPv4路由器进一步分段此数据包。
Fragment Offset: Copied from the Fragment Offset field of the IPv6 Fragment Header.
片段偏移量:从IPv6片段头的片段偏移量字段复制。
Protocol: For ICMPv6 (58), it is changed to ICMPv4 (1); otherwise, extension headers are skipped, and the Next Header field is copied from the last IPv6 header.
协议:对于ICMPv6(58),将其更改为ICMPv4(1);否则,将跳过扩展标头,并从上一个IPv6标头复制下一个标头字段。
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.
如果DF设置为1的已翻译数据包将大于下一跳接口的MTU,则转换器必须丢弃该数据包并将ICMPv6数据包过大(类型2,代码0)错误消息发送到IPv6主机,并在ICMPv6消息中调整MTU。
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.
如果使用非校验和中性转换地址,则ICMPv6消息的ICMPv4校验和字段必须作为转换的一部分进行更新,因为ICMPv6(与ICMPv4不同)在校验和中包含伪头,就像UDP和TCP一样。
In addition, all ICMP packets MUST have the Type 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.
此外,所有ICMP数据包都必须转换类型,对于ICMP错误消息,还必须转换包含的IP头。请注意,IPv6标头中的IPv6地址可能不是IPv4可翻译地址,并且不会有表示此IPv6地址的相应IPv4地址。在这种情况下,译者可以进行有状态翻译。翻译人员可以通过一种机制对该地址进行无状态翻译,这将留待以后的工作。
The actions needed to translate various ICMPv6 messages are:
翻译各种ICMPv6消息所需的操作包括:
ICMPv6 informational messages:
ICMPv6信息性消息:
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.
Echo Request和Echo Reply(类型128和129):分别将类型值调整为8和0,并调整ICMP校验和,以考虑类型更改并排除ICMPv6伪头。
MLD Multicast Listener Query/Report/Done (Type 130, 131, 132): Single-hop message. Silently drop.
MLD多播侦听器查询/报告/完成(类型130、131、132):单跳消息。静静地落下。
Neighbor Discover messages (Type 133 through 137): Single-hop message. Silently drop.
邻居发现消息(类型133到137):单跳消息。静静地落下。
Unknown informational messages: Silently drop.
未知信息消息:静默删除。
ICMPv6 error messages:
ICMPv6错误消息:
Destination Unreachable (Type 1) Set the Type to 3, and adjust the ICMP checksum both to take the type/code change into account and to exclude the ICMPv6 pseudo-header.
目标不可到达(类型1)将类型设置为3,并调整ICMP校验和,以考虑类型/代码更改并排除ICMPv6伪标头。
Translate the Code as follows:
将代码翻译如下:
Code 0 (No route to destination): Set the Code to 1 (Host unreachable).
代码0(没有到目的地的路由):将代码设置为1(无法访问主机)。
Code 1 (Communication with destination administratively prohibited): Set the Code to 10 (Communication with destination host administratively prohibited).
代码1(与目标主机的通信被行政禁止):将代码设置为10(与目标主机的通信被行政禁止)。
Code 2 (Beyond scope of source address): Set the Code to 1 (Host unreachable). Note that this error is very unlikely since an IPv4-translatable source address is typically considered to have global scope.
代码2(超出源地址范围):将代码设置为1(无法访问主机)。请注意,由于IPv4可翻译源地址通常被视为具有全局作用域,因此此错误不太可能发生。
Code 3 (Address unreachable): Set the Code to 1 (Host unreachable).
代码3(地址不可访问):将代码设置为1(主机不可访问)。
Code 4 (Port unreachable): Set the Code to 3 (Port unreachable).
代码4(端口不可访问):将代码设置为3(端口不可访问)。
Other Code values: Silently drop.
其他代码值:静默删除。
Packet Too Big (Type 2): Translate to an ICMPv4 Destination Unreachable (Type 3) with Code 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).
数据包太大(类型2):转换为代码为4的ICMPv4目标不可访问(类型3),并调整ICMPv4校验和,以考虑类型更改并排除ICMPv6伪标头。必须针对IPv4和IPv6报头大小之间的差异调整MTU字段,同时考虑出错的数据包是否包含片段报头,即最小值(播发的MTU-20、IPv4的MTU-nexthop、(IPv6的MTU-nexthop)-20)。
See also the requirements in Section 6.
另见第6节中的要求。
Time Exceeded (Type 3): Set the Type to 11, and adjust the ICMPv4 checksum both to take the type change into account and to exclude the ICMPv6 pseudo-header. The Code is unchanged.
超出时间(类型3):将类型设置为11,并调整ICMPv4校验和,以考虑类型更改并排除ICMPv6伪标头。代码保持不变。
Parameter Problem (Type 4): Translate the Type and Code as follows, and adjust the ICMPv4 checksum both to take the type/ code change into account and to exclude the ICMPv6 pseudo-header.
参数问题(类型4):按如下方式转换类型和代码,并调整ICMPv4校验和,以考虑类型/代码更改并排除ICMPv6伪头。
Translate the Code as follows:
将代码翻译如下:
Code 0 (Erroneous header field encountered): Set to 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.)
代码0(遇到错误的标题字段):设置为类型12,代码0,并按照图6中的定义更新指针。(如果原始IPv6指针值未列出,或转换后的IPv4指针值列为“n/a”,则以静默方式丢弃数据包。)
Code 1 (Unrecognized Next Header type encountered): Translate this to an ICMPv4 protocol unreachable (Type 3, Code 2).
代码1(遇到无法识别的下一个标头类型):将其转换为无法访问的ICMPv4协议(类型3,代码2)。
Code 2 (Unrecognized IPv6 option encountered): Silently drop.
代码2(遇到无法识别的IPv6选项):自动删除。
Unknown error messages: Silently drop.
未知错误消息:自动删除。
+--------------------------------+--------------------------------+ | 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 | +--------------------------------+--------------------------------+
+--------------------------------+--------------------------------+ | 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 | +--------------------------------+--------------------------------+
Figure 6: Pointer Value for Translating from IPv6 to IPv4
图6:用于从IPv6转换到IPv4的指针值
ICMP Error Payload: If the received ICMPv6 packet contains an ICMPv6 Extension [RFC4884], 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 [RFC4884], the translator passes the extensions as opaque bit strings and any IPv6 address literals contained therein will not be translated to IPv4 address literals; this may cause problems with processing of those ICMP extensions.
ICMP错误有效负载:如果收到的ICMPv6数据包包含ICMPv6扩展[RFC4884],ICMPv6数据包的转换将导致ICMPv4数据包更改长度。出现这种情况时,必须相应地调整ICMPv6扩展长度属性(例如,由于从IPv6转换为IPv4而缩短)。对于[RFC4884]中未定义的扩展,转换器将扩展作为不透明位字符串传递,其中包含的任何IPv6地址文字将不会转换为IPv4地址文字;这可能会导致处理这些ICMP扩展时出现问题。
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
如上所述,ICMPv4和ICMPv6错误消息格式之间存在一些差异。包含出错数据包的ICMP错误消息必须像正常IP数据包一样进行翻译。“错误数据包”的翻译可能会
change the length of the datagram; thus, the Total Length field in the outer IPv4 header MUST be updated.
改变数据报的长度;因此,必须更新外部IPv4标头中的总长度字段。
+-------------+ +-------------+ | IPv6 | | IPv4 | | Header | | Header | +-------------+ +-------------+ | ICMPv6 | | ICMPv4 | | Header | | Header | +-------------+ +-------------+ | IPv6 | ===> | IPv4 | | Header | | Header | +-------------+ +-------------+ | Partial | | Partial | | Transport- | | Transport- | | Layer | | Layer | | Header | | Header | +-------------+ +-------------+
+-------------+ +-------------+ | IPv6 | | IPv4 | | Header | | Header | +-------------+ +-------------+ | ICMPv6 | | ICMPv4 | | Header | | Header | +-------------+ +-------------+ | IPv6 | ===> | IPv4 | | Header | | Header | +-------------+ +-------------+ | Partial | | Partial | | Transport- | | Transport- | | Layer | | Layer | | Header | | Header | +-------------+ +-------------+
Figure 7: IPv6-to-IPv4 ICMP Error Translation
图7:IPv6到IPv4 ICMP错误转换
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 embedded headers. 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.
内部IP头的转换可以通过调用转换外部IP头的函数来完成。此进程必须在第一个嵌入头处停止,如果数据包包含更多嵌入头,则丢弃该数据包。请注意,IPv6标头中的IPv6地址可能不是IPv4可翻译地址,并且不会有相应的IPv4地址。在这种情况下,译者可以进行有状态翻译。翻译人员可以使用一种机制来代替无状态翻译,这将留给未来的工作。
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.
如果IPv6数据包被丢弃,则转换器应向数据包的原始发送者发回ICMPv6错误消息,除非丢弃的数据包本身是ICMPv6消息。
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 Type 1 and Code 5 (Source address failed ingress/egress policy). In other cases, the ICMPv6 message MUST have Type 1 (Destination Unreachable) and Code 1 (Communication with destination administratively prohibited), unless otherwise specified in this document or [RFC6146]. The translator SHOULD allow an administrator to configure whether the ICMPv6 error messages are sent, rate-limited, or not sent.
如果由于IPv6源地址不是IPv4可翻译地址且转换器无状态而发送ICMPv6错误消息,则ICMPv6消息(如果已发送)必须具有类型1和代码5(源地址失败的入口/出口策略)。在其他情况下,除非本文档或[RFC6146]中另有规定,否则ICMPv6消息必须具有类型1(无法到达目的地)和代码1(禁止与目的地进行管理通信)。转换器应允许管理员配置ICMPv6错误消息是否已发送、速率受限或未发送。
If the address translation algorithm is not checksum neutral (see Section 4.1 of [RFC6052]), the recalculation and updating of the transport-layer headers that contain pseudo-headers need to be performed. Translators MUST do this for TCP, UDP, and ICMP.
如果地址转换算法不是校验和中性的(参见[RFC6052]第4.1节),则需要重新计算和更新包含伪报头的传输层报头。对于TCP、UDP和ICMP,转换器必须这样做。
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 Section 5.1.
其他传输协议(如DCCP)是可选的。为了简化调试和故障排除,翻译人员必须转发第5.1节“协议”步骤中所述的所有传输协议。
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.
如果IP/ICMP转换器也提供正常的转发功能,并且目标地址可以通过更具体的路由访问而无需翻译,则路由器必须转发而无需翻译。当IP/ICMP转换器接收到一个IPv6数据报,该数据报的地址为表示IPv4域中主机的IPv6地址时,IPv6数据包必须转换为IPv4。
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 that firewalls violating Section 4.3.1 of [RFC4890] are at fault. Both failures (the 5% wrong response when MTU = 1280 and the 57% wrong response when MTU < 1280) will cause PMTUD black holes [RFC2923]. 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.
最近的两项研究分析了Internet上支持IPv6的web服务器的行为,发现大约95%的人对表示MTU=1280的IPv6数据包太大做出了预期的响应,但只有43%的人对表示MTU<1280的IPv6数据包太大做出了预期的响应。据信,违反[RFC4890]第4.3.1节的防火墙有故障。这两种故障(MTU=1280时5%的错误响应和MTU<1280时57%的错误响应)都会导致PMTUD黑洞[RFC2923]。不幸的是,翻译器无法提高第一种情况(MTU=1280)的故障率,但翻译器可以提高第二种情况(MTU<1280)的故障率。有两种方法可以解决发送指示MTU<1280的ICMPv6消息的问题。应该可以为这两种方法中的任何一种配置转换器。
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 [RFC6144], 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 [RFC4890] and therefore avoid the problem witnessed with IPv6 hosts on the Internet.
第一种方法是通过观察到四种用于无状态IPv6/IPv4转换器的方案在Internet上没有IPv6主机来限制IPv6/IPv4转换器的部署(方案1、2、5和6在[RFC6144]中描述,它们指的是“IPv6网络”)。在这些场景中,可以按照[RFC4890]第4.3.1节管理IPv6主机、基于IPv6主机的防火墙和IPv6网络防火墙,从而避免互联网上的IPv6主机出现问题。
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 [RFC2460] -- such as IPv6 hosts on the Internet. This approach requires the translator to do the following:
如果转换器的IPv6主机、基于IPv6主机的防火墙或IPv6网络防火墙不(或不能)符合[RFC2460]第5节的要求,则第二种方法是必要的,例如Internet上的IPv6主机。此方法要求翻译人员执行以下操作:
1. In the IPv4-to-IPv6 direction: if the MTU value of ICMPv4 Packet Too Big (PTB) 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 Fragment Header.
1. 在IPv4到IPv6方向:如果ICMPv4数据包过大(PTB)消息的MTU值小于1280,则将其更改为1280。这旨在使IPv6主机和IPv6防火墙处理ICMP PTB消息,并使用IPv6片段头生成到该目标的后续数据包。
Note: Based on recent studies, this is effective for 95% of IPv6 hosts on the Internet.
注意:根据最近的研究,这对Internet上95%的IPv6主机有效。
2. In the IPv6-to-IPv4 direction:
2. 在IPv6到IPv4的方向上:
A. 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.
A.如果IPv6数据包中存在片段头,则其值的最后16位必须用于IPv4标识值。
B. If there is no Fragment Header in the IPv6 packet:
B.如果IPv6数据包中没有片段头:
a. If the packet is less than or equal to 1280 bytes:
a. 如果数据包小于或等于1280字节:
- The translator SHOULD set DF to 0 and generate an IPv4 identification value.
- 转换器应将DF设置为0并生成IPv4标识值。
- To avoid the problems described in [RFC4963], it is RECOMMENDED that the translator maintain 3-tuple state for generating the IPv4 identification value.
- 为了避免[RFC4963]中描述的问题,建议转换器保持三元组状态以生成IPv4标识值。
b. If the packet is greater than 1280 bytes, the translator SHOULD set the IPv4 DF bit to 1.
b. 如果数据包大于1280字节,转换器应将IPv4 DF位设置为1。
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.
除了IPv4和IPv6协议以及用于使数据包到达转换器的路由协议中已经存在的安全问题外,使用无状态IP/ICMP转换器不会带来任何新的安全问题。
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. [RFC6052] addresses these issues.
从IPv6地址派生IPv4地址可能会出现一些潜在问题,特别是广播或环回地址以及非IPv4可翻译IPv6地址等地址。[RFC6052]解决了这些问题。
As with network address translation of IPv4 to IPv4, the IPsec Authentication Header [RFC4302] cannot be used across an IPv6-to-IPv4 translator.
与IPv4到IPv4的网络地址转换一样,IPsec身份验证头[RFC4302]不能跨IPv6到IPv4转换器使用。
As with network address translation of IPv4 to IPv4, packets with tunnel mode Encapsulating Security Payload (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 [RFC3948].
与IPv4到IPv4的网络地址转换一样,可以转换具有隧道模式封装安全有效负载(ESP)的数据包,因为隧道模式ESP不依赖于ESP报头之前的报头字段。类似地,除非使用校验和中性地址,否则传输模式ESP将在IPv6到IPv4转换时失败。在这两种情况下,IPsec ESP端点通常会检测到转换器的存在,并将ESP封装在UDP数据包中[RFC3948]。
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.
这是由一大群人开发的。在讨论过程中公布名单的人包括阿列克谢·梅尔尼科夫、安德鲁·沙利文、安德鲁·尤琴科、布赖恩·卡彭特、丹·荣格、戴夫·泰勒、大卫·哈灵顿、埃德·詹基维茨、Hiroshi Miyata、Iljitsch van Beijnum、贾里·阿尔科、杰里·黄、约翰·施尼兹莱因、朱尼·科霍宁、肯塔罗·埃比萨瓦、凯文·尹、马格纳斯·韦斯特隆德、,马塞洛·巴格鲁·布劳恩、玛格丽特·瓦瑟曼、马萨希托·恩多、菲尔·罗伯茨、菲利普·马修斯、雷纳尔多·佩诺、雷米·丹尼斯·库尔蒙、雷米·德斯普雷斯、肖恩·特纳、森希尔·西瓦库马尔、西蒙·佩雷尔特、斯图尔特·布莱恩特、蒂姆·波尔克、泰罗·基维宁和曹禅。
[RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, August 1980.
[RFC0768]Postel,J.,“用户数据报协议”,STD 6,RFC 768,1980年8月。
[RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791, September 1981.
[RFC0791]Postel,J.,“互联网协议”,STD 5,RFC 7911981年9月。
[RFC0792] Postel, J., "Internet Control Message Protocol", STD 5, RFC 792, September 1981.
[RFC0792]Postel,J.,“互联网控制消息协议”,STD 5,RFC 792,1981年9月。
[RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September 1981.
[RFC0793]Postel,J.,“传输控制协议”,标准7,RFC 793,1981年9月。
[RFC1812] Baker, F., "Requirements for IP Version 4 Routers", RFC 1812, June 1995.
[RFC1812]Baker,F.,“IP版本4路由器的要求”,RFC1812,1995年6月。
[RFC1883] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 1883, December 1995.
[RFC1883]Deering,S.和R.Hinden,“互联网协议,第6版(IPv6)规范”,RFC 1883,1995年12月。
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。
[RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, December 1998.
[RFC2460]Deering,S.和R.Hinden,“互联网协议,第6版(IPv6)规范”,RFC 2460,1998年12月。
[RFC2765] Nordmark, E., "Stateless IP/ICMP Translation Algorithm (SIIT)", RFC 2765, February 2000.
[RFC2765]Nordmark,E.“无状态IP/ICMP转换算法(SIIT)”,RFC2765,2000年2月。
[RFC3948] Huttunen, A., Swander, B., Volpe, V., DiBurro, L., and M. Stenberg, "UDP Encapsulation of IPsec ESP Packets", RFC 3948, January 2005.
[RFC3948]Huttunen,A.,Swander,B.,Volpe,V.,DiBurro,L.,和M.Stenberg,“IPsec ESP数据包的UDP封装”,RFC 3948,2005年1月。
[RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC 4291, February 2006.
[RFC4291]Hinden,R.和S.Deering,“IP版本6寻址体系结构”,RFC 42912006年2月。
[RFC4340] Kohler, E., Handley, M., and S. Floyd, "Datagram Congestion Control Protocol (DCCP)", RFC 4340, March 2006.
[RFC4340]Kohler,E.,Handley,M.和S.Floyd,“数据报拥塞控制协议(DCCP)”,RFC 43402006年3月。
[RFC4443] Conta, A., Deering, S., and M. Gupta, "Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification", RFC 4443, March 2006.
[RFC4443]Conta,A.,Deering,S.和M.Gupta,“互联网协议版本6(IPv6)规范的互联网控制消息协议(ICMPv6)”,RFC 4443,2006年3月。
[RFC4884] Bonica, R., Gan, D., Tappan, D., and C. Pignataro, "Extended ICMP to Support Multi-Part Messages", RFC 4884, April 2007.
[RFC4884]Bonica,R.,Gan,D.,Tappan,D.,和C.Pignataro,“支持多部分消息的扩展ICMP”,RFC 4884,2007年4月。
[RFC5382] Guha, S., Biswas, K., Ford, B., Sivakumar, S., and P. Srisuresh, "NAT Behavioral Requirements for TCP", BCP 142, RFC 5382, October 2008.
[RFC5382]Guha,S.,Biswas,K.,Ford,B.,Sivakumar,S.,和P.Srisuresh,“TCP的NAT行为要求”,BCP 142,RFC 5382,2008年10月。
[RFC5771] Cotton, M., Vegoda, L., and D. Meyer, "IANA Guidelines for IPv4 Multicast Address Assignments", BCP 51, RFC 5771, March 2010.
[RFC5771]Cotton,M.,Vegoda,L.,和D.Meyer,“IPv4多播地址分配的IANA指南”,BCP 51,RFC 57712010年3月。
[RFC6052] Bao, C., Huitema, C., Bagnulo, M., Boucadair, M., and X. Li, "IPv6 Addressing of IPv4/IPv6 Translators", RFC 6052, October 2010.
[RFC6052]Bao,C.,Huitema,C.,Bagnulo,M.,Boucadair,M.,和X.Li,“IPv4/IPv6转换器的IPv6寻址”,RFC 6052010年10月。
[RFC6146] Bagnulo, M., Matthews, P., and I. Beijnum, "Stateful NAT64: Network Address and Protocol Translation from IPv6 Clients to IPv4 Servers", RFC 6146, April 2011.
[RFC6146]Bagnulo,M.,Matthews,P.,和I.Beijnum,“有状态NAT64:从IPv6客户端到IPv4服务器的网络地址和协议转换”,RFC 61462011年4月。
[RFC0879] Postel, J., "TCP maximum segment size and related topics", RFC 879, November 1983.
[RFC0879]Postel,J.,“TCP最大段大小和相关主题”,RFC 879,1983年11月。
[RFC1191] Mogul, J. and S. Deering, "Path MTU discovery", RFC 1191, November 1990.
[RFC1191]Mogul,J.和S.Deering,“MTU发现路径”,RFC1191,1990年11月。
[RFC2474] Nichols, K., Blake, S., Baker, F., and D. Black, "Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers", RFC 2474, December 1998.
[RFC2474]Nichols,K.,Blake,S.,Baker,F.,和D.Black,“IPv4和IPv6头中区分服务字段(DS字段)的定义”,RFC 2474,1998年12月。
[RFC2475] Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z., and W. Weiss, "An Architecture for Differentiated Services", RFC 2475, December 1998.
[RFC2475]Blake,S.,Black,D.,Carlson,M.,Davies,E.,Wang,Z.,和W.Weiss,“差异化服务架构”,RFC 24751998年12月。
[RFC2710] Deering, S., Fenner, W., and B. Haberman, "Multicast Listener Discovery (MLD) for IPv6", RFC 2710, October 1999.
[RFC2710]Deering,S.,Fenner,W.,和B.Haberman,“IPv6的多播侦听器发现(MLD)”,RFC 2710,1999年10月。
[RFC2766] Tsirtsis, G. and P. Srisuresh, "Network Address Translation - Protocol Translation (NAT-PT)", RFC 2766, February 2000.
[RFC2766]Tsirtsis,G.和P.Srisuresh,“网络地址转换-协议转换(NAT-PT)”,RFC 2766,2000年2月。
[RFC2923] Lahey, K., "TCP Problems with Path MTU Discovery", RFC 2923, September 2000.
[RFC2923]Lahey,K.,“路径MTU发现的TCP问题”,RFC 29232000年9月。
[RFC3307] Haberman, B., "Allocation Guidelines for IPv6 Multicast Addresses", RFC 3307, August 2002.
[RFC3307]Haberman,B.,“IPv6多播地址的分配指南”,RFC3307,2002年8月。
[RFC3590] Haberman, B., "Source Address Selection for the Multicast Listener Discovery (MLD) Protocol", RFC 3590, September 2003.
[RFC3590]Haberman,B.,“多播侦听器发现(MLD)协议的源地址选择”,RFC 35902003年9月。
[RFC3810] Vida, R. and L. Costa, "Multicast Listener Discovery Version 2 (MLDv2) for IPv6", RFC 3810, June 2004.
[RFC3810]Vida,R.和L.Costa,“IPv6多播侦听器发现版本2(MLDv2)”,RFC 3810,2004年6月。
[RFC3849] Huston, G., Lord, A., and P. Smith, "IPv6 Address Prefix Reserved for Documentation", RFC 3849, July 2004.
[RFC3849]Huston,G.,Lord,A.,和P.Smith,“为文档保留IPv6地址前缀”,RFC 3849,2004年7月。
[RFC4302] Kent, S., "IP Authentication Header", RFC 4302, December 2005.
[RFC4302]Kent,S.,“IP认证头”,RFC43022005年12月。
[RFC4890] Davies, E. and J. Mohacsi, "Recommendations for Filtering ICMPv6 Messages in Firewalls", RFC 4890, May 2007.
[RFC4890]Davies,E.和J.Mohacsi,“防火墙中过滤ICMPv6消息的建议”,RFC 48902007年5月。
[RFC4963] Heffner, J., Mathis, M., and B. Chandler, "IPv4 Reassembly Errors at High Data Rates", RFC 4963, July 2007.
[RFC4963]Heffner,J.,Mathis,M.,和B.Chandler,“高数据速率下的IPv4重组错误”,RFC 4963,2007年7月。
[RFC4966] Aoun, C. and E. Davies, "Reasons to Move the Network Address Translator - Protocol Translator (NAT-PT) to Historic Status", RFC 4966, July 2007.
[RFC4966]Aoun,C.和E.Davies,“将网络地址转换器-协议转换器(NAT-PT)移至历史状态的原因”,RFC 4966,2007年7月。
[RFC5737] Arkko, J., Cotton, M., and L. Vegoda, "IPv4 Address Blocks Reserved for Documentation", RFC 5737, January 2010.
[RFC5737]Arkko,J.,Cotton,M.和L.Vegoda,“为文档保留的IPv4地址块”,RFC 5737,2010年1月。
[RFC6144] Baker, F., Li, X., Bao, C., and K. Yin, "Framework for IPv4/IPv6 Translation", RFC 6144, April 2011.
[RFC6144]Baker,F.,Li,X.,Bao,C.,和K.Yin,“IPv4/IPv6转换框架”,RFC 61442011年4月。
A stateless translation workflow example is depicted in the following figure. The documentation address blocks 2001:db8::/32 [RFC3849], 192.0.2.0/24, and 198.51.100.0/24 [RFC5737] are used in this example.
下图描述了一个无状态翻译工作流示例。此示例中使用了文档地址块2001:db8::/32[RFC3849]、192.0.2.0/24和198.51.100.0/24[RFC5737]。
+--------------+ +--------------+ | IPv4 network | | IPv6 network | | | +-------+ | | | +----+ |-----| XLAT |---- | +----+ | | | H4 |-----| +-------+ |--| H6 | | | +----+ | | +----+ | +--------------+ +--------------+
+--------------+ +--------------+ | IPv4 network | | IPv6 network | | | +-------+ | | | +----+ |-----| XLAT |---- | +----+ | | | H4 |-----| +-------+ |--| H6 | | | +----+ | | +----+ | +--------------+ +--------------+
Figure 8
图8
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 [RFC6052] 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.
转换器(XLAT)将IPv6网络连接到IPv4网络。此XLAT使用[RFC6052]中定义的网络特定前缀(NSP)2001:db8:100::/40表示IPv6地址空间中的IPv4地址(IPv4转换地址)和IPv4地址空间中的IPv6地址(IPv4可翻译地址)。在本例中,192.0.2.0/24是对应IPv4可翻译地址的IPv4块。
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.
根据地址映射规则,IPv6节点H6具有IPv4可翻译的IPv6地址2001:db8:1c0:2:21::(地址映射自192.0.2.33)。IPv4节点H4具有IPv4地址198.51.100.2。
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.
IPv6路由的配置方式是,将地址为2001:db8:100::/40中的目标地址的IPv6数据包路由到XLAT的IPv6接口。
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.
IPv4路由的配置方式是,在192.0.2.0/24中寻址到目标地址的IPv4数据包被路由到XLAT的IPv4接口。
The steps by which H6 establishes communication with H4 are:
H6与H4建立通信的步骤如下:
1. H6 performs the destination address mapping, so the IPv4- converted address 2001:db8:1c6:3364:2:: is formed from 198.51.100.2 based on the address mapping algorithm [RFC6052].
1. H6执行目标地址映射,因此IPv4转换地址2001:db8:1c6:3364:2::是基于地址映射算法[RFC6052]从198.51.100.2形成的。
2. 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:2::.
2. H6向H4发送一个数据包。数据包从源地址2001:db8:1c0:2:21::发送到目标地址2001:db8:1c6:3364:2::。
3. The packet is routed to the IPv6 interface of the XLAT (since IPv6 routing is configured that way).
3. 数据包被路由到XLAT的IPv6接口(因为IPv6路由是以这种方式配置的)。
4. The XLAT receives the packet and performs the following actions:
4. XLAT接收数据包并执行以下操作:
* The XLAT translates the IPv6 header into an IPv4 header using the IP/ICMP Translation Algorithm defined in this document.
* XLAT使用本文档中定义的IP/ICMP转换算法将IPv6报头转换为IPv4报头。
* The XLAT includes 192.0.2.33 as the source address in the packet and 198.51.100.2 as the 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:2:: (IPv4-converted address) of the received IPv6 packet that is being translated.
* XLAT包括192.0.2.33作为数据包中的源地址和198.51.100.2作为数据包中的目标地址。请注意,192.0.2.33和198.51.100.2直接从正在转换的接收IPv6数据包的源IPv6地址2001:db8:1c0:2:21:(IPv4可翻译地址)和目标IPv6地址2001:db8:1c6:3364:2:(IPv4转换地址)中提取。
5. The XLAT sends the translated packet out of its IPv4 interface, and the packet arrives at H4.
5. XLAT从其IPv4接口发送转换后的数据包,数据包到达H4。
6. H4 node responds by sending a packet with destination address 192.0.2.33 and source address 198.51.100.2.
6. H4节点通过发送具有目的地址192.0.2.33和源地址198.51.100.2的数据包进行响应。
7. The packet is routed to the IPv4 interface of the XLAT (since IPv4 routing is configured that way). The XLAT performs the following operations:
7. 数据包被路由到XLAT的IPv4接口(因为IPv4路由是以这种方式配置的)。XLAT执行以下操作:
* The XLAT translates the IPv4 header into an IPv6 header using the IP/ICMP Translation Algorithm defined in this document.
* XLAT使用本文档中定义的IP/ICMP转换算法将IPv4报头转换为IPv6报头。
* The XLAT includes 2001:db8:1c0:2:21:: as the destination address in the packet and 2001:db8:1c6:3364:2:: as the source address in the packet. Note that 2001:db8:1c0:2:21:: and 2001:db8:1c6:3364:2:: are formed directly from the destination IPv4 address 192.0.2.33 and the source IPv4 address 198.51.100.2 of the received IPv4 packet that is being translated.
* XLAT包括2001:db8:1c0:2:21::作为数据包中的目标地址,以及2001:db8:1c6:3364:2::作为数据包中的源地址。请注意,2001:db8:1c0:2:21::和2001:db8:1c6:3364:2::直接由正在转换的接收IPv4数据包的目标IPv4地址192.0.2.33和源IPv4地址198.51.100.2组成。
8. The translated packet is sent out of the IPv6 interface to H6.
8. 翻译后的数据包从IPv6接口发送到H6。
The packet exchange between H6 and H4 continues until the session is finished.
H6和H4之间的数据包交换将继续,直到会话结束。
The steps by which H4 establishes communication with H6 are:
H4与H6建立通信的步骤如下:
1. H4 performs the destination address mapping, so 192.0.2.33 is formed from the IPv4-translatable address 2001:db8:1c0:2:21:: based on the address mapping algorithm [RFC6052].
1. H4执行目标地址映射,因此192.0.2.33是基于地址映射算法[RFC6052]从IPv4可翻译地址2001:db8:1c0:2:21::形成的。
2. 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.
2. H4向H6发送一个数据包。数据包从源地址198.51.100.2发送到目标地址192.0.2.33。
3. The packet is routed to the IPv4 interface of the XLAT (since IPv4 routing is configured that way).
3. 数据包被路由到XLAT的IPv4接口(因为IPv4路由是以这种方式配置的)。
4. The XLAT receives the packet and performs the following actions:
4. XLAT接收数据包并执行以下操作:
* The XLAT translates the IPv4 header into an IPv6 header using the IP/ICMP Translation Algorithm defined in this document.
* XLAT使用本文档中定义的IP/ICMP转换算法将IPv4报头转换为IPv6报头。
* The XLAT includes 2001:db8:1c6:3364:2:: as the source address in the packet and 2001:db8:1c0:2:21:: as the destination address in the packet. Note that 2001:db8:1c6:3364:2:: (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.
* XLAT包括2001:db8:1c6:3364:2::作为数据包中的源地址,以及2001:db8:1c0:2:21::作为数据包中的目标地址。请注意,2001:db8:1c6:3364:2:(IPv4转换地址)和2001:db8:1c0:2:21:(IPv4可翻译地址)直接从正在翻译的接收IPv4数据包的源IPv4地址198.51.100.2和目标IPv4地址192.0.2.33获取。
5. The XLAT sends the translated packet out its IPv6 interface, and the packet arrives at H6.
5. XLAT将转换后的数据包发送出其IPv6接口,数据包到达H6。
6. H6 node responds by sending a packet with destination address 2001:db8:1c6:3364:2:: and source address 2001:db8:1c0:2:21::.
6. H6节点通过发送一个具有目标地址2001:db8:1c6:3364:2::和源地址2001:db8:1c0:2:21::的数据包进行响应。
7. The packet is routed to the IPv6 interface of the XLAT (since IPv6 routing is configured that way). The XLAT performs the following operations:
7. 数据包被路由到XLAT的IPv6接口(因为IPv6路由是以这种方式配置的)。XLAT执行以下操作:
* The XLAT translates the IPv6 header into an IPv4 header using the IP/ICMP Translation Algorithm defined in this document.
* XLAT使用本文档中定义的IP/ICMP转换算法将IPv6报头转换为IPv4报头。
* The XLAT includes 198.51.100.2 as the destination address in the packet and 192.0.2.33 as the 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:2:: and source IPv6 address 2001:db8:1c0:2:21:: of the received IPv6 packet that is being translated.
* XLAT包括198.51.100.2作为数据包中的目标地址和192.0.2.33作为数据包中的源地址。请注意,198.51.100.2和192.0.2.33直接由正在转换的接收IPv6数据包的目标IPv6地址2001:db8:1c6:3364:2::和源IPv6地址2001:db8:1c0:2:21::构成。
8. The translated packet is sent out the IPv4 interface to H4.
8. 翻译后的数据包通过IPv4接口发送到H4。
The packet exchange between H4 and H6 continues until the session is finished.
H4和H6之间的数据包交换将继续,直到会话结束。
Authors' Addresses
作者地址
Xing Li CERNET Center/Tsinghua University Room 225, Main Building, Tsinghua University Beijing, 100084 China
中国北京清华大学主楼225室兴利赛尔网中心/清华大学,100084
Phone: +86 10-62785983 EMail: xing@cernet.edu.cn
Phone: +86 10-62785983 EMail: xing@cernet.edu.cn
Congxiao Bao CERNET Center/Tsinghua University Room 225, Main Building, Tsinghua University Beijing, 100084 China
丛晓宝CERNET中心/清华大学主楼225室,北京,100084
Phone: +86 10-62785983 EMail: congxiao@cernet.edu.cn
Phone: +86 10-62785983 EMail: congxiao@cernet.edu.cn
Fred Baker Cisco Systems Santa Barbara, California 93117 USA
美国加利福尼亚州圣巴巴拉市弗雷德·贝克思科系统公司,邮编:93117
Phone: +1-408-526-4257 EMail: fred@cisco.com
Phone: +1-408-526-4257 EMail: fred@cisco.com