Internet Engineering Task Force (IETF)                          R. Penno
Request for Comments: 7857                                         Cisco
BCP: 127                                                    S. Perreault
Updates: 4787, 5382, 5508                            Jive Communications
Category: Best Current Practice                        M. Boucadair, Ed.
ISSN: 2070-1721                                                   Orange
                                                            S. Sivakumar
                                                                   Cisco
                                                                K. Naito
                                                                     NTT
                                                              April 2016
        
Internet Engineering Task Force (IETF)                          R. Penno
Request for Comments: 7857                                         Cisco
BCP: 127                                                    S. Perreault
Updates: 4787, 5382, 5508                            Jive Communications
Category: Best Current Practice                        M. Boucadair, Ed.
ISSN: 2070-1721                                                   Orange
                                                            S. Sivakumar
                                                                   Cisco
                                                                K. Naito
                                                                     NTT
                                                              April 2016
        

Updates to Network Address Translation (NAT) Behavioral Requirements

更新网络地址转换(NAT)行为要求

Abstract

摘要

This document clarifies and updates several requirements of RFCs 4787, 5382, and 5508 based on operational and development experience. The focus of this document is Network Address Translation from IPv4 to IPv4 (NAT44).

本文件根据运营和开发经验澄清并更新了RFCs 4787、5382和5508的若干要求。本文档的重点是从IPv4到IPv4(NAT44)的网络地址转换。

This document updates RFCs 4787, 5382, and 5508.

本文档更新了RFCs 4787、5382和5508。

Status of This Memo

关于下段备忘

This memo documents an Internet Best Current Practice.

本备忘录记录了互联网最佳实践。

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 BCPs is available in Section 2 of RFC 5741.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关BCP的更多信息,请参见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/rfc7857.

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc7857.

Copyright Notice

版权公告

Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved.

版权所有(c)2016 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  . . . . . . . . . . . . . . . . . . . . . . . .   3
     1.1.  Scope . . . . . . . . . . . . . . . . . . . . . . . . . .   3
     1.2.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   4
   2.  TCP Session Tracking  . . . . . . . . . . . . . . . . . . . .   4
     2.1.  TCP Transitory Connection Idle-Timeout  . . . . . . . . .   6
     2.2.  TCP RST . . . . . . . . . . . . . . . . . . . . . . . . .   6
   3.  Port Overlapping Behavior . . . . . . . . . . . . . . . . . .   6
   4.  Address Pooling Paired (APP)  . . . . . . . . . . . . . . . .   7
   5.  Endpoint-Independent Mapping (EIM) Protocol Independence  . .   8
   6.  Endpoint-Independent Filtering (EIF) Protocol Independence  .   8
   7.  Endpoint-Independent Filtering (EIF) Mapping Refresh  . . . .   8
     7.1.  Outbound Mapping Refresh and Error Packets  . . . . . . .   9
   8.  Port Parity . . . . . . . . . . . . . . . . . . . . . . . . .   9
   9.  Port Randomization  . . . . . . . . . . . . . . . . . . . . .   9
   10. IP Identification (IP ID) . . . . . . . . . . . . . . . . . .  10
   11. ICMP Query Mappings Timeout . . . . . . . . . . . . . . . . .  10
   12. Hairpinning Support for ICMP Packets  . . . . . . . . . . . .  10
   13. Security Considerations . . . . . . . . . . . . . . . . . . .  11
   14. References  . . . . . . . . . . . . . . . . . . . . . . . . .  12
     14.1.  Normative References . . . . . . . . . . . . . . . . . .  12
     14.2.  Informative References . . . . . . . . . . . . . . . . .  12
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  13
   Contributors  . . . . . . . . . . . . . . . . . . . . . . . . . .  14
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  14
        
   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
     1.1.  Scope . . . . . . . . . . . . . . . . . . . . . . . . . .   3
     1.2.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   4
   2.  TCP Session Tracking  . . . . . . . . . . . . . . . . . . . .   4
     2.1.  TCP Transitory Connection Idle-Timeout  . . . . . . . . .   6
     2.2.  TCP RST . . . . . . . . . . . . . . . . . . . . . . . . .   6
   3.  Port Overlapping Behavior . . . . . . . . . . . . . . . . . .   6
   4.  Address Pooling Paired (APP)  . . . . . . . . . . . . . . . .   7
   5.  Endpoint-Independent Mapping (EIM) Protocol Independence  . .   8
   6.  Endpoint-Independent Filtering (EIF) Protocol Independence  .   8
   7.  Endpoint-Independent Filtering (EIF) Mapping Refresh  . . . .   8
     7.1.  Outbound Mapping Refresh and Error Packets  . . . . . . .   9
   8.  Port Parity . . . . . . . . . . . . . . . . . . . . . . . . .   9
   9.  Port Randomization  . . . . . . . . . . . . . . . . . . . . .   9
   10. IP Identification (IP ID) . . . . . . . . . . . . . . . . . .  10
   11. ICMP Query Mappings Timeout . . . . . . . . . . . . . . . . .  10
   12. Hairpinning Support for ICMP Packets  . . . . . . . . . . . .  10
   13. Security Considerations . . . . . . . . . . . . . . . . . . .  11
   14. References  . . . . . . . . . . . . . . . . . . . . . . . . .  12
     14.1.  Normative References . . . . . . . . . . . . . . . . . .  12
     14.2.  Informative References . . . . . . . . . . . . . . . . .  12
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  13
   Contributors  . . . . . . . . . . . . . . . . . . . . . . . . . .  14
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  14
        
1. Introduction
1. 介绍

[RFC4787], [RFC5382], and [RFC5508] contributed to enhance Network Address Translation (NAT) interoperability and conformance. Operational experience gained through widespread deployment and evolution of NAT indicates that some areas of the original documents need further clarification or updates. This document provides such clarifications and updates.

[RFC4787]、[RFC5382]和[RFC5508]有助于增强网络地址转换(NAT)的互操作性和一致性。通过广泛部署和发展NAT获得的运营经验表明,原始文档的某些方面需要进一步澄清或更新。本文件提供了此类澄清和更新。

1.1. Scope
1.1. 范围

The goal of this document is to clarify and update the set of requirements listed in [RFC4787], [RFC5382], and [RFC5508]. The document focuses exclusively on NAT44.

本文件的目的是澄清和更新[RFC4787]、[RFC5382]和[RFC5508]中列出的一组要求。本文件专门关注NAT44。

The scope of this document has been set so that it does not create new requirements beyond those specified in the documents cited above.

本文件的范围已确定,因此不会产生超出上述文件规定的新要求。

Requirements related to Carrier-Grade NAT (CGN) are defined in [RFC6888].

[RFC6888]中定义了与承运人级NAT(CGN)相关的要求。

1.2. Terminology
1.2. 术语

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]中所述进行解释。

The reader is assumed to be familiar with the terminology defined in [RFC2663], [RFC4787], [RFC5382], and [RFC5508].

假定读者熟悉[RFC2663]、[RFC4787]、[RFC5382]和[RFC5508]中定义的术语。

In this document, the term "NAT" refers to both "Basic NAT" and "Network Address/Port Translator (NAPT)" (see Section 3 of [RFC4787]). As a reminder, Basic NAT and NAPT are two variations of traditional NAT in that translation in Basic NAT is limited to IP addresses alone, whereas translation in NAPT is extended to include IP addresses and transport identifiers (such as a TCP/UDP port or ICMP query ID); refer to Section 2 of [RFC3022].

在本文件中,术语“NAT”指的是“基本NAT”和“网络地址/端口转换器(NAPT)”(见[RFC4787]第3节)。提醒一下,基本NAT和NAPT是传统NAT的两个变体,因为基本NAT中的转换仅限于IP地址,而NAPT中的转换扩展为包括IP地址和传输标识符(如TCP/UDP端口或ICMP查询ID);参考[RFC3022]第2节。

2. TCP Session Tracking
2. TCP会话跟踪

[RFC5382] specifies TCP timers associated with various connection states but does not specify the TCP state machine a NAT44 should follow as a basis to apply such timers.

[RFC5382]指定与各种连接状态关联的TCP计时器,但未指定NAT44应遵循的TCP状态机作为应用此类计时器的基础。

Update: The TCP state machine depicted in Figure 1, adapted from [RFC6146], SHOULD be implemented by a NAT for TCP session tracking purposes.

更新:图1中描述的TCP状态机(改编自[RFC6146])应该由NAT实现,用于TCP会话跟踪。

                    +----------------------------+
                    |                            |
                    V                            |
                 +------+   Client               |
                 |CLOSED|-----SYN------+         |
                 +------+              |         |
                     ^                 |         |
                     |TCP_TRANS T.O.   |         |
                     |                 V         |
                 +-------+          +-------+    |
                 | TRANS |          |  INIT |    |
                 +-------+          +-------+    |
                   |    ^               |        |
             data pkt   |               |        |
                   | Server/Client RST  |        |
                   |  TCP_EST T.O.      |        |
                   V    |           Server SYN   |
              +--------------+          |        |
              | ESTABLISHED  |<---------+        |
              +--------------+                   |
               |           |                     |
         Client FIN    Server FIN                |
               |           |                     |
               V           V                     |
        +---------+   +----------+               |
        |  C FIN  |   |  S FIN   |               |
        |   RCV   |   |    RCV   |               |
        +---------+   +----------+               |
            |             |                      |
        Server FIN      Client FIN            TCP_TRANS
            |             |                    T.O.
            V             V                      |
        +----------------------+                 |
        |   C FIN + S FIN RCV  |-----------------+
        +----------------------+
    Legend:
      * Messages sent or received from the server are
        prefixed with "Server".
      * Messages sent or received from the client are
        prefixed with "Client".
      * "C" means "Client-side".
      * "S" means "Server-side".
      * TCP_EST T.O. refers to the established connection
        idle-timeout as defined in [RFC5382].
      * TCP_TRANS T.O. refers to the transitory connection
        idle-timeout as defined in [RFC5382].
        
                    +----------------------------+
                    |                            |
                    V                            |
                 +------+   Client               |
                 |CLOSED|-----SYN------+         |
                 +------+              |         |
                     ^                 |         |
                     |TCP_TRANS T.O.   |         |
                     |                 V         |
                 +-------+          +-------+    |
                 | TRANS |          |  INIT |    |
                 +-------+          +-------+    |
                   |    ^               |        |
             data pkt   |               |        |
                   | Server/Client RST  |        |
                   |  TCP_EST T.O.      |        |
                   V    |           Server SYN   |
              +--------------+          |        |
              | ESTABLISHED  |<---------+        |
              +--------------+                   |
               |           |                     |
         Client FIN    Server FIN                |
               |           |                     |
               V           V                     |
        +---------+   +----------+               |
        |  C FIN  |   |  S FIN   |               |
        |   RCV   |   |    RCV   |               |
        +---------+   +----------+               |
            |             |                      |
        Server FIN      Client FIN            TCP_TRANS
            |             |                    T.O.
            V             V                      |
        +----------------------+                 |
        |   C FIN + S FIN RCV  |-----------------+
        +----------------------+
    Legend:
      * Messages sent or received from the server are
        prefixed with "Server".
      * Messages sent or received from the client are
        prefixed with "Client".
      * "C" means "Client-side".
      * "S" means "Server-side".
      * TCP_EST T.O. refers to the established connection
        idle-timeout as defined in [RFC5382].
      * TCP_TRANS T.O. refers to the transitory connection
        idle-timeout as defined in [RFC5382].
        

Figure 1: Simplified Version of the TCP State Machine

图1:TCP状态机的简化版本

2.1. TCP Transitory Connection Idle-Timeout
2.1. TCP临时连接空闲超时

The transitory connection idle-timeout is defined as the minimum time a TCP connection in the partially open or closing phases must remain idle before the NAT considers the associated session a candidate for removal (REQ-5 of [RFC5382]). However, [RFC5382] does not clearly state whether these can be configured separately.

临时连接空闲超时被定义为在NAT将相关会话视为删除候选(RFC5382的REQ-5)之前,部分打开或关闭阶段的TCP连接必须保持空闲的最短时间。但是,[RFC5382]没有明确说明是否可以单独配置。

Clarification: This document clarifies that a NAT SHOULD provide different configurable parameters for configuring the open and closing idle timeouts.

澄清:本文件澄清NAT应提供不同的可配置参数,用于配置打开和关闭空闲超时。

To accommodate deployments that consider a partially open timeout of 4 minutes as being excessive from a security standpoint, a NAT MAY allow the configured timeout to be less than 4 minutes. However, a minimum default transitory connection idle-timeout of 4 minutes is RECOMMENDED.

为了适应从安全的角度考虑超过4分钟的部分开放超时的部署,NAT可以允许配置的超时时间小于4分钟。但是,建议使用最小默认临时连接空闲超时4分钟。

2.2. TCP RST
2.2. TCP RST

[RFC5382] leaves the handling of TCP RST packets unspecified.

[RFC5382]未指定TCP RST数据包的处理。

Update: This document adopts a similar default behavior as in [RFC6146]. Concretely, when the NAT receives a TCP RST matching an existing mapping, it MUST translate the packet according to the NAT mapping entry. Moreover, the NAT SHOULD wait for 4 minutes before deleting the session and removing any state associated with it if no packets are received during that 4-minute timeout.

更新:本文档采用与[RFC6146]中类似的默认行为。具体地说,当NAT接收到与现有映射匹配的TCP RST时,它必须根据NAT映射条目转换数据包。此外,如果在4分钟超时期间未收到任何数据包,NAT应等待4分钟,然后删除会话并删除与之相关的任何状态。

Notes:

笔记:

* Admittedly, the NAT has to verify whether received TCP RST packets belong to a connection. This verification check is required to avoid off-path attacks.

* 诚然,NAT必须验证接收到的TCP RST数据包是否属于连接。此验证检查是避免路径外攻击所必需的。

* If the NAT immediately removes the NAT mapping upon receipt of a TCP RST message, stale connections may be maintained by endpoints if the first RST message is lost between the NAT and the recipient.

* 如果NAT在收到TCP RST消息后立即删除NAT映射,那么如果NAT和收件人之间的第一条RST消息丢失,端点可能会保持陈旧的连接。

3. Port Overlapping Behavior
3. 端口重叠行为

REQ-1 from [RFC4787] and REQ-1 from [RFC5382] specify a specific port overlapping behavior; that is, the external IP address and port can be reused for connections originating from the same internal source IP address and port irrespective of the destination. This is known as Endpoint-Independent Mapping (EIM).

[RFC4787]中的REQ-1和[RFC5382]中的REQ-1指定了特定的端口重叠行为;也就是说,外部IP地址和端口可以重新用于源自相同内部源IP地址和端口的连接,而不考虑目的地。这称为端点独立映射(EIM)。

Update: This document clarifies that this port overlapping behavior may be extended to connections originating from different internal source IP addresses and ports as long as their destinations are different.

更新:本文档澄清了这种端口重叠行为可以扩展到源于不同内部源IP地址和端口的连接,只要它们的目的地不同。

The following mechanism MAY be implemented by a NAT:

NAT可以实现以下机制:

If destination addresses and ports are different for outgoing connections started by local clients, a NAT MAY assign the same external port as the source ports for the connections. The port overlapping mechanism manages mappings between external packets and internal packets by looking at and storing their 5-tuple (protocol, source address, source port, destination address, and destination port).

如果本地客户端启动的传出连接的目标地址和端口不同,NAT可以为连接分配与源端口相同的外部端口。端口重叠机制通过查看和存储外部数据包和内部数据包的5元组(协议、源地址、源端口、目标地址和目标端口),管理它们之间的映射。

This enables concurrent use of a single NAT external port for multiple transport sessions, which allows a NAT to successfully process packets in a network that has a limited number of IP addresses (e.g., deployment with a high address space multiplicative factor (refer to Appendix B of [RFC6269])).

这使得多个传输会话可以同时使用单个NAT外部端口,从而允许NAT在IP地址数量有限的网络中成功处理数据包(例如,使用高地址空间倍增系数部署(请参阅[RFC6269]的附录B])。

4. Address Pooling Paired (APP)
4. 地址池配对(应用程序)

The "IP address pooling" behavior of "Paired" (APP) was recommended in REQ-2 from [RFC4787], but the behavior when an external IPv4 runs out of ports was left undefined.

[RFC4787]中的REQ-2中建议使用“配对”(APP)的“IP地址池”行为,但未定义外部IPv4耗尽端口时的行为。

Clarification: This document clarifies that if APP is enabled, new sessions from a host that already has a mapping associated with an external IP that ran out of ports SHOULD be dropped. A configuration parameter MAY be provided to allow a NAT to start using ports from another external IP address when the one that anchored the APP mapping ran out of ports. Tweaking this configuration parameter is a trade-off between service continuity and APP strict enforcement. Note, this behavior is sometimes referred to as "soft-APP".

澄清:本文档澄清,如果启用了应用程序,则应删除来自已具有与端口用尽的外部IP关联的映射的主机的新会话。可以提供一个配置参数,以允许NAT在锚定应用程序映射的外部IP地址的端口用完时开始使用另一个外部IP地址的端口。调整此配置参数是服务连续性和应用程序严格执行之间的权衡。注意,这种行为有时被称为“软应用”。

As a reminder, the recommendation for the particular case of a CGN is that an implementation must use the same external IP address mapping for all sessions associated with the same internal IP address, be they TCP, UDP, ICMP, something else, or a mix of different protocols [RFC6888].

提醒一下,对于CGN的特定情况,建议实现必须对与相同内部IP地址相关联的所有会话使用相同的外部IP地址映射,无论是TCP、UDP、ICMP或其他协议,还是不同协议的混合[RFC6888]。

Update: This behavior SHOULD apply also for TCP.

更新:此行为也应适用于TCP。

5. Endpoint-Independent Mapping (EIM) Protocol Independence
5. 端点独立映射(EIM)协议独立性

REQ-1 from [RFC4787] and REQ-1 from [RFC5382] do not specify whether EIM are protocol dependent or protocol independent. For example, if an outbound TCP SYN creates a mapping, it is left undefined whether outbound UDP packets can reuse such mapping.

[RFC4787]中的REQ-1和[RFC5382]中的REQ-1未指定EIM是协议相关的还是协议独立的。例如,如果出站TCP SYN创建映射,则未定义出站UDP数据包是否可以重用此类映射。

Update: EIM mappings SHOULD be protocol dependent. A configuration parameter MAY be provided to allow protocols that multiplex TCP and UDP over the same source IP address and port number to use a single mapping. The default value of this configuration parameter MUST be protocol-dependent EIM.

更新:EIM映射应与协议相关。可以提供配置参数,以允许通过相同源IP地址和端口号多路传输TCP和UDP的协议使用单个映射。此配置参数的默认值必须是协议相关的EIM。

This update is consistent with the stateful Network Address and Protocol Translation from IPv6 Clients to IPv4 Servers (NAT64) [RFC6146] that clearly specifies three binding information bases (TCP, UDP, and ICMP).

此更新与IPv6客户端到IPv4服务器(NAT64)[RFC6146]的有状态网络地址和协议转换一致,后者明确指定了三个绑定信息基础(TCP、UDP和ICMP)。

6. Endpoint-Independent Filtering (EIF) Protocol Independence
6. 端点独立过滤(EIF)协议独立性

REQ-8 from [RFC4787] and REQ-3 from [RFC5382] do not specify whether mappings with Endpoint-Independent Filtering (EIF) are protocol independent or protocol dependent. For example, if an outbound TCP SYN creates a mapping, it is left undefined whether inbound UDP packets matching that mapping should be accepted or rejected.

[RFC4787]中的REQ-8和[RFC5382]中的REQ-3未指定具有端点独立筛选(EIF)的映射是协议独立的还是协议依赖的。例如,如果出站TCP SYN创建映射,则未定义是否应接受或拒绝与该映射匹配的入站UDP数据包。

Update: EIF filtering SHOULD be protocol dependent. A configuration parameter MAY be provided to make it protocol independent. The default value of this configuration parameter MUST be protocol-dependent EIF.

更新:EIF筛选应与协议相关。可以提供配置参数,使其与协议无关。此配置参数的默认值必须是协议相关的EIF。

This behavior is aligned with the update in Section 5.

此行为与第5节中的更新一致。

Applications that can be transported over a variety of transport protocols and/or support transport fallback schemes won't experience connectivity failures if the NAT is configured with protocol-independent EIM and protocol-independent EIF.

如果NAT配置了协议独立EIM和协议独立EIF,则可以通过各种传输协议和/或支持传输回退方案传输的应用程序不会出现连接故障。

7. Endpoint-Independent Filtering (EIF) Mapping Refresh
7. 端点独立筛选(EIF)映射刷新

The NAT mapping Refresh direction may have a "NAT Inbound refresh behavior" of "True" according to REQ-6 from [RFC4787], but [RFC4787] does not clarify how this behavior applies to EIF mappings. The issue in question is whether inbound packets that match an EIF mapping but do not create a new session due to a security policy should refresh the mapping timer.

根据[RFC4787]中的REQ-6,NAT映射刷新方向的“NAT入站刷新行为”可能为“真”,但[RFC4787]未阐明此行为如何应用于EIF映射。问题在于,匹配EIF映射但由于安全策略未创建新会话的入站数据包是否应刷新映射计时器。

Clarification: This document clarifies that even when a NAT has an inbound refresh behavior set to "TRUE", such packets SHOULD NOT refresh the mapping. Otherwise, a simple attack of a packet every two minutes can keep the mapping indefinitely.

澄清:本文档澄清,即使NAT的入站刷新行为设置为“TRUE”,此类数据包也不应刷新映射。否则,每两分钟对数据包进行一次简单的攻击就可以无限期地保持映射。

Update: This behavior SHOULD apply also for TCP.

更新:此行为也应适用于TCP。

7.1. Outbound Mapping Refresh and Error Packets
7.1. 出站映射刷新和错误数据包

Update: In the case of NAT outbound refresh behavior, ICMP Errors or TCP RST outbound packets sent as a response to inbound packets SHOULD NOT refresh the mapping. Other packets that indicate the host is not interested in receiving packets MAY be configurable to also not refresh state, such as a Session Traversal Utilities for NAT (STUN) error response [RFC5389] or IKE INVALID_SYNTAX [RFC7296].

更新:在NAT出站刷新行为的情况下,作为对入站数据包的响应而发送的ICMP错误或TCP RST出站数据包不应刷新映射。指示主机对接收数据包不感兴趣的其他数据包也可配置为不刷新状态,例如NAT(STUN)错误响应的会话遍历实用程序[RFC5389]或IKE无效_语法[RFC7296]。

8. Port Parity
8. 端口奇偶校验

Update: A NAT MAY disable port parity preservation for all dynamic mappings. Nevertheless, A NAT SHOULD support means to explicitly request to preserve port parity (e.g., [RFC7753]).

更新:NAT可能会禁用所有动态映射的端口奇偶校验保留。然而,NAT应该支持显式请求保留端口奇偶校验的方法(例如,[RFC7753])。

Note: According to [RFC6887], dynamic mappings are said to be dynamic in the sense that they are created on demand, either implicitly or explicitly:

注意:根据[RFC6887],动态映射被认为是动态的,因为它们是根据需要创建的,可以隐式地或显式地:

1. Implicit dynamic mappings refer to mappings that are created as a side effect of traffic such as an outgoing TCP SYN or outgoing UDP packet. Implicit dynamic mappings usually have a finite lifetime, though this lifetime is generally not known to the client using them.

1. 隐式动态映射是指作为流量的副作用创建的映射,例如传出TCP SYN或传出UDP数据包。隐式动态映射通常有一个有限的生存期,尽管使用它们的客户端通常不知道这个生存期。

2. Explicit dynamic mappings refer to mappings that are created as a result, for example, of explicit Port Control Protocol (PCP) MAP and PEER requests. Explicit dynamic mappings have a finite lifetime, and this lifetime is communicated to the client.

2. 显式动态映射是指作为显式端口控制协议(PCP)映射和对等请求的结果而创建的映射。显式动态映射有一个有限的生存期,此生存期将与客户端通信。

9. Port Randomization
9. 端口随机化

Update: A NAT SHOULD follow the recommendations specified in Section 4 of [RFC6056], especially:

更新:NAT应遵循[RFC6056]第4节中规定的建议,尤其是:

A NAPT that does not implement port preservation [RFC4787] [RFC5382] SHOULD obfuscate selection of the ephemeral port of a packet when it is changed during translation of that packet.

未实现端口保留[RFC4787][RFC5382]的NAPT应在数据包转换期间更改数据包的临时端口时混淆该数据包的临时端口选择。

A NAPT that does implement port preservation SHOULD obfuscate the ephemeral port of a packet only if the port must be changed as a result of the port being already in use for some other session.

只有当由于端口已用于其他会话而必须更改端口时,实现端口保留的NAPT才应混淆数据包的临时端口。

A NAPT that performs parity preservation and that must change the ephemeral port during translation of a packet SHOULD obfuscate the ephemeral ports. The algorithms described in this document could be easily adapted such that the parity is preserved (i.e., force the lowest order bit of the resulting port number to 0 or 1 according to whether even or odd parity is desired).

执行奇偶校验保护且在数据包转换期间必须更改临时端口的NAPT应混淆临时端口。本文档中描述的算法可以很容易地进行调整,以保持奇偶校验(即,根据是否需要奇偶校验,强制结果端口号的最低阶位为0或1)。

10. IP Identification (IP ID)
10. IP标识(IP ID)

Update: A NAT SHOULD handle the Identification field of translated IPv4 packets as specified in Section 5.3.1 of [RFC6864].

更新:NAT应按照[RFC6864]第5.3.1节的规定处理已翻译IPv4数据包的标识字段。

11. ICMP Query Mappings Timeout
11. ICMP查询映射超时

Section 3.1 of [RFC5508] specifies that ICMP Query mappings are to be maintained by a NAT. However, the specification doesn't discuss Query mapping timeout values. Section 3.2 of [RFC5508] only discusses ICMP Query session timeouts.

[RFC5508]第3.1节规定,ICMP查询映射将由NAT维护。但是,该规范没有讨论查询映射超时值。[RFC5508]第3.2节仅讨论ICMP查询会话超时。

Update: ICMP Query mappings MAY be deleted once the last session using the mapping is deleted.

更新:一旦删除使用映射的最后一个会话,就可以删除ICMP查询映射。

12. Hairpinning Support for ICMP Packets
12. 对ICMP数据包的头发固定支持

REQ-7 from [RFC5508] specifies that a NAT enforcing Basic NAT must support traversal of hairpinned ICMP Query sessions.

[RFC5508]中的REQ-7指定强制基本NAT的NAT必须支持发夹式ICMP查询会话的遍历。

Clarification: This implicitly means that address mappings from external address to internal address (similar to Endpoint-Independent Filters) must be maintained to allow inbound ICMP Query sessions. If an ICMP Query is received on an external address, a NAT can then translate to an internal IP.

澄清:这意味着必须维护从外部地址到内部地址的地址映射(类似于端点独立筛选器),以允许入站ICMP查询会话。如果在外部地址上接收到ICMP查询,则NAT可以转换为内部IP。

REQ-7 from [RFC5508] specifies that all NATs must support the traversal of hairpinned ICMP Error messages.

[RFC5508]中的REQ-7指定所有NAT必须支持发夹ICMP错误消息的遍历。

Clarification: This behavior requires a NAT to maintain address mappings from external IP address to internal IP address in addition to the ICMP Query mappings described in Section 3.1 of [RFC5508].

澄清:除了[RFC5508]第3.1节中描述的ICMP查询映射之外,此行为还需要NAT维护从外部IP地址到内部IP地址的地址映射。

13. Security Considerations
13. 安全考虑

NAT behavioral considerations are discussed in [RFC4787], [RFC5382], and [RFC5508].

[RFC4787]、[RFC5382]和[RFC5508]中讨论了NAT行为考虑因素。

Because some of the clarifications and updates (e.g., Section 2) are inspired from NAT64, the security considerations discussed in Section 5 of [RFC6146] apply also for this specification.

由于一些澄清和更新(如第2节)是从NAT64中得到启发的,因此[RFC6146]第5节中讨论的安全注意事项也适用于本规范。

The update in Section 3 allows for an optimized NAT resource usage. In order to avoid service disruption, the NAT must not invoke this functionality unless the packets are to be sent to distinct destination addresses.

第3节中的更新允许优化NAT资源使用。为了避免服务中断,NAT不得调用此功能,除非将数据包发送到不同的目标地址。

Some of the updates (e.g., Sections 7, 9, and 11) allow for increased security compared to [RFC4787], [RFC5382], and [RFC5508]. Particularly,

与[RFC4787]、[RFC5382]和[RFC5508]相比,一些更新(如第7、9和11节)允许提高安全性。尤其

o the updates in Sections 7 and 11 prevent an illegitimate node to maintain mappings activated in the NAT while these mappings should be cleared, and

o 第7节和第11节中的更新防止非法节点在NAT中维护激活的映射,同时应清除这些映射,以及

o port randomization (Section 9) complicates tracking hosts located behind a NAT.

o 端口随机化(第9节)使跟踪NAT后面的主机变得复杂。

Sections 4 and 12 propose updates that increase the serviceability of a host located behind a NAT. These updates do not introduce any additional security concerns to [RFC4787], [RFC5382], and [RFC5508].

第4节和第12节提出了提高NAT后面主机可用性的更新。这些更新不会给[RFC4787]、[RFC5382]和[RFC5508]带来任何额外的安全问题。

The updates in Sections 5 and 6 allow for a better NAT transparency from an application standpoint. Hosts that require a restricted filtering behavior should enable specific policies (e.g., Access Control List (ACL)) either locally or by soliciting a dedicated security device (e.g., firewall). How a host updates its filtering policies is out of scope of this document.

第5节和第6节中的更新从应用程序的角度考虑了更好的NAT透明度。需要受限过滤行为的主机应在本地或通过请求专用安全设备(如防火墙)启用特定策略(如访问控制列表(ACL))。主机如何更新其筛选策略超出了本文档的范围。

The update in Section 8 induces security concerns that are specific to the protocol used to interact with the NAT. For example, if PCP is used to explicitly request parity preservation for a given mapping, the security considerations discussed in [RFC6887] should be taken into account.

第8节中的更新引发了特定于用于与NAT交互的协议的安全问题。例如,如果使用PCP显式请求给定映射的奇偶校验保留,则应考虑[RFC6887]中讨论的安全注意事项。

The update in Section 10 may have undesired effects on the performance of the NAT in environments in which fragmentation is massively experienced. Such an issue may be used as an attack vector against NATs.

第10节中的更新可能会对大量经历碎片化的环境中的NAT性能产生不期望的影响。这样的问题可以用作攻击NAT的攻击向量。

14. References
14. 工具书类
14.1. Normative References
14.1. 规范性引用文件

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,DOI 10.17487/RFC2119,1997年3月<http://www.rfc-editor.org/info/rfc2119>.

[RFC4787] Audet, F., Ed. and C. Jennings, "Network Address Translation (NAT) Behavioral Requirements for Unicast UDP", BCP 127, RFC 4787, DOI 10.17487/RFC4787, January 2007, <http://www.rfc-editor.org/info/rfc4787>.

[RFC4787]Audet,F.,Ed.和C.Jennings,“单播UDP的网络地址转换(NAT)行为要求”,BCP 127,RFC 4787,DOI 10.17487/RFC4787,2007年1月<http://www.rfc-editor.org/info/rfc4787>.

[RFC5382] Guha, S., Ed., Biswas, K., Ford, B., Sivakumar, S., and P. Srisuresh, "NAT Behavioral Requirements for TCP", BCP 142, RFC 5382, DOI 10.17487/RFC5382, October 2008, <http://www.rfc-editor.org/info/rfc5382>.

[RFC5382]Guha,S.,Ed.,Biswas,K.,Ford,B.,Sivakumar,S.,和P.Srisuresh,“TCP的NAT行为要求”,BCP 142,RFC 5382,DOI 10.17487/RFC5382,2008年10月<http://www.rfc-editor.org/info/rfc5382>.

[RFC5508] Srisuresh, P., Ford, B., Sivakumar, S., and S. Guha, "NAT Behavioral Requirements for ICMP", BCP 148, RFC 5508, DOI 10.17487/RFC5508, April 2009, <http://www.rfc-editor.org/info/rfc5508>.

[RFC5508]Srisuresh,P.,Ford,B.,Sivakumar,S.,和S.Guha,“ICMP的NAT行为要求”,BCP 148,RFC 5508,DOI 10.17487/RFC5508,2009年4月<http://www.rfc-editor.org/info/rfc5508>.

[RFC6056] Larsen, M. and F. Gont, "Recommendations for Transport-Protocol Port Randomization", BCP 156, RFC 6056, DOI 10.17487/RFC6056, January 2011, <http://www.rfc-editor.org/info/rfc6056>.

[RFC6056]Larsen,M.和F.Gont,“运输协议端口随机化建议”,BCP 156,RFC 6056,DOI 10.17487/RFC6056,2011年1月<http://www.rfc-editor.org/info/rfc6056>.

[RFC6146] Bagnulo, M., Matthews, P., and I. van Beijnum, "Stateful NAT64: Network Address and Protocol Translation from IPv6 Clients to IPv4 Servers", RFC 6146, DOI 10.17487/RFC6146, April 2011, <http://www.rfc-editor.org/info/rfc6146>.

[RFC6146]Bagnulo,M.,Matthews,P.,和I.van Beijnum,“有状态NAT64:从IPv6客户端到IPv4服务器的网络地址和协议转换”,RFC 6146,DOI 10.17487/RFC6146,2011年4月<http://www.rfc-editor.org/info/rfc6146>.

[RFC6864] Touch, J., "Updated Specification of the IPv4 ID Field", RFC 6864, DOI 10.17487/RFC6864, February 2013, <http://www.rfc-editor.org/info/rfc6864>.

[RFC6864]Touch,J.,“IPv4 ID字段的更新规范”,RFC 6864,DOI 10.17487/RFC6864,2013年2月<http://www.rfc-editor.org/info/rfc6864>.

14.2. Informative References
14.2. 资料性引用

[RFC2663] Srisuresh, P. and M. Holdrege, "IP Network Address Translator (NAT) Terminology and Considerations", RFC 2663, DOI 10.17487/RFC2663, August 1999, <http://www.rfc-editor.org/info/rfc2663>.

[RFC2663]Srisuresh,P.和M.Holdrege,“IP网络地址转换器(NAT)术语和注意事项”,RFC 2663,DOI 10.17487/RFC2663,1999年8月<http://www.rfc-editor.org/info/rfc2663>.

[RFC3022] Srisuresh, P. and K. Egevang, "Traditional IP Network Address Translator (Traditional NAT)", RFC 3022, DOI 10.17487/RFC3022, January 2001, <http://www.rfc-editor.org/info/rfc3022>.

[RFC3022]Srisuresh,P.和K.Egevang,“传统IP网络地址转换器(传统NAT)”,RFC 3022,DOI 10.17487/RFC3022,2001年1月<http://www.rfc-editor.org/info/rfc3022>.

[RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, "Session Traversal Utilities for NAT (STUN)", RFC 5389, DOI 10.17487/RFC5389, October 2008, <http://www.rfc-editor.org/info/rfc5389>.

[RFC5389]Rosenberg,J.,Mahy,R.,Matthews,P.,和D.Wing,“NAT(STUN)的会话遍历实用程序”,RFC 5389,DOI 10.17487/RFC5389,2008年10月<http://www.rfc-editor.org/info/rfc5389>.

[RFC6269] Ford, M., Ed., Boucadair, M., Durand, A., Levis, P., and P. Roberts, "Issues with IP Address Sharing", RFC 6269, DOI 10.17487/RFC6269, June 2011, <http://www.rfc-editor.org/info/rfc6269>.

[RFC6269]福特,M.,Ed.,Boucadair,M.,Durand,A.,Levis,P.,和P.Roberts,“IP地址共享问题”,RFC 6269,DOI 10.17487/RFC62692011年6月<http://www.rfc-editor.org/info/rfc6269>.

[RFC6887] Wing, D., Ed., Cheshire, S., Boucadair, M., Penno, R., and P. Selkirk, "Port Control Protocol (PCP)", RFC 6887, DOI 10.17487/RFC6887, April 2013, <http://www.rfc-editor.org/info/rfc6887>.

[RFC6887]Wing,D.,Ed.,Cheshire,S.,Boucadair,M.,Penno,R.,和P.Selkirk,“港口控制协议(PCP)”,RFC 6887,DOI 10.17487/RFC6887,2013年4月<http://www.rfc-editor.org/info/rfc6887>.

[RFC6888] Perreault, S., Ed., Yamagata, I., Miyakawa, S., Nakagawa, A., and H. Ashida, "Common Requirements for Carrier-Grade NATs (CGNs)", BCP 127, RFC 6888, DOI 10.17487/RFC6888, April 2013, <http://www.rfc-editor.org/info/rfc6888>.

[RFC6888]Perreault,S.,Ed.,Yamagata,I.,Miyakawa,S.,Nakagawa,A.,和H.Ashida,“载体级NAT(CGN)的通用要求”,BCP 127,RFC 6888,DOI 10.17487/RFC6888,2013年4月<http://www.rfc-editor.org/info/rfc6888>.

[RFC7296] Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and T. Kivinen, "Internet Key Exchange Protocol Version 2 (IKEv2)", STD 79, RFC 7296, DOI 10.17487/RFC7296, October 2014, <http://www.rfc-editor.org/info/rfc7296>.

[RFC7296]Kaufman,C.,Hoffman,P.,Nir,Y.,Eronen,P.,和T.Kivinen,“互联网密钥交换协议版本2(IKEv2)”,STD 79,RFC 7296,DOI 10.17487/RFC72962014年10月<http://www.rfc-editor.org/info/rfc7296>.

[RFC7753] Sun, Q., Boucadair, M., Sivakumar, S., Zhou, C., Tsou, T., and S. Perreault, "Port Control Protocol (PCP) Extension for Port-Set Allocation", RFC 7753, DOI 10.17487/RFC7753, February 2016, <http://www.rfc-editor.org/info/rfc7753>.

[RFC7753]Sun,Q.,Boucadair,M.,Sivakumar,S.,Zhou,C.,Tsou,T.,和S.Perreault,“用于端口集分配的端口控制协议(PCP)扩展”,RFC 7753,DOI 10.17487/RFC7753,2016年2月<http://www.rfc-editor.org/info/rfc7753>.

Acknowledgements

致谢

Thanks to Dan Wing, Suresh Kumar, Mayuresh Bakshi, Rajesh Mohan, Lars Eggert, Gorry Fairhurst, Brandon Williams, and David Black for their review and discussion.

感谢Dan Wing、Suresh Kumar、Mayuresh Bakshi、Rajesh Mohan、Lars Eggert、Gorry Fairhurst、Brandon Williams和David Black的回顾和讨论。

Many thanks to Ben Laurie for the SecDir review and Dan Romascanu for the Gen-ART review.

非常感谢Ben Laurie的SecDir评论和Dan Romascanu的Gen ART评论。

Dan Wing proposed some text for the configurable errors in Section 7.1.

Dan Wing针对第7.1节中的可配置错误提出了一些文本。

Contributors

贡献者

The following individual contributed text to the document:

以下个人为文件提供了文本:

Sarat Kamiset Insieme Networks United States

美国Sarat Kamiset Insieme网络公司

Authors' Addresses

作者地址

Reinaldo Penno Cisco Systems, Inc. 170 West Tasman Drive San Jose, California 95134 United States

美国加利福尼亚州圣何塞西塔斯曼大道170号雷纳尔多·佩诺思科系统公司,邮编95134

   Email: repenno@cisco.com
        
   Email: repenno@cisco.com
        

Simon Perreault Jive Communications Canada

Simon Perreault Jive通信加拿大公司

   Email: sperreault@jive.com
        
   Email: sperreault@jive.com
        

Mohamed Boucadair (editor) Orange Rennes 35000 France

Mohamed Boucadair(编辑)Orange Rennes 35000法国

   Email: mohamed.boucadair@orange.com
        
   Email: mohamed.boucadair@orange.com
        

Senthil Sivakumar Cisco Systems, Inc. United States

Senthil Sivakumar思科系统公司,美国

   Email: ssenthil@cisco.com
        
   Email: ssenthil@cisco.com
        

Kengo Naito NTT Tokyo Japan

日本东京剑道新台币

   Email: k.naito@nttv6.jp
        
   Email: k.naito@nttv6.jp