Internet Engineering Task Force (IETF)                         D. Thaler
Request for Comments: 6081                                     Microsoft
Updates: 4380                                               January 2011
Category: Standards Track
ISSN: 2070-1721
        
Internet Engineering Task Force (IETF)                         D. Thaler
Request for Comments: 6081                                     Microsoft
Updates: 4380                                               January 2011
Category: Standards Track
ISSN: 2070-1721
        

Teredo Extensions

Teredo扩展

Abstract

摘要

This document specifies a set of extensions to the Teredo protocol. These extensions provide additional capabilities to Teredo, including support for more types of Network Address Translations (NATs) and support for more efficient communication.

本文档指定Teredo协议的一组扩展。这些扩展为Teredo提供了额外的功能,包括支持更多类型的网络地址转换(NAT)和支持更高效的通信。

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/rfc6081.

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

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许可证中所述的无担保。

Table of Contents

目录

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
   2.  Terminology  . . . . . . . . . . . . . . . . . . . . . . . . .  3
   3.  Overview . . . . . . . . . . . . . . . . . . . . . . . . . . .  6
     3.1.  Symmetric NAT Support Extension  . . . . . . . . . . . . .  9
     3.2.  UPnP-Enabled Symmetric NAT Extension . . . . . . . . . . . 11
     3.3.  Port-Preserving Symmetric NAT Extension  . . . . . . . . . 13
     3.4.  Sequential Port-Symmetric NAT Extension  . . . . . . . . . 14
     3.5.  Hairpinning Extension  . . . . . . . . . . . . . . . . . . 15
     3.6.  Server Load Reduction Extension  . . . . . . . . . . . . . 17
   4.  Message Syntax . . . . . . . . . . . . . . . . . . . . . . . . 18
     4.1.  Trailers . . . . . . . . . . . . . . . . . . . . . . . . . 18
     4.2.  Nonce Trailer  . . . . . . . . . . . . . . . . . . . . . . 19
     4.3.  Alternate Address Trailer  . . . . . . . . . . . . . . . . 19
     4.4.  Neighbor Discovery Option Trailer  . . . . . . . . . . . . 20
     4.5.  Random Port Trailer  . . . . . . . . . . . . . . . . . . . 21
   5.  Protocol Details . . . . . . . . . . . . . . . . . . . . . . . 22
     5.1.  Common Processing  . . . . . . . . . . . . . . . . . . . . 22
       5.1.1.  Refresh Interval . . . . . . . . . . . . . . . . . . . 22
       5.1.2.  Trailer Processing . . . . . . . . . . . . . . . . . . 23
     5.2.  Symmetric NAT Support Extension  . . . . . . . . . . . . . 23
       5.2.1.  Abstract Data Model  . . . . . . . . . . . . . . . . . 24
       5.2.2.  Timers . . . . . . . . . . . . . . . . . . . . . . . . 24
       5.2.3.  Initialization . . . . . . . . . . . . . . . . . . . . 24
       5.2.4.  Message Processing . . . . . . . . . . . . . . . . . . 24
     5.3.  UPnP-Enabled Symmetric NAT Extension . . . . . . . . . . . 25
       5.3.1.  Abstract Data Model  . . . . . . . . . . . . . . . . . 26
       5.3.2.  Timers . . . . . . . . . . . . . . . . . . . . . . . . 26
       5.3.3.  Initialization . . . . . . . . . . . . . . . . . . . . 27
       5.3.4.  Message Processing . . . . . . . . . . . . . . . . . . 28
       5.3.5.  Shutdown . . . . . . . . . . . . . . . . . . . . . . . 29
     5.4.  Port-Preserving Symmetric NAT Extension  . . . . . . . . . 30
       5.4.1.  Abstract Data Model  . . . . . . . . . . . . . . . . . 30
       5.4.2.  Timers . . . . . . . . . . . . . . . . . . . . . . . . 31
       5.4.3.  Initialization . . . . . . . . . . . . . . . . . . . . 32
       5.4.4.  Message Processing . . . . . . . . . . . . . . . . . . 32
     5.5.  Sequential Port-Symmetric NAT Extension  . . . . . . . . . 35
       5.5.1.  Abstract Data Model  . . . . . . . . . . . . . . . . . 35
       5.5.2.  Timers . . . . . . . . . . . . . . . . . . . . . . . . 36
       5.5.3.  Initialization . . . . . . . . . . . . . . . . . . . . 37
       5.5.4.  Message Processing . . . . . . . . . . . . . . . . . . 37
     5.6.  Hairpinning Extension  . . . . . . . . . . . . . . . . . . 39
       5.6.1.  Abstract Data Model  . . . . . . . . . . . . . . . . . 39
       5.6.2.  Timers . . . . . . . . . . . . . . . . . . . . . . . . 39
       5.6.3.  Initialization . . . . . . . . . . . . . . . . . . . . 39
       5.6.4.  Message Processing . . . . . . . . . . . . . . . . . . 40
        
   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
   2.  Terminology  . . . . . . . . . . . . . . . . . . . . . . . . .  3
   3.  Overview . . . . . . . . . . . . . . . . . . . . . . . . . . .  6
     3.1.  Symmetric NAT Support Extension  . . . . . . . . . . . . .  9
     3.2.  UPnP-Enabled Symmetric NAT Extension . . . . . . . . . . . 11
     3.3.  Port-Preserving Symmetric NAT Extension  . . . . . . . . . 13
     3.4.  Sequential Port-Symmetric NAT Extension  . . . . . . . . . 14
     3.5.  Hairpinning Extension  . . . . . . . . . . . . . . . . . . 15
     3.6.  Server Load Reduction Extension  . . . . . . . . . . . . . 17
   4.  Message Syntax . . . . . . . . . . . . . . . . . . . . . . . . 18
     4.1.  Trailers . . . . . . . . . . . . . . . . . . . . . . . . . 18
     4.2.  Nonce Trailer  . . . . . . . . . . . . . . . . . . . . . . 19
     4.3.  Alternate Address Trailer  . . . . . . . . . . . . . . . . 19
     4.4.  Neighbor Discovery Option Trailer  . . . . . . . . . . . . 20
     4.5.  Random Port Trailer  . . . . . . . . . . . . . . . . . . . 21
   5.  Protocol Details . . . . . . . . . . . . . . . . . . . . . . . 22
     5.1.  Common Processing  . . . . . . . . . . . . . . . . . . . . 22
       5.1.1.  Refresh Interval . . . . . . . . . . . . . . . . . . . 22
       5.1.2.  Trailer Processing . . . . . . . . . . . . . . . . . . 23
     5.2.  Symmetric NAT Support Extension  . . . . . . . . . . . . . 23
       5.2.1.  Abstract Data Model  . . . . . . . . . . . . . . . . . 24
       5.2.2.  Timers . . . . . . . . . . . . . . . . . . . . . . . . 24
       5.2.3.  Initialization . . . . . . . . . . . . . . . . . . . . 24
       5.2.4.  Message Processing . . . . . . . . . . . . . . . . . . 24
     5.3.  UPnP-Enabled Symmetric NAT Extension . . . . . . . . . . . 25
       5.3.1.  Abstract Data Model  . . . . . . . . . . . . . . . . . 26
       5.3.2.  Timers . . . . . . . . . . . . . . . . . . . . . . . . 26
       5.3.3.  Initialization . . . . . . . . . . . . . . . . . . . . 27
       5.3.4.  Message Processing . . . . . . . . . . . . . . . . . . 28
       5.3.5.  Shutdown . . . . . . . . . . . . . . . . . . . . . . . 29
     5.4.  Port-Preserving Symmetric NAT Extension  . . . . . . . . . 30
       5.4.1.  Abstract Data Model  . . . . . . . . . . . . . . . . . 30
       5.4.2.  Timers . . . . . . . . . . . . . . . . . . . . . . . . 31
       5.4.3.  Initialization . . . . . . . . . . . . . . . . . . . . 32
       5.4.4.  Message Processing . . . . . . . . . . . . . . . . . . 32
     5.5.  Sequential Port-Symmetric NAT Extension  . . . . . . . . . 35
       5.5.1.  Abstract Data Model  . . . . . . . . . . . . . . . . . 35
       5.5.2.  Timers . . . . . . . . . . . . . . . . . . . . . . . . 36
       5.5.3.  Initialization . . . . . . . . . . . . . . . . . . . . 37
       5.5.4.  Message Processing . . . . . . . . . . . . . . . . . . 37
     5.6.  Hairpinning Extension  . . . . . . . . . . . . . . . . . . 39
       5.6.1.  Abstract Data Model  . . . . . . . . . . . . . . . . . 39
       5.6.2.  Timers . . . . . . . . . . . . . . . . . . . . . . . . 39
       5.6.3.  Initialization . . . . . . . . . . . . . . . . . . . . 39
       5.6.4.  Message Processing . . . . . . . . . . . . . . . . . . 40
        
     5.7.  Server Load Reduction Extension  . . . . . . . . . . . . . 41
       5.7.1.  Abstract Data Model  . . . . . . . . . . . . . . . . . 41
       5.7.2.  Timers . . . . . . . . . . . . . . . . . . . . . . . . 41
       5.7.3.  Initialization . . . . . . . . . . . . . . . . . . . . 42
       5.7.4.  Message Processing . . . . . . . . . . . . . . . . . . 42
   6.  Protocol Examples  . . . . . . . . . . . . . . . . . . . . . . 42
     6.1.  Symmetric NAT Support Extension  . . . . . . . . . . . . . 42
     6.2.  UPnP-Enabled Symmetric NAT Extension . . . . . . . . . . . 45
     6.3.  Port-Preserving Symmetric NAT Extension  . . . . . . . . . 47
     6.4.  Sequential Port-Symmetric NAT Extension  . . . . . . . . . 51
     6.5.  Hairpinning Extension  . . . . . . . . . . . . . . . . . . 54
     6.6.  Server Load Reduction Extension  . . . . . . . . . . . . . 57
   7.  Security Considerations  . . . . . . . . . . . . . . . . . . . 58
   8.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 58
   9.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 58
   10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 58
     10.1. Normative References . . . . . . . . . . . . . . . . . . . 58
     10.2. Informative References . . . . . . . . . . . . . . . . . . 59
        
     5.7.  Server Load Reduction Extension  . . . . . . . . . . . . . 41
       5.7.1.  Abstract Data Model  . . . . . . . . . . . . . . . . . 41
       5.7.2.  Timers . . . . . . . . . . . . . . . . . . . . . . . . 41
       5.7.3.  Initialization . . . . . . . . . . . . . . . . . . . . 42
       5.7.4.  Message Processing . . . . . . . . . . . . . . . . . . 42
   6.  Protocol Examples  . . . . . . . . . . . . . . . . . . . . . . 42
     6.1.  Symmetric NAT Support Extension  . . . . . . . . . . . . . 42
     6.2.  UPnP-Enabled Symmetric NAT Extension . . . . . . . . . . . 45
     6.3.  Port-Preserving Symmetric NAT Extension  . . . . . . . . . 47
     6.4.  Sequential Port-Symmetric NAT Extension  . . . . . . . . . 51
     6.5.  Hairpinning Extension  . . . . . . . . . . . . . . . . . . 54
     6.6.  Server Load Reduction Extension  . . . . . . . . . . . . . 57
   7.  Security Considerations  . . . . . . . . . . . . . . . . . . . 58
   8.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 58
   9.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 58
   10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 58
     10.1. Normative References . . . . . . . . . . . . . . . . . . . 58
     10.2. Informative References . . . . . . . . . . . . . . . . . . 59
        
1. Introduction
1. 介绍

This document specifies extensions to the Teredo protocol, as specified in [RFC4380]. These extensions provide additional capabilities to Teredo, including support for more types of Network Address Translations (NATs) and support for more efficient communication.

本文件规定了Teredo协议的扩展,如[RFC4380]所述。这些扩展为Teredo提供了额外的功能,包括支持更多类型的网络地址转换(NAT)和支持更高效的通信。

2. Terminology
2. 术语

Because this document extends [RFC4380], it uses the following terminology, for consistency with [RFC4380].

由于本文档扩展了[RFC4380],为了与[RFC4380]保持一致,它使用了以下术语。

Address-Restricted NAT: A restricted NAT that accepts packets from an external host's IP address X and port Y if the internal host has sent a packet that is destined to IP address X regardless of the destination port. In the terminology of [RFC4787], this is a NAT with Endpoint-Independent Mapping and Address-Dependent Filtering.

地址受限NAT:一种受限NAT,如果内部主机发送了一个以IP地址X为目的地的数据包,而不考虑目标端口,则该NAT接受来自外部主机IP地址X和端口Y的数据包。在[RFC4787]的术语中,这是一个具有端点无关映射和地址相关过滤的NAT。

Address-Symmetric NAT: A symmetric NAT that has multiple external IP addresses and that assigns different IP addresses and ports when communicating with different external hosts.

地址对称NAT:一种对称NAT,具有多个外部IP地址,在与不同的外部主机通信时分配不同的IP地址和端口。

Cone NAT: A NAT that maps all requests from the same internal IP address and port to the same external IP address and port. Furthermore, any external host can send a packet to the internal host by sending a packet to the mapped external address and port. In the terminology of [RFC4787], this is a NAT with Endpoint-Independent Mapping and Endpoint-Independent Filtering.

Cone NAT:将来自相同内部IP地址和端口的所有请求映射到相同外部IP地址和端口的NAT。此外,任何外部主机都可以通过向映射的外部地址和端口发送数据包来向内部主机发送数据包。在[RFC4787]的术语中,这是一个具有端点无关映射和端点无关过滤的NAT。

Direct Bubble: A Teredo bubble that is sent directly to the IPv4 node whose Teredo address is contained in the Destination field of the IPv6 header, as specified in Section 2.8 of [RFC4380]. The IPv4 Destination Address and UDP Destination Port fields contain a mapped address/port.

直接冒泡:直接发送到IPv4节点的Teredo冒泡,其Teredo地址包含在IPv6标头的目标字段中,如[RFC4380]第2.8节所述。IPv4目标地址和UDP目标端口字段包含映射的地址/端口。

Echo Test: A mechanism to predict the mapped address/port a sequential port-symmetric NAT is using for a client behind it.

Echo测试:一种机制,用于预测顺序端口对称NAT为其背后的客户端使用的映射地址/端口。

Hairpinning: A feature that is available in some NATs where two or more hosts are positioned behind a NAT and each of those hosts is assigned a specific external (public) address and port by the NAT. Hairpinning support in a NAT allows these hosts to send a packet to the external address and port that is assigned to one of the other hosts, and the NAT automatically routes the packet back to the correct host. The term hairpinning is derived from the behavior of the packet, which arrives on, and is sent out to, the same NAT interface.

发夹:在某些NAT中可用的一种功能,其中两个或多个主机位于NAT后面,并且NAT为这些主机中的每个主机分配了特定的外部(公共)地址和端口。NAT中的发夹支持允许这些主机将数据包发送到分配给其他主机之一的外部地址和端口,并且NAT自动将数据包路由回正确的主机。术语发夹源自数据包的行为,数据包到达并发送到同一NAT接口。

Indirect Bubble: A Teredo bubble that is sent indirectly (via the destination's Teredo server) to another Teredo client, as specified in Section 5.2.4 of [RFC4380].

间接气泡:根据[RFC4380]第5.2.4节的规定,间接(通过目的地的Teredo服务器)发送到另一个Teredo客户端的Teredo气泡。

Local Address/Port: The IPv4 address and UDP port from which a Teredo client sends Teredo packets. The local port is referred to as the Teredo service port in [RFC4380]. The local address of a node may or may not be globally routable because the node can be located behind one or more NATs.

本地地址/端口:Teredo客户端从中发送Teredo数据包的IPv4地址和UDP端口。本地端口在[RFC4380]中称为Teredo服务端口。节点的本地地址可能是全局可路由的,也可能不是全局可路由的,因为节点可以位于一个或多个NAT后面。

Mapped Address/Port: A global IPv4 address and a UDP port that results from the translation of a node's own local address/port by one or more NATs. The node learns these values through the Teredo protocol as specified in [RFC4380]. For symmetric NATs, the mapped address/port can be different for every peer with which a node tries to communicate.

映射地址/端口:全局IPv4地址和UDP端口,由一个或多个NAT转换节点自身的本地地址/端口而产生。节点通过[RFC4380]中规定的Teredo协议学习这些值。对于对称NAT,节点尝试与之通信的每个对等方的映射地址/端口可能不同。

Network Address Translation (NAT): The process of converting between IP addresses used within an intranet or other private network and Internet IP addresses.

网络地址转换(NAT):在内部网或其他专用网络中使用的IP地址与Internet IP地址之间进行转换的过程。

Nonce: A time-variant random value used in the connection setup phase to prevent message replay and other types of attacks.

Nonce:连接设置阶段使用的时变随机值,用于防止消息重播和其他类型的攻击。

Peer: A Teredo client with which another Teredo client needs to communicate.

对等方:另一个Teredo客户端需要与之通信的Teredo客户端。

Port-Preserving NAT: A NAT that translates a local address/port to a mapped address/port such that the mapped port has the same value as the local port, as long as that same mapped address/port has not already been used for a different local address/port.

端口保留NAT:将本地地址/端口转换为映射地址/端口的NAT,只要相同的映射地址/端口尚未用于不同的本地地址/端口,则映射端口与本地端口具有相同的值。

Port-Restricted NAT: A restricted NAT that accepts packets from an external host's IP address X and port Y only if the internal host has sent a packet destined to IP address X and port Y. In the terminology of [RFC4787], this is a NAT with Endpoint-Independent Mapping and Address and Port-Dependent Filtering.

端口受限NAT:一种受限NAT,仅当内部主机发送了一个目的地为IP地址X和端口Y的数据包时,才接受来自外部主机IP地址X和端口Y的数据包。在[RFC4787]术语中,这是一种具有端点无关映射和地址及端口相关过滤的NAT。

Port-Symmetric NAT: A symmetric NAT that has only a single external IP address and hence only assigns different ports when communicating with different external hosts.

端口对称NAT:只有一个外部IP地址的对称NAT,因此在与不同的外部主机通信时只分配不同的端口。

Private Address: An IPv4 address that is not globally routable but is part of the private address space specified in Section 3 of [RFC1918].

专用地址:不可全局路由的IPv4地址,但属于[RFC1918]第3节中指定的专用地址空间的一部分。

Public Address: An external global address used by a NAT.

公共地址:NAT使用的外部全局地址。

Restricted NAT: A NAT where all requests from the same internal IP address and port are mapped to the same external IP address and port. Unlike the cone NAT, an external host can send packets to an internal host (by sending a packet to the external mapped address and port) only if the internal host has first sent a packet to the external host. There are two kinds of restricted NATs: address-restricted NATs and port-restricted NATs.

受限NAT:来自相同内部IP地址和端口的所有请求都映射到相同外部IP地址和端口的NAT。与cone NAT不同,只有在内部主机首先向外部主机发送数据包的情况下,外部主机才能向内部主机发送数据包(通过向外部映射的地址和端口发送数据包)。有两种受限NAT:地址受限NAT和端口受限NAT。

Sequential Port-Symmetric NAT: A port-symmetric NAT that allocates external ports sequentially for every {internal IP address and port, destination IP address and port} tuple. The delta used in the sequential assignment is typically 1 or 2 for most such NATs.

顺序端口对称NAT:一种端口对称NAT,为每个{内部IP地址和端口、目标IP地址和端口}元组顺序分配外部端口。对于大多数此类NAT,顺序分配中使用的增量通常为1或2。

Symmetric NAT: A NAT where all requests from the same internal IP address and port and to the same destination IP address and port are mapped to the same external IP address and port. Requests from the same internal IP address and port to a different destination IP address and port may be mapped to a different external IP address and port. Furthermore, a symmetric NAT accepts packets received from an external host's IP address X and port Y only if some internal host has sent packets to IP address X and port Y. In the terminology of [RFC4787], this is a NAT with a mapping behavior of either Address-Dependent Mapping or Address- and Port-Dependent Mapping, and a filtering behavior of either Address-Dependent Filtering or Address-and Port-Dependent Filtering.

对称NAT:一种NAT,其中来自相同内部IP地址和端口以及到相同目标IP地址和端口的所有请求都映射到相同的外部IP地址和端口。从相同的内部IP地址和端口到不同的目标IP地址和端口的请求可以映射到不同的外部IP地址和端口。此外,仅当某个内部主机已将数据包发送到IP地址X和端口Y时,对称NAT才接受从外部主机的IP地址X和端口Y接收的数据包。在[RFC4787]术语中,这是一种具有地址相关映射或地址和端口相关映射的映射行为的NAT,以及地址相关过滤或地址和端口相关过滤的过滤行为。

Teredo Bubble: A Teredo control message (specified in Section 2.8 of [RFC4380]) that is used to create a mapping in a NAT. There are two types of Teredo bubbles: direct bubbles and indirect bubbles.

Teredo Bubble:Teredo控制消息(在[RFC4380]第2.8节中指定),用于在NAT中创建映射。Teredo气泡有两种类型:直接气泡和间接气泡。

Teredo Client: A node that has access to the IPv4 Internet and wants to gain access to the IPv6 Internet using the Teredo protocol.

Teredo客户端:可以访问IPv4 Internet并希望使用Teredo协议访问IPv6 Internet的节点。

Teredo IPv6 Address: An IPv6 address of a Teredo client, as specified in Section 2.14 of [RFC4380].

Teredo IPv6地址:Teredo客户端的IPv6地址,如[RFC4380]第2.14节所述。

Teredo Secondary Server Address: A secondary IPv4 address of a Teredo server with which a Teredo client is configured, as specified in Section 5.2 of [RFC4380].

Teredo次要服务器地址:Teredo客户端配置的Teredo服务器的次要IPv4地址,如[RFC4380]第5.2节所述。

Teredo Server: A node that has a globally routable address on the IPv4 Internet, and is used as a helper to provide IPv6 connectivity to Teredo clients.

Teredo服务器:在IPv4 Internet上具有全局可路由地址的节点,用作向Teredo客户端提供IPv6连接的帮助器。

Teredo Server Address: A (primary) IPv4 address of a Teredo server with which a Teredo client is configured, as specified in Section 5.2 of [RFC4380].

Teredo服务器地址:Teredo服务器的(主)IPv4地址,Teredo客户端使用该地址进行配置,如[RFC4380]第5.2节所述。

UPnP-enabled NAT: A NAT that has the UPnP device control protocol enabled, as specified in [UPNPWANIP]. (Note that today, by default, most UPnP-capable NATs have the UPnP device control protocol disabled.)

已启用UPnP的NAT:已启用UPnP设备控制协议的NAT,如[UPNPWANIP]中所述。(请注意,目前,默认情况下,大多数支持UPnP的NAT都禁用了UPnP设备控制协议。)

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 RFC 2119 [RFC2119].

本文件中的关键词“必须”、“不得”、“要求”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照RFC 2119[RFC2119]中所述进行解释。

3. Overview
3. 概述

The Teredo protocol (as specified in [RFC4380]) enables nodes located behind one or more IPv4 NATs to obtain IPv6 connectivity by tunneling packets over UDP.

Teredo协议(如[RFC4380]中所述)允许位于一个或多个IPv4 NAT后面的节点通过UDP上的隧道数据包获得IPv6连接。

When a node behind a NAT needs to communicate with a peer (i.e., another node) that is behind a NAT, there are four sets of IPv4 address/port pairs of interest:

当NAT后面的节点需要与NAT后面的对等方(即另一个节点)通信时,有四组IPv4地址/端口对:

o The node's own IPv4 address/port.

o 节点自己的IPv4地址/端口。

o The external IPv4 address/port to which the node's NAT translates.

o 节点的NAT转换到的外部IPv4地址/端口。

o The peer's own IPv4 address/port.

o 对等方自己的IPv4地址/端口。

o The external IPv4 address/port to which the peer's NAT translates.

o 对等方的NAT转换到的外部IPv4地址/端口。

When the node sends a packet to a peer, the node needs to send it from the node's own IPv4 address/port, destined to the peer's external IPv4 address/port. By the time it arrives at the peer (i.e., after passing through both NATs), the peer will see the same packet as coming from the node's external IPv4 address/port, destined to the peer's own IPv4 address/port.

当节点向对等方发送数据包时,节点需要从节点自己的IPv4地址/端口发送数据包,目的地为对等方的外部IPv4地址/端口。当它到达对等方时(即,通过两个NAT后),对等方将看到来自节点外部IPv4地址/端口的相同数据包,目的地是对等方自己的IPv4地址/端口。

In this document, the term local address/port refers to a Teredo client's own IPv4 address/port, and mapped address/port refers to the external IPv4 address/port to which its NAT translates the local address/port. That is, the mapped address/port is what the IPv4 Internet sees the Teredo client as.

在本文档中,术语本地地址/端口指Teredo客户端自己的IPv4地址/端口,映射地址/端口指其NAT将本地地址/端口转换为的外部IPv4地址/端口。也就是说,映射的地址/端口就是IPv4 Internet将Teredo客户端视为的地址/端口。

A Teredo client running on a node communicates with a Teredo server to discover its mapped address/port. The mapped address/port, along with the Teredo server address, is used to generate an IPv6 address known as a Teredo IPv6 address. This allows any peer that gets the node's IPv6 address to easily determine the external IPv4 address/ port to which to send IPv6 packets encapsulated in IPv4 UDP messages.

在节点上运行的Teredo客户端与Teredo服务器通信以发现其映射的地址/端口。映射的地址/端口以及Teredo服务器地址用于生成称为Teredo IPv6地址的IPv6地址。这允许获取节点IPv6地址的任何对等方轻松确定外部IPv4地址/端口,以便将封装在IPv4 UDP消息中的IPv6数据包发送到该地址/端口。

This document specifies extensions to the Teredo protocol. These Teredo extensions are independent of each other and can be implemented in isolation, except that the UPnP-Symmetric NAT Extension and the Port-Preserving Symmetric NAT Extension both require the Symmetric NAT Support Extension to be implemented. An implementation of this specification can support any combination of the Teredo extensions, subject to the above-mentioned restriction.

本文档指定Teredo协议的扩展。除了UPnP对称NAT扩展和端口保持对称NAT扩展都需要实现对称NAT支持扩展之外,这些Teredo扩展彼此独立,并且可以单独实现。根据上述限制,本规范的实现可以支持Teredo扩展的任何组合。

The following matrix outlines the connectivity improvements of some of the extensions outlined in this document.

以下矩阵概述了本文档中概述的一些扩展的连接性改进。

                                 Destination NAT
          |      |      |      |      |      | Port-|      |      |
          |      |      |      | UPnP | UPnP | pres.| Seq. |      |
          |      | Addr.| Port | Port | Port | Port-| Port-| Port-| Addr
Source NAT| Cone | rest.| rest.| rest.| symm.| symm.| symm.| symm.| symm
----------+------+------+------+------+------+------+------+------+-----
Cone      |  Yes |  Yes |  Yes |  Yes |  SNS |  SNS |  SNS |  SNS |  SNS
----------+------+------+------+------+------+------+------+------+-----
Address   |  Yes |  Yes |  Yes |  Yes |  SNS |  SNS |  SNS |  SNS |  No
restricted|      |      |      |      |      |      |      |      |
----------+------+------+------+------+------+------+------+------+-----
Port      |  Yes |  Yes |  Yes |  Yes |  No  | SNS+ | SNS+ |  No  |  No
restricted|      |      |      |      |      |  PP  |  SS  |      |
----------+------+------+------+------+------+------+------+------+-----
UPnP Port-|  Yes |  Yes |  Yes |  Yes | SNS+ |  No  |  No  |  No  |  No
restricted|      |      |      |      | UPnP |      |      |      |
----------+------+------+------+------+------+------+------+------+-----
UPnP Port |  SNS |  SNS |  No  | SNS+ | SNS+ |  No  |  No  |  No  |  No
symmetric |      |      |      | UPnP | UPnP |      |      |      |
----------+------+------+------+------+------+------+------+------+-----
Port-     |      |      |  SNS |      |      |  SNS |  SNS |      |
preserving|  SNS |  SNS |   +  |  No  |  No  |   +  |   +  |  No  |  No
Port-     |      |      |  PP  |      |      |  PP  |  SS  |      |
symmetric |      |      |      |      |      |      |      |      |
----------+------+------+------+------+------+------+------+------+-----
Sequential|      |      |  SNS |      |      |      |      |      |
Port-     |  SNS |  SNS |   +  |  No  |  No  |  No  |  No  |  No  |  No
symmetric |      |      |  SS  |      |      |      |      |      |
----------+------+------+------+------+------+------+------+------+-----
Port-     |  SNS |  SNS |  No  |  No  |  No  |  No  |  No  |  No  |  No
symmetric |      |      |      |      |      |      |      |      |
----------+------+------+------+------+------+------+------+------+-----
Address-  |  SNS |  No  |  No  |  No  |  No  |  No  |  No  |  No  |  No
symmetric |      |      |      |      |      |      |      |      |
----------+------+------+------+------+------+------+------+------+-----
        
                                 Destination NAT
          |      |      |      |      |      | Port-|      |      |
          |      |      |      | UPnP | UPnP | pres.| Seq. |      |
          |      | Addr.| Port | Port | Port | Port-| Port-| Port-| Addr
Source NAT| Cone | rest.| rest.| rest.| symm.| symm.| symm.| symm.| symm
----------+------+------+------+------+------+------+------+------+-----
Cone      |  Yes |  Yes |  Yes |  Yes |  SNS |  SNS |  SNS |  SNS |  SNS
----------+------+------+------+------+------+------+------+------+-----
Address   |  Yes |  Yes |  Yes |  Yes |  SNS |  SNS |  SNS |  SNS |  No
restricted|      |      |      |      |      |      |      |      |
----------+------+------+------+------+------+------+------+------+-----
Port      |  Yes |  Yes |  Yes |  Yes |  No  | SNS+ | SNS+ |  No  |  No
restricted|      |      |      |      |      |  PP  |  SS  |      |
----------+------+------+------+------+------+------+------+------+-----
UPnP Port-|  Yes |  Yes |  Yes |  Yes | SNS+ |  No  |  No  |  No  |  No
restricted|      |      |      |      | UPnP |      |      |      |
----------+------+------+------+------+------+------+------+------+-----
UPnP Port |  SNS |  SNS |  No  | SNS+ | SNS+ |  No  |  No  |  No  |  No
symmetric |      |      |      | UPnP | UPnP |      |      |      |
----------+------+------+------+------+------+------+------+------+-----
Port-     |      |      |  SNS |      |      |  SNS |  SNS |      |
preserving|  SNS |  SNS |   +  |  No  |  No  |   +  |   +  |  No  |  No
Port-     |      |      |  PP  |      |      |  PP  |  SS  |      |
symmetric |      |      |      |      |      |      |      |      |
----------+------+------+------+------+------+------+------+------+-----
Sequential|      |      |  SNS |      |      |      |      |      |
Port-     |  SNS |  SNS |   +  |  No  |  No  |  No  |  No  |  No  |  No
symmetric |      |      |  SS  |      |      |      |      |      |
----------+------+------+------+------+------+------+------+------+-----
Port-     |  SNS |  SNS |  No  |  No  |  No  |  No  |  No  |  No  |  No
symmetric |      |      |      |      |      |      |      |      |
----------+------+------+------+------+------+------+------+------+-----
Address-  |  SNS |  No  |  No  |  No  |  No  |  No  |  No  |  No  |  No
symmetric |      |      |      |      |      |      |      |      |
----------+------+------+------+------+------+------+------+------+-----
        

Yes = Supported by [RFC4380].

是=受[RFC4380]支持。

SNS = Supported with the Symmetric NAT Support Extension.

SNS=由对称NAT支持扩展支持。

SNS+UPnP = Supported with the Symmetric NAT Support Extension and UPnP Symmetric NAT Extension.

SNS+UPnP=支持对称NAT支持扩展和UPnP对称NAT扩展。

SNS+PP = Supported with the Symmetric NAT Support Extension and Port-Preserving Symmetric NAT Extension.

SNS+PP=由对称NAT支持扩展和端口保持对称NAT扩展支持。

SNS+SS = Supported with the Symmetric NAT Support Extension and Sequential Port-Symmetric NAT Extension.

SNS+SS=支持对称NAT扩展和顺序端口对称NAT扩展。

No = No connectivity.

否=无连接。

Figure 1: Matrix of Connectivity Improvements for Teredo Extensions

图1:Teredo扩展的连通性改进矩阵

Note that as with [RFC4380], if the qualification process is not successful, Teredo will not be configured with an IPv6 address, and connectivity will function as if Teredo were not present. Similarly, for any combination of NAT types that are not supported by Teredo and the extensions defined herein, the connectivity tests between a client and a peer will fail within a finite period of time, allowing the client to handle this case as with any other type of unreachable destination address (e.g., by trying another address of the destination such as a native IPv4 address).

请注意,与[RFC4380]一样,如果鉴定过程不成功,Teredo将不会配置IPv6地址,并且连接功能将如同Teredo不存在一样。类似地,对于Teredo和本文定义的扩展不支持的NAT类型的任何组合,客户机和对等机之间的连接测试将在有限时间内失败,从而允许客户机像处理任何其他类型的不可到达目的地地址一样处理这种情况(例如,通过尝试目标的另一个地址,如本机IPv4地址)。

3.1. Symmetric NAT Support Extension
3.1. 对称NAT支持扩展

The qualification procedure (as specified in Section 5.2.1 of [RFC4380]) is a process that allows a Teredo client to determine the type of NAT that it is behind, in addition to its mapped address/port as seen by its Teredo server. However, Section 5.2.1 of [RFC4380] suggests that if the client learns it is behind a symmetric NAT, the Teredo client should go into an "offline state" where it is not able to use Teredo. The primary reason for doing so is that it is not easy for Teredo clients to connect to each other if either or both of them are positioned behind a symmetric NAT. Because of the way a symmetric NAT works, a peer sees a different mapped address/port in the IPv4/UDP headers of packets coming from a Teredo client than the node's Teredo server sees (and hence appears in the node's Teredo IPv6 address). Consequently, a symmetric NAT does not allow incoming packets from a peer that are addressed to the mapped address/port embedded in the node's Teredo IPv6 address. Thus, the incoming packets are dropped and communication with Teredo clients behind symmetric NATs is not established.

鉴定程序(如[RFC4380]第5.2.1节所述)是一个允许Teredo客户端确定其背后NAT类型的过程,以及Teredo服务器看到的映射地址/端口。然而,[RFC4380]第5.2.1节建议,如果客户机知道它在对称NAT后面,Teredo客户机应进入“脱机状态”,无法使用Teredo。这样做的主要原因是,如果Teredo客户端中的一个或两个都位于对称NAT后面,则它们之间的连接并不容易。由于对称NAT的工作方式,对等方在来自Teredo客户端的数据包的IPv4/UDP报头中看到的映射地址/端口与节点的Teredo服务器看到的不同(因此出现在节点的Teredo IPv6地址中)。因此,对称NAT不允许来自对等方的传入数据包寻址到节点的Teredo IPv6地址中嵌入的映射地址/端口。因此,传入的数据包被丢弃,并且在对称NAT之后与Teredo客户端的通信没有建立。

With the Symmetric NAT Support Extension, Teredo clients begin to use Teredo even after they detect that they are positioned behind a symmetric NAT.

有了对称NAT支持扩展,Teredo客户机甚至在检测到自己位于对称NAT后面之后也开始使用Teredo。

Consider the topology shown in Figure 2. Teredo Client B uses Teredo Server 2 to learn that its mapped address/port is 192.0.2.10:8192, and constructs a Teredo IPv6 address, as specified in Section 4 of [RFC4380]. Hence, c633:6476 is the hexadecimal value of the address of Teredo Server 2 (198.51.100.118), the mapped port is exclusive-OR'ed with 0xffff to form dfff, and the Mapped Address is exclusive-OR'ed with 0xffffffff to form 3fff:fdf5.

考虑图2所示的拓扑结构。Teredo客户端B使用Teredo服务器2了解其映射地址/端口为192.0.2.10:8192,并按照[RFC4380]第4节的规定构造Teredo IPv6地址。因此,c633:6476是Teredo服务器2(198.51.100.118)地址的十六进制值,映射的端口与0xffff异或形成dfff,映射的地址与0xFFFFFF异或形成3fff:fdf5。

Teredo Client A uses Teredo Server 1 to learn that its mapped address/port is 192.0.2.1:4096 and, with this extension, constructs a Teredo IPv6 address (as specified in Section 4 of [RFC4380]) even though it learns that it is behind a symmetric NAT. Hence, cb00:7178 is the hexadecimal value of the address of Teredo Server 1 (203.0.113.120), the mapped port is exclusive-OR'ed with 0xffff to form efff, and the Mapped Address is exclusive-OR'ed with 0xffffffff to form 3fff:fdfe.

Teredo客户端A使用Teredo服务器1了解其映射的地址/端口为192.0.2.1:4096,并通过此扩展构造Teredo IPv6地址(如[RFC4380]第4节所述),即使它了解到它位于对称NAT后面。因此,cb00:7178是Teredo服务器1(203.0.113.120)地址的十六进制值,映射的端口与0xffff异或形成efff,映射的地址与0xFFFFFF异或形成3fff:fdfe。

The Symmetric NAT Support Extension enables a Teredo client positioned behind a symmetric NAT to communicate with Teredo peers positioned behind a cone or address-restricted NATs as follows, depending on what side initiates the communication.

对称NAT支持扩展使位于对称NAT后面的Teredo客户端能够与位于锥形或地址受限NAT后面的Teredo对等方进行通信,具体如下所示,具体取决于发起通信的一方。

               --------------------------------------------
              /                                            \
             <               IPv6 Internet                  >
              \                                            /
               -|----------------------------------------|-
                |                                        |
          +----------+                             +----------+
          |  Teredo  |                             |  Teredo  |
          | Server 1 |                             | Server 2 |
          +----------+                             +----------+
   203.0.113.120|                          198.51.100.118|
               -|----------------------------------------|-
              /                                            \
             <               IPv4 Internet                  >
              \                                            /
               -|----------------------------------------|-
       192.0.2.1|                              192.0.2.10|
   UDP port 4096|                           UDP port 8192|
           +---------+                             +----------+
           |Symmetric|                             |Other type|
           |   NAT   |                             |  of NAT  |
           +---------+                             +----------+
                |                                        |
       +-----------------+                      +-----------------+
       | Teredo client A |                      | Teredo client B |
       +-----------------+                      +-----------------+
2001:0:cb00:7178:0:efff:3fff:fdfe      2001:0:c633:6476:0:dfff:3fff:fdf5
          Teredo Address                           Teredo Address
        
               --------------------------------------------
              /                                            \
             <               IPv6 Internet                  >
              \                                            /
               -|----------------------------------------|-
                |                                        |
          +----------+                             +----------+
          |  Teredo  |                             |  Teredo  |
          | Server 1 |                             | Server 2 |
          +----------+                             +----------+
   203.0.113.120|                          198.51.100.118|
               -|----------------------------------------|-
              /                                            \
             <               IPv4 Internet                  >
              \                                            /
               -|----------------------------------------|-
       192.0.2.1|                              192.0.2.10|
   UDP port 4096|                           UDP port 8192|
           +---------+                             +----------+
           |Symmetric|                             |Other type|
           |   NAT   |                             |  of NAT  |
           +---------+                             +----------+
                |                                        |
       +-----------------+                      +-----------------+
       | Teredo client A |                      | Teredo client B |
       +-----------------+                      +-----------------+
2001:0:cb00:7178:0:efff:3fff:fdfe      2001:0:c633:6476:0:dfff:3fff:fdf5
          Teredo Address                           Teredo Address
        

Figure 2: Symmetric NAT Example

图2:对称NAT示例

In the first case, assume that a Teredo Client B (B) positioned behind a cone or address-restricted NATs initiates communication with Teredo Client A (A) positioned behind a symmetric NAT. B sends an

在第一种情况下,假设位于圆锥体或地址受限NAT后面的Teredo客户端B(B)启动与位于对称NAT后面的Teredo客户端a(a)的通信。B发了一封信

indirect bubble via A's server (Teredo Server 1) to A, and A responds with a direct bubble. This direct bubble reaches B, because it is positioned behind a cone or address-restricted NAT. However, the mapped address/port in the IPv4/UDP headers of the direct bubble are different from the mapped address/port embedded in A's Teredo IPv6 address. B therefore remembers the mapped address/port of the direct bubble and uses them for future communication with A, and thus communication is established.

间接气泡通过A的服务器(Teredo服务器1)发送到A,A用直接气泡响应。这个直接气泡到达B,因为它位于圆锥体或地址受限NAT的后面。但是,direct bubble的IPv4/UDP标头中的映射地址/端口与A的Teredo IPv6地址中嵌入的映射地址/端口不同。因此,B记住直接气泡的映射地址/端口,并将其用于将来与A的通信,从而建立通信。

In the second case, assume that A, positioned behind a symmetric NAT, initiates communication with B, positioned behind a cone or address-restricted NAT. A sends an indirect bubble to B via B's server (Teredo Server 2), and B responds with a direct bubble. This direct bubble is dropped by A's symmetric NAT because the direct bubble is addressed to the mapped address/port embedded in A's Teredo IPv6 address. However, communication can be established by having B respond with an indirect bubble via A's server (Teredo Server 1). Now the scenario is similar to the first case and communication will be established.

在第二种情况下,假设位于对称NAT后面的A启动与位于圆锥体或地址受限NAT后面的B的通信。A通过B的服务器(Teredo服务器2)向B发送一个间接气泡,B用一个直接气泡响应。A的对称NAT丢弃此直接气泡,因为直接气泡被寻址到A的Teredo IPv6地址中嵌入的映射地址/端口。然而,可以通过让B通过A的服务器(Teredo服务器1)以间接气泡响应来建立通信。现在,场景与第一个案例类似,将建立通信。

3.2. UPnP-Enabled Symmetric NAT Extension
3.2. 支持UPnP的对称NAT扩展

The UPnP-enabled Symmetric NAT Extension is dependent on the Symmetric NAT Support Extension. Only if Teredo clients have been enabled to acquire a Teredo IPv6 address in spite of being behind a symmetric NAT will this extension help in traversing UPnP-enabled Symmetric NATs.

支持UPnP的对称NAT扩展依赖于对称NAT支持扩展。只有当Teredo客户端能够在对称NAT后面获取Teredo IPv6地址时,此扩展才有助于遍历支持UPnP的对称NAT。

The Symmetric NAT Support Extension enables communication between Teredo clients behind symmetric NATs with Teredo clients behind cone NATs or address-restricted NATs. However, clients behind symmetric NATs can still not communicate with clients behind port-restricted NATs or symmetric NATs.

对称NAT支持扩展支持对称NAT后的Teredo客户端与cone NAT或地址受限NAT后的Teredo客户端之间的通信。但是,对称NAT后面的客户端仍然无法与端口受限NAT或对称NAT后面的客户端通信。

Referring again to Figure 2 (see Section 3.1), assume that Teredo Client A is positioned behind a symmetric NAT and initiates communication with Client B, which is positioned behind a port-restricted NAT. Client A sends a direct bubble and an indirect bubble to Client B via Client B's server (Teredo Server 2). As per the characteristics of the symmetric NAT, the IPv4 source of the direct bubble contains a different mapped address and/or port than the one embedded in the Teredo server. This direct bubble is dropped because Client B's NAT does not have state to let it pass through, and Client B does not learn the mapped address/port used in the IPv4/ UDP headers. In response to the indirect bubble from Client A, Client B sends a direct bubble destined to the mapped address/port embedded in Client A's Teredo IPv6 address. This direct bubble is dropped because Client A's NAT does not have state to accept packets

再次参考图2(参见第3.1节),假设Teredo客户端A位于对称NAT后面,并启动与客户端B的通信,客户端B位于端口受限NAT后面。客户端A通过客户端B的服务器(Teredo服务器2)向客户端B发送直接气泡和间接气泡。根据对称NAT的特征,direct bubble的IPv4源包含与Teredo服务器中嵌入的源不同的映射地址和/或端口。删除此直接冒泡是因为客户端B的NAT没有允许其通过的状态,并且客户端B不了解IPv4/UDP报头中使用的映射地址/端口。作为对来自客户端A的间接冒泡的响应,客户端B发送一个直接冒泡,目的地是嵌入在客户端A的Teredo IPv6地址中的映射地址/端口。由于客户机A的NAT没有接受数据包的状态,因此会丢弃此直接冒泡

destined to that mapped address/port. The direct bubble does, however, cause Client B's NAT to set up outgoing state for the mapped address/port embedded in Client A's Teredo IPv6 address.

目的地为该映射地址/端口。然而,直接冒泡确实会导致客户端B的NAT为嵌入在客户端A的Teredo IPv6地址中的映射地址/端口设置传出状态。

As described in Section 3.1, Client B also sends an indirect bubble that elicits a direct bubble from Client A. Unlike the case in Section 3.1, however, the direct bubble from Client A is dropped as Client B's NAT does not have state for the mapped address/port that Client A's NAT uses. Note that Client B's NAT is port-restricted and hence requires both the mapped address and port to be the same as in its outgoing state, whereas in Section 3.1, Client A's NAT was a cone or address-restricted NAT which only required the mapped address (but not port) to be the same. Thus, communication between Client A and Client B fails. If Client B were behind a symmetric NAT, the problem is further complicated by Client B's NAT using a different outgoing mapped address/port than the one embedded in Client B's Teredo IPv6 address.

如第3.1节所述,客户端B还发送一个间接冒泡,从客户端a引出一个直接冒泡。然而,与第3.1节中的情况不同,由于客户端B的NAT没有客户端a的NAT使用的映射地址/端口的状态,客户端a的直接冒泡被丢弃。请注意,客户端B的NAT是端口受限的,因此要求映射地址和端口与其传出状态相同,而在第3.1节中,客户端A的NAT是锥形或地址受限NAT,仅要求映射地址(而不是端口)相同。因此,客户端A和客户端B之间的通信失败。如果客户机B位于对称NAT之后,则客户机B的NAT使用的传出映射地址/端口与客户机B的Teredo IPv6地址中嵌入的地址/端口不同,从而使问题更加复杂。

If a Teredo client is separated from the global Internet by a single UPnP-enabled symmetric or port-restricted NAT, it can communicate with other Teredo clients that are positioned behind a single UPnP-enabled symmetric or port-restricted NAT as follows.

如果Teredo客户端通过单个启用UPnP的对称或端口限制NAT与全球互联网分离,则它可以与位于单个启用UPnP的对称或端口限制NAT后面的其他Teredo客户端通信,如下所示。

Teredo clients, before communicating with the Teredo server during the qualification procedure, use UPnP to reserve a translation from a local address/port to a mapped-address/port. Therefore, during the qualification procedure, the Teredo server reflects back the reserved mapped address/port, which then is included in the Teredo IPv6 address. The mapping created by UPnP allows the NAT to forward packets destined for the mapped address/port to the local address/ port, independent of the source of the packets. It typically does not, however, cause packets sourced from the local address/port to be translated to have the mapped address/port as the external source and hence continues to function as a symmetric NAT in this respect.

Teredo客户端在鉴定过程中与Teredo服务器通信之前,使用UPnP保留从本地地址/端口到映射地址/端口的转换。因此,在鉴定过程中,Teredo服务器会反射保留的映射地址/端口,该地址/端口随后包含在Teredo IPv6地址中。UPnP创建的映射允许NAT将目的地为映射地址/端口的数据包转发到本地地址/端口,与数据包的源无关。然而,它通常不会导致源于本地地址/端口的包被转换为具有映射的地址/端口作为外部源,因此在这方面继续作为对称NAT起作用。

Thus, a Teredo client, positioned behind a UPnP-enabled symmetric NAT, can receive a direct bubble sent by any Teredo peer. The Teredo client compares the peer's mapped address/port as seen in the IPv4/ UDP headers with the mapped address/port in the peer's Teredo IPv6 address. If the two mappings are different, the packet was sent by another Teredo client positioned behind a symmetric NAT. The Symmetric NAT Support Extension suggested that the Teredo client use the peer's mapped address/port seen in the IPv4/UDP headers for future communication. However, because symmetric NAT-to-symmetric NAT communication would not have been possible anyway, the Teredo client sends back a direct bubble to the mapped port/address embedded

因此,位于支持UPnP的对称NAT后面的Teredo客户端可以接收任何Teredo对等方发送的直接气泡。Teredo客户端将IPv4/UDP标头中显示的对等方的映射地址/端口与对等方的Teredo IPv6地址中的映射地址/端口进行比较。如果两个映射不同,则数据包由位于对称NAT后面的另一个Teredo客户端发送。对称NAT支持扩展建议Teredo客户端使用IPv4/UDP头中的对等映射地址/端口进行未来通信。但是,由于对称NAT到对称NAT通信无论如何都不可能实现,Teredo客户端将直接气泡发送回映射的嵌入端口/地址

in the peer's Teredo IPv6 address. If the peer is also situated behind a UPnP-enabled NAT, the direct bubble will make it through and communication will be established.

在对等方的Teredo IPv6地址中。如果对等方也位于支持UPnP的NAT后面,则直接气泡将通过并建立通信。

Even though communication is established between the two Teredo IPv6 addresses, the mappings will be asymmetric in the two directions of data transfer. Specifically, incoming packets will be destined to the reserved mapped address/port that is embedded in the Teredo IPv6 address. Outgoing packets will instead appear to come from a different mapped address/port due to the symmetric NAT behavior.

尽管在两个Teredo IPv6地址之间建立了通信,但映射在数据传输的两个方向上是不对称的。具体而言,传入的数据包将发送到Teredo IPv6地址中嵌入的保留映射地址/端口。由于对称NAT行为,传出数据包似乎来自不同的映射地址/端口。

3.3. Port-Preserving Symmetric NAT Extension
3.3. 端口保持对称NAT扩展

The Port-Preserving Symmetric NAT Extension is dependent on the Symmetric NAT Support Extension (Section 3.1). Only if Teredo clients have been enabled to acquire a Teredo IPv6 address in spite of being behind a symmetric NAT will this extension help in traversing port-preserving symmetric NATs.

端口保持对称NAT扩展依赖于对称NAT支持扩展(第3.1节)。只有当Teredo客户端能够在对称NAT后面获取Teredo IPv6地址时,此扩展才有助于遍历保留端口的对称NAT。

The Symmetric NAT Support Extension enables communication between Teredo clients behind symmetric NATs with Teredo clients behind cone NATs or address-restricted NATs. However, clients behind symmetric NATs can still not communicate with clients behind port-restricted or symmetric NATs, as described in Section 3.2. Note that the Port-Preserving Symmetric NAT Extension described here is independent of the UPnP-enabled Symmetric NAT Extension, described in Section 3.2.

对称NAT支持扩展支持对称NAT后的Teredo客户端与cone NAT或地址受限NAT后的Teredo客户端之间的通信。但是,对称NAT后面的客户端仍然不能与端口受限或对称NAT后面的客户端通信,如第3.2节所述。请注意,此处描述的端口保持对称NAT扩展独立于第3.2节中描述的支持UPnP的对称NAT扩展。

If a Teredo client is positioned behind a port-preserving symmetric NAT, the client can communicate with other Teredo clients positioned behind a port-restricted NAT or a port-preserving symmetric NAT as follows.

如果Teredo客户端位于端口保持对称NAT之后,则该客户端可以与位于端口限制NAT或端口保持对称NAT之后的其他Teredo客户端通信,如下所示。

Teredo clients compare the mapped port learned during the qualification procedure with their local port to determine if they are positioned behind a port-preserving NAT. If both the mapped port and the local port have the same value, the Teredo client is positioned behind a port-preserving NAT. At the end of the qualification procedure, the Teredo client also knows if it is positioned behind a symmetric NAT, as described in Section 3.1.

Teredo客户端将在鉴定过程中学习到的映射端口与其本地端口进行比较,以确定它们是否位于保留端口的NAT后面。如果映射端口和本地端口具有相同的值,Teredo客户端将位于保留端口的NAT后面。在鉴定程序结束时,Teredo客户还知道其是否位于对称NAT后面,如第3.1节所述。

Teredo clients positioned behind port-preserving symmetric NATs can also listen on randomly chosen local ports. If the randomly chosen local port has not been used by the symmetric NAT as a mapped port in a prior port-mapping, the NAT uses the same port number as the mapped port. Thus, the challenge is to get the first direct bubble sent out from the random port to be destined to a valid destination address and port. When the mapped address/port is embedded in the destination's Teredo IPv6 address, this is easy.

位于端口保持对称NAT后面的Teredo客户端也可以侦听随机选择的本地端口。如果随机选择的本地端口未被对称NAT用作先前端口映射中的映射端口,则NAT将使用与映射端口相同的端口号。因此,挑战在于获得从随机端口发送的第一个直接气泡,以将其发送到有效的目标地址和端口。当映射的地址/端口嵌入到目标的Teredo IPv6地址中时,这很容易。

The communication setup is more complicated when the destination Teredo client is also positioned behind a port-preserving symmetric NAT. In such a case, both Teredo clients need to send their first direct bubbles to the correct destination mapped address/port. Thus, the protocol messages, which communicate one Teredo client's random port number to the other Teredo client, must be exchanged indirectly (via Teredo servers). When one Teredo client has access to the other Teredo client's random port number, it can send a direct bubble destined to the mapped address embedded in the destination's Teredo IPv6 address, and the mapped port can be the same as the destination's random port number. If both NATs are port-preserving, port-preserved mappings are created on both NATs and the second direct bubble succeeds in reaching the destination.

当目标Teredo客户端也位于保留端口的对称NAT后面时,通信设置更加复杂。在这种情况下,两个Teredo客户端都需要将其第一个直接气泡发送到正确的目标映射地址/端口。因此,将一个Teredo客户端的随机端口号传递给另一个Teredo客户端的协议消息必须(通过Teredo服务器)进行间接交换。当一个Teredo客户端可以访问另一个Teredo客户端的随机端口号时,它可以向嵌入在目标Teredo IPv6地址中的映射地址发送一个直接气泡,并且映射端口可以与目标的随机端口号相同。如果两个NAT都是端口保留的,则会在两个NAT上创建端口保留映射,并且第二个直接气泡成功到达目标。

3.4. Sequential Port-Symmetric NAT Extension
3.4. 顺序端口对称NAT扩展

The Sequential Port-Symmetric NAT Extension is dependent on the Symmetric NAT Support Extension (Section 3.1). This extension helps in traversing a sequential port-symmetric NAT only if Teredo clients are enabled to acquire a Teredo IPv6 address even when behind a symmetric NAT.

顺序端口对称NAT扩展依赖于对称NAT支持扩展(第3.1节)。仅当Teredo客户端能够获取Teredo IPv6地址时(即使在对称NAT后面),此扩展才有助于遍历顺序端口对称NAT。

When the Sequential Port-Symmetric NAT Extension is used, if a Teredo client is positioned behind a sequential port-symmetric NAT, the client can communicate with other Teredo clients that are positioned behind a port-restricted NAT as follows.

使用顺序端口对称NAT扩展时,如果Teredo客户端位于顺序端口对称NAT后面,则该客户端可以与位于端口受限NAT后面的其他Teredo客户端通信,如下所示。

During qualification, if the client discovers it is behind a symmetric NAT that is not port-preserving, the client assumes by default that it is behind a sequential port-symmetric NAT. This assumption is proactive for the following reasons:

在验证期间,如果客户端发现它位于不保留端口的对称NAT后面,则默认情况下,客户端假定它位于顺序端口对称NAT后面。出于以下原因,这种假设是积极的:

o There is no perfect method of discovering whether the client is behind a sequential port-symmetric NAT.

o 没有完美的方法可以发现客户端是否位于顺序端口对称NAT之后。

o These kinds of NATs are notorious for changing their behavior. At times, they could be sequential port-symmetric and at other times not.

o 这类NAT因改变其行为而臭名昭著。有时,它们可能是顺序端口对称的,而有时不是。

o There is no other solution for symmetric NAT traversal so this is a last resort.

o 对称NAT穿越没有其他解决方案,因此这是最后的手段。

Teredo clients positioned behind sequential port-symmetric NATs can also listen on a randomly chosen local port when communicating with a peer. To predict the external port being used for a given peer, the client sends three packets:

位于顺序端口对称NAT后面的Teredo客户端在与对等方通信时也可以侦听随机选择的本地端口。为了预测用于给定对等方的外部端口,客户端发送三个数据包:

o Packet 1 is a router solicitation (as specified in Section 5.2.1 of [RFC4380]) sent to the Teredo server address.

o 数据包1是发送到Teredo服务器地址的路由器请求(如[RFC4380]第5.2.1节所述)。

o Packet 2 is a direct bubble sent to the peer.

o 数据包2是直接发送给对等方的气泡。

o Packet 3 is a router solicitation sent to the secondary Teredo server address.

o 包3是发送到辅助Teredo服务器地址的路由器请求。

As part of the normal Teredo protocol, the Teredo server responds to packets 1 and 3. Based on the information in the responses, the client now knows that Packet 1 was seen as coming from one external port, and Packet 3 was seen as coming from another external port. Assuming the NAT is a sequential port-symmetric NAT, the external port for Packet 2 is estimated (or predicted) to be midway between the external ports for Packets 1 and 3. Note that because other applications might also have been using the NAT between packets 1 and 3, the actual port might not be exactly the midpoint.

作为正常Teredo协议的一部分,Teredo服务器响应数据包1和3。根据响应中的信息,客户端现在知道数据包1被视为来自一个外部端口,数据包3被视为来自另一个外部端口。假设NAT是顺序端口对称NAT,则分组2的外部端口被估计(或预测)为分组1和3的外部端口之间的中间位置。请注意,由于其他应用程序可能也在数据包1和3之间使用NAT,因此实际端口可能不完全是中点。

The Teredo client then communicates the predicted port to its peer, which sends a direct bubble to the communicated port. If the communicated port is indeed the external port for Packet 2, the direct bubble will reach the Teredo client.

Teredo客户端然后将预测的端口传送给它的对等方,对等方向传送的端口发送一个直接气泡。如果通信端口确实是数据包2的外部端口,则直接气泡将到达Teredo客户端。

3.5. Hairpinning Extension
3.5. 发夹延伸

Hairpinning support in a NAT routes packets that are sent from a private (local) address destined to a public (mapped) address of the NAT, back to another private (local) destination address behind the same NAT. If hairpinning support is not available in a NAT, two Teredo clients behind the same NAT are not able to communicate with each other, as specified in Section 8.3 of [RFC4380].

NAT中的发夹支持将从专用(本地)地址发送到NAT的公用(映射)地址的数据包路由回同一NAT后面的另一个专用(本地)目标地址。如[RFC4380]第8.3节所述,如果NAT中不提供发夹支持,则同一NAT后面的两个Teredo客户端将无法相互通信。

The Hairpinning Extension enables two clients behind the same NAT to talk to each other when the NAT does not support hairpinning. This process is illustrated in the following diagram.

当NAT不支持发夹时,发夹扩展使同一NAT后面的两个客户端能够相互通信。此过程如下图所示。

               --------------------------------------------
              /                                            \
             <               IPv6 Internet                  >
              \                                            /
               --------------------|-----------------------
                                   |
                             +----------+
                             |  Teredo  |
                             |  Server  |
                             +----------+
                      203.0.113.120|
               --------------------|-----------------------
              /                                            \
             <               IPv4 Internet                  >
              \                                            /
               --------------------|-----------------------
                     198.51.100.118|
                           NAT +-------+
                       without |  NAT  |
                   hairpinning |   E   |
                       support +-------+
                                   |
                +------------------+--------------------+
     192.168.1.0|                            192.168.1.1|
   UDP port 4095|                          UDP port 4096|
           +---------+                            +----------+
           |   NAT   |                            |    NAT   |
           |    F    |                            |     G    |
           +---------+                            +----------+
                |                                       |
       +-----------------+                     +-----------------+
       | Teredo client A |                     | Teredo client B |
       +-----------------+                     +-----------------+
2001:0:cb00:7178:0:f000:39cc:9b89      2001:0:cb00:7178:0:efff:39cc:9b89
          Teredo Address                          Teredo Address
        
               --------------------------------------------
              /                                            \
             <               IPv6 Internet                  >
              \                                            /
               --------------------|-----------------------
                                   |
                             +----------+
                             |  Teredo  |
                             |  Server  |
                             +----------+
                      203.0.113.120|
               --------------------|-----------------------
              /                                            \
             <               IPv4 Internet                  >
              \                                            /
               --------------------|-----------------------
                     198.51.100.118|
                           NAT +-------+
                       without |  NAT  |
                   hairpinning |   E   |
                       support +-------+
                                   |
                +------------------+--------------------+
     192.168.1.0|                            192.168.1.1|
   UDP port 4095|                          UDP port 4096|
           +---------+                            +----------+
           |   NAT   |                            |    NAT   |
           |    F    |                            |     G    |
           +---------+                            +----------+
                |                                       |
       +-----------------+                     +-----------------+
       | Teredo client A |                     | Teredo client B |
       +-----------------+                     +-----------------+
2001:0:cb00:7178:0:f000:39cc:9b89      2001:0:cb00:7178:0:efff:39cc:9b89
          Teredo Address                          Teredo Address
        

Figure 3: Hairpinning Example

图3:发夹示例

The Teredo Client A (A) includes, as part of its indirect bubble sent to Teredo Client B (B), its local address/port. B, upon receiving the indirect bubble, tries to establish communication by sending direct bubbles to the mapped address/port of A, and also to the local address/port of B.

Teredo客户端A(A)包括其本地地址/端口,作为发送给Teredo客户端B(B)的间接气泡的一部分。B、 收到间接气泡后,尝试通过将直接气泡发送到A的映射地址/端口以及B的本地地址/端口来建立通信。

If a Teredo client is part of a multi-NAT hierarchy and the NAT to which the Teredo client is connected supports the UPnP protocol (as specified in [UPNPWANIP]), the Teredo client can use UPnP to determine the mapped address/port assigned to it by the NAT. This

如果Teredo客户端是多NAT层次结构的一部分,并且Teredo客户端连接到的NAT支持UPnP协议(如[UPNPWANIP]中所述),Teredo客户端可以使用UPnP确定NAT分配给它的映射地址/端口。这

information can be included along with the local address/port when sending the indirect bubble. The destination Teredo client now tries to establish a connection by sending direct bubbles to the mapped address/port in the Teredo IPv6 address, to the local address/port included in the bubble, and also to the mapped address/port included in the bubble.

发送间接气泡时,信息可以与本地地址/端口一起包含。目标Teredo客户端现在尝试通过向Teredo IPv6地址中的映射地址/端口、气泡中包含的本地地址/端口以及气泡中包含的映射地址/端口发送直接气泡来建立连接。

Note that UPnP support is only required if the Teredo clients are behind different NATs in a multi-NAT hierarchy. Without UPnP support, the Hairpinning Extension still allows two hosts behind the same non-hairpinning NAT to communicate using their Teredo IPv6 addresses.

请注意,仅当Teredo客户端位于多NAT层次结构中的不同NAT之后时,才需要UPnP支持。在没有UPnP支持的情况下,发夹扩展仍然允许同一个非发夹NAT后面的两个主机使用其Teredo IPv6地址进行通信。

3.6. Server Load Reduction Extension
3.6. 服务器负载减少扩展

If communication between a Teredo client and a Teredo peer was successfully established but at a later stage was silent for a while, for efficiency, it is best to refresh the mapping state in the NATs that are positioned between them. To refresh the communication between itself and a Teredo peer, a Teredo client needs to solicit a direct bubble response from the Teredo peer. An indirect bubble is sent to solicit a direct bubble response from a Teredo peer, as specified in Section 5.2.4 of [RFC4380]. However, these indirect bubbles increase the load on the Teredo server.

如果Teredo客户机和Teredo对等机之间的通信已成功建立,但在稍后阶段保持沉默一段时间,为了提高效率,最好刷新位于它们之间的NAT中的映射状态。要刷新自身与Teredo对等方之间的通信,Teredo客户端需要从Teredo对等方请求直接气泡响应。按照[RFC4380]第5.2.4节的规定,发送一个间接气泡以请求Teredo对等方的直接气泡响应。但是,这些间接气泡会增加Teredo服务器上的负载。

The Server Load Reduction Extension allows Teredo clients to send direct bubbles most of the time instead of sending indirect bubbles all of the time in the following way:

Server Load Reduction Extension允许Teredo客户端大部分时间发送直接气泡,而不是通过以下方式始终发送间接气泡:

1. When a Teredo client tries to refresh its communication with a Teredo peer, it uses a direct bubble instead of an indirect bubble. However, because direct bubbles do not normally solicit a response, the direct bubble format is extended to be able to solicit a response.

1. 当Teredo客户机尝试刷新与Teredo对等机的通信时,它使用直接冒泡而不是间接冒泡。但是,由于直接冒泡通常不会请求响应,因此直接冒泡格式被扩展为能够请求响应。

2. When a Teredo client receives a direct bubble that is soliciting a response, the Teredo client responds with a direct bubble.

2. 当Teredo客户端收到请求响应的直接气泡时,Teredo客户端将以直接气泡响应。

3. If attempts to re-establish communication with the help of direct bubbles fail, the Teredo client starts over the process of establishing communication with the Teredo peer, as specified in Section 5.2.4 of [RFC4380].

3. 如果在direct bubbles的帮助下重新建立通信的尝试失败,Teredo客户端将按照[RFC4380]第5.2.4节的规定重新开始与Teredo对等方建立通信的过程。

4. Message Syntax
4. 消息语法

All Teredo messages are transported over the User Datagram Protocol (UDP), as specified in Section 3 of [RFC4380].

按照[RFC4380]第3节的规定,所有Teredo消息均通过用户数据报协议(UDP)传输。

In addition, Section 5.2.3 of [RFC4380] states:

此外,[RFC4380]第5.2.3节规定:

An IPv6 packet is deemed valid if it conforms to [RFC2460]: the protocol identifier should indicate an IPv6 packet and the payload length should be consistent with the length of the UDP datagram in which the packet is encapsulated. In addition, the client should check that the IPv6 destination address correspond [sic] to its own Teredo address.

如果IPv6数据包符合[RFC2460]:协议标识符应指示IPv6数据包,且有效负载长度应与封装该数据包的UDP数据报的长度一致,则认为该数据包有效。此外,客户端应检查IPv6目标地址是否与其自己的Teredo地址相对应。

This document updates the word "consistent" above as follows. The IPv6 payload length is "consistent" with the length of the UDP datagram if the IPv6 packet length (i.e., the Payload Length value in the IPv6 header plus the IPv6 header size) is less than or equal to the UDP payload length (i.e., the Length value in the UDP header minus the UDP header size). This allows the use of trailers after the IPv6 packet, which are defined in the following sections.

本文件更新了上述“一致”一词,如下所示。如果IPv6数据包长度(即IPv6报头中的有效负载长度值加上IPv6报头大小)小于或等于UDP有效负载长度(即UDP报头中的长度值减去UDP报头大小),则IPv6有效负载长度与UDP数据报的长度“一致”。这允许在IPv6数据包之后使用拖车,这将在以下部分中定义。

4.1. Trailers
4.1. 拖车

Teredo packets can carry a variable number of type-length-value (TLV) encoded trailers, of the following format (intended to be similar to the use of IPv6 options defined in [RFC2460] section 4.2):

Teredo数据包可携带以下格式的可变数量的类型长度值(TLV)编码拖车(旨在类似于[RFC2460]第4.2节中定义的IPv6选项的使用):

                        1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |        Value (variable)       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
                        1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |        Value (variable)       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Type (1 byte): 8-bit identifier of the type of trailer.

类型(1字节):拖车类型的8位标识符。

Length (1 byte): 8-bit unsigned integer. Length of the Value field of this trailer, in octets.

长度(1字节):8位无符号整数。此预告片的值字段的长度,以八位字节为单位。

Value (variable): Trailer-Type-specific data.

值(变量):拖车类型特定数据。

The trailer Type identifiers are internally encoded such that their highest-order two bits specify the action that is to be taken if the host does not recognize the trailer Type:

拖车类型标识符进行内部编码,以便其最高顺序的两位指定主机无法识别拖车类型时要采取的操作:

00, 10, 11 - skip over this trailer and continue processing the packet.

00、10、11-跳过此拖车并继续处理数据包。

01 - discard the packet.

01-丢弃数据包。

4.2. Nonce Trailer
4.2. 临时拖车

The Nonce Trailer is used by the Symmetric NAT Support Extension (and therefore the UPnP-enabled Symmetric NAT Extension and Port-Preserving Symmetric NAT Extension also) and the Hairpinning Extension. The Nonce Trailer can be present in both indirect and direct bubbles. The nonce in the Nonce Trailer helps authenticate a Teredo client positioned behind a Symmetric NAT.

Nonce拖车由对称NAT支持扩展(因此也包括支持UPnP的对称NAT扩展和保持端口的对称NAT扩展)和发夹扩展使用。临时拖车可存在于间接气泡和直接气泡中。nonce拖车中的nonce有助于对位于对称NAT后面的Teredo客户端进行身份验证。

                        1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Nonce             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              ...              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
                        1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |             Nonce             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              ...              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Type (1 byte): The Trailer Option type. This field MUST be set to 0x01.

类型(1字节):拖车选项类型。此字段必须设置为0x01。

Length (1 byte): The length in bytes of the rest of the option. This field MUST be set to 0x04.

长度(1字节):选项其余部分的长度(以字节为单位)。此字段必须设置为0x04。

Nonce (4 bytes): The nonce value.

Nonce(4字节):Nonce值。

4.3. Alternate Address Trailer
4.3. 备用地址预告片

The Alternate Address Trailer is used by the Hairpinning Extension. The Alternate Address Trailer MUST NOT be present in any packets other than indirect bubbles sent by a Teredo client. The Alternate Address Trailer provides another Teredo client positioned behind the same NAT with more address options that it can use to connect.

Hairpinning扩展使用备用地址尾部。除了Teredo客户端发送的间接气泡外,任何数据包中都不得存在备用地址尾部。备用地址拖车为位于同一NAT后面的另一个Teredo客户端提供了更多的地址选项,可用于连接。

                        1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |            Reserved           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |              Alternate Address/Port List (variable)           |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
                        1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |            Reserved           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |              Alternate Address/Port List (variable)           |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Type (1 byte): The Trailer Option type. This field MUST be set to 0x03.

类型(1字节):拖车选项类型。此字段必须设置为0x03。

Length (1 byte): The length in bytes of the rest of the option. The value of this field MUST be in the range 8 to 26 (i.e., 2 bytes for the Reserved field, and 6 bytes for each entry in the Alternate Address/Port List). This allows for a minimum of one address/port mapping and a maximum of four address/port mappings to be advertised. It SHOULD be at most 14 as a maximum of two address/port mappings can be determined by Teredo: one local address/port and one obtained using UPnP. Because the length of the alternate address/port is 6 bytes, the valid range of values is only 8, 14, 20, and 26.

长度(1字节):选项其余部分的长度(以字节为单位)。此字段的值必须在8到26之间(即,保留字段为2字节,备用地址/端口列表中的每个条目为6字节)。这允许播发最少一个地址/端口映射,最多四个地址/端口映射。它最多应该是14,因为Teredo最多可以确定两个地址/端口映射:一个本地地址/端口和一个使用UPnP获得的地址/端口。由于备用地址/端口的长度为6字节,因此值的有效范围仅为8、14、20和26。

Reserved (2 bytes): This field MUST be set to 0x0000 and ignored on receipt.

保留(2字节):此字段必须设置为0x0000,并在收到时忽略。

Alternate Address/Port List (variable): An array of additional address/port pairs that can be used by other Teredo clients to communicate with the sender. Each alternate address/port entry MUST be formatted as follows:

备用地址/端口列表(变量):其他Teredo客户端可用于与发送方通信的附加地址/端口对数组。每个备用地址/端口条目的格式必须如下所示:

                        1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      IPv4 Address                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              Port             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
                        1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      IPv4 Address                             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              Port             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

IPv4 Address (4 bytes): An IPv4 address in network byte order. This field MUST contain a valid unicast address.

IPv4地址(4字节):按网络字节顺序排列的IPv4地址。此字段必须包含有效的单播地址。

Port (2 bytes): A port number in network byte order. This field MUST NOT be zero.

端口(2字节):按网络字节顺序排列的端口号。此字段不能为零。

4.4. Neighbor Discovery Option Trailer
4.4. 邻居发现选项预告片

The Neighbor Discovery Option Trailer is used by the Server Load Reduction Extension because it allows direct bubbles to encode an IPv6 Neighbor Solicitation (Section 4.3 of [RFC4861]), in addition to an IPv6 Neighbor Advertisement (Section 4.4 of [RFC4861]). This allows packets to be sent without having to relay them through a Teredo server. The Neighbor Discovery Option Trailer allows the receiver to differentiate between a direct bubble that is soliciting a response versus a regular direct bubble. This allows Teredo clients to use direct bubbles to refresh inactive connections instead of using indirect bubbles.

服务器负载减少扩展使用邻居发现选项尾部,因为除了IPv6邻居公告(RFC4861第4.4节)外,它还允许直接气泡对IPv6邻居请求(RFC4861第4.3节)进行编码。这允许发送数据包,而无需通过Teredo服务器进行中继。邻居发现选项拖车允许接收者区分请求响应的直接气泡和常规直接气泡。这允许Teredo客户端使用直接气泡来刷新非活动连接,而不是使用间接气泡。

                        1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Type     |     Length    | DiscoveryType |   Reserved    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              ...              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
                        1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Type     |     Length    | DiscoveryType |   Reserved    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              ...              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Type (1 byte): The Trailer Option type. This field MUST be set to 0x04.

类型(1字节):拖车选项类型。此字段必须设置为0x04。

Length (1 byte): The length in bytes of the rest of the option. This field MUST be set to 0x04.

长度(1字节):选项其余部分的长度(以字节为单位)。此字段必须设置为0x04。

DiscoveryType (1 byte): This field MUST be set to one of the following values:

DiscoveryType(1字节):此字段必须设置为以下值之一:

TeredoDiscoverySolicitation (0x00): The receiver is requested to respond with a direct bubble of DiscoveryType TeredoDiscoveryAdvertisement.

TeredDiscoverySolicitation(0x00):请求接收者以直接气泡式的DiscoveryType TeredDiscoveryAdvertisement进行响应。

TeredoDiscoveryAdvertisement (0x01): The direct bubble is in response to a direct bubble or an indirect bubbles containing DiscoveryType TeredoDiscoverySolicitation.

TeredodiscoveryAdvertision(0x01):直接气泡是对包含DiscoveryType Terediscovery合并的直接气泡或间接气泡的响应。

Reserved (3 bytes): This field MUST be set to 0x000000 on transmission and ignored on receipt.

保留(3字节):此字段在传输时必须设置为0x000000,在接收时必须忽略。

4.5. Random Port Trailer
4.5. 随机港口拖车

The Random Port Trailer is used by the Port-Preserving Symmetric NAT Extension in both indirect and direct bubbles.

在间接气泡和直接气泡中,端口保持对称NAT扩展都使用随机端口拖车。

                        1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Type     |     Length    |          Random Port          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
                        1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |      Type     |     Length    |          Random Port          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Type (1 byte): The Trailer Option type. This field MUST be set to 0x05.

类型(1字节):拖车选项类型。此字段必须设置为0x05。

Length (1 byte): The length in bytes of the rest of the option. This field MUST be set to 0x02.

长度(1字节):选项其余部分的长度(以字节为单位)。此字段必须设置为0x02。

Random Port (2 bytes): The external port that the sender predicts that its NAT has assigned it for communication with the destination. This field MUST be specified in network byte order.

随机端口(2字节):发送方预测其NAT已为其分配与目标通信的外部端口。必须以网络字节顺序指定此字段。

5. Protocol Details
5. 协议详情
5.1. Common Processing
5.1. 共同处理

The behavior in this section applies to multiple extensions.

本节中的行为适用于多个扩展。

Packets equivalent to those sent for a peer the first time a connection is being established MAY be generated at other implementation-specific times. (For example, an implementation might choose to do so when its Neighbor Cache Entry for the peer is in the PROBE state.)

与第一次建立连接时为对等方发送的数据包等效的数据包可以在其他实现特定的时间生成。(例如,当对等方的邻居缓存项处于探测状态时,实现可能会选择这样做。)

5.1.1. Refresh Interval
5.1.1. 刷新间隔

Section 5.2 of [RFC4380] states:

[RFC4380]第5.2节规定:

The client must regularly perform the maintenance procedure in order to guarantee that the Teredo service port remains usable. The need to use this procedure or not depends on the delay since the last interaction with the Teredo server. The refresh procedure takes as a parameter the "Teredo refresh interval". This parameter is initially set to 30 seconds; it can be updated as a result of the optional "interval determination procedure". The randomized refresh interval is set to a value randomly chosen between 75% and 100% of the refresh interval.

客户必须定期执行维护程序,以确保Teredo服务端口保持可用。是否需要使用此过程取决于自上次与Teredo服务器交互以来的延迟。刷新过程将“Teredo刷新间隔”作为参数。该参数最初设置为30秒;可根据可选的“间隔确定程序”进行更新。随机刷新间隔设置为在刷新间隔的75%和100%之间随机选择的值。

This requirement can be problematic when the client is behind a NAT that expires state in less than 30 seconds. The optional interval determination procedure (Section 5.2.7 of [RFC4380]) also does not provide for intervals under 30 seconds. Hence, this document refines the behavior by saying the initial parameter SHOULD be configurable and the default MUST be 30 seconds. An implementation MAY set the randomized refresh interval to a value randomly chosen within an implementation-specific range. Such a range MUST fall within 50% to 150% of the refresh interval.

当客户机处于NAT之后且NAT状态在30秒内过期时,此要求可能会出现问题。可选间隔确定程序(RFC4380第5.2.7节)也未规定30秒以下的间隔。因此,本文档通过说初始参数应该是可配置的,默认值必须是30秒来细化行为。实现可以将随机刷新间隔设置为在特定于实现的范围内随机选择的值。该范围必须在刷新间隔的50%到150%之间。

Section 5.2.5 of [RFC4380] states that:

[RFC4380]第5.2.5节规定:

At regular intervals, the client MUST check the "date and time of the last interaction with the Teredo server" to ensure that at least one packet has been received in the last Randomized Teredo Refresh Interval. If this is not the case, the client SHOULD send a router solicitation message to the server, as specified in Section 5.2.1;

客户机必须定期检查“上次与Teredo服务器交互的日期和时间”,以确保在上次随机Teredo刷新间隔内至少收到一个数据包。如果情况并非如此,则客户端应按照第5.2.1节的规定向服务器发送路由器请求消息;

This document refines the behavior as follows. A Teredo client MAY choose to send additional router solicitation messages to the server at other implementation-specific times. (For example, an implementation might choose to do so when its Neighbor Cache Entry for the router is in the PROBE state.)

本文档细化了以下行为。Teredo客户端可以选择在其他特定于实现的时间向服务器发送额外的路由器请求消息。(例如,当路由器的邻居缓存项处于探测状态时,实现可能会选择这样做。)

5.1.2. Trailer Processing
5.1.2. 拖车处理

A Teredo client MUST process the sequence of trailers in the same order as they appear in the packet. If the Teredo client does not recognize the trailer Type while processing the trailers in the Teredo packet, the client MUST discard the packet if the highest-order bits of the trailer Type contain 01, or else the Teredo client MUST skip past the trailer. A Teredo client MUST stop processing the trailers as soon as a malformed trailer appears in the sequence of trailers in the packet. A trailer is defined as malformed if it has any of the following properties:

Teredo客户端必须按照数据包中显示的相同顺序处理拖车序列。如果Teredo客户端在处理Teredo数据包中的拖车时无法识别拖车类型,则如果拖车类型的最高顺序位包含01,则客户端必须丢弃该数据包,否则Teredo客户端必须跳过拖车。一旦数据包中的拖车序列中出现格式错误的拖车,Teredo客户端必须立即停止处理拖车。如果拖车具有以下任何属性,则将其定义为格式不正确:

o The length in bytes of the remainder of the UDP datagram is less than 2 (the size of the Type and Length fields of a trailer).

o UDP数据报其余部分的字节长度小于2(拖车的类型和长度字段的大小)。

o The length in bytes of the remainder of the UDP datagram is less than 2 + the value of the Length field of the trailer.

o UDP数据报其余部分的字节长度小于2+尾部长度字段的值。

5.2. Symmetric NAT Support Extension
5.2. 对称NAT支持扩展

Section 5.2.1 of [RFC4380] advises that no Teredo IPv6 address be configured if the Teredo client is positioned behind a symmetric NAT. For Teredo clients positioned behind symmetric NATs, the mapped address/port used by its NAT when communicating with a Teredo peer is different from the mapped address/port embedded in the Teredo client's Teredo IPv6 address. The Symmetric NAT Support Extension provides a solution to this problem.

[RFC4380]第5.2.1节建议,如果Teredo客户端位于对称NAT后面,则不配置Teredo IPv6地址。对于位于对称NAT后面的Teredo客户端,其NAT在与Teredo对等方通信时使用的映射地址/端口与Teredo客户端Teredo IPv6地址中嵌入的映射地址/端口不同。对称NAT支持扩展为这个问题提供了一个解决方案。

In addition, Section 5.2.9 of [RFC4380] specifies a direct IPv6 connectivity test to determine that the mapped address/port in the Teredo IPv6 address of a peer is not spoofed. It does this through the use of a nonce in ICMPv6 Echo Request and Response messages (which are defined in Section 4 of [RFC4443]). However, the direct IPv6 connectivity test is limited only to communication between Teredo IPv6 addresses and non-Teredo IPv6 addresses. In the following extension, we introduce the use of a nonce in direct and indirect bubbles and provide a mechanism to verify that the mapped address/port are not spoofed.

此外,[RFC4380]第5.2.9节规定了直接IPv6连接测试,以确定对等方的Teredo IPv6地址中的映射地址/端口未被欺骗。它通过在ICMPv6回显请求和响应消息(在[RFC4443]第4节中定义)中使用nonce来实现这一点。但是,直接IPv6连接测试仅限于Teredo IPv6地址和非Teredo IPv6地址之间的通信。在下面的扩展中,我们介绍了在直接和间接冒泡中使用nonce,并提供了一种机制来验证映射的地址/端口是否被欺骗。

This extension is optional; an implementation SHOULD support it.

此扩展是可选的;实现应该支持它。

5.2.1. Abstract Data Model
5.2.1. 抽象数据模型

This section describes a conceptual model of possible data organization that an implementation maintains to participate in this protocol. The described organization is provided to facilitate the explanation of how the protocol behaves. This document does not mandate that implementations adhere to this model as long as their external behavior is consistent with that described in this document.

本节描述实现维护以参与此协议的可能数据组织的概念模型。提供所述组织是为了便于解释协议的行为方式。本文档并不要求实现遵守此模型,只要其外部行为与本文档中描述的一致。

In addition to the state specified in Section 5.2 of [RFC4380], the following are also required.

除了[RFC4380]第5.2节中规定的状态外,还需要以下内容。

Peer Entry: The following additional state is required on a per-peer basis:

对等条目:每个对等条目都需要以下附加状态:

o Nonce Sent: The value of the nonce sent in the last indirect bubble sent to the Teredo peer.

o Nonce Sent:在发送给Teredo对等方的最后一个间接气泡中发送的Nonce的值。

o Nonce Received: The value of the nonce received in the last indirect bubble received from the Teredo peer.

o 接收的Nonce:从Teredo对等方接收的最后一个间接气泡中接收的Nonce的值。

5.2.2. Timers
5.2.2. 计时器

No timers are necessary other than those in [RFC4380].

除[RFC4380]中的计时器外,不需要其他计时器。

5.2.3. Initialization
5.2.3. 初始化

No initialization is necessary other than that specified in [RFC4380].

除[RFC4380]中规定的初始化外,无需进行任何初始化。

5.2.4. Message Processing
5.2.4. 消息处理

Except as specified in the following sections, the rules for message processing are as specified in [RFC4380].

除以下章节另有规定外,信息处理规则见[RFC4380]。

5.2.4.1. Sending an Indirect Bubble
5.2.4.1. 发出间接泡沫

The rules for when indirect bubbles are sent to a Teredo peer are specified in Section 5.2.6 of [RFC4380]. When a Teredo client sends an indirect bubble, it MUST generate a random 4-byte value and include it in the Nonce field of a Nonce Trailer (Section 4.2) appended to the indirect bubble, and also store it in the Nonce Sent field of its Peer Entry for that Teredo peer.

[RFC4380]第5.2.6节规定了将间接气泡发送给Teredo对等体的时间规则。当Teredo客户端发送间接气泡时,它必须生成一个随机的4字节值,并将其包含在附加到间接气泡的Nonce拖车(第4.2节)的Nonce字段中,还必须将其存储在Teredo对等方的对等条目的Nonce Sent字段中。

5.2.4.2. Sending a Direct Bubble
5.2.4.2. 发出直接泡沫

The rules for when direct bubbles are sent to a Teredo peer are specified in Section 5.2.6 of [RFC4380]. When a Teredo client sends a direct bubble to a peer after receiving an indirect bubble with a Nonce Trailer, it MUST include in the direct bubble a Nonce Trailer with the same nonce value.

[RFC4380]第5.2.6节规定了将直接气泡发送给Teredo对等体的规则。当Teredo客户端在接收到带有Nonce尾部的间接气泡后向对等方发送直接气泡时,它必须在直接气泡中包含具有相同Nonce值的Nonce尾部。

If the Teredo client is about to send a direct bubble before it has received an indirect bubble from the Teredo peer, the Teredo client MUST NOT include a Nonce Trailer.

如果Teredo客户端在从Teredo对等方接收到间接气泡之前将要发送一个直接气泡,则Teredo客户端不得包含Nonce尾部。

5.2.4.3. Receiving an Indirect Bubble
5.2.4.3. 接受间接泡沫

The rules for processing an indirect bubble are specified in Section 5.2.3 of [RFC4380]. In addition, when a Teredo client receives an indirect bubble containing a Nonce Trailer, the Teredo client MUST store the nonce in the Nonce Received field of its Peer Entry for that Teredo peer. If an indirect bubble is received without a Nonce Trailer, and the Nonce Received field in the Peer Entry is non-zero, the Nonce Received field SHOULD be set to zero.

[RFC4380]第5.2.3节规定了处理间接气泡的规则。此外,当Teredo客户端接收到包含Nonce尾部的间接气泡时,Teredo客户端必须将Nonce存储在该Teredo对等机的对等机条目的Nonce Received字段中。如果接收到的间接气泡没有Nonce尾部,并且对等条目中的Nonce received字段为非零,则Nonce received字段应设置为零。

5.2.4.4. Receiving a Direct Bubble
5.2.4.4. 直接接受泡沫

If the mapped address/port of the direct bubble matches the mapped address/port embedded in the source Teredo IPv6 address, the direct bubble MUST be accepted, as specified in Section 5.2.3 of [RFC4380].

如果直接编号的映射地址/端口与源Teredo IPv6地址中嵌入的映射地址/端口匹配,则必须按照[RFC4380]第5.2.3节的规定接受直接编号。

In addition, if the mapped address/port does not match the embedded address/port but the direct bubble contains a Nonce Trailer with a nonce that matches the Nonce Sent field of the Teredo peer, the direct bubble MUST be accepted.

此外,如果映射的地址/端口与嵌入的地址/端口不匹配,但直接冒泡包含一个Nonce尾部,其Nonce与Teredo对等方的Nonce Sent字段匹配,则必须接受直接冒泡。

If neither of the above conditions is true, the direct bubble MUST be dropped.

如果上述两种情况均不成立,则必须除去直接气泡。

If the direct bubble is accepted, the Teredo client MUST record the mapped address/port from which the direct bubble is received in the mapped address/port fields of the Teredo peer, as specified in Section 5.2 of [RFC4380].

如果接受直接气泡,Teredo客户端必须按照[RFC4380]第5.2节的规定,在Teredo对等机的映射地址/端口字段中记录接收直接气泡的映射地址/端口。

5.3. UPnP-Enabled Symmetric NAT Extension
5.3. 支持UPnP的对称NAT扩展

The UPnP-enabled Symmetric NAT Extension is optional; an implementation SHOULD support it. This extension has the Symmetric NAT Support Extension (Section 5.2) as a dependency. Any node that implements this extension MUST also implement the Symmetric NAT Support Extension.

支持UPnP的对称NAT扩展是可选的;实现应该支持它。此扩展将对称NAT支持扩展(第5.2节)作为依赖项。实现此扩展的任何节点也必须实现对称NAT支持扩展。

5.3.1. Abstract Data Model
5.3.1. 抽象数据模型

This section describes a conceptual model of possible data organization that an implementation maintains to participate in this protocol. The described organization is provided to facilitate the explanation of how the protocol behaves. This document does not mandate that implementations adhere to this model as long as their external behavior is consistent with that described in this document.

本节描述实现维护以参与此协议的可能数据组织的概念模型。提供所述组织是为了便于解释协议的行为方式。本文档并不要求实现遵守此模型,只要其外部行为与本文档中描述的一致。

This extension extends the abstract data model in Section 5.2.1 by adding the following additional fields.

此扩展通过添加以下附加字段扩展了第5.2.1节中的抽象数据模型。

UPnP-Enabled NAT flag: This is a Boolean value, set to TRUE if the NAT positioned in front of the Teredo client is UPnP enabled. The default value of this flag is FALSE.

已启用UPnP的NAT标志:这是一个布尔值,如果Teredo客户端前面的NAT已启用UPnP,则设置为TRUE。此标志的默认值为FALSE。

UPnP-Mapped Address/Port: The mapped address/port assigned via UPnP to the Teredo client by the UPnP-enabled NAT behind which the Teredo client is positioned. Note that this field has a valid value only if the NAT to which the Teredo client is connected is UPnP enabled. Also, note that if the Teredo client is positioned behind a single NAT only (as opposed to a series of nested NATs), this value is the same as the mapped address/port embedded in its Teredo IPv6 address.

UPnP映射地址/端口:Teredo客户端所在的支持UPnP的NAT通过UPnP分配给Teredo客户端的映射地址/端口。请注意,仅当Teredo客户端连接的NAT已启用UPnP时,此字段才具有有效值。另外,请注意,如果Teredo客户端仅位于单个NAT后面(与一系列嵌套NAT相反),则该值与嵌入其Teredo IPv6地址中的映射地址/端口相同。

Symmetric NAT flag: This is a Boolean value, set to TRUE if the Teredo client is positioned behind a symmetric NAT.

对称NAT标志:这是一个布尔值,如果Teredo客户端位于对称NAT后面,则设置为TRUE。

Peer Entry: The following state needs to be added on a per-peer basis:

对等条目:每个对等条目需要添加以下状态:

o Symmetric Peer flag: This is a Boolean value and is TRUE if the Teredo peer is positioned behind a symmetric NAT.

o 对称对等标志:这是一个布尔值,如果Teredo对等位于对称NAT后面,则为真。

A Teredo client SHOULD also maintain the following state that is persisted across reboots:

Teredo客户端还应在重新启动期间保持以下状态:

o Persisted UPnP-Mapped Port: The mapped port assigned via UPnP to the Teredo client by the UPnP-enabled NAT behind which the Teredo client is positioned. Note that this value is the same as the UPnP-Mapped Port value when both are non-zero. The default value is all zero bytes.

o 持久化UPnP映射端口:Teredo客户端所在的启用UPnP的NAT通过UPnP分配给Teredo客户端的映射端口。请注意,当两者均为非零时,此值与UPnP映射端口值相同。默认值为所有零字节。

5.3.2. Timers
5.3.2. 计时器

No timers are necessary other than those in [RFC4380].

除[RFC4380]中的计时器外,不需要其他计时器。

5.3.3. Initialization
5.3.3. 初始化

Prior to beginning the qualification procedure, the Teredo client MUST first perform the uninitialization procedure specified in Section 5.3.5.1 if the Persisted UPnP-Mapped Port is supported and non-zero.

在开始鉴定程序之前,Teredo客户端必须首先执行第5.3.5.1节中规定的取消初始化程序,前提是支持持久化UPnP映射端口且端口不为零。

The Teredo client MUST then invoke the AddPortMapping function, as specified in Section 2.4.16 of [UPNPWANIP], with the following parameters:

Teredo客户端随后必须使用以下参数调用[UPNPWANIP]第2.4.16节中指定的AddPortMapping函数:

o NewRemoteHost: "" (empty string)

o NewRemoteHost:“”(空字符串)

o NewExternalPort: Local Port value

o NewExternalPort:本地端口值

o NewProtocol: UDP

o 新协议:UDP

o NewInternalPort: Local Port value

o NewInternalPort:本地端口值

o NewInternalClient: Local Address value

o NewInternalClient:本地地址值

o NewEnabled: TRUE

o NewEnabled:TRUE

o NewPortMappingDescription: "TEREDO"

o NewPortMappingDescription:“TEREDO”

o NewLeaseDuration: 0

o 新西兰教育:0

The successful completion of the AddPortMapping function indicates that the NAT has created a port mapping from the external port of the NAT to the internal port of the Teredo client node. The parameters are specified so that any external host should be able to send packets to the Teredo client by sending packets to the mapped address/port. If the AddPortMapping function fails, the Teredo client MUST continue without using this extension. Otherwise, it MUST proceed as follows.

AddPortMapping函数的成功完成表明NAT已经创建了从NAT的外部端口到Teredo客户端节点的内部端口的端口映射。指定参数是为了使任何外部主机都能够通过向映射的地址/端口发送数据包来向Teredo客户端发送数据包。如果AddPortMapping函数失败,Teredo客户端必须在不使用此扩展的情况下继续。否则,必须按以下步骤进行。

The Teredo client MUST set the UPnP-Mapped Port (and Persisted UPnP-Mapped Port, if supported) to the Local Port value specified in AddPortMapping. The Teredo client MUST then call the GetExternalIPAddress function specified in Section 2.4.18 of [UPNPWANIP]. If the GetExternalIPAddress function fails, the Teredo client SHOULD perform the uninitialization procedure specified in Section 5.3.5.1 and continue without using this extension. If the GetExternalIPAddress function succeeds, the Teredo client MUST proceed as follows.

Teredo客户端必须将UPnP映射端口(以及持久化UPnP映射端口,如果支持)设置为AddPortMapping中指定的本地端口值。Teredo客户端随后必须调用[UPNPWANIP]第2.4.18节中指定的GetExternalPaddress函数。如果GetExternalPaddress函数失败,Teredo客户端应执行第5.3.5.1节中指定的取消初始化过程,并在不使用此扩展的情况下继续。如果getExternalPaddress函数成功,Teredo客户端必须按如下步骤进行。

The Teredo client MUST set the UPnP-Mapped Address to the address returned from the GetExternalIPAddress function, and set the UPnP-Enabled NAT flag to TRUE.

Teredo客户端必须将UPnP映射地址设置为GetExternalPaddress函数返回的地址,并将UPnP启用NAT标志设置为TRUE。

During the qualification procedure (as specified in Section 5.2.1 of [RFC4380]) when the Teredo client receives a response from the secondary Teredo server, the Teredo client MUST compare the mapped address/port learned from the secondary Teredo server with the mapped address/port associated with the Teredo server. If either the mapped address or the mapped port value is different, the Symmetric NAT flag MUST be set to TRUE.

在鉴定程序期间(如[RFC4380]第5.2.1节所述),当Teredo客户端从辅助Teredo服务器收到响应时,Teredo客户端必须将从辅助Teredo服务器获取的映射地址/端口与与与Teredo服务器关联的映射地址/端口进行比较。如果映射的地址或映射的端口值不同,则必须将对称NAT标志设置为TRUE。

After the qualification procedure, the mapped address/port learned from the Teredo server MUST be compared to the UPnP-Mapped Address/ Port. If both are the same, the Teredo client is positioned behind a single NAT and the UPnP-Mapped Address/Port MUST be zeroed out.

在鉴定程序之后,必须将从Teredo服务器获取的映射地址/端口与UPnP映射地址/端口进行比较。如果两者相同,Teredo客户端位于单个NAT后面,UPnP映射的地址/端口必须归零。

5.3.4. Message Processing
5.3.4. 消息处理

Except as specified in the following sections, the rules for message processing are as specified in Section 5.2.3 of [RFC4380].

除以下章节另有规定外,信息处理规则见[RFC4380]第5.2.3节。

5.3.4.1. Receiving a Direct Bubble
5.3.4.1. 直接接受泡沫

Except as indicated below, the rules for handling a direct bubble are as specified in Section 5.2.4.4.

除下述规定外,处理直接气泡的规则见第5.2.4.4节。

A Teredo client positioned behind a UPnP-enabled NAT (port-restricted NAT as well as symmetric NAT) will receive all packets sent to the mapped address/port embedded in its Teredo IPv6 address. Thus, when a Teredo client receives a direct bubble, it MUST compare the mapped address/port from which the packet was received with the mapped address/port embedded in the Teredo IPv6 address in the source address field of the IPv6 header. If the two are not the same, it indicates that the Teredo peer is positioned behind a symmetric NAT, and it MUST set the Symmetric Peer flag in its Peer Entry.

位于支持UPnP的NAT(端口受限NAT以及对称NAT)后面的Teredo客户端将接收发送到其Teredo IPv6地址中嵌入的映射地址/端口的所有数据包。因此,当Teredo客户端接收到直接气泡时,它必须将接收数据包的映射地址/端口与IPv6报头的源地址字段中嵌入Teredo IPv6地址的映射地址/端口进行比较。如果两者不相同,则表示Teredo对等体位于对称NAT后面,并且必须在其对等体条目中设置对称对等体标志。

5.3.4.2. Sending a Direct Bubble
5.3.4.2. 发出直接泡沫

The rules for sending a direct bubble are specified in Section 5.2.6 of [RFC4380] and Section 5.2.4.2 of this document. These rules are further refined as follows.

[RFC4380]第5.2.6节和本文件第5.2.4.2节规定了发送直接气泡的规则。这些规则进一步细化如下。

If the Teredo client sending the direct bubble meets all of the following criteria:

如果发送直接气泡的Teredo客户端满足以下所有条件:

o The Symmetric NAT flag is set to TRUE.

o 对称NAT标志设置为TRUE。

o The UPnP-Enabled NAT flag is set to TRUE.

o 已启用UPnP的NAT标志设置为TRUE。

o The UPnP-Mapped Address/Port are set to zero.

o UPnP映射的地址/端口设置为零。

o The peer's Symmetric Peer flag is set to TRUE.

o 对等方的对称对等标志设置为TRUE。

then the Teredo client MUST send the direct bubble to the mapped address/port embedded in the peer's Teredo IPv6 address.

然后Teredo客户端必须将直接气泡发送到嵌入对等方Teredo IPv6地址中的映射地址/端口。

This is because Symmetric-to-Symmetric and Port-Restricted-to-Symmetric NAT communication between the Teredo client and the peer would have failed anyway. However, by taking a chance that the peer might also be positioned behind a UPnP-enabled NAT just like the Teredo client itself, the Teredo client can try sending the direct bubble to the mapped address/port in the peer's Teredo IPv6 address. If the packet does go through, communication is established.

这是因为Teredo客户端和对等方之间的对称到对称和端口限制为对称NAT通信无论如何都会失败。然而,如果像Teredo客户端本身一样,对等机也可能位于支持UPnP的NAT后面,Teredo客户端可以尝试将直接气泡发送到对等机Teredo IPv6地址中的映射地址/端口。如果数据包确实通过,则建立通信。

5.3.4.3. Sending a Data Packet
5.3.4.3. 发送数据包

The rules for sending a data packet are specified in Section 5.2.4 of [RFC4380]. These rules are further refined as follows.

[RFC4380]第5.2.4节规定了发送数据包的规则。这些规则进一步细化如下。

If the Teredo client sending the data packet meets all of the following criteria:

如果发送数据包的Teredo客户端满足以下所有条件:

o The Symmetric NAT flag is set to TRUE.

o 对称NAT标志设置为TRUE。

o The UPnP-Enabled NAT flag is set to TRUE.

o 已启用UPnP的NAT标志设置为TRUE。

o The UPnP-Mapped Address/Port are set to zero.

o UPnP映射的地址/端口设置为零。

o The peer's Symmetric Peer flag is set to TRUE.

o 对等方的对称对等标志设置为TRUE。

then the Teredo client MUST send the data packet to the mapped address/port embedded in the peer's Teredo IPv6 address.

然后Teredo客户端必须将数据包发送到嵌入对等方Teredo IPv6地址中的映射地址/端口。

5.3.5. Shutdown
5.3.5. 关闭

When Teredo client functionality is being shut down, uninitialization MUST be performed as specified in Section 5.3.5.1.

关闭Teredo客户端功能时,必须按照第5.3.5.1节的规定执行取消初始化。

5.3.5.1. Uninitialization
5.3.5.1. 未初始化

First determine the mapped port as follows. If Persisted UPnP-Mapped Port is supported, use it as the mapped port. Otherwise, use the UPnP-Mapped Port.

首先确定映射端口,如下所示。如果支持持久化UPnP映射端口,请将其用作映射端口。否则,请使用UPnP映射端口。

If the mapped port is non-zero, the Teredo client MUST call the DeletePortMapping function, as specified in Section 2.4.17 of [UPNPWANIP], with the following parameters:

如果映射端口为非零,Teredo客户端必须使用以下参数调用[UPNPWANIP]第2.4.17节中指定的DeletePortMapping函数:

o NewRemoteHost: "" (empty string)

o NewRemoteHost:“”(空字符串)

o NewExternalPort: the mapped port

o NewExternalPort:映射的端口

o NewProtocol: UDP

o 新协议:UDP

5.4. Port-Preserving Symmetric NAT Extension
5.4. 端口保持对称NAT扩展

The Port-Preserving Symmetric NAT Extension is optional; an implementation SHOULD support it. This extension has the Symmetric NAT Support Extension (as specified in Section 5.2) as a dependency. Any node that implements this extension MUST also implement the Symmetric NAT Support Extension.

端口保持对称NAT扩展是可选的;实现应该支持它。此扩展具有对称NAT支持扩展(如第5.2节所述)作为依赖项。实现此扩展的任何节点也必须实现对称NAT支持扩展。

5.4.1. Abstract Data Model
5.4.1. 抽象数据模型

This section describes a conceptual model of possible data organization that an implementation maintains to participate in this protocol. The described organization is provided to facilitate the explanation of how the protocol behaves. This document does not mandate that implementations adhere to this model as long as their external behavior is consistent with that described in this document.

本节描述实现维护以参与此协议的可能数据组织的概念模型。提供所述组织是为了便于解释协议的行为方式。本文档并不要求实现遵守此模型,只要其外部行为与本文档中描述的一致。

The Port-Preserving Symmetric NAT Extension extends the abstract data model in Section 5.2.1 by adding the following additional fields.

端口保持对称NAT扩展通过添加以下附加字段扩展了第5.2.1节中的抽象数据模型。

Port-Preserving NAT flag: This is a Boolean value, set to TRUE if the Teredo client is positioned behind a port-preserving NAT.

端口保留NAT标志:这是一个布尔值,如果Teredo客户端位于端口保留NAT后面,则设置为TRUE。

Symmetric NAT flag: This is a Boolean value, set to TRUE if the Teredo client is positioned behind a symmetric NAT.

对称NAT标志:这是一个布尔值,如果Teredo客户端位于对称NAT后面,则设置为TRUE。

Peer Entry: The following fields need to be added on a per-peer basis:

对等条目:需要按每个对等条目添加以下字段:

o Random Port: This field contains the value of the external port that the Teredo client predicts that its NAT has assigned it for communication with the peer. Set to zero by default.

o Random Port(随机端口):此字段包含Teredo客户端预测其NAT已为其分配用于与对等方通信的外部端口的值。默认设置为零。

o Peer Random Port: This field contains the value of the random port that the peer is using for communication with this Teredo client. Set to zero by default.

o 对等随机端口:此字段包含对等方用于与此Teredo客户端通信的随机端口的值。默认设置为零。

o Direct Receive on Primary Port: This is a Boolean value, set to TRUE if a packet is received from the Teredo peer on the primary local port. Set to FALSE by default.

o 主端口上的直接接收:这是一个布尔值,如果从主本地端口上的Teredo对等方接收到数据包,则设置为TRUE。默认设置为FALSE。

o Direct Receive on Random Port: This is a Boolean value, set to TRUE if a packet is received from the Teredo peer on the Random Port. Set to FALSE by default.

o 随机端口上的直接接收:这是一个布尔值,如果从随机端口上的Teredo对等方接收到数据包,则设置为TRUE。默认设置为FALSE。

o Connection Refresh Count: This field contains the number of direct bubbles that have been sent to the peer since the last time data was sent to the peer.

o 连接刷新计数:此字段包含自上次向对等方发送数据以来已发送到对等方的直接气泡数。

o Last Data Packet Sent Timestamp: This field contains the timestamp of the last data packet sent to the peer. This timestamp is different from the field that stores the data and time of last transmission to the peer (as specified in Section 5.2 of [RFC4380]) because the RFC-defined field is also updated every time a direct bubble is sent.

o Last Data Packet Sent Timestamp:此字段包含发送给对等方的最后一个数据包的时间戳。此时间戳不同于存储数据和上次传输到对等方的时间的字段(如[RFC4380]第5.2节所述),因为RFC定义的字段也会在每次发送直接气泡时更新。

5.4.2. Timers
5.4.2. 计时器

Other than those in [RFC4380], the Port-Preserving Symmetric NAT Extension requires the following additional timer.

除了[RFC4380]中的那些,保持端口的对称NAT扩展需要以下额外的计时器。

Peer Refresh Timer: A timer to refresh peer connections through the random port, on which no data has been sent for a while.

对等刷新计时器:通过随机端口刷新对等连接的计时器,在该端口上已有一段时间没有发送数据。

5.4.2.1. Peer Refresh Timer Expiry
5.4.2.1. 对等刷新计时器到期

When the Peer Refresh Timer expires, the Teredo client MUST go through its list of peers and for each peer to which the Teredo client is communicating through the random port, the Teredo client MUST check the Last Data Packet Sent Timestamp to determine if data has been sent to the peer in the last 30 seconds, and check the Connection Refresh Count field to determine if the count has reached the maximum allowed value of 20. If both checks are FALSE, the Teredo client MUST send a direct bubble (as specified in Section 5.4.4.3) to the peer and increment the Connection Refresh Count. This direct bubble is sent as an attempt to keep the port mappings on all the intermediate NATs alive while the application/ user may be temporarily inactive. If on the other hand, data has been sent to the peer in the last 30 seconds, the Connection Refresh Count MUST be reset to zero.

当对等刷新计时器过期时,Teredo客户端必须查看其对等列表,对于Teredo客户端通过随机端口与之通信的每个对等,Teredo客户端必须检查发送的最后一个数据包时间戳,以确定数据是否已在过去30秒内发送到对等,并检查连接刷新计数字段,以确定计数是否已达到允许的最大值20。如果两个检查都为假,Teredo客户端必须向对等方发送一个直接气泡(如第5.4.4.3节所述),并增加连接刷新计数。发送此直接气泡是为了在应用程序/用户可能暂时处于非活动状态时,保持所有中间NAT上的端口映射处于活动状态。另一方面,如果数据已在过去30秒内发送到对等方,则必须将连接刷新计数重置为零。

The Peer Refresh Timer MUST then be rescheduled to expire in 30 seconds.

然后必须重新安排对等刷新计时器,使其在30秒后过期。

5.4.3. Initialization
5.4.3. 初始化

In addition to the behavior specified in [RFC4380], the Port-Preserving NAT flag and Symmetric NAT flag MUST be set to FALSE when the Teredo client is started. The Peer Refresh Timer MUST be started and scheduled to expire in 30 seconds.

除了[RFC4380]中指定的行为外,Teredo客户端启动时,端口保留NAT标志和对称NAT标志必须设置为FALSE。对等刷新计时器必须启动并计划在30秒后过期。

During the qualification procedure (as specified in Section 5.2.1 of [RFC4380]), when the Teredo client receives a response from the Teredo server address, the Teredo client MUST compare the Port value in the origin indication, as specified in Section 5.1.1 of [RFC4380], with the Local Port value. If both values match, the client MUST set the Port-Preserving NAT flag to TRUE.

在鉴定程序期间(如[RFC4380]第5.2.1节所规定),当Teredo客户端收到Teredo服务器地址的响应时,Teredo客户端必须将[RFC4380]第5.1.1节所规定的原点指示中的端口值与本地端口值进行比较。如果两个值都匹配,客户端必须将端口保留NAT标志设置为TRUE。

5.4.4. Message Processing
5.4.4. 消息处理
5.4.4.1. Sending a Data Packet
5.4.4.1. 发送数据包

On receiving a data packet to be transmitted to the Teredo peer (in addition to the rules specified in Section 5.2.4 of [RFC4380]), the Teredo client MUST update the Last Data Packet Sent Timestamp when the packet is actually sent.

在接收到要发送给Teredo对等方的数据包时(除了[RFC4380]第5.2.4节中规定的规则之外),Teredo客户端必须在实际发送数据包时更新最后发送的数据包时间戳。

5.4.4.2. Sending an Indirect Bubble
5.4.4.2. 发出间接泡沫

The rules for sending an indirect bubble are as specified in Section 5.2.4.1 of this document and Section 5.2.6 of [RFC4380]. In addition to those rules, if the Port-Preserving NAT flag is TRUE, the Teredo client MUST do the following:

发送间接气泡的规则如本文件第5.2.4.1节和[RFC4380]第5.2.6节所述。除这些规则外,如果端口保留NAT标志为TRUE,Teredo客户端必须执行以下操作:

o If the Symmetric NAT flag is set, the Teredo peer is not marked as "trusted" (as specified in Section 5.2 of [RFC4380]), and the Random Port is zero, the Teredo client MUST first select a random port number to use, and then begin listening on that port. Since the NAT is port-preserving, the Teredo client can predict that the external port assigned will be equal to the random port chosen, and hence the Teredo client MUST store the random port chosen in the Random Port field of the Peer Entry.

o 如果设置了对称NAT标志,Teredo对等机未标记为“受信任”(如[RFC4380]第5.2节所述),并且随机端口为零,Teredo客户端必须首先选择要使用的随机端口号,然后开始侦听该端口。由于NAT保留端口,Teredo客户端可以预测分配的外部端口将等于选择的随机端口,因此Teredo客户端必须将选择的随机端口存储在对等项的随机端口字段中。

o If the Random Port value is non-zero, the Teredo client MUST append a Random Port Trailer to the indirect bubble.

o 如果随机端口值非零,Teredo客户端必须将随机端口尾部附加到间接气泡。

5.4.4.3. Sending a Direct Bubble
5.4.4.3. 发出直接泡沫

The rules for when direct bubbles are sent to a Teredo peer are as specified in Section 5.2.6 of [RFC4380]. In addition, Section 5.2.4.2 defines rules for enabling communication for clients positioned behind a symmetric NAT. In addition to the rules defined in both the aforementioned sections, if the Port-Preserving NAT flag is TRUE, the following rules apply also.

[RFC4380]第5.2.6节规定了将直接气泡发送给Teredo对等体的规则。此外,第5.2.4.2节定义了为位于对称NAT后面的客户端启用通信的规则。除了上述两部分中定义的规则外,如果端口保留NAT标志为TRUE,则以下规则也适用。

If the Symmetric NAT flag is set, and the Teredo peer is not marked as "trusted" (as specified in Section 5.2 of [RFC4380]) the Teredo client MUST send a direct bubble destined to the mapped address/port embedded in the Teredo IPv6 address of the Teredo peer. If the peer Random Port field is non-zero, the Teredo client MUST send another direct bubble from its own random port, destined to the peer random port. The IPv4 destination address MUST be the mapped address embedded in the Teredo IPv6 address. In addition, the Teredo client MUST include the Random Port Trailer (Section 4.5).

如果设置了对称NAT标志,并且Teredo对等方未标记为“受信任”(如[RFC4380]第5.2节所述),Teredo客户端必须发送一个直接气泡,该气泡指向Teredo对等方的Teredo IPv6地址中嵌入的映射地址/端口。如果对等随机端口字段为非零,Teredo客户端必须从其自己的随机端口发送另一个直接气泡,目的地为对等随机端口。IPv4目标地址必须是嵌入Teredo IPv6地址中的映射地址。此外,Teredo客户必须包括随机端口拖车(第4.5节)。

5.4.4.4. Receiving an Indirect Bubble
5.4.4.4. 接受间接泡沫

The rules for processing an indirect bubble are as specified in Section 5.2.4.3 of this document and Section 5.2.3 of [RFC4380]. In addition to these rules, if the incoming indirect bubble has a Random Port Trailer, the following additional processing MUST be done.

处理间接气泡的规则如本文件第5.2.4.3节和[RFC4380]第5.2.3节所述。除这些规则外,如果传入的间接气泡具有随机端口拖车,则必须执行以下附加处理。

If the Peer Random Port field of the Peer Entry is zero, the Teredo client MUST store the port from the Random Port Trailer in the Peer Random Port field of the Peer Entry.

如果对等项的对等随机端口字段为零,Teredo客户端必须将随机端口尾部的端口存储在对等项的对等随机端口字段中。

If the Peer Random Port field is non-zero and if either the Peer Random Port field and the new advertised port have the same value, or if active data has been exchanged between the two Teredo clients in the last 30 seconds (that is, "time of last transmission" or "time of last reception", as specified in Section 5.2 of [RFC4380], is set to a time that is less than 30 seconds ago), the new advertised port value MUST be ignored.

如果对等随机端口字段为非零,并且对等随机端口字段和新播发端口具有相同的值,或者如果两个Teredo客户端在过去30秒内交换了活动数据(即,[RFC4380]第5.2节中规定的“上次传输时间”或“上次接收时间”),设置为小于30秒前的时间),必须忽略新播发的端口值。

If the Peer Random Port field is non-zero and the new advertised port value is different from the Peer Random Port value, and it has been more than 30 seconds since the last exchange of data packets between the two Teredo clients, (that is, "time of last transmission" and "time of last reception" are set to a time that is more than 30 seconds ago), the Teredo client SHOULD store the new advertised port value in the Peer Random Port field and, if the Port-Preserving NAT flag is TRUE, then clear the Random Port field, and stop listening on the old random port. This allows communication to be re-established if either side changes the random port that it is using.

如果对等随机端口字段为非零且新公布的端口值不同于对等随机端口值,并且自两个Teredo客户端之间上次交换数据分组以来已超过30秒(即,“上次传输时间”和“上次接收时间”设置为30秒前的时间),Teredo客户端应将新公布的端口值存储在对等随机端口字段中,如果端口保留NAT标志为TRUE,则清除随机端口字段,并停止侦听旧随机端口。这允许在任意一方更改其使用的随机端口时重新建立通信。

5.4.4.5. Receiving a Direct Bubble
5.4.4.5. 直接接受泡沫

The rules for handling direct bubbles are specified in Section 5.2.4.4 of this document and Section 5.2.3 of [RFC4380]. The rules for whether to accept a direct bubble are extended as follows, when the Port-Preserving NAT flag is TRUE:

本文件第5.2.4.4节和[RFC4380]第5.2.3节规定了处理直接气泡的规则。当端口保留NAT标志为TRUE时,是否接受直接冒泡的规则扩展如下:

o If the direct bubble is received on the primary port and the Teredo peer is not "trusted", the status field of the Teredo client MUST be changed to "trusted" and the Direct Receive on Primary Port flag MUST be set to TRUE. The mapped address/port from which the direct bubble was received MUST be recorded in the mapped address/port fields of the Teredo peer, as specified in Section 5.2 of [RFC4380]. The Teredo client MUST then set the Random Port field in the Peer Entry to zero and stop listening on the old random port.

o 如果在主端口上接收到direct bubble,并且Teredo对等方不“受信任”,则Teredo客户端的状态字段必须更改为“受信任”,并且主端口上的direct Receive标志必须设置为TRUE。根据[RFC4380]第5.2节的规定,接收直接气泡的映射地址/端口必须记录在Teredo对等机的映射地址/端口字段中。Teredo客户端必须将对等项中的随机端口字段设置为零,并停止侦听旧的随机端口。

o If the direct bubble is received on the primary port, the Teredo peer is "trusted", and the Direct Receive on Primary flag is set to TRUE, the Teredo client MUST compare the mapped address/port of the direct bubble with the mapped address/port of the Peer Entry. If both mappings are the same, the direct bubble MUST be accepted. If the mappings are different and it has been more than 30 seconds since the last packet exchange with the Teredo peer (that is, "time of last transmission" and "time of last reception", as defined in Section 5.2 of [RFC4380], are set to a time that is more than 30 seconds ago), the mapping on the Teredo peer's NAT has changed and communication needs to be re-established. This MUST be done by changing the status of the peer to "not-trusted", setting the Direct Receive on Primary Port flag to FALSE, and sending an indirect bubble to the Teredo peer via its Teredo server.

o 如果在主端口上接收到直接气泡,Teredo对等方为“受信任”,并且direct Receive on primary标志设置为TRUE,Teredo客户端必须将直接气泡的映射地址/端口与对等条目的映射地址/端口进行比较。如果两个映射相同,则必须接受直接冒泡。如果映射不同,并且自与Teredo对等方进行最后一次数据包交换以来已超过30秒(即,[RFC4380]第5.2节中定义的“最后一次传输时间”和“最后一次接收时间”被设置为超过30秒之前的时间),Teredo对等方的NAT上的映射已更改,需要重新建立通信。这必须通过将对等机的状态更改为“不受信任”,将主端口上的直接接收标志设置为FALSE,并通过Teredo服务器向Teredo对等机发送间接气泡来完成。

o If the direct bubble is received on the primary port, the Teredo peer is "trusted", the Direct Receive on Primary Port flag is set to FALSE, and the Direct Receive on Random Port flag is set to TRUE, the mapped address/port from which the direct bubble is received MUST be stored in the mapped address/port fields of the Peer Entry. The Direct Receive on Primary Port flag MUST be set to TRUE. The Teredo client MUST then set the Random Port field in the Peer Entry to zero and stop listening on the old random port. Finally, the Direct Receive on Random Port flag MUST be set to FALSE.

o 如果在主端口上接收到直接气泡,Teredo对等方为“受信任”,主端口上的直接接收标志设置为FALSE,随机端口上的直接接收标志设置为TRUE,则接收直接气泡的映射地址/端口必须存储在对等条目的映射地址/端口字段中。主端口上的直接接收标志必须设置为TRUE。Teredo客户端必须将对等项中的随机端口字段设置为零,并停止侦听旧的随机端口。最后,随机端口上的直接接收标志必须设置为FALSE。

o If the direct bubble is received on the random port and the Teredo peer is not "trusted", the status field of the Teredo client MUST be changed to "trusted" and the Direct Receive on Random Port flag MUST be set to TRUE. The mapped address/port from which the direct bubble was received MUST be recorded in the mapped address/ port fields of the Teredo Peer Entry, as specified in Section 5.2 of [RFC4380].

o 如果在随机端口上接收到直接气泡,并且Teredo对等方不“受信任”,则Teredo客户端的状态字段必须更改为“受信任”,并且随机端口上的直接接收标志必须设置为TRUE。根据[RFC4380]第5.2节的规定,接收直接气泡的映射地址/端口必须记录在Teredo对等条目的映射地址/端口字段中。

o If the direct bubble is received on the random port, the Teredo peer is "trusted", and the Direct Receive on Primary Port flag is FALSE, the Teredo client MUST compare the mapped address/port in the direct bubble with the mapped address/port in the Peer Entry. If the two mappings are the same, the direct bubble MUST be accepted. If the mappings are different, it implies that the NAT had deleted the mapping and when it reassigned the mapping, a different external port was chosen. In this instance, the Teredo client SHOULD set the Random Port field to zero, stop listening on the old random port, and send an indirect bubble to the Teredo peer as specified in Section 5.4.4.2.

o 如果在随机端口上接收到直接气泡,Teredo对等方为“受信任”,且主端口上的直接接收标志为FALSE,则Teredo客户端必须将直接气泡中的映射地址/端口与对等条目中的映射地址/端口进行比较。如果两个映射相同,则必须接受直接冒泡。如果映射不同,则表示NAT已删除映射,并且在重新分配映射时,选择了不同的外部端口。在这种情况下,Teredo客户端应将随机端口字段设置为零,停止侦听旧的随机端口,并按照第5.4.4.2节的规定向Teredo对等方发送间接气泡。

Note that once the Direct Receive on Primary Port flag is TRUE, the client will stop listening on the random port and hence a direct bubble cannot be received on the random port. As a result, this case is intentionally omitted above.

请注意,一旦主端口上的Direct Receive(直接接收)标志为TRUE,客户端将停止在随机端口上侦听,因此无法在随机端口上接收直接气泡。因此,上述情况被故意省略。

5.5. Sequential Port-Symmetric NAT Extension
5.5. 顺序端口对称NAT扩展

The Sequential Port-Symmetric NAT Extension is optional; an implementation SHOULD support it. This extension has the Symmetric NAT Support Extension (Section 5.2) as a dependency. Any node that implements this extension MUST also implement the Symmetric NAT Support Extension, as well as the Port-Preserving NAT Extension (Section 5.4).

顺序端口对称NAT扩展是可选的;实现应该支持它。此扩展将对称NAT支持扩展(第5.2节)作为依赖项。实现此扩展的任何节点还必须实现对称NAT支持扩展,以及保留端口的NAT扩展(第5.4节)。

5.5.1. Abstract Data Model
5.5.1. 抽象数据模型

This section describes a conceptual model of possible data organization that an implementation maintains to participate in this protocol. The described organization is provided to facilitate the explanation of how the protocol behaves. This document does not mandate that implementations adhere to this model as long as their external behavior is consistent with that described in this document.

本节描述实现维护以参与此协议的可能数据组织的概念模型。提供所述组织是为了便于解释协议的行为方式。本文档并不要求实现遵守此模型,只要其外部行为与本文档中描述的一致。

The Sequential Port-Symmetric NAT Extension extends the abstract data model in Section 5.4.1 by adding the following additional state.

顺序端口对称NAT扩展通过添加以下附加状态扩展了第5.4.1节中的抽象数据模型。

Peer Entry: The following fields need to be added on a per-peer basis:

对等条目:需要按每个对等条目添加以下字段:

o EchoTestNonce1: The value of the nonce sent as part of the authentication encapsulation, as specified in Section 5.1.1 of [RFC4380], in the router solicitation packet sent to the Teredo server address as part of the Echo Test.

o EchoTestNonce1:作为身份验证封装的一部分发送的nonce值,如[RFC4380]第5.1.1节所述,在作为回声测试的一部分发送到Teredo服务器地址的路由器请求数据包中。

o EchoTestNonce2: The value of the nonce sent as part of the authentication encapsulation in the router solicitation packet sent to the secondary Teredo server address as part of the Echo Test.

o EchoTestNonce2:作为身份验证封装的一部分发送到作为Echo测试一部分发送到辅助Teredo服务器地址的路由器请求数据包中的nonce的值。

o EchoTestLowerPort: The value of the external port mapping extracted from the origin indication of the router advertisement received from the Teredo server address as part of the Echo Test. A value of 0 indicates that no such router advertisement has been received.

o EchoTestLowerPort:从Teredo服务器地址接收的路由器播发的原始指示中提取的外部端口映射值,作为Echo测试的一部分。值为0表示未收到此类路由器播发。

o EchoTestUpperPort: The value of the external port mapping extracted from the origin indication of the router advertisement received from the secondary Teredo server address as part of the Echo Test. A value of 0 indicates that no such router advertisement has been received.

o EchoTestUpperPort:作为Echo测试的一部分,从次要Teredo服务器地址接收的路由器播发的原始指示中提取的外部端口映射的值。值为0表示未收到此类路由器播发。

o EchoTestRetryCounter: The number of times an Echo Test has been attempted.

o EchoTestRetryCounter:尝试回声测试的次数。

5.5.2. Timers
5.5.2. 计时器

In addition to the timers specified in Section 5.4.2, the following additional timer is required per Peer Entry.

除了第5.4.2节中规定的计时器外,每个对等条目还需要以下额外的计时器。

Echo Test Failover Timer: A one-shot timer that runs whenever an Echo Test is in progress.

Echo测试故障转移计时器:一个一次性计时器,在进行Echo测试时运行。

5.5.2.1. Peer Refresh Timer Expiry
5.5.2.1. 对等刷新计时器到期

The processing of the Peer Refresh Timer Expiry MUST be completed as specified in Section 5.4.2.1. In addition to those rules, the Teredo client MUST set the EchoTestLowerPort, EchoTestUpperPort, and EchoTestRetryCounter to zero.

必须按照第5.4.2.1节的规定完成对等刷新计时器到期的处理。除了这些规则之外,Teredo客户端还必须将EchoTestLowerPort、EchoTestUpperPort和EchoTestRetryCounter设置为零。

5.5.2.2. Echo Test Failover Timer Expiry
5.5.2.2. 回显测试故障转移计时器到期

If the Echo Test Failover Timer expires, the Teredo client MUST do the following.

如果Echo测试故障切换计时器过期,Teredo客户端必须执行以下操作。

If the value of the EchoTestRetryCounter is two, then the Teredo client MUST send an indirect bubble as specified in Section 5.2.4.1.

如果EchoTestRetryCounter的值为2,则Teredo客户端必须按照第5.2.4.1节的规定发送间接气泡。

If the value of the EchoTestRetryCounter is one, then the Teredo client MUST start another Echo Test as specified in Section 5.5.4.1.1.

如果EchoTestRetryCounter的值为1,则Teredo客户端必须按照第5.5.4.1.1节的规定启动另一个Echo测试。

5.5.3. Initialization
5.5.3. 初始化

No behavior changes are required beyond what is specified in Section 5.4.3.

除第5.4.3节规定外,无需进行任何行为变更。

5.5.4. Message Processing
5.5.4. 消息处理

Except as specified in the following sections, the rules for message processing are as specified in Section 5.4.4.

除以下章节另有规定外,第5.4.4节规定了信息处理规则。

5.5.4.1. Handling a Request to Send an Indirect Bubble
5.5.4.1. 处理发送间接冒泡的请求

Whenever [RFC4380] or other extensions specified in this document specify that an indirect bubble is to be sent, the following actions apply at that time instead if the Symmetric NAT flag is TRUE and the Port-Preserving NAT flag is FALSE. Note that any behavior specified by [RFC4380] or other extensions in this document still applies to how indirect bubbles are constructed, but such behavior is done at a later time as specified in Section 5.5.4.4.

每当[RFC4380]或本文档中指定的其他扩展指定要发送间接冒泡时,如果对称NAT标志为TRUE,而端口保留NAT标志为FALSE,则此时将应用以下操作。请注意,[RFC4380]或本文件中其他扩展部分规定的任何行为仍然适用于间接气泡的构造方式,但此类行为将在第5.5.4.4节规定的稍后时间进行。

If the Symmetric NAT flag is TRUE, and the Port-Preserving NAT flag is FALSE, and the Teredo peer is not marked as "trusted" (as specified in Section 5.2 of [RFC4380]), and the Random Port is zero, then the Teredo client MUST select a random port number to use, begin listening on that port, and start an Echo Test as specified below.

如果对称NAT标志为TRUE,端口保留NAT标志为FALSE,Teredo对等方未标记为“受信任”(如[RFC4380]第5.2节所述),且随机端口为零,则Teredo客户端必须选择要使用的随机端口号,开始侦听该端口,并按照以下规定启动回声测试。

5.5.4.1.1. Starting an Echo Test
5.5.4.1.1. 开始回声测试

To start an Echo Test, the Teredo client MUST send the following three packets from this port:

要启动回显测试,Teredo客户端必须从此端口发送以下三个数据包:

o First, a router solicitation (as specified in Section 5.2.1 of [RFC4380]) MUST be sent to the Teredo server address. The router solicitation MUST include an authentication encapsulation with a randomly generated Nonce field, as specified in Section 5.1.1 of [RFC4380]. The nonce included in the authentication encapsulation MUST then be stored in the EchoTestNonce1 field of the Peer Entry.

o 首先,必须向Teredo服务器地址发送路由器请求(如[RFC4380]第5.2.1节所述)。根据[RFC4380]第5.1.1节的规定,路由器请求必须包括带有随机生成的Nonce字段的认证封装。然后,身份验证封装中包含的nonce必须存储在对等条目的EchoTestNonce1字段中。

o Second, a direct bubble MUST be sent to the peer.

o 其次,必须向对等方发送一个直接气泡。

o Third, a router solicitation MUST be sent to the secondary Teredo server address. The router solicitation MUST include an authentication encapsulation with a randomly generated Nonce field, as specified in Section 5.1.1 of [RFC4380]. The nonce included in the authentication encapsulation MUST then be stored in the EchoTestNonce2 field of the Peer Entry.

o 第三,路由器请求必须发送到辅助Teredo服务器地址。根据[RFC4380]第5.1.1节的规定,路由器请求必须包括带有随机生成的Nonce字段的认证封装。然后,身份验证封装中包含的nonce必须存储在对等条目的EchoTestNonce2字段中。

The Teredo client MUST then increment the EchoTestRetryCounter and set the Echo Test Failover Timer to expire in a number of seconds equal to EchoTestRetryCounter.

Teredo客户端必须增加EchoTestRetryCounter,并将EchoTest故障转移计时器设置为在等于EchoTestRetryCounter的秒数内过期。

5.5.4.2. Sending an Indirect Bubble
5.5.4.2. 发出间接泡沫

The rules for sending an indirect bubble are as specified in Section 5.2.4.1 of this document and Section 5.2.6 of [RFC4380]. In addition to those rules, if the Symmetric NAT flag is TRUE, and the Port-Preserving NAT flag is FALSE, and the Random Port value is non-zero, then the Teredo client MUST append a Random Port Trailer to the indirect bubble.

发送间接气泡的规则如本文件第5.2.4.1节和[RFC4380]第5.2.6节所述。除这些规则外,如果对称NAT标志为TRUE,端口保留NAT标志为FALSE,且随机端口值为非零,则Teredo客户端必须将随机端口尾部附加到间接气泡。

5.5.4.3. Receiving a Direct Bubble
5.5.4.3. 直接接受泡沫

The processing of the direct bubble MUST be completed as specified in Section 5.4.4.5, as if the Port-Preserving NAT flag were TRUE. After the processing is complete, if the Direct Bubble Received on Primary flag is TRUE, and the Echo Test Failover Timer is running, then the Echo Test Failover Timer MUST be canceled and EchoTestLowerPort, EchoTestUpperPort, and EchoTestRetryCounter MUST be set to zero.

必须按照第5.4.4.5节的规定完成直接气泡的处理,就好像保留端口的NAT标志为真一样。处理完成后,如果主标志上接收到的直接冒泡为TRUE,并且Echo测试故障转移计时器正在运行,则必须取消Echo测试故障转移计时器,并且EchoTestLowerPort、EchoTestUpperPort和EchoTestRetryCounter必须设置为零。

5.5.4.4. Receiving a Router Advertisement
5.5.4.4. 接收路由器广告

The rules for processing a router advertisement are as specified in Section 5.2.1 of [RFC4380]. In addition to those rules, if the router advertisement contains an authentication encapsulation, the Teredo client MUST look for a Peer Entry whose EchoTestNonce1 or EchoTestNonce2 field matches the nonce in the authentication encapsulation. If a Peer Entry is found, the Teredo client MUST do the following.

处理路由器公告的规则如[RFC4380]第5.2.1节所述。除这些规则外,如果路由器公告包含身份验证封装,Teredo客户端必须查找其EchoTestNonce1或EchoTestNonce2字段与身份验证封装中的nonce匹配的对等条目。如果找到对等条目,Teredo客户端必须执行以下操作。

If the received nonce is equal to EchoTestNonce1 and EchoTestLowerPort is zero, then EchoTestLowerPort MUST be set to the external port mapping extracted from the origin indication of this router advertisement.

如果收到的nonce等于EchoTestNonce1且EchoTestLowerPort为零,则必须将EchoTestLowerPort设置为从此路由器播发的源指示提取的外部端口映射。

If the received nonce is equal to EchoTestNonce2 and EchoTestUpperPort is zero, then EchoTestUpperPort MUST be set to the external port mapping extracted from the origin indication of this router advertisement.

如果收到的nonce等于EchoTestNonce2且EchoTestUpperPort为零,则必须将EchoTestUpperPort设置为从该路由器播发的原点指示提取的外部端口映射。

If the EchoTestUpperPort and EchoTestLowerPort are now both non-zero, the Teredo client MUST then set the Random Port field of the Peer Entry to (EchoTestUpperPort + EchoTestUpperPort)/2, rounded down, and send an indirect bubble as specified in Section 5.5.4.2.

如果EchoTestUpperPort和EchoTestLowerPort现在都为非零,Teredo客户端必须将对等项的随机端口字段设置为(EchoTestUpperPort+EchoTestUpperPort)/2,四舍五入,并按照第5.5.4.2节的规定发送间接气泡。

5.6. Hairpinning Extension
5.6. 发夹延伸

This extension is optional; an implementation SHOULD support it.

此扩展是可选的;实现应该支持它。

5.6.1. Abstract Data Model
5.6.1. 抽象数据模型

This section describes a conceptual model of possible data organization that an implementation maintains to participate in this protocol. The described organization is provided to facilitate the explanation of how the protocol behaves. This document does not mandate that implementations adhere to this model as long as their external behavior is consistent with that described in this document.

本节描述实现维护以参与此协议的可能数据组织的概念模型。提供所述组织是为了便于解释协议的行为方式。本文档并不要求实现遵守此模型,只要其外部行为与本文档中描述的一致。

In addition to the state specified in Section 5.2 of [RFC4380], the following are also required:

除了[RFC4380]第5.2节中规定的状态外,还需要以下内容:

UPnP Mapped Address/Port: The mapped address/port assigned via UPnP to the Teredo client by the UPnP-enabled NAT behind which the Teredo client is positioned. This field has a valid value only if the NAT to which the Teredo client is connected is UPnP enabled. In addition, if the Teredo client is positioned behind a single NAT only (as opposed to a series of nested NATs), this value will be the same as the mapped address/port embedded in its Teredo IPv6 address.

UPnP映射地址/端口:Teredo客户端所在的支持UPnP的NAT通过UPnP分配给Teredo客户端的映射地址/端口。仅当Teredo客户端连接的NAT已启用UPnP时,此字段才具有有效值。此外,如果Teredo客户端仅位于单个NAT后面(与一系列嵌套NAT相反),则该值将与其Teredo IPv6地址中嵌入的映射地址/端口相同。

Peer Entry: Per-peer state is extended beyond what is described in [RFC4380] by including the following:

对等条目:每个对等状态的扩展超出了[RFC4380]中的描述,包括以下内容:

o Alternate Address/Port list: The list of alternate address/port pairs advertised by the peer.

o 备用地址/端口列表:对等方播发的备用地址/端口对列表。

5.6.2. Timers
5.6.2. 计时器

No timers are necessary other than those in [RFC4380].

除[RFC4380]中的计时器外,不需要其他计时器。

5.6.3. Initialization
5.6.3. 初始化

Behavior is as specified in [RFC4380], with the following additions.

行为如[RFC4380]所述,并添加以下内容。

Prior to beginning the qualification procedure, the Teredo client MUST invoke the AddPortMapping function (as specified in Section 2.4.16 of [UPNPWANIP]) with the parameters specified in Section 5.3.3. If successful, it indicates that the NAT has created a port mapping from the external port of the NAT to the internal port

在开始鉴定程序之前,Teredo客户端必须使用第5.3.3节中规定的参数调用AddPortMapping函数(如[UPNPWANIP]第2.4.16节中规定)。如果成功,则表示NAT已创建从NAT外部端口到内部端口的端口映射

of the Teredo client node. If the AddPortMapping function is successful, the Teredo client MUST store the mapping assigned by the NAT in its UPnP Mapped Address/Port state.

Teredo客户端节点的。如果AddPortMapping函数成功,Teredo客户端必须将NAT分配的映射存储在其UPnP映射的地址/端口状态中。

After the qualification procedure, the mapped address/port learned from the Teredo server MUST be compared to the UPnP Mapped Address/ Port. If both are the same, the Teredo client is positioned behind a single NAT and the UPnP Mapped Address/Port MUST be zeroed out.

在鉴定程序之后,必须将从Teredo服务器获取的映射地址/端口与UPnP映射地址/端口进行比较。如果两者相同,Teredo客户端位于单个NAT后面,UPnP映射的地址/端口必须归零。

5.6.4. Message Processing
5.6.4. 消息处理
5.6.4.1. Sending an Indirect Bubble
5.6.4.1. 发出间接泡沫

The rules for when indirect bubbles are sent to a Teredo peer are as specified in Section 5.2.6 of [RFC4380]. If communication between a Teredo client and a Teredo peer has not been established, the Teredo client MUST include the Alternate Address Trailer in the indirect bubble. The Alternate Address Trailer MUST include the node's local address/port in the Alternate Address/Port list. If the UPnP Mapped Address/Port is non-zero, the Alternate Address Trailer MUST also include it in the list.

[RFC4380]第5.2.6节规定了将间接气泡发送给Teredo对等体的时间规则。如果Teredo客户端和Teredo对等方之间的通信尚未建立,Teredo客户端必须在间接气泡中包含备用地址尾部。备用地址尾部必须在备用地址/端口列表中包含节点的本地地址/端口。如果UPnP映射的地址/端口为非零,则备用地址尾部还必须将其包括在列表中。

Hairpinning requires "direct IPv6 connectivity tests" (as specified in Section 5.2.9 of [RFC4380]) to succeed before it can accept packets from an IPv4 address and port not embedded in the Teredo IPv6 address. Hence, the indirect bubble MUST also include a Nonce Trailer.

发夹需要“直接IPv6连接测试”(如[RFC4380]第5.2.9节所述)才能成功,然后才能接受来自IPv4地址和未嵌入Teredo IPv6地址的端口的数据包。因此,间接气泡还必须包括临时拖车。

5.6.4.2. Receiving an Indirect Bubble
5.6.4.2. 接受间接泡沫

The rules for processing indirect bubbles are as specified in Section 5.2.3 of [RFC4380]. In addition to those rules, when a Teredo client receives an indirect bubble with the Alternate Address Trailer, it SHOULD first verify that the Alternate Address Trailer is correctly formed (as specified in Section 4.3), and drop the bubble if not. Otherwise, it MUST set the Alternate Address/Port list in its Peer Entry to the list in the trailer. The Teredo client, besides sending direct bubbles to the mapped address/port embedded in the Teredo IPv6 address (as specified in Section 5.2.6 of [RFC4380]), MUST also send a direct bubble to each mapped address/port advertised in the Alternate Address Trailer.

处理间接气泡的规则如[RFC4380]第5.2.3节所述。除这些规则外,当Teredo客户收到带有备用地址尾部的间接气泡时,应首先验证备用地址尾部是否正确形成(如第4.3节所述),如果没有,则丢弃气泡。否则,它必须将对等条目中的备用地址/端口列表设置为拖车中的列表。Teredo客户端除了向Teredo IPv6地址(如[RFC4380]第5.2.6节所述)中嵌入的映射地址/端口发送直接气泡外,还必须向备用地址尾部中公布的每个映射地址/端口发送直接气泡。

In each of the direct bubbles, the Teredo client MUST include a Nonce Trailer with the nonce value received in the indirect bubble.

在每个直接气泡中,Teredo客户端必须包含一个Nonce尾部,其中包含在间接气泡中接收到的Nonce值。

5.6.4.3. Receiving a Direct Bubble
5.6.4.3. 直接接受泡沫

If the mapped address/port of the direct bubble matches the mapped address/port embedded in the source Teredo IPv6 address, the direct bubble MUST be accepted, as specified in Section 5.2.3 of [RFC4380].

如果直接编号的映射地址/端口与源Teredo IPv6地址中嵌入的映射地址/端口匹配,则必须按照[RFC4380]第5.2.3节的规定接受直接编号。

If the mapped address/port does not match the embedded address/port, but the direct bubble contains a Nonce Trailer with a nonce that matches the Nonce Sent field of the Teredo peer, the direct bubble MUST be accepted.

如果映射的地址/端口与嵌入的地址/端口不匹配,但直接冒泡包含一个Nonce尾部,其Nonce与Teredo对等方的Nonce Sent字段匹配,则必须接受直接冒泡。

If neither of the above rules match, the direct bubble MUST be dropped.

如果上述两条规则都不匹配,则必须放弃直接气泡。

5.7. Server Load Reduction Extension
5.7. 服务器负载减少扩展

This extension is optional; an implementation SHOULD support it.

此扩展是可选的;实现应该支持它。

5.7.1. Abstract Data Model
5.7.1. 抽象数据模型

This section describes a conceptual model of possible data organization that an implementation maintains to participate in this protocol. The described organization is provided to facilitate the explanation of how the protocol behaves. This document does not mandate that implementations adhere to this model as long as their external behavior is consistent with that described in this document.

本节描述实现维护以参与此协议的可能数据组织的概念模型。提供所述组织是为了便于解释协议的行为方式。本文档并不要求实现遵守此模型,只要其外部行为与本文档中描述的一致。

In addition to the state specified in Section 5.2 of [RFC4380], the following are also required.

除了[RFC4380]第5.2节中规定的状态外,还需要以下内容。

Peer Entry: The following state needs to be added on a per-peer basis:

对等条目:每个对等条目需要添加以下状态:

o Count of Solicitations Transmitted: The number of Solicitation packets sent.

o 发送的请求计数:发送的请求数据包数。

5.7.2. Timers
5.7.2. 计时器

Retransmission Timer: A timer used to retransmit Teredo Neighbor Solicitation packets.

重传计时器:用于重传Teredo邻居请求数据包的计时器。

When the retransmission timer expires, the Teredo client MUST retransmit a direct bubble with a Neighbor Discovery Option Trailer, and increment the Count of Solicitations Transmitted. If the count is less than three, it MUST then reset the timer to expire in two seconds. Otherwise (if the count is now three), it MUST send an

当重新传输计时器过期时,Teredo客户端必须使用邻居发现选项拖车重新传输直接气泡,并增加传输的请求计数。如果计数小于3,则必须将计时器重置为在两秒钟后过期。否则(如果计数现在为3),它必须发送一个

indirect bubble to the Teredo peer to re-establish connectivity as if no communication between the Teredo client and the Teredo peer had been established.

间接连接到Teredo对等点以重新建立连接,就像Teredo客户端和Teredo对等点之间没有建立通信一样。

5.7.3. Initialization
5.7.3. 初始化

No initialization is necessary other than that specified in [RFC4380].

除[RFC4380]中规定的初始化外,无需进行任何初始化。

5.7.4. Message Processing
5.7.4. 消息处理

Except as specified below, processing is the same as specified in [RFC4380].

除以下规定外,处理与[RFC4380]中的规定相同。

5.7.4.1. Sending a Data Packet
5.7.4.1. 发送数据包

Upon receiving a data packet to be transmitted to the Teredo peer, the Teredo client MUST determine whether data has been exchanged between the Teredo client and peer in either direction in the last 30 seconds (using the state as specified in Section 5.2 of [RFC4380]). If not, the Teredo client MUST send a direct bubble with a Neighbor Discovery Option Trailer having the DiscoveryType field set to TeredoDiscoverySolicitation. The Count of Solicitations Transmitted field MUST be set to 1. The retransmission timer MUST be set to expire in two seconds.

在接收到要发送给Teredo对等机的数据包后,Teredo客户端必须确定在过去30秒内Teredo客户端和对等机之间是否在任一方向上交换了数据(使用[RFC4380]第5.2节中规定的状态)。如果没有,Teredo客户端必须发送一个带有邻居发现选项的直接气泡,其发现类型字段设置为TeredDiscoverySolicitation。“发送的请求计数”字段必须设置为1。必须将重传计时器设置为在两秒钟后过期。

5.7.4.2. Receiving a Direct Bubble
5.7.4.2. 直接接受泡沫

The rules for processing direct bubbles are as specified in Section 5.2.3 of [RFC4380]. In addition to those rules, upon receiving a direct bubble containing a Neighbor Discovery Option Trailer with DiscoveryType field set to TeredoDiscoverySolicitation, the Teredo client MUST respond with a direct bubble with the Neighbor Discovery Option Trailer having the DiscoveryType field set to TeredoDiscoveryAdvertisement.

[RFC4380]第5.2.3节规定了处理直接气泡的规则。除这些规则外,在接收到一个包含邻居发现选项尾部的直接气泡(DiscoveryType字段设置为TeredDiscoverySolicitation)时,Teredo客户端必须使用邻居发现选项尾部的直接气泡(DiscoveryType字段设置为TeredDiscoveryAdvertisement)进行响应。

6. Protocol Examples
6. 协议示例

The following sections describe several operations as used in common scenarios to illustrate the function of Teredo Extensions.

以下部分描述了常见场景中使用的几个操作,以说明Teredo扩展的功能。

6.1. Symmetric NAT Support Extension
6.1. 对称NAT支持扩展

The following protocol example illustrates the use of the Symmetric NAT Support Extension.

下面的协议示例说明了对称NAT支持扩展的使用。

In Figure 2 (Section 3.1), assume that Teredo Client A, which is positioned behind a port-symmetric NAT, wants to communicate with Teredo Client B, which is positioned behind an address-restricted NAT.

在图2中(第3.1节),假设位于端口对称NAT后面的Teredo客户端A想要与位于地址受限NAT后面的Teredo客户端B通信。

The qualification procedure where the Teredo client determines that it is positioned behind a symmetric NAT is exactly the same as that specified in Section 5.2.1 of [RFC4380]. Because of the Symmetric NAT Extension, Client A continues to configure a Teredo IPv6 address even after determining that the Teredo client is positioned behind a symmetric NAT.

Teredo客户确定其位于对称NAT后面的鉴定程序与[RFC4380]第5.2.1节中规定的完全相同。由于对称NAT扩展,即使在确定Teredo客户端位于对称NAT之后,客户端A仍会继续配置Teredo IPv6地址。

Next the following packet exchange helps Teredo Client A (A) establish communication with Teredo Client B (B).

接下来,以下数据包交换帮助Teredo客户端A(A)与Teredo客户端B(B)建立通信。

   Teredo           Client A's              Client B's           Teredo
   Client             Teredo                  Teredo             Client
      A        NAT    Server                  Server      NAT       B
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to B   |         |        |
    1 |--------------------------------------------------->|        |
      |         |        |                       |         |        |
      |Indirect Bubble to B via B's Teredo Server|         |        |
    2 |----------------------------------------->|----------------->|
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to A   |         |        |
      |         |<--------------------------------------------------| 3
      |         |        |                       |         |        |
      |         |        |Indirect Bubble to A via A's Teredo Server|
      |<-----------------|<-----------------------------------------| 4
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to B   |         |        |
    5 |------------------------------------------------------------>|
      |         |        |                       |         |        |
      |Indirect Bubble to B via B's Teredo Server|         |        |
    6 |----------------------------------------->|----------------->|
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to A   |         |        |
      |<------------------------------------------------------------| 7
      |         |        |                       |         |        |
        
   Teredo           Client A's              Client B's           Teredo
   Client             Teredo                  Teredo             Client
      A        NAT    Server                  Server      NAT       B
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to B   |         |        |
    1 |--------------------------------------------------->|        |
      |         |        |                       |         |        |
      |Indirect Bubble to B via B's Teredo Server|         |        |
    2 |----------------------------------------->|----------------->|
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to A   |         |        |
      |         |<--------------------------------------------------| 3
      |         |        |                       |         |        |
      |         |        |Indirect Bubble to A via A's Teredo Server|
      |<-----------------|<-----------------------------------------| 4
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to B   |         |        |
    5 |------------------------------------------------------------>|
      |         |        |                       |         |        |
      |Indirect Bubble to B via B's Teredo Server|         |        |
    6 |----------------------------------------->|----------------->|
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to A   |         |        |
      |<------------------------------------------------------------| 7
      |         |        |                       |         |        |
        

Port-Symmetric NAT to Address-Restricted NAT Packet Exchange

端口对称NAT到地址受限NAT数据包交换

1. A sends a direct bubble (Packet 1) destined to the mapped address/port embedded in B's Teredo IPv6 address. The mapped port in the source field of the packet assigned by Client A's NAT is different from the mapped port embedded in A's Teredo IPv6 address. This is characteristic of the port-symmetric NAT positioned in front of A. The mapped address in the source field of the packet is the same as the mapped address embedded in the Teredo IPv6 address of A.

1. A向B的Teredo IPv6地址中嵌入的映射地址/端口发送直接气泡(数据包1)。客户端A的NAT分配的数据包源字段中的映射端口与嵌入在客户端A的Teredo IPv6地址中的映射端口不同。这是位于A前面的端口对称NAT的特征。数据包源字段中的映射地址与A的Teredo IPv6地址中嵌入的映射地址相同。

2. The aforementioned direct bubble is dropped by B's NAT because it has not seen an outgoing packet destined to A's mapped IPv4 address.

2. 前面提到的直接冒泡被B的NAT丢弃,因为它没有看到发送到A的映射IPv4地址的传出数据包。

3. A sends an indirect bubble (Packet 2) destined to B via Client B's Teredo server.

3. A通过客户端B的Teredo服务器向B发送一个间接气泡(数据包2)。

4. The above-mentioned indirect bubble is received by B. B then responds with the following packets. The first packet sent by B is a direct bubble (Packet 3) destined to the mapped address/ port embedded in A's Teredo IPv6 address.

4. 上述间接气泡由B接收。B然后用以下数据包进行响应。B发送的第一个数据包是一个直接气泡(数据包3),目的地是a的Teredo IPv6地址中嵌入的映射地址/端口。

5. The above-mentioned direct bubble is dropped by A's NAT because the NAT has not seen any outgoing packet sourced from the mapped address/port embedded in A's Teredo IPv6 address and destined to the mapped address/port embedded in B's Teredo IPv6 address.

5. A的NAT丢弃了上述直接冒泡,因为NAT没有看到任何来自嵌入A的Teredo IPv6地址中的映射地址/端口并且目的地为嵌入B的Teredo IPv6地址中的映射地址/端口的传出数据包。

6. B also sends an indirect bubble (Packet 4) destined to A via A's Teredo Server.

6. B还通过A的Teredo服务器向A发送一个间接气泡(数据包4)。

7. The aforementioned indirect bubble is successfully received by A. A responds to the indirect bubble with its own direct bubble (Packet 5). This direct bubble is exactly the same as the first direct bubble (Packet 1) sent by A.

7. A成功地接收到上述间接气泡。A用自己的直接气泡(数据包5)响应间接气泡。此直接气泡与A发送的第一个直接气泡(数据包1)完全相同。

8. This time around the aforementioned direct bubble is accepted by B's NAT because the NAT has seen an outgoing packet (Packet 3) sourced from the mapped address/port embedded in B's Teredo IPv6 address and destined to the mapped address/port embedded in A's Teredo IPv6 address. It is important to remember that A's NAT is port-symmetric and therefore varies only the mapped port while the mapped address remains the same. B's NAT is address-restricted and cares only about prior communication with the IPv4 address, not the specific port. At this point, communication in one direction is now possible (B to A, but not vice versa).

8. 这一次,B的NAT接受了上述直接冒泡,因为NAT看到了一个传出数据包(数据包3),该数据包来自B的Teredo IPv6地址中嵌入的映射地址/端口,目的地是A的Teredo IPv6地址中嵌入的映射地址/端口。重要的是要记住,A的NAT是端口对称的,因此只改变映射的端口,而映射的地址保持不变。B的NAT是地址受限的,只关心先前与IPv4地址的通信,而不关心特定端口。此时,一个方向的通信现在是可能的(B到A,但不是相反)。

9. After receiving the direct bubble, B remembers the new mapped address/port that was in the source fields of the direct bubble and uses those for future communication with A instead of the mapped address/port embedded in A's Teredo IPv6 address.

9. 接收到直接编号后,B会记住直接编号的源字段中的新映射地址/端口,并将其用于将来与A的通信,而不是A的Teredo IPv6地址中嵌入的映射地址/端口。

10. A then times out and resends an indirect bubble (Packet 6) and in response, B sends a direct bubble (Packet 7). This direct bubble is destined to the new learned mapped address/port and hence A's NAT permits the direct bubble through. Communication is now possible in the other direction (client A to B).

10. 然后A超时并重新发送一个间接气泡(数据包6),作为响应,B发送一个直接气泡(数据包7)。这个直接冒泡被发送到新的已学习映射地址/端口,因此A的NAT允许直接冒泡通过。现在可以在另一个方向(客户端A到B)进行通信。

6.2. UPnP-Enabled Symmetric NAT Extension
6.2. 支持UPnP的对称NAT扩展

The following protocol example illustrates the use of the UPnP-Enabled Symmetric NAT Extension in addition to the Symmetric NAT Support Extension.

下面的协议示例说明了除了对称NAT支持扩展之外,还使用支持UPnP的对称NAT扩展。

Assume that Teredo Client A, which is positioned behind a UPnP-enabled port-symmetric NAT, wants to communicate with Teredo Client B, which is also positioned behind a UPnP-Enabled port-symmetric NAT.

假设Teredo客户端A位于启用UPnP的端口对称NAT后面,希望与Teredo客户端B通信,Teredo客户端B也位于启用UPnP的端口对称NAT后面。

Before both clients start their qualification procedure, they use UPnP to reserve port mappings on their respective NATs. The UPnP operations succeed for both the clients and the clients hence know that they are positioned behind UPnP-enabled NATs. After the qualification procedure, both clients have valid Teredo IPv6 addresses because they both support the Symmetric NAT Support Extension. Also, after the qualification procedure both clients will compare their mapped address/port determined through UPnP with the mapped address/port determined through the qualification procedure. Because both will be the same, the clients will zero out their UPnP mapped address/port values and conclude that they are each located behind a single UPnP-enabled NAT.

在两个客户端开始其鉴定过程之前,它们使用UPnP在各自的NAT上保留端口映射。UPnP操作对于客户端和客户端都是成功的,因此客户端知道它们位于支持UPnP的NAT后面。在验证过程之后,两个客户端都具有有效的Teredo IPv6地址,因为它们都支持对称NAT支持扩展。此外,在鉴定程序之后,两个客户端将比较通过UPnP确定的映射地址/端口与通过鉴定程序确定的映射地址/端口。因为两者都是相同的,所以客户端会将其UPnP映射的地址/端口值归零,并得出结论,它们各自位于一个启用UPnP的NAT后面。

The following packet exchange shows Teredo client A (A) establishing communication with Teredo client B (B).

下面的数据包交换显示Teredo客户端A(A)与Teredo客户端B(B)建立通信。

   Teredo           Client A's              Client B's           Teredo
   Client             Teredo                  Teredo             Client
      A        NAT    Server                  Server      NAT       B
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to B   |         |        |
    1 |------------------------------------------------------------>|
      |         |        |                       |         |        |
      |Indirect Bubble to B via B's Teredo Server|         |        |
    2 |----------------------------------------->|----------------->|
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to A   |         |        |
      |<------------------------------------------------------------| 3
      |         |        |                       |         |        |
        
   Teredo           Client A's              Client B's           Teredo
   Client             Teredo                  Teredo             Client
      A        NAT    Server                  Server      NAT       B
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to B   |         |        |
    1 |------------------------------------------------------------>|
      |         |        |                       |         |        |
      |Indirect Bubble to B via B's Teredo Server|         |        |
    2 |----------------------------------------->|----------------->|
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to A   |         |        |
      |<------------------------------------------------------------| 3
      |         |        |                       |         |        |
        

UPnP-enabled Symmetric NAT Packet Exchange

支持UPnP的对称NAT数据包交换

1. A sends a direct bubble (Packet 1) to the mapped address/port embedded in B's Teredo IPv6 address. Because A's NAT is a symmetric NAT, the UDP source port field in the packet assigned by A's NAT is different from the mapped port embedded in A's Teredo IPv6 address, but the IPv4 source address of the packet is the same as the mapped address embedded in A's Teredo IPv6 address.

1. A向嵌入在B的Teredo IPv6地址中的映射地址/端口发送直接气泡(数据包1)。由于A的NAT是对称NAT,由A的NAT分配的数据包中的UDP源端口字段与A的Teredo IPv6地址中嵌入的映射端口不同,但数据包的IPv4源地址与A的Teredo IPv6地址中嵌入的映射地址相同。

2. The above-mentioned direct bubble is received by B because it is destined for the UPnP mapped address/port of B and hence is let through by the NAT. At this point, B deduces that A is positioned behind a symmetric NAT because the mapped address/port from which the direct bubble is received is different from the mapped address/port that is embedded in A's Teredo IPv6 address. Hence, it remembers that the peer is positioned behind a symmetric NAT so that data packets will be sent to the mapped address/port embedded in A's Teredo IPv6 address, rather than the mapped address/port from which the direct bubble was received. At this point, communication in one direction is now possible (B to A, but not vice versa).

2. 上述直接冒泡由B接收,因为它的目的地是B的UPnP映射地址/端口,因此被NAT允许通过。此时,B推断A位于对称NAT后面,因为接收直接气泡的映射地址/端口与嵌入A的Teredo IPv6地址中的映射地址/端口不同。因此,它记住对等方位于对称NAT后面,因此数据包将被发送到嵌入a的Teredo IPv6地址中的映射地址/端口,而不是接收直接气泡的映射地址/端口。此时,一个方向的通信现在是可能的(B到A,但不是相反)。

3. A also sends an indirect bubble (Packet 2) destined to B via B's Teredo Server.

3. A还通过B的Teredo服务器向B发送一个间接气泡(数据包2)。

4. The above indirect bubble is received by B. B then responds with a direct bubble (Packet 3) destined to the mapped address/port embedded in A's Teredo IPv6 address, as in step 2.

4. 上述间接气泡由B接收。B然后用直接气泡(数据包3)响应,该气泡目的地为a的Teredo IPv6地址中嵌入的映射地址/端口,如步骤2所示。

5. Because A's NAT is also UPnP enabled, the above-mentioned direct bubble is received by A. A also notices that B is positioned behind a Symmetric NAT because the mapped address/port from which the packet is received is different from the mapped address/port

5. 由于A的NAT也支持UPnP,因此A接收上述直接气泡。A还注意到B位于对称NAT后面,因为接收数据包的映射地址/端口与映射地址/端口不同

embedded in B's Teredo IPv6 address. Hence, it remembers that the peer is positioned behind a symmetric NAT so that data packets will be sent to the mapped address/port embedded in B's Teredo IPv6 address, rather than the mapped address/port from which the direct bubble was received. At this point, communication is now possible in the other direction (A to B).

嵌入B的Teredo IPv6地址中。因此,它记住对等方位于对称NAT后面,因此数据包将被发送到嵌入B的Teredo IPv6地址中的映射地址/端口,而不是接收直接气泡的映射地址/端口。此时,可以在另一个方向(A到B)进行通信。

6.3. Port-Preserving Symmetric NAT Extension
6.3. 端口保持对称NAT扩展

The following protocol example illustrates the use of the Port-Preserving Symmetric NAT Extension.

下面的协议示例说明了端口保持对称NAT扩展的使用。

Assume that Teredo Client A (A), which is positioned behind a port-preserving symmetric NAT, wants to communicate with Teredo Client B (B), which is also positioned behind a port-preserving symmetric NAT.

假设Teredo客户端A(A)位于保留端口的对称NAT后面,希望与Teredo客户端B(B)通信,Teredo客户端B(B)也位于保留端口的对称NAT后面。

The following packet exchange explains the configuration setup and communication setup between the two clients.

下面的数据包交换解释了两个客户端之间的配置设置和通信设置。

   Teredo           Client A's              Client B's           Teredo
   Client             Teredo                  Teredo             Client
      A        NAT    Server                  Server      NAT       B
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to B   |         |        |
    1 |--------------------------------------------------->|        |
      |         |        |                       |         |        |
      |Indirect Bubble to B via B's Teredo Server|         |        |
    2 |----------------------------------------->|----------------->|
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to A   |         |        |
      |         |<--------------------------------------------------| 3
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to A   |         |        |
      |         |<--------------------------------------------------| 4
      |         |        |                       |         |        |
      |         |        |Indirect Bubble to A via A's Teredo Server|
      |<-----------------|<-----------------------------------------| 5
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to B   |         |        |
    6 |--------------------------------------------------->|        |
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to B   |         |        |
    7 |------------------------------------------------------------>|
      |         |        |                       |         |        |
      |Indirect Bubble to B via B's Teredo Server|         |        |
    8 |----------------------------------------->|----------------->|
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to A   |         |        |
      |<------------------------------------------------------------| 9
      |         |        |                       |         |        |
        
   Teredo           Client A's              Client B's           Teredo
   Client             Teredo                  Teredo             Client
      A        NAT    Server                  Server      NAT       B
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to B   |         |        |
    1 |--------------------------------------------------->|        |
      |         |        |                       |         |        |
      |Indirect Bubble to B via B's Teredo Server|         |        |
    2 |----------------------------------------->|----------------->|
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to A   |         |        |
      |         |<--------------------------------------------------| 3
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to A   |         |        |
      |         |<--------------------------------------------------| 4
      |         |        |                       |         |        |
      |         |        |Indirect Bubble to A via A's Teredo Server|
      |<-----------------|<-----------------------------------------| 5
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to B   |         |        |
    6 |--------------------------------------------------->|        |
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to B   |         |        |
    7 |------------------------------------------------------------>|
      |         |        |                       |         |        |
      |Indirect Bubble to B via B's Teredo Server|         |        |
    8 |----------------------------------------->|----------------->|
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to A   |         |        |
      |<------------------------------------------------------------| 9
      |         |        |                       |         |        |
        

Port-Preserving Symmetric NAT Packet Exchange

端口保持对称NAT数据包交换

1. During the qualification procedure, when the clients receive a response from the Teredo server, they compare the Port value in the Origin indication with the Local Port value. If both values match, the clients set the Port-Preserving NAT flag to TRUE.

1. 在鉴定过程中,当客户端收到Teredo服务器的响应时,它们会将原点指示中的端口值与本地端口值进行比较。如果两个值都匹配,则客户端将端口保留NAT标志设置为TRUE。

2. When the response is received from the secondary Teredo server, the mapped address/port value in the Origin indication is compared with the mapped address/port value learned from the response received from the primary server. If the mappings are different, the Symmetric NAT flag is set to TRUE.

2. 当从辅助Teredo服务器接收到响应时,原点指示中的映射地址/端口值将与从主服务器接收到的响应中获取的映射地址/端口值进行比较。如果映射不同,则对称NAT标志设置为TRUE。

3. It is assumed that for both Clients A and B, the Port-Preserving NAT flag and the Symmetric NAT flag are set to TRUE at the end of the qualification procedure.

3. 假设对于客户端A和B,在鉴定过程结束时,端口保持NAT标志和对称NAT标志都设置为TRUE。

4. Before A sends packets to B, A checks to see if it is positioned behind a port-preserving NAT and a symmetric NAT, which in the example, it is. A also checks to see if the peer is "trusted", but it currently is not. Next, A checks if the Random Port is set to non-zero. Since it is still zero, A allocates a new random port, begins listening on it, and stores the value in the Random Port field.

4. 在A向B发送数据包之前,A会检查它是否位于保留端口的NAT和对称NAT之后,在本例中,它是。A还检查对等方是否“受信任”,但当前不受信任。接下来,检查随机端口是否设置为非零。由于它仍然为零,A分配一个新的随机端口,开始侦听它,并将该值存储在随机端口字段中。

5. A sends a direct bubble (Packet 1) from the primary port to the mapped address/port embedded in B's Teredo IPv6 address. This direct bubble does not have a Nonce Trailer or a Random Port Trailer attached to the end.

5. A从主端口向B的Teredo IPv6地址中嵌入的映射地址/端口发送直接气泡(数据包1)。该直接气泡没有连接到末端的临时拖车或随机端口拖车。

6. The aforementioned direct bubble is dropped by B's NAT because the NAT has not seen an outgoing packet destined to A's mapped address.

6. 前面提到的直接冒泡被B的NAT丢弃,因为NAT没有看到发送到A的映射地址的传出数据包。

7. A sends an indirect bubble (Packet 2) destined to B via client B's Teredo server. This indirect bubble contains two trailers: the Nonce Trailer containing a random nonce, and the Random Port Trailer containing the random port value from the Peer Entry. The nonce used in the Nonce Trailer is also stored in the Nonce Sent field of the Peer Entry.

7. A通过客户端B的Teredo服务器向B发送一个间接气泡(数据包2)。此间接气泡包含两个拖车:包含随机Nonce的Nonce拖车和包含来自对等条目的随机端口值的随机端口拖车。nonce拖车中使用的nonce也存储在对等条目的nonce Sent字段中。

8. The aforementioned indirect bubble is received by B. B adds the Teredo peer to its peer list. B saves the nonce value from the Nonce Trailer in the Nonce Advertised field of the Peer Entry. B stores the port value from the Random Port Trailer in the Peer Random Port field in the Peer Entry.

8. 上述间接气泡由B接收。B将Teredo peer添加到其对等列表中。B在对等条目的nonce advised字段中保存nonce尾部的nonce值。B将随机端口拖车的端口值存储在对等条目的对等随机端口字段中。

9. B responds by sending the following packets. The first packet sent by B is a direct bubble (Packet 3) destined to the mapped address/port embedded in A's Teredo IPv6 address. This packet is sent from the primary port. It includes the Nonce Trailer with the nonce from the Nonce Advertised field of the Peer Entry.

9. B通过发送以下数据包进行响应。B发送的第一个数据包是一个直接气泡(数据包3),目的地是a的Teredo IPv6地址中嵌入的映射地址/端口。此数据包从主端口发送。它包括具有来自对等条目的Nonce广告字段的Nonce的Nonce尾部。

10. The aforementioned direct bubble is dropped by A's NAT because the NAT has not seen any outgoing packet sourced from the mapped address/port embedded in A's Teredo IPv6 address and destined to the mapped address/port embedded in B's Teredo IPv6 address.

10. 前面提到的直接冒泡被A的NAT丢弃,因为NAT没有看到任何来自A的Teredo IPv6地址中嵌入的映射地址/端口的传出数据包,这些数据包的目的地是B的Teredo IPv6地址中嵌入的映射地址/端口。

11. B then checks if it is positioned behind a port-restricted NAT or a symmetric NAT. It also checks if the peer has already advertised a random port. In this case, B is positioned behind a port-preserving symmetric NAT and the peer has advertised a random port; hence, it needs to use a random port. It checks if its Random Port field is set to non-zero. Since it is still

11. 然后检查它是否位于端口受限NAT或对称NAT后面。它还检查对等方是否已经公布了一个随机端口。在这种情况下,B被定位在保持对称NAT的端口后面,并且对等方已经通告了随机端口;因此,它需要使用一个随机端口。它检查其随机端口字段是否设置为非零。因为它还是

zero, B allocates a new random port, begins listening on it, and stores it in the Random Port entry of the Peer Entry. B then sends a direct bubble (Packet 4) destined to the mapped address embedded in A's Teredo IPv6 address and the port stored in the Peer Random Port field of the Peer Entry. The direct bubble is sent from its own random port.

零,B分配一个新的随机端口,开始侦听它,并将其存储在对等项的随机端口项中。然后,B发送一个直接气泡(数据包4),目的地为a的Teredo IPv6地址中嵌入的映射地址和存储在对等条目的对等随机端口字段中的端口。直接气泡从其自己的随机端口发送。

12. The above direct bubble is dropped by A's NAT because the NAT has not seen any outgoing packet sourced from the mapped address embedded in A's Teredo IPv6 address and random port advertised by A.

12. A的NAT丢弃了上述直接冒泡,因为NAT没有看到任何来自A的Teredo IPv6地址中嵌入的映射地址和A广告的随机端口的传出数据包。

13. B also sends an indirect bubble (Packet 5) destined to A via A's Teredo Server. This indirect bubble includes a Nonce Trailer and a Random Port Trailer. The Nonce Trailer includes a new randomly generated nonce that is also stored in the Nonce Sent field of the Peer Entry. The Random Port Trailer includes the value in the Random Port field of the Peer Entry.

13. B还通过A的Teredo服务器向A发送一个间接气泡(数据包5)。这个间接气泡包括一个Nonce拖车和一个随机端口拖车。Nonce尾部包括新的随机生成的Nonce,该Nonce也存储在对等条目的Nonce Sent字段中。随机端口尾部包括对等条目的随机端口字段中的值。

14. The aforementioned indirect bubble is successfully received by A. A parses the trailers and stores the nonce contained in the Nonce Trailer in the Nonce Received field of the Peer Entry. A stores the port advertised in the Random Port Trailer in the Random Port field of the Peer Entry.

14. A成功接收到上述间接气泡。A解析预告片,并将预告片中包含的nonce存储在对等条目的nonce received字段中。A将随机端口拖车中公布的端口存储在对等条目的随机端口字段中。

15. A responds with the following packets in response to the indirect bubble received. The first packet is a direct bubble (Packet 6) sent from the primary port and is destined to the mapped address/port embedded in B's Teredo IPv6 address.

15. A使用以下数据包响应接收到的间接气泡。第一个数据包是从主端口发送的直接气泡(数据包6),目的地是B的Teredo IPv6地址中嵌入的映射地址/端口。

16. The aforementioned direct bubble again is dropped by B's NAT because the NAT has not seen an outgoing packet with the same 4-tuple as the incoming packet.

16. 前面提到的直接气泡再次被B的NAT丢弃,因为NAT没有看到与传入数据包具有相同4元组的传出数据包。

17. The next packet is also a direct bubble (Packet 7) and this one is sent from A's random port. The packet is destined to the mapped address embedded in B's Teredo IPv6 address and the Peer Random Port stored in the Peer Entry.

17. 下一个数据包也是一个直接气泡(数据包7),这个数据包是从a的随机端口发送的。数据包的目的地是嵌入在B的Teredo IPv6地址中的映射地址和存储在对等条目中的对等随机端口。

18. Because both NATs are port-preserving NATs and the random ports have not been used for any other mapping, the aforementioned direct bubble is received by B because B's NAT has seen an outgoing packet (Packet 4) with the same address/port pairs. B stores the address/port from which the direct bubble was received in the mapped address/port fields of the Peer Entry. It changes the status of the peer to "trusted" and sets the

18. 因为两个NAT都是端口保留NAT,并且随机端口没有用于任何其他映射,所以B接收上述直接气泡,因为B的NAT看到了具有相同地址/端口对的传出数据包(数据包4)。B在对等条目的映射地址/端口字段中存储接收直接气泡的地址/端口。它将对等方的状态更改为“受信任”,并设置

Direct Receive on Random Port field to TRUE. At this point, communication in one direction is now possible (B to A, but not vice versa).

随机端口上的直接接收字段为TRUE。此时,一个方向的通信现在是可能的(B到A,但不是相反)。

19. Because A still considers B to be "not-trusted", it times out and retransmits an indirect bubble (Packet 8). This packet contains a new nonce as part of the Nonce Trailer and also contains the value of the random port as part of the Random Port Trailer.

19. 因为A仍然认为B“不可信”,所以它超时并重新发送一个间接冒泡(数据包8)。此数据包包含一个新的nonce作为nonce尾部的一部分,还包含随机端口的值作为随机端口尾部的一部分。

20. B receives the aforementioned indirect bubble. The processing of this indirect bubble is similar to the processing of Packet 2. Since B received a direct bubble on its random port, it does not respond with a direct bubble from its primary port. Instead, it responds with a direct bubble (Packet 9) sent from its random port, which is similar to Packet 4 mentioned above.

20. B接收上述间接气泡。该间接气泡的处理类似于包2的处理。由于B在其随机端口上接收到直接气泡,因此它不会从其主端口响应直接气泡。相反,它使用从其随机端口发送的直接气泡(数据包9)进行响应,这类似于上面提到的数据包4。

21. A receives the direct bubble sent by B. A stores the mapped address/port from which the direct bubble was received in mapped address/port fields in the Peer Entry. A changes the status of B to "trusted" and sets the Direct Receive on Random Port field to TRUE. At this point, the communication is now possible in the other direction (A to B).

21. A接收B发送的直接气泡。A将从中接收直接气泡的映射地址/端口存储在对等条目的映射地址/端口字段中。A将B的状态更改为“受信任”,并将随机端口上的直接接收字段设置为TRUE。此时,可以在另一个方向(A到B)进行通信。

6.4. Sequential Port-Symmetric NAT Extension
6.4. 顺序端口对称NAT扩展

The following protocol example illustrates the use of the Sequential Port-Symmetric NAT Extension.

下面的协议示例说明了顺序端口对称NAT扩展的使用。

Assume that Teredo Client A (A), which is positioned behind a sequential port-symmetric NAT and implements the Sequential Port-Symmetric NAT Extension, wants to communicate with Teredo Client B (B), which is positioned behind a port-restricted NAT that supports the Port-Preserving Port-Symmetric NAT Extension. The following packet exchange explains the configuration setup and communication setup between the two clients.

假设Teredo客户端A(A)位于顺序端口对称NAT后面并实现顺序端口对称NAT扩展,它希望与Teredo客户端B(B)通信,Teredo客户端B(B)位于支持端口保留端口对称NAT扩展的端口受限NAT后面。下面的数据包交换解释了两个客户端之间的配置设置和通信设置。

   Teredo                 A's      A's            B's
   Client               Primary  Secondary      Teredo          Client
      A        NAT      Server    Server        Server   NAT       B
      |         |          |        |              |      |        |
      | Direct Bubble to B |        |              |      |        |
    1 |-------------------------------------------------->|        |
      |         |          |        |              |      |        |
      |Router Solicitation |        |              |      |        |
    2 |------------------->|        |              |      |        |
      |         |          |        |              |      |        |
      |Router Advertisement|        |              |      |        |
      |<-------------------| 3      |              |      |        |
      |         |          |        |              |      |        |
    4 | Direct Bubble to B |        |              |      |        |
      |-------------------------------------------------->|        |
      |         |          |        |              |      |        |
      |  Router Solicitation        |              |      |        |
    5 |---------------------------->|              |      |        |
      |         |          |        |              |      |        |
      |  Router Advertisement       |              |      |        |
      |<----------------------------| 6            |      |        |
      |         |          |        |              |      |        |
      | Indirect Bubble to B via B's Teredo Server |      |        |
    7 |------------------------------------------->|-------------->|
      |         |          |        |              |      |        |
      |         |          |        |         Direct Bubble to A   |
      |         |<-------------------------------------------------| 8
      |         |          |        |              |      |        |
      |         |          |        |       Indirect Bubble to A   |
      |<-------------------|<--------------------------------------| 9
      |         |          |        |              |      |        |
      |         |          |        |         Direct Bubble to A   |
      |<-----------------------------------------------------------| 10
      |         |          |        |              |      |        |
      |   Direct Bubble to B        |              |      |        |
   11 |----------------------------------------------------------->|
        
   Teredo                 A's      A's            B's
   Client               Primary  Secondary      Teredo          Client
      A        NAT      Server    Server        Server   NAT       B
      |         |          |        |              |      |        |
      | Direct Bubble to B |        |              |      |        |
    1 |-------------------------------------------------->|        |
      |         |          |        |              |      |        |
      |Router Solicitation |        |              |      |        |
    2 |------------------->|        |              |      |        |
      |         |          |        |              |      |        |
      |Router Advertisement|        |              |      |        |
      |<-------------------| 3      |              |      |        |
      |         |          |        |              |      |        |
    4 | Direct Bubble to B |        |              |      |        |
      |-------------------------------------------------->|        |
      |         |          |        |              |      |        |
      |  Router Solicitation        |              |      |        |
    5 |---------------------------->|              |      |        |
      |         |          |        |              |      |        |
      |  Router Advertisement       |              |      |        |
      |<----------------------------| 6            |      |        |
      |         |          |        |              |      |        |
      | Indirect Bubble to B via B's Teredo Server |      |        |
    7 |------------------------------------------->|-------------->|
      |         |          |        |              |      |        |
      |         |          |        |         Direct Bubble to A   |
      |         |<-------------------------------------------------| 8
      |         |          |        |              |      |        |
      |         |          |        |       Indirect Bubble to A   |
      |<-------------------|<--------------------------------------| 9
      |         |          |        |              |      |        |
      |         |          |        |         Direct Bubble to A   |
      |<-----------------------------------------------------------| 10
      |         |          |        |              |      |        |
      |   Direct Bubble to B        |              |      |        |
   11 |----------------------------------------------------------->|
        

Sequential Port-Symmetric NAT Packet Exchange

顺序端口对称NAT数据包交换

1. During the qualification procedure, when Client A receives a response from the Teredo Server, it compares the Port value in the Origin indication with the Local Port value. Since they are different, it concludes that it is not behind a port-preserving NAT, and so assumes it is behind a sequential port-symmetric NAT.

1. 在鉴定过程中,当客户端A收到Teredo服务器的响应时,它会将原点指示中的端口值与本地端口值进行比较。由于它们是不同的,它得出的结论是,它不在保留端口的NAT后面,因此假设它在顺序端口对称NAT后面。

2. When A wants to communicate with B, A starts by sending a direct bubble (Packet 1) from its primary port. This occurs because Client A does not know Client B's NAT type, which could be a cone

2. 当A想要与B通信时,A首先从其主端口发送一个直接气泡(数据包1)。发生这种情况是因为客户端A不知道客户端B的NAT类型,可能是一个圆锥体

or address restricted NAT or UPnP-enabled NAT. Because Client A is behind a symmetric NAT, the external port used by A's NAT is a new port. This direct bubble will be dropped by B's NAT since Client B is behind a port-restricted NAT.

或地址受限NAT或支持UPnP的NAT。因为客户机A位于对称NAT之后,所以A的NAT使用的外部端口是一个新端口。由于客户端B位于端口受限的NAT后面,因此B的NAT将丢弃此直接气泡。

3. Because Client A does not know if B is behind a port restricted NAT or some other kind of NAT, Client A proactively opens a new random internal port, say, port 1100.

3. 因为客户端A不知道B是在端口受限NAT后面还是在其他NAT后面,所以客户端A主动打开一个新的随机内部端口,比如端口1100。

4. Client A then performs its Echo Test as follows:

4. 然后,客户端A执行其回波测试,如下所示:

A. Client A sends a router solicitation (Packet 2) to its Teredo Server address from port 1100. The server responds with a router advertisement (Packet 3).

A.客户端A从端口1100向其Teredo服务器地址发送路由器请求(数据包2)。服务器用路由器公告(数据包3)进行响应。

B. Client A sends a direct bubble (Packet 4) to the peer from port 1100 destined to the port advertised in Client B's Teredo address, say, port 2100. This direct bubble is dropped by Client B's port-restricted NAT.

B.客户端A从端口1100向对等方发送一个直接气泡(数据包4),目的地为客户端B的Teredo地址(例如端口2100)中公布的端口。此直接气泡由客户端B的端口受限NAT丢弃。

C. Client A sends a router solicitation (Packet 5) to its secondary Teredo server address from port 1100. The server responds with a router advertisement (Packet 6).

C.客户端A从端口1100向其辅助Teredo服务器地址发送路由器请求(数据包5)。服务器用路由器公告(数据包6)进行响应。

D. On receiving the corresponding router advertisements for Packet 2 and Packet 4, Client A knows that port 1100 maps to, say, port 1200 for Packet 2 and port 1202 for Packet 4.

D.在接收到分组2和分组4的相应路由器广告时,客户端A知道端口1100映射到例如分组2的端口1200和分组4的端口1202。

E. Client A then calculates its predicted port used for Packet 2 as the average (rounded down) of 1200 and 1202, i.e., 1201.

E.客户端A然后将其用于数据包2的预测端口计算为1200和1202的平均值(向下舍入),即1201。

5. Client A then sends out an indirect bubble (Packet 7). This indirect bubble contains a random port trailer that contains the predicted port, port 1201. This indirect bubble makes it to Client B.

5. 然后,客户端A发送一个间接气泡(数据包7)。此间接气泡包含一个随机端口拖车,其中包含预测的端口,端口1201。这个间接的气泡使它到达客户B。

6. Client B sends out the following bubbles in response to the indirect bubble:

6. 客户端B发出以下气泡以响应间接气泡:

A. The first direct bubble (Packet 8) is destined for the port mapping embedded in Client A's Teredo Address. (It has been observed that some NATs display symmetric NAT behavior for outgoing packets but cone NAT behavior for incoming packets. The direct bubble described is likely to succeed if Client A's NAT displays such a behavior.) Since in this example, A's NAT is a normal sequential port-symmetric NAT, this packet is dropped.

A.第一个直接冒泡(数据包8)将用于嵌入客户机A的Teredo地址中的端口映射。(已经观察到,一些NAT对传出数据包显示对称NAT行为,但对传入数据包显示锥形NAT行为。如果客户端A的NAT显示这种行为,则描述的直接冒泡可能会成功。)因为在本例中,A的NAT是正常的顺序端口对称NAT,所以会丢弃此数据包。

B. The second packet is an indirect bubble (Packet 9) sent to Client A without any trailers since Client B is behind a port-restricted NAT.

B.第二个数据包是发送到客户端A的间接气泡(数据包9),没有任何拖车,因为客户端B位于端口受限NAT后面。

C. The next packet will be a direct bubble (Packet 10) sent to port 1201. This packet will make it in to Client A since Client A previously sent an outgoing packet (Packet 4) with the same four tuple. At this point, communication in one direction is now possible (A to B, but not vice versa).

C.下一个数据包将是发送到端口1201的直接气泡(数据包10)。此数据包将进入客户端A,因为客户端A先前发送了一个具有相同四元组的传出数据包(数据包4)。此时,一个方向的通信现在是可能的(A到B,但不是相反)。

7. Client A then sends a direct bubble (Packet 11) to Client B when it receives Packet 10. This time, the bubble makes it through to B because it previously sent an outgoing packet (Packet 10) with the same four tuple. At this point, communication is now possible in the other direction (B to A).

7. 然后,当客户端A接收到数据包10时,它向客户端B发送一个直接气泡(数据包11)。这一次,气泡通过B,因为它之前发送了一个具有相同四元组的传出数据包(数据包10)。此时,可以在另一个方向(B到A)进行通信。

6.5. Hairpinning Extension
6.5. 发夹延伸

The following protocol example illustrates the use of the Hairpinning Extension.

下面的协议示例演示了Hairpinning扩展的使用。

In Figure 3 (Section 3.5), Teredo Client A (A) and Teredo Client B (B) are positioned behind different immediate NATs in a two-layer NAT topology; that is, the outermost NAT (NAT E) is common to both A and B but the immediate NATs that they are connected to are different (A is connected to NAT F while B is connected to NAT G). Further assume that the immediate NATs that A and B are connected to are UPnP-enabled (NAT F and NAT G are UPnP-enabled). We assume that NAT E does not support hairpinning; that is, the NAT does not relay packets originating from the private address space and destined for the public address of the NAT, back to the private address of the NAT.

在图3(第3.5节)中,Teredo客户端A(A)和Teredo客户端B(B)位于两层NAT拓扑中不同的立即NAT后面;也就是说,最外面的NAT(NAT E)对于A和B都是公共的,但是它们连接到的直接NAT是不同的(A连接到NAT F,而B连接到NAT G)。进一步假设A和B连接到的直接NAT是UPnP启用的(NAT F和NAT G是UPnP启用的)。我们假设nate不支持发夹;也就是说,NAT不将源自专用地址空间且目的地为NAT的公共地址的分组中继回NAT的专用地址。

Before starting the qualification procedure, both A and B use UPnP to reserve port mappings on their respective NATs. They observe that the UPnP operation succeeds and both clients obtain valid UPnP Mapped Address/Port values.

在开始鉴定程序之前,A和B都使用UPnP在各自的NAT上保留端口映射。他们观察到UPnP操作成功,并且两个客户端都获得有效的UPnP映射地址/端口值。

Next, both client A and client B implement the qualification procedure where they determine their mapped address/port values, as specified in Section 5.2.1 of [RFC4380].

接下来,客户机A和客户机B都实施鉴定程序,根据[RFC4380]第5.2.1节的规定,确定其映射的地址/端口值。

A and B both compare their UPnP Mapped Address/Port values with the mapped address/port values obtained through the qualification procedure. Because both A and B are part of a two-layer NAT topology, these values will be different. Hence, both A and B continue to hold on to their UPnP Mapped Address/Port.

A和B都将其UPnP映射地址/端口值与通过鉴定程序获得的映射地址/端口值进行比较。因为A和B都是两层NAT拓扑的一部分,所以这些值将不同。因此,A和B都继续保持它们的UPnP映射地址/端口。

The following packet exchange shows client A establishing communication with client B.

下面的数据包交换显示客户端A与客户端B建立通信。

   Teredo             Teredo                      Client A's  Client B's
   Client     NAT     Client        NAT      NAT    Teredo      Teredo
      A        F         B           G        E     Server      Server
      |        |         |           |        |        |           |
      |        | Direct Bubble to B  |        |        |           |
    1 |-------------------------------------->|        |           |
      |        |         |           |        |        |           |
      |       Indirect Bubble to B via B's Teredo Server           |
    2 |----------------------------------------------------------->|
      |        |         |<----------------------------------------|
      |        |         |           |        |        |           |
      |        |         | Direct Bubble to A |        |           |
    3 |        |         |------------------->|        |           |
      |        |         |           |        |        |           |
      |        |         |  Direct   |        |        |           |
      |        |         |Bubble to A|        |        |           |
    4 |        |         |---------->|        |        |           |
      |        |         |           |        |        |           |
      |        |         |  Direct   |        |        |           |
      |        |         |Bubble to A|        |        |           |
    5 |        |         |---------->|        |        |           |
      |<-----------------------------|        |        |           |
      |        |         |           |        |        |           |
      |        |         |    Indirect Bubble to A     |           |
    6 |        |         |---------------------------->|           |
      |<-----------------------------------------------|           |
      |        |         |           |        |        |           |
      |Direct Bubble to B|           |        |        |           |
    7 |----------------->|           |        |        |           |
      |        |         |           |        |        |           |
        
   Teredo             Teredo                      Client A's  Client B's
   Client     NAT     Client        NAT      NAT    Teredo      Teredo
      A        F         B           G        E     Server      Server
      |        |         |           |        |        |           |
      |        | Direct Bubble to B  |        |        |           |
    1 |-------------------------------------->|        |           |
      |        |         |           |        |        |           |
      |       Indirect Bubble to B via B's Teredo Server           |
    2 |----------------------------------------------------------->|
      |        |         |<----------------------------------------|
      |        |         |           |        |        |           |
      |        |         | Direct Bubble to A |        |           |
    3 |        |         |------------------->|        |           |
      |        |         |           |        |        |           |
      |        |         |  Direct   |        |        |           |
      |        |         |Bubble to A|        |        |           |
    4 |        |         |---------->|        |        |           |
      |        |         |           |        |        |           |
      |        |         |  Direct   |        |        |           |
      |        |         |Bubble to A|        |        |           |
    5 |        |         |---------->|        |        |           |
      |<-----------------------------|        |        |           |
      |        |         |           |        |        |           |
      |        |         |    Indirect Bubble to A     |           |
    6 |        |         |---------------------------->|           |
      |<-----------------------------------------------|           |
      |        |         |           |        |        |           |
      |Direct Bubble to B|           |        |        |           |
    7 |----------------->|           |        |        |           |
      |        |         |           |        |        |           |
        

Hairpinning-Based Packet Exchange

基于发夹的分组交换

1. A sends a direct bubble (Packet 1) to the mapped address/port embedded in B's Teredo IPv6 address.

1. A向嵌入在B的Teredo IPv6地址中的映射地址/端口发送直接气泡(数据包1)。

2. The aforementioned direct bubble is dropped by NAT E, because it does not support Hairpinning.

2. NAT E放弃了前面提到的直接气泡,因为它不支持发夹。

3. A sends out an indirect bubble (Packet 2) destined to B via B's Teredo Server. In this indirect bubble, A includes an Alternate Address Trailer that includes both the local address/port and the UPnP mapped address/port.

3. A通过B的Teredo服务器发送一个目的地为B的间接气泡(数据包2)。在这个间接冒泡中,A包括一个备用地址尾部,它包括本地地址/端口和UPnP映射的地址/端口。

4. The aforementioned indirect bubble is received by B. After parsing the Alternate Address Trailer, B has a total of three addresses to communicate with: two from the Alternate Address Trailer and one from the mapped address/port embedded in A's Teredo IPv6 address. B then responds with the following packets. The first packet sent by B is a direct bubble (Packet 3) destined to the mapped address/port embedded in A's Teredo IPv6 address.

4. 上述间接气泡由B接收。解析备用地址尾部后,B总共有三个地址要与之通信:两个来自备用地址尾部,一个来自嵌入a的Teredo IPv6地址中的映射地址/端口。B然后用以下数据包进行响应。B发送的第一个数据包是一个直接气泡(数据包3),目的地是a的Teredo IPv6地址中嵌入的映射地址/端口。

5. The aforementioned direct bubble will be dropped by the NAT E because it does not support Hairpinning.

5. 上述直接气泡将被NAT E丢弃,因为它不支持发夹。

6. Because the local address/port was the first mapping in the Alternate Address Trailer, the second direct bubble (Packet 4) sent by B is destined to the local address/port.

6. 因为本地地址/端口是备用地址尾部中的第一个映射,所以由B发送的第二个直接气泡(数据包4)以本地地址/端口为目的地。

7. The aforementioned direct bubble is dropped because A and B are positioned behind different NATs and hence have their own private address space. A's local address is not reachable from B.

7. 前面提到的直接冒泡被丢弃,因为A和B位于不同的NAT后面,因此有它们自己的私有地址空间。无法从B访问A的本地地址。

8. The next direct bubble (Packet 5) is sent by B destined to A's UPnP mapped address/port, which is the second mapping in the Alternate Address Trailer sent by A.

8. 下一个直接气泡(数据包5)由B发送到A的UPnP映射地址/端口,这是A发送的备用地址拖车中的第二个映射。

9. The aforementioned direct bubble is received by A because A's UPnP-mapped address is reachable from B. A stores the source address from which the direct bubble was received in the mapped address/port fields of the Peer Entry, as defined in Section 5.2 of [RFC4380]. Also, the mapped address status field (as specified in Section 5.2.3 of [RFC4380]) is changed to "trusted". At this point, communication in one direction (A to B) is now possible, but not vice versa because B has not yet marked A as trusted.

9. 上述直接编号由A接收,因为A的UPnP映射地址可从B访问。A将接收直接编号的源地址存储在对等条目的映射地址/端口字段中,如[RFC4380]第5.2节所定义。此外,映射地址状态字段(如[RFC4380]第5.2.3节所述)更改为“受信任”。此时,一个方向(A到B)的通信现在是可能的,但反之亦然,因为B尚未将A标记为受信任。

10. B also sends an indirect bubble (Packet 6) to A via A's Teredo server. As part of the indirect bubble, B also includes an Alternate Address Trailer, which contains the local address/port and the UPnP mapped address/port of B.

10. B还通过A的Teredo服务器向A发送一个间接气泡(数据包6)。作为间接冒泡的一部分,B还包括一个备用地址尾部,其中包含B的本地地址/端口和UPnP映射的地址/端口。

11. The aforementioned indirect bubble is received by A. After parsing the Alternate Address Trailer, A adds the two addresses in the Alternate Address Trailer to the Alternate Address List in the Peer Entry. Because the peer's mapping is "trusted" (point 9), A responds with only one direct bubble (Packet 7) that is sent to the mapped address/port stored in the Peer Entry.

11. 前面提到的间接气泡由A接收。解析备用地址尾部后,A将备用地址尾部中的两个地址添加到对等条目中的备用地址列表中。因为对等方的映射是“可信的”(第9点),所以A只响应一个直接气泡(数据包7),该气泡被发送到存储在对等条目中的映射地址/端口。

12. The aforementioned direct bubble is received by B. B records the mapped address/port from which the direct bubble was received in the mapped address/port field in its Peer Entry, and changes the status of the mapped address to "trusted". At this point, communication is now possible in the other direction (B to A).

12. 上述直接气泡由B接收。B在其对等条目的映射地址/端口字段中记录接收直接气泡的映射地址/端口,并将映射地址的状态更改为“受信任”。此时,可以在另一个方向(B到A)进行通信。

6.6. Server Load Reduction Extension
6.6. 服务器负载减少扩展

The following protocol example illustrates the use of the Server Load Reduction Extension.

下面的协议示例演示了服务器负载减少扩展的使用。

Assume that Teredo Client A (A) has established communication with Teredo Client B (B). Also, assume that at some later point when no data packets have been exchanged between both clients for more than 30 seconds, the communication needs to be re-established because A wants to send a data packet to B.

假设Teredo客户端A(A)已与Teredo客户端B(B)建立通信。此外,假设在稍后某个时间点,当两个客户端之间没有数据包交换超过30秒时,需要重新建立通信,因为A想要向B发送数据包。

The following packet exchange helps A re-establish communication with B.

以下数据包交换有助于A与B重新建立通信。

   Teredo           Client A's              Client B's           Teredo
   Client             Teredo                  Teredo             Client
      A        NAT    Server                  Server      NAT       B
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to B   |         |        |
    1 |------------------------------------------------------------>|
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to A   |         |        |
      |<------------------------------------------------------------| 2
      |         |        |                       |         |        |
        
   Teredo           Client A's              Client B's           Teredo
   Client             Teredo                  Teredo             Client
      A        NAT    Server                  Server      NAT       B
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to B   |         |        |
    1 |------------------------------------------------------------>|
      |         |        |                       |         |        |
      |         |        |  Direct Bubble to A   |         |        |
      |<------------------------------------------------------------| 2
      |         |        |                       |         |        |
        

Server Load Reduction Packet Exchange

服务器负载减少数据包交换

1. A sends a direct bubble (Packet 1) with the Neighbor Discovery Option Trailer, with the DiscoveryType field set to TeredoDiscoverySolicitation.

1. A发送带有邻居发现选项尾部的直接气泡(数据包1),发现类型字段设置为TeredDiscoverySolicitation。

2. If the mapping on either of the NATs has not expired, the direct bubble is received by B. B parses the Neighbor Discovery Option and because the DiscoveryType was set to TeredoDiscoverySolicitation, B responds with a direct bubble (Packet 2). B's direct bubble also contains the Neighbor Discovery Option and the DiscoveryType is set to TeredoDiscoveryAdvertisement.

2. 如果任一NAT上的映射尚未过期,则B将接收直接气泡。B解析邻居发现选项,并且由于发现类型设置为TeredDiscoverySolicitation,B将使用直接气泡(数据包2)进行响应。B的直接气泡还包含邻居发现选项,并且发现类型设置为TeredDiscoveryAdvertision。

3. The aforementioned direct bubble is received by A and at this point, communication between the Teredo clients is re-established.

3. 前面提到的直接气泡由A接收,此时,Teredo客户端之间的通信被重新建立。

7. Security Considerations
7. 安全考虑

Security considerations are the same as those specified in Section 7 of [RFC4380].

安全注意事项与[RFC4380]第7节中规定的相同。

In addition, the Hairpinning Extension introduces the possibility of an amplification attack if a malicious user could advertise a large number of port mappings in the Alternate Address Trailer, resulting in a large number of direct bubbles sent in response. Because of this, Section 4.3 explicitly limits the number of addresses that a Teredo client will accept.

此外,如果恶意用户可以在备用地址拖车中公布大量端口映射,从而导致响应时发送大量直接气泡,则发夹扩展引入了放大攻击的可能性。因此,第4.3节明确限制Teredo客户端将接受的地址数。

Because the nonce in the Nonce Trailer is used (as specified in Section 5.2.4.4) to prevent spoofing of bubbles that would result in directing traffic to the wrong place, it is important that the nonce be random so that attackers cannot predict its value. See [RFC4086] for further discussion of randomness requirements.

由于nonce拖车中的nonce(如第5.2.4.4节所述)用于防止欺骗气泡,从而导致将交通导向错误的地方,因此nonce必须是随机的,以便攻击者无法预测其值。有关随机性要求的进一步讨论,请参见[RFC4086]。

8. Acknowledgements
8. 致谢

Thanks to Gurpreet Virdi and Poorna Gaddehosur for technical contributions to this document, and to the V6OPS WG and Jari Arkko for their helpful reviews.

感谢Gurpreet Virdi和Poorna Gaddehosur对本文件的技术贡献,感谢V6OPS工作组和Jari Arkko的有益评论。

9. IANA Considerations
9. IANA考虑

IANA has created a new trailer Type registry. Requests for new trailer Type values are made through Specification Required [RFC5226]. Initial values are listed below.

IANA已经创建了一个新的拖车类型注册表。通过所需规范[RFC5226]请求新拖车类型值。初始值如下所示。

   Trailer Type  Usage                              Reference
   ------------  ---------------------------------  ---------
      0x01       Nonce Trailer                      RFC 6081
      0x02       Random Port Trailer                RFC 6081
      0x03       Alternate Address Trailer          RFC 6081
      0x04       Neighbor Discovery Option Trailer  RFC 6081
        
   Trailer Type  Usage                              Reference
   ------------  ---------------------------------  ---------
      0x01       Nonce Trailer                      RFC 6081
      0x02       Random Port Trailer                RFC 6081
      0x03       Alternate Address Trailer          RFC 6081
      0x04       Neighbor Discovery Option Trailer  RFC 6081
        
10. References
10. 工具书类
10.1. Normative References
10.1. 规范性引用文件

[RFC1918] Rekhter, Y., Moskowitz, R., Karrenberg, D., Groot, G., and E. Lear, "Address Allocation for Private Internets", BCP 5, RFC 1918, February 1996.

[RFC1918]Rekhter,Y.,Moskowitz,R.,Karrenberg,D.,Groot,G.,和E.Lear,“私人互联网地址分配”,BCP 5,RFC 1918,1996年2月。

[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月。

[RFC4380] Huitema, C., "Teredo: Tunneling IPv6 over UDP through Network Address Translations (NATs)", RFC 4380, February 2006.

[RFC4380]Huitema,C.,“Teredo:通过网络地址转换(NAT)通过UDP传输IPv6”,RFC 43802006年2月。

[RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, September 2007.

[RFC4861]Narten,T.,Nordmark,E.,Simpson,W.,和H.Soliman,“IP版本6(IPv6)的邻居发现”,RFC 48612007年9月。

[RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 5226, May 2008.

[RFC5226]Narten,T.和H.Alvestrand,“在RFCs中编写IANA注意事项部分的指南”,BCP 26,RFC 5226,2008年5月。

[UPNPWANIP] UPnP Forum, "WANIPConnection:1", November 2001, <http://www.upnp.org/standardizeddcps/documents/ UPnP_IGD_WANIPConnection%201.0.pdf>.

[UPNPWANIP]UPnP论坛,“WANIConnect:1”,2001年11月<http://www.upnp.org/standardizeddcps/documents/ UPnP\u IGD\u WANIPC连接%201.0.pdf>。

10.2. Informative References
10.2. 资料性引用

[RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness Requirements for Security", BCP 106, RFC 4086, June 2005.

[RFC4086]Eastlake,D.,Schiller,J.,和S.Crocker,“安全的随机性要求”,BCP 106,RFC 4086,2005年6月。

[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月。

[RFC4787] Audet, F. and C. Jennings, "Network Address Translation (NAT) Behavioral Requirements for Unicast UDP", BCP 127, RFC 4787, January 2007.

[RFC4787]Audet,F.和C.Jennings,“单播UDP的网络地址转换(NAT)行为要求”,BCP 127,RFC 4787,2007年1月。

Author's Address

作者地址

Dave Thaler Microsoft Corporation One Microsoft Way Redmond, WA 98052 USA

Dave Thaler微软公司美国华盛顿州雷德蒙微软大道一号,邮编:98052

   Phone: +1 425 703 8835
   EMail: dthaler@microsoft.com
        
   Phone: +1 425 703 8835
   EMail: dthaler@microsoft.com