Network Working Group                                         S. Deering
Request for Comments: 2460                                         Cisco
Obsoletes: 1883                                                R. Hinden
Category: Standards Track                                          Nokia
                                                           December 1998
        
Network Working Group                                         S. Deering
Request for Comments: 2460                                         Cisco
Obsoletes: 1883                                                R. Hinden
Category: Standards Track                                          Nokia
                                                           December 1998
        

Internet Protocol, Version 6 (IPv6) Specification

互联网协议,版本6(IPv6)规范

Status of this Memo

本备忘录的状况

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (1998). All Rights Reserved.

版权所有(C)互联网协会(1998年)。版权所有。

Abstract

摘要

This document specifies version 6 of the Internet Protocol (IPv6), also sometimes referred to as IP Next Generation or IPng.

本文件规定了互联网协议(IPv6)的第6版,有时也称为IP下一代或IPng。

Table of Contents

目录

   1. Introduction..................................................2
   2. Terminology...................................................3
   3. IPv6 Header Format............................................4
   4. IPv6 Extension Headers........................................6
       4.1 Extension Header Order...................................7
       4.2 Options..................................................9
       4.3 Hop-by-Hop Options Header...............................11
       4.4 Routing Header..........................................12
       4.5 Fragment Header.........................................18
       4.6 Destination Options Header..............................23
       4.7 No Next Header..........................................24
   5. Packet Size Issues...........................................24
   6. Flow Labels..................................................25
   7. Traffic Classes..............................................25
   8. Upper-Layer Protocol Issues..................................27
       8.1 Upper-Layer Checksums...................................27
       8.2 Maximum Packet Lifetime.................................28
       8.3 Maximum Upper-Layer Payload Size........................28
       8.4 Responding to Packets Carrying Routing Headers..........29
        
   1. Introduction..................................................2
   2. Terminology...................................................3
   3. IPv6 Header Format............................................4
   4. IPv6 Extension Headers........................................6
       4.1 Extension Header Order...................................7
       4.2 Options..................................................9
       4.3 Hop-by-Hop Options Header...............................11
       4.4 Routing Header..........................................12
       4.5 Fragment Header.........................................18
       4.6 Destination Options Header..............................23
       4.7 No Next Header..........................................24
   5. Packet Size Issues...........................................24
   6. Flow Labels..................................................25
   7. Traffic Classes..............................................25
   8. Upper-Layer Protocol Issues..................................27
       8.1 Upper-Layer Checksums...................................27
       8.2 Maximum Packet Lifetime.................................28
       8.3 Maximum Upper-Layer Payload Size........................28
       8.4 Responding to Packets Carrying Routing Headers..........29
        
   Appendix A. Semantics and Usage of the Flow Label Field.........30
   Appendix B. Formatting Guidelines for Options...................32
   Security Considerations.........................................35
   Acknowledgments.................................................35
   Authors' Addresses..............................................35
   References......................................................35
   Changes Since RFC-1883..........................................36
   Full Copyright Statement........................................39
        
   Appendix A. Semantics and Usage of the Flow Label Field.........30
   Appendix B. Formatting Guidelines for Options...................32
   Security Considerations.........................................35
   Acknowledgments.................................................35
   Authors' Addresses..............................................35
   References......................................................35
   Changes Since RFC-1883..........................................36
   Full Copyright Statement........................................39
        
1. Introduction
1. 介绍

IP version 6 (IPv6) is a new version of the Internet Protocol, designed as the successor to IP version 4 (IPv4) [RFC-791]. The changes from IPv4 to IPv6 fall primarily into the following categories:

IP版本6(IPv6)是互联网协议的新版本,设计为IP版本4(IPv4)[RFC-791]的后续版本。从IPv4到IPv6的变化主要分为以下几类:

o Expanded Addressing Capabilities

o 扩展的寻址能力

IPv6 increases the IP address size from 32 bits to 128 bits, to support more levels of addressing hierarchy, a much greater number of addressable nodes, and simpler auto-configuration of addresses. The scalability of multicast routing is improved by adding a "scope" field to multicast addresses. And a new type of address called an "anycast address" is defined, used to send a packet to any one of a group of nodes.

IPv6将IP地址大小从32位增加到128位,以支持更高级别的寻址层次结构、更多的可寻址节点以及更简单的地址自动配置。通过在多播地址中添加“scope”字段,提高了多播路由的可扩展性。定义了一种称为“选播地址”的新型地址,用于向一组节点中的任何一个发送数据包。

o Header Format Simplification

o 标题格式简化

Some IPv4 header fields have been dropped or made optional, to reduce the common-case processing cost of packet handling and to limit the bandwidth cost of the IPv6 header.

一些IPv4报头字段已被删除或成为可选字段,以降低数据包处理的常见情况处理成本并限制IPv6报头的带宽成本。

o Improved Support for Extensions and Options

o 改进了对扩展和选项的支持

Changes in the way IP header options are encoded allows for more efficient forwarding, less stringent limits on the length of options, and greater flexibility for introducing new options in the future.

IP报头选项编码方式的改变允许更高效的转发,对选项长度的限制不那么严格,并且在将来引入新选项时具有更大的灵活性。

o Flow Labeling Capability

o 流标记能力

A new capability is added to enable the labeling of packets belonging to particular traffic "flows" for which the sender requests special handling, such as non-default quality of service or "real-time" service.

添加了一个新功能,以支持标记属于特定流量“流”的数据包,发送方请求对其进行特殊处理,例如非默认服务质量或“实时”服务。

o Authentication and Privacy Capabilities

o 身份验证和隐私功能

Extensions to support authentication, data integrity, and (optional) data confidentiality are specified for IPv6.

为IPv6指定了支持身份验证、数据完整性和(可选)数据机密性的扩展。

This document specifies the basic IPv6 header and the initially-defined IPv6 extension headers and options. It also discusses packet size issues, the semantics of flow labels and traffic classes, and the effects of IPv6 on upper-layer protocols. The format and semantics of IPv6 addresses are specified separately in [ADDRARCH]. The IPv6 version of ICMP, which all IPv6 implementations are required to include, is specified in [ICMPv6].

本文档指定基本IPv6标头以及最初定义的IPv6扩展标头和选项。它还讨论了数据包大小问题、流标签和流量类的语义,以及IPv6对上层协议的影响。IPv6地址的格式和语义在[ADDRARCH]中分别指定。[ICMPv6]中规定了ICMP的IPv6版本,所有IPv6实施都需要包括该版本。

2. Terminology
2. 术语

node - a device that implements IPv6.

节点-实现IPv6的设备。

router - a node that forwards IPv6 packets not explicitly addressed to itself. [See Note below].

路由器-转发未显式寻址到自身的IPv6数据包的节点。[见下文注释]。

host - any node that is not a router. [See Note below].

主机-不是路由器的任何节点。[见下文注释]。

upper layer - a protocol layer immediately above IPv6. Examples are transport protocols such as TCP and UDP, control protocols such as ICMP, routing protocols such as OSPF, and internet or lower-layer protocols being "tunneled" over (i.e., encapsulated in) IPv6 such as IPX, AppleTalk, or IPv6 itself.

上层-IPv6之上的协议层。例如,传输协议(如TCP和UDP)、控制协议(如ICMP)、路由协议(如OSPF)以及通过(即封装在)IPv6(如IPX、AppleTalk或IPv6本身)“隧道”的互联网或较低层协议。

link - a communication facility or medium over which nodes can communicate at the link layer, i.e., the layer immediately below IPv6. Examples are Ethernets (simple or bridged); PPP links; X.25, Frame Relay, or ATM networks; and internet (or higher) layer "tunnels", such as tunnels over IPv4 or IPv6 itself.

链路—一种通信设施或介质,节点可通过该通信设施或介质在链路层(即IPv6下的一层)进行通信。例如以太网络(简单或桥接);PPP链接;X.25、帧中继或ATM网络;互联网(或更高)层的“隧道”,如IPv4或IPv6本身上的隧道。

neighbors - nodes attached to the same link.

邻居-连接到同一链接的节点。

interface - a node's attachment to a link.

接口-节点与链接的附件。

address - an IPv6-layer identifier for an interface or a set of interfaces.

地址—一个接口或一组接口的IPv6层标识符。

packet - an IPv6 header plus payload.

数据包-IPv6标头加上有效负载。

link MTU - the maximum transmission unit, i.e., maximum packet size in octets, that can be conveyed over a link.

链路MTU-可通过链路传输的最大传输单元,即以八位字节为单位的最大数据包大小。

path MTU - the minimum link MTU of all the links in a path between a source node and a destination node.

路径MTU—源节点和目标节点之间路径中所有链路的最小链路MTU。

Note: it is possible, though unusual, for a device with multiple interfaces to be configured to forward non-self-destined packets arriving from some set (fewer than all) of its interfaces, and to discard non-self-destined packets arriving from its other interfaces. Such a device must obey the protocol requirements for routers when receiving packets from, and interacting with neighbors over, the former (forwarding) interfaces. It must obey the protocol requirements for hosts when receiving packets from, and interacting with neighbors over, the latter (non-forwarding) interfaces.

注:对于具有多个接口的设备来说,可能(尽管不常见)被配置为转发从其某一组(少于所有)接口到达的非自定目的数据包,并丢弃从其其他接口到达的非自定目的数据包。当从前(转发)接口接收数据包并通过前(转发)接口与邻居交互时,此类设备必须遵守路由器的协议要求。当从邻居(非转发)接口接收数据包并通过邻居(非转发)接口与邻居交互时,它必须遵守主机的协议要求。

3. IPv6 Header Format
3. IPv6标头格式
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Version| Traffic Class |           Flow Label                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Payload Length        |  Next Header  |   Hop Limit   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                         Source Address                        +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                      Destination Address                      +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Version| Traffic Class |           Flow Label                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Payload Length        |  Next Header  |   Hop Limit   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                         Source Address                        +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                      Destination Address                      +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Version 4-bit Internet Protocol version number = 6.

版本4位互联网协议版本号=6。

Traffic Class 8-bit traffic class field. See section 7.

流量等级8位流量等级字段。见第7节。

Flow Label 20-bit flow label. See section 6.

流量标签20位流量标签。见第6节。

Payload Length 16-bit unsigned integer. Length of the IPv6 payload, i.e., the rest of the packet following this IPv6 header, in octets. (Note that any

有效负载长度16位无符号整数。IPv6有效负载的长度,即该IPv6报头之后的数据包的剩余部分,以八位字节为单位。(请注意

extension headers [section 4] present are considered part of the payload, i.e., included in the length count.)

存在的扩展标头[第4节]被视为有效负载的一部分,即包含在长度计数中。)

Next Header 8-bit selector. Identifies the type of header immediately following the IPv6 header. Uses the same values as the IPv4 Protocol field [RFC-1700 et seq.].

下一个标题8位选择器。标识紧跟在IPv6标头之后的标头类型。使用与IPv4协议字段相同的值[RFC-1700 et seq.]。

Hop Limit 8-bit unsigned integer. Decremented by 1 by each node that forwards the packet. The packet is discarded if Hop Limit is decremented to zero.

跃点限制8位无符号整数。转发数据包的每个节点递减1。如果跃点限制减为零,则丢弃数据包。

Source Address 128-bit address of the originator of the packet. See [ADDRARCH].

源地址数据包发起方的128位地址。见[ADDRARCH]。

Destination Address 128-bit address of the intended recipient of the packet (possibly not the ultimate recipient, if a Routing header is present). See [ADDRARCH] and section 4.4.

目标地址数据包的预期收件人的128位地址(如果存在路由报头,则可能不是最终收件人)。参见[ADDRARCH]和第4.4节。

4. IPv6 Extension Headers
4. IPv6扩展头

In IPv6, optional internet-layer information is encoded in separate headers that may be placed between the IPv6 header and the upper-layer header in a packet. There are a small number of such extension headers, each identified by a distinct Next Header value. As illustrated in these examples, an IPv6 packet may carry zero, one, or more extension headers, each identified by the Next Header field of the preceding header:

在IPv6中,可选的internet层信息编码在单独的报头中,这些报头可以放在数据包中的IPv6报头和上层报头之间。有少量这样的扩展头,每个扩展头由一个不同的下一个头值标识。如这些示例中所示,IPv6数据包可携带零个、一个或多个扩展报头,每个扩展报头由前一报头的下一报头字段标识:

   +---------------+------------------------
   |  IPv6 header  | TCP header + data
   |               |
   | Next Header = |
   |      TCP      |
   +---------------+------------------------
        
   +---------------+------------------------
   |  IPv6 header  | TCP header + data
   |               |
   | Next Header = |
   |      TCP      |
   +---------------+------------------------
        
   +---------------+----------------+------------------------
   |  IPv6 header  | Routing header | TCP header + data
   |               |                |
   | Next Header = |  Next Header = |
   |    Routing    |      TCP       |
   +---------------+----------------+------------------------
        
   +---------------+----------------+------------------------
   |  IPv6 header  | Routing header | TCP header + data
   |               |                |
   | Next Header = |  Next Header = |
   |    Routing    |      TCP       |
   +---------------+----------------+------------------------
        
   +---------------+----------------+-----------------+-----------------
   |  IPv6 header  | Routing header | Fragment header | fragment of TCP
   |               |                |                 |  header + data
   | Next Header = |  Next Header = |  Next Header =  |
   |    Routing    |    Fragment    |       TCP       |
   +---------------+----------------+-----------------+-----------------
        
   +---------------+----------------+-----------------+-----------------
   |  IPv6 header  | Routing header | Fragment header | fragment of TCP
   |               |                |                 |  header + data
   | Next Header = |  Next Header = |  Next Header =  |
   |    Routing    |    Fragment    |       TCP       |
   +---------------+----------------+-----------------+-----------------
        

With one exception, extension headers are not examined or processed by any node along a packet's delivery path, until the packet reaches the node (or each of the set of nodes, in the case of multicast) identified in the Destination Address field of the IPv6 header. There, normal demultiplexing on the Next Header field of the IPv6 header invokes the module to process the first extension header, or the upper-layer header if no extension header is present. The contents and semantics of each extension header determine whether or not to proceed to the next header. Therefore, extension headers must be processed strictly in the order they appear in the packet; a receiver must not, for example, scan through a packet looking for a particular kind of extension header and process that header prior to processing all preceding ones.

除了一个例外,在数据包到达IPv6报头的目的地地址字段中标识的节点(或多播情况下的每一组节点)之前,任何节点都不会沿着数据包的传递路径检查或处理扩展报头。在那里,IPv6报头的下一个报头字段上的正常解复用调用模块来处理第一个扩展报头,如果没有扩展报头,则调用上层报头。每个扩展头的内容和语义决定是否继续下一个头。因此,必须严格按照扩展头在数据包中出现的顺序进行处理;例如,接收方不得扫描数据包寻找特定类型的扩展报头,并在处理之前处理该报头。

The exception referred to in the preceding paragraph is the Hop-by-Hop Options header, which carries information that must be examined and processed by every node along a packet's delivery path, including the source and destination nodes. The Hop-by-Hop Options header, when present, must immediately follow the IPv6 header. Its presence is indicated by the value zero in the Next Header field of the IPv6 header.

前段中提到的例外情况是逐跳选项报头,它携带的信息必须由每个节点沿着数据包的传递路径进行检查和处理,包括源节点和目标节点。“逐跳选项”标头(如果存在)必须紧跟在IPv6标头之后。它的存在由IPv6标头的下一个标头字段中的值零表示。

If, as a result of processing a header, a node is required to proceed to the next header but the Next Header value in the current header is unrecognized by the node, it should discard the packet and send an ICMP Parameter Problem message to the source of the packet, with an ICMP Code value of 1 ("unrecognized Next Header type encountered") and the ICMP Pointer field containing the offset of the unrecognized value within the original packet. The same action should be taken if a node encounters a Next Header value of zero in any header other than an IPv6 header.

如果由于处理一个报头,某个节点需要继续处理下一个报头,但该节点无法识别当前报头中的下一个报头值,则该节点应丢弃该数据包,并向该数据包的源发送ICMP参数问题消息,ICMP代码值为1(“遇到无法识别的下一个报头类型”)以及包含原始数据包内未识别值的偏移量的ICMP指针字段。如果节点在除IPv6标头以外的任何标头中遇到下一个标头值为零,则应采取相同的操作。

Each extension header is an integer multiple of 8 octets long, in order to retain 8-octet alignment for subsequent headers. Multi-octet fields within each extension header are aligned on their natural boundaries, i.e., fields of width n octets are placed at an integer multiple of n octets from the start of the header, for n = 1, 2, 4, or 8.

每个扩展头是8个八位字节的整数倍,以便为后续头保留8个八位字节的对齐。每个扩展标头内的多个八位元字段在其自然边界上对齐,即,宽度为n个八位元的字段从标头开始以n个八位元的整数倍放置,n=1、2、4或8。

A full implementation of IPv6 includes implementation of the following extension headers:

IPv6的完整实现包括以下扩展头的实现:

Hop-by-Hop Options Routing (Type 0) Fragment Destination Options Authentication Encapsulating Security Payload

逐跳选项路由(类型0)分段目标选项身份验证封装安全负载

The first four are specified in this document; the last two are specified in [RFC-2402] and [RFC-2406], respectively.

前四项在本文件中规定;最后两个分别在[RFC-2402]和[RFC-2406]中规定。

4.1 Extension Header Order
4.1 扩展标题顺序

When more than one extension header is used in the same packet, it is recommended that those headers appear in the following order:

当在同一数据包中使用多个扩展标头时,建议这些标头按以下顺序显示:

IPv6 header Hop-by-Hop Options header Destination Options header (note 1) Routing header Fragment header

IPv6报头逐跳选项报头目标选项报头(注1)路由报头片段报头

Authentication header (note 2) Encapsulating Security Payload header (note 2) Destination Options header (note 3) upper-layer header

身份验证头(注2)封装安全有效负载头(注2)目标选项头(注3)上层头

note 1: for options to be processed by the first destination that appears in the IPv6 Destination Address field plus subsequent destinations listed in the Routing header.

注1:用于由IPv6目标地址字段中显示的第一个目标以及路由标头中列出的后续目标处理的选项。

note 2: additional recommendations regarding the relative order of the Authentication and Encapsulating Security Payload headers are given in [RFC-2406].

注2:[RFC-2406]中给出了关于认证和封装安全有效负载头的相对顺序的其他建议。

note 3: for options to be processed only by the final destination of the packet.

注3:对于仅由数据包最终目的地处理的选项。

Each extension header should occur at most once, except for the Destination Options header which should occur at most twice (once before a Routing header and once before the upper-layer header).

每个扩展标头最多应出现一次,但目标选项标头最多应出现两次(一次在路由标头之前,一次在上层标头之前)。

If the upper-layer header is another IPv6 header (in the case of IPv6 being tunneled over or encapsulated in IPv6), it may be followed by its own extension headers, which are separately subject to the same ordering recommendations.

如果上层报头是另一个IPv6报头(在IPv6被隧道覆盖或封装在IPv6中的情况下),则其后面可能会有其自己的扩展报头,这些扩展报头分别遵循相同的排序建议。

If and when other extension headers are defined, their ordering constraints relative to the above listed headers must be specified.

如果定义了其他扩展标头,则必须指定它们相对于上面列出的标头的顺序约束。

IPv6 nodes must accept and attempt to process extension headers in any order and occurring any number of times in the same packet, except for the Hop-by-Hop Options header which is restricted to appear immediately after an IPv6 header only. Nonetheless, it is strongly advised that sources of IPv6 packets adhere to the above recommended order until and unless subsequent specifications revise that recommendation.

IPv6节点必须接受并尝试以任何顺序处理扩展标头,并在同一数据包中出现任意次数,但逐跳选项标头除外,该标头仅限于出现在IPv6标头之后。尽管如此,强烈建议IPv6数据包的源遵守上述建议的顺序,除非后续规范修改该建议。

4.2 Options
4.2 选择权

Two of the currently-defined extension headers -- the Hop-by-Hop Options header and the Destination Options header -- carry a variable number of type-length-value (TLV) encoded "options", of the following format:

当前定义的两个扩展头(逐跳选项头和目标选项头)带有可变数量的类型长度值(TLV)编码的“选项”,格式如下:

      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
      |  Option Type  |  Opt Data Len |  Option Data
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
        
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
      |  Option Type  |  Opt Data Len |  Option Data
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
        

Option Type 8-bit identifier of the type of option.

选项类型选项类型的8位标识符。

Opt Data Len 8-bit unsigned integer. Length of the Option Data field of this option, in octets.

Opt Data Len 8位无符号整数。此选项的选项数据字段的长度,以八位字节为单位。

Option Data Variable-length field. Option-Type-specific data.

选项数据可变长度字段。选项类型特定的数据。

The sequence of options within a header must be processed strictly in the order they appear in the header; a receiver must not, for example, scan through the header looking for a particular kind of option and process that option prior to processing all preceding ones.

标题中的选项序列必须严格按照它们在标题中出现的顺序进行处理;例如,接收者不得扫描报头寻找特定类型的选项,并在处理之前处理该选项。

The Option Type identifiers are internally encoded such that their highest-order two bits specify the action that must be taken if the processing IPv6 node does not recognize the Option Type:

选项类型标识符是内部编码的,因此它们的最高两位指定了在处理IPv6节点无法识别选项类型时必须采取的操作:

00 - skip over this option and continue processing the header.

00-跳过此选项并继续处理标题。

01 - discard the packet.

01-丢弃数据包。

10 - discard the packet and, regardless of whether or not the packet's Destination Address was a multicast address, send an ICMP Parameter Problem, Code 2, message to the packet's Source Address, pointing to the unrecognized Option Type.

10-丢弃数据包,无论数据包的目标地址是否为多播地址,都将ICMP参数问题代码2消息发送到数据包的源地址,指向无法识别的选项类型。

11 - discard the packet and, only if the packet's Destination Address was not a multicast address, send an ICMP Parameter Problem, Code 2, message to the packet's Source Address, pointing to the unrecognized Option Type.

11-丢弃数据包,仅当数据包的目标地址不是多播地址时,才将ICMP参数问题代码2消息发送到数据包的源地址,指向无法识别的选项类型。

The third-highest-order bit of the Option Type specifies whether or not the Option Data of that option can change en-route to the packet's final destination. When an Authentication header is present

选项类型的第三高阶位指定该选项的选项数据是否可以在到数据包最终目的地的途中更改。当存在身份验证标头时

in the packet, for any option whose data may change en-route, its entire Option Data field must be treated as zero-valued octets when computing or verifying the packet's authenticating value.

在数据包中,对于其数据可能在途中更改的任何选项,在计算或验证数据包的身份验证值时,其整个选项数据字段必须视为零值八位字节。

0 - Option Data does not change en-route

0-选项数据在途中不会更改

1 - Option Data may change en-route

1-选项数据可能会在途中更改

The three high-order bits described above are to be treated as part of the Option Type, not independent of the Option Type. That is, a particular option is identified by a full 8-bit Option Type, not just the low-order 5 bits of an Option Type.

上述三个高阶位将被视为选项类型的一部分,而不是独立于选项类型。也就是说,特定选项由完整的8位选项类型标识,而不仅仅是选项类型的低阶5位。

The same Option Type numbering space is used for both the Hop-by-Hop Options header and the Destination Options header. However, the specification of a particular option may restrict its use to only one of those two headers.

相同的选项类型编号空间用于逐跳选项标题和目标选项标题。但是,特定选项的规范可能会将其使用限制为这两个标题中的一个。

Individual options may have specific alignment requirements, to ensure that multi-octet values within Option Data fields fall on natural boundaries. The alignment requirement of an option is specified using the notation xn+y, meaning the Option Type must appear at an integer multiple of x octets from the start of the header, plus y octets. For example:

单个选项可能有特定的对齐要求,以确保选项数据字段中的多个八位组值位于自然边界上。选项的对齐要求使用符号xn+y指定,这意味着选项类型必须以从标题开始的x个八位字节加上y个八位字节的整数倍显示。例如:

2n means any 2-octet offset from the start of the header. 8n+2 means any 8-octet offset from the start of the header, plus 2 octets.

2n表示从报头开始的任何2个八位组偏移量。8n+2表示从报头开始的任何8个八位字节的偏移量加上2个八位字节。

There are two padding options which are used when necessary to align subsequent options and to pad out the containing header to a multiple of 8 octets in length. These padding options must be recognized by all IPv6 implementations:

有两个填充选项,在必要时用于对齐后续选项,并将包含的标题填充到8个八位字节的倍数。所有IPv6实施都必须识别这些填充选项:

Pad1 option (alignment requirement: none)

Pad1选项(对齐要求:无)

      +-+-+-+-+-+-+-+-+
      |       0       |
      +-+-+-+-+-+-+-+-+
        
      +-+-+-+-+-+-+-+-+
      |       0       |
      +-+-+-+-+-+-+-+-+
        

NOTE! the format of the Pad1 option is a special case -- it does not have length and value fields.

笔记Pad1选项的格式是一种特殊情况——它没有长度和值字段。

The Pad1 option is used to insert one octet of padding into the Options area of a header. If more than one octet of padding is required, the PadN option, described next, should be used, rather than multiple Pad1 options.

Pad1选项用于将一个八位字节的填充插入标头的选项区域。如果需要多个八位字节的填充,则应使用下面介绍的PadN选项,而不是多个Pad1选项。

PadN option (alignment requirement: none)

PadN选项(对齐要求:无)

      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
      |       1       |  Opt Data Len |  Option Data
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
        
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
      |       1       |  Opt Data Len |  Option Data
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- - - - - - - - -
        

The PadN option is used to insert two or more octets of padding into the Options area of a header. For N octets of padding, the Opt Data Len field contains the value N-2, and the Option Data consists of N-2 zero-valued octets.

PadN选项用于将两个或多个八位字节的填充插入标头的选项区域。对于N个八位字节的填充,Opt Data Len字段包含值N-2,选项数据由N-2个零值八位字节组成。

Appendix B contains formatting guidelines for designing new options.

附录B包含设计新选项的格式指南。

4.3 Hop-by-Hop Options Header
4.3 逐跳选项标题

The Hop-by-Hop Options header is used to carry optional information that must be examined by every node along a packet's delivery path. The Hop-by-Hop Options header is identified by a Next Header value of 0 in the IPv6 header, and has the following format:

Hop-by-Hop-Options报头用于携带可选信息,这些信息必须由每个节点沿着数据包的传递路径进行检查。逐跳选项标头由IPv6标头中的下一个标头值0标识,格式如下:

    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Next Header  |  Hdr Ext Len  |                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
    |                                                               |
    .                                                               .
    .                            Options                            .
    .                                                               .
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Next Header  |  Hdr Ext Len  |                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
    |                                                               |
    .                                                               .
    .                            Options                            .
    .                                                               .
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Next Header 8-bit selector. Identifies the type of header immediately following the Hop-by-Hop Options header. Uses the same values as the IPv4 Protocol field [RFC-1700 et seq.].

下一个标题8位选择器。标识紧跟在逐跳选项标头之后的标头类型。使用与IPv4协议字段相同的值[RFC-1700 et seq.]。

Hdr Ext Len 8-bit unsigned integer. Length of the Hop-by-Hop Options header in 8-octet units, not including the first 8 octets.

Hdr Ext Len 8位无符号整数。逐跳选项标头的长度,以8个八位字节为单位,不包括前8个八位字节。

Options Variable-length field, of length such that the complete Hop-by-Hop Options header is an integer multiple of 8 octets long. Contains one or more TLV-encoded options, as described in section 4.2.

Options可变长度字段,其长度应确保完整的逐跳Options标头为8个八位字节长的整数倍。包含一个或多个TLV编码选项,如第4.2节所述。

The only hop-by-hop options defined in this document are the Pad1 and PadN options specified in section 4.2.

本文件中定义的唯一逐跳选项是第4.2节中规定的Pad1和PadN选项。

4.4 Routing Header
4.4 路由报头

The Routing header is used by an IPv6 source to list one or more intermediate nodes to be "visited" on the way to a packet's destination. This function is very similar to IPv4's Loose Source and Record Route option. The Routing header is identified by a Next Header value of 43 in the immediately preceding header, and has the following format:

IPv6源使用路由报头列出一个或多个中间节点,这些节点将在到达数据包目的地的途中“访问”。此功能与IPv4的松散源代码和记录路由选项非常相似。路由报头由前一报头中的下一报头值43标识,格式如下:

    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Next Header  |  Hdr Ext Len  |  Routing Type | Segments Left |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    .                                                               .
    .                       type-specific data                      .
    .                                                               .
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Next Header  |  Hdr Ext Len  |  Routing Type | Segments Left |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    .                                                               .
    .                       type-specific data                      .
    .                                                               .
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Next Header 8-bit selector. Identifies the type of header immediately following the Routing header. Uses the same values as the IPv4 Protocol field [RFC-1700 et seq.].

下一个标题8位选择器。标识紧接路由标头之后的标头类型。使用与IPv4协议字段相同的值[RFC-1700 et seq.]。

Hdr Ext Len 8-bit unsigned integer. Length of the Routing header in 8-octet units, not including the first 8 octets.

Hdr Ext Len 8位无符号整数。路由头的长度,以8个八位字节为单位,不包括前8个八位字节。

Routing Type 8-bit identifier of a particular Routing header variant.

路由类型特定路由头变量的8位标识符。

Segments Left 8-bit unsigned integer. Number of route segments remaining, i.e., number of explicitly listed intermediate nodes still to be visited before reaching the final destination.

段左8位无符号整数。剩余的路由段数,即在到达最终目的地之前仍要访问的明确列出的中间节点数。

type-specific data Variable-length field, of format determined by the Routing Type, and of length such that the complete Routing header is an integer multiple of 8 octets long.

特定于类型的数据可变长度字段,其格式由路由类型确定,长度应确保完整的路由头是8个八位字节的整数倍。

If, while processing a received packet, a node encounters a Routing header with an unrecognized Routing Type value, the required behavior of the node depends on the value of the Segments Left field, as follows:

如果在处理接收到的数据包时,节点遇到具有无法识别的路由类型值的路由报头,则节点所需的行为取决于Segments Left字段的值,如下所示:

If Segments Left is zero, the node must ignore the Routing header and proceed to process the next header in the packet, whose type is identified by the Next Header field in the Routing header.

如果剩余段为零,则节点必须忽略路由报头并继续处理数据包中的下一个报头,其类型由路由报头中的下一个报头字段标识。

If Segments Left is non-zero, the node must discard the packet and send an ICMP Parameter Problem, Code 0, message to the packet's Source Address, pointing to the unrecognized Routing Type.

如果剩余段不为零,则节点必须丢弃数据包,并向数据包的源地址发送ICMP参数问题代码0消息,指向无法识别的路由类型。

If, after processing a Routing header of a received packet, an intermediate node determines that the packet is to be forwarded onto a link whose link MTU is less than the size of the packet, the node must discard the packet and send an ICMP Packet Too Big message to the packet's Source Address.

如果在处理所接收分组的路由报头之后,中间节点确定该分组将被转发到链路MTU小于该分组大小的链路上,则该节点必须丢弃该分组并向该分组的源地址发送ICMP分组过大消息。

The Type 0 Routing header has the following format:

类型0路由标头具有以下格式:

    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Next Header  |  Hdr Ext Len  | Routing Type=0| Segments Left |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                            Reserved                           |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    +                                                               +
    |                                                               |
    +                           Address[1]                          +
    |                                                               |
    +                                                               +
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    +                                                               +
    |                                                               |
    +                           Address[2]                          +
    |                                                               |
    +                                                               +
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    .                               .                               .
    .                               .                               .
    .                               .                               .
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    +                                                               +
    |                                                               |
    +                           Address[n]                          +
    |                                                               |
    +                                                               +
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Next Header  |  Hdr Ext Len  | Routing Type=0| Segments Left |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                            Reserved                           |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    +                                                               +
    |                                                               |
    +                           Address[1]                          +
    |                                                               |
    +                                                               +
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    +                                                               +
    |                                                               |
    +                           Address[2]                          +
    |                                                               |
    +                                                               +
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    .                               .                               .
    .                               .                               .
    .                               .                               .
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    +                                                               +
    |                                                               |
    +                           Address[n]                          +
    |                                                               |
    +                                                               +
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Next Header 8-bit selector. Identifies the type of header immediately following the Routing header. Uses the same values as the IPv4 Protocol field [RFC-1700 et seq.].

下一个标题8位选择器。标识紧接路由标头之后的标头类型。使用与IPv4协议字段相同的值[RFC-1700 et seq.]。

Hdr Ext Len 8-bit unsigned integer. Length of the Routing header in 8-octet units, not including the first 8 octets. For the Type 0 Routing header, Hdr Ext Len is equal to two times the number of addresses in the header.

Hdr Ext Len 8位无符号整数。路由头的长度,以8个八位字节为单位,不包括前8个八位字节。对于类型0路由标头,Hdr Ext Len等于标头中地址数的两倍。

Routing Type 0.

路由类型0。

Segments Left 8-bit unsigned integer. Number of route segments remaining, i.e., number of explicitly listed intermediate nodes still to be visited before reaching the final destination.

段左8位无符号整数。剩余的路由段数,即在到达最终目的地之前仍要访问的明确列出的中间节点数。

Reserved 32-bit reserved field. Initialized to zero for transmission; ignored on reception.

保留32位保留字段。初始化为零以便传输;接待时被忽略。

Address[1..n] Vector of 128-bit addresses, numbered 1 to n.

地址[1..n]128位地址的向量,编号为1到n。

Multicast addresses must not appear in a Routing header of Type 0, or in the IPv6 Destination Address field of a packet carrying a Routing header of Type 0.

多播地址不得出现在类型为0的路由标头中,或出现在承载类型为0的路由标头的数据包的IPv6目标地址字段中。

A Routing header is not examined or processed until it reaches the node identified in the Destination Address field of the IPv6 header. In that node, dispatching on the Next Header field of the immediately preceding header causes the Routing header module to be invoked, which, in the case of Routing Type 0, performs the following algorithm:

路由报头在到达IPv6报头的目标地址字段中标识的节点之前不会被检查或处理。在该节点中,对前一个报头的下一个报头字段进行调度会导致调用路由报头模块,在路由类型为0的情况下,该模块执行以下算法:

   if Segments Left = 0 {
      proceed to process the next header in the packet, whose type is
      identified by the Next Header field in the Routing header
   }
   else if Hdr Ext Len is odd {
         send an ICMP Parameter Problem, Code 0, message to the Source
         Address, pointing to the Hdr Ext Len field, and discard the
         packet
   }
   else {
      compute n, the number of addresses in the Routing header, by
      dividing Hdr Ext Len by 2
        
   if Segments Left = 0 {
      proceed to process the next header in the packet, whose type is
      identified by the Next Header field in the Routing header
   }
   else if Hdr Ext Len is odd {
         send an ICMP Parameter Problem, Code 0, message to the Source
         Address, pointing to the Hdr Ext Len field, and discard the
         packet
   }
   else {
      compute n, the number of addresses in the Routing header, by
      dividing Hdr Ext Len by 2
        
      if Segments Left is greater than n {
         send an ICMP Parameter Problem, Code 0, message to the Source
         Address, pointing to the Segments Left field, and discard the
         packet
      }
      else {
         decrement Segments Left by 1;
         compute i, the index of the next address to be visited in
         the address vector, by subtracting Segments Left from n
        
      if Segments Left is greater than n {
         send an ICMP Parameter Problem, Code 0, message to the Source
         Address, pointing to the Segments Left field, and discard the
         packet
      }
      else {
         decrement Segments Left by 1;
         compute i, the index of the next address to be visited in
         the address vector, by subtracting Segments Left from n
        
         if Address [i] or the IPv6 Destination Address is multicast {
            discard the packet
         }
         else {
            swap the IPv6 Destination Address and Address[i]
        
         if Address [i] or the IPv6 Destination Address is multicast {
            discard the packet
         }
         else {
            swap the IPv6 Destination Address and Address[i]
        
            if the IPv6 Hop Limit is less than or equal to 1 {
               send an ICMP Time Exceeded -- Hop Limit Exceeded in
               Transit message to the Source Address and discard the
               packet
            }
            else {
               decrement the Hop Limit by 1
        
            if the IPv6 Hop Limit is less than or equal to 1 {
               send an ICMP Time Exceeded -- Hop Limit Exceeded in
               Transit message to the Source Address and discard the
               packet
            }
            else {
               decrement the Hop Limit by 1
        
               resubmit the packet to the IPv6 module for transmission
               to the new destination
            }
         }
      }
   }
        
               resubmit the packet to the IPv6 module for transmission
               to the new destination
            }
         }
      }
   }
        

As an example of the effects of the above algorithm, consider the case of a source node S sending a packet to destination node D, using a Routing header to cause the packet to be routed via intermediate nodes I1, I2, and I3. The values of the relevant IPv6 header and Routing header fields on each segment of the delivery path would be as follows:

作为上述算法的效果的一个例子,考虑源节点将分组发送到目的节点D的情况,使用路由报头使分组通过中间节点I1、I2和I3路由。传递路径每个段上的相关IPv6标头和路由标头字段的值如下所示:

As the packet travels from S to I1:

当数据包从S移动到I1时:

        Source Address = S                  Hdr Ext Len = 6
        Destination Address = I1            Segments Left = 3
                                            Address[1] = I2
                                            Address[2] = I3
                                            Address[3] = D
        
        Source Address = S                  Hdr Ext Len = 6
        Destination Address = I1            Segments Left = 3
                                            Address[1] = I2
                                            Address[2] = I3
                                            Address[3] = D
        

As the packet travels from I1 to I2:

当数据包从I1移动到I2时:

        Source Address = S                  Hdr Ext Len = 6
        Destination Address = I2            Segments Left = 2
                                            Address[1] = I1
                                            Address[2] = I3
                                            Address[3] = D
        
        Source Address = S                  Hdr Ext Len = 6
        Destination Address = I2            Segments Left = 2
                                            Address[1] = I1
                                            Address[2] = I3
                                            Address[3] = D
        

As the packet travels from I2 to I3:

当数据包从I2移动到I3时:

        Source Address = S                  Hdr Ext Len = 6
        Destination Address = I3            Segments Left = 1
                                            Address[1] = I1
                                            Address[2] = I2
                                            Address[3] = D
        
        Source Address = S                  Hdr Ext Len = 6
        Destination Address = I3            Segments Left = 1
                                            Address[1] = I1
                                            Address[2] = I2
                                            Address[3] = D
        

As the packet travels from I3 to D:

当数据包从I3移动到D时:

        Source Address = S                  Hdr Ext Len = 6
        Destination Address = D             Segments Left = 0
                                            Address[1] = I1
                                            Address[2] = I2
                                            Address[3] = I3
        
        Source Address = S                  Hdr Ext Len = 6
        Destination Address = D             Segments Left = 0
                                            Address[1] = I1
                                            Address[2] = I2
                                            Address[3] = I3
        
4.5 Fragment Header
4.5 片段头

The Fragment header is used by an IPv6 source to send a packet larger than would fit in the path MTU to its destination. (Note: unlike IPv4, fragmentation in IPv6 is performed only by source nodes, not by routers along a packet's delivery path -- see section 5.) The Fragment header is identified by a Next Header value of 44 in the immediately preceding header, and has the following format:

IPv6源使用片段头向其目的地发送比路径MTU中适合的数据包大的数据包。(注意:与IPv4不同,IPv6中的分段仅由源节点执行,而不是由沿数据包传递路径的路由器执行——请参见第5节。)分段标头由前一个标头中的下一个标头值44标识,格式如下:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Next Header  |   Reserved    |      Fragment Offset    |Res|M|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Identification                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Next Header  |   Reserved    |      Fragment Offset    |Res|M|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Identification                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Next Header 8-bit selector. Identifies the initial header type of the Fragmentable Part of the original packet (defined below). Uses the same values as the IPv4 Protocol field [RFC-1700 et seq.].

下一个标题8位选择器。标识原始数据包(定义见下文)可分段部分的初始头类型。使用与IPv4协议字段相同的值[RFC-1700 et seq.]。

Reserved 8-bit reserved field. Initialized to zero for transmission; ignored on reception.

保留8位保留字段。初始化为零以便传输;接待时被忽略。

Fragment Offset 13-bit unsigned integer. The offset, in 8-octet units, of the data following this header, relative to the start of the Fragmentable Part of the original packet.

片段偏移量13位无符号整数。该报头之后的数据相对于原始数据包的可分割部分的开始的偏移量,以8个八位字节为单位。

Res 2-bit reserved field. Initialized to zero for transmission; ignored on reception.

Res 2位保留字段。初始化为零以便传输;接待时被忽略。

M flag 1 = more fragments; 0 = last fragment.

M标志1=更多碎片;0=最后一个片段。

Identification 32 bits. See description below.

标识32位。见下面的描述。

In order to send a packet that is too large to fit in the MTU of the path to its destination, a source node may divide the packet into fragments and send each fragment as a separate packet, to be reassembled at the receiver.

为了发送太大而不适合其目的地的路径的MTU的分组,源节点可以将该分组分成片段,并将每个片段作为单独的分组发送,以在接收器处重新组装。

For every packet that is to be fragmented, the source node generates an Identification value. The Identification must be different than that of any other fragmented packet sent recently* with the same Source Address and Destination Address. If a Routing header is present, the Destination Address of concern is that of the final destination.

对于要分段的每个数据包,源节点生成一个标识值。该标识必须与最近发送的具有相同源地址和目标地址的任何其他碎片数据包的标识不同。如果存在路由标头,则关注的目的地地址是最终目的地的地址。

* "recently" means within the maximum likely lifetime of a packet, including transit time from source to destination and time spent awaiting reassembly with other fragments of the same packet. However, it is not required that a source node know the maximum packet lifetime. Rather, it is assumed that the requirement can be met by maintaining the Identification value as a simple, 32- bit, "wrap-around" counter, incremented each time a packet must be fragmented. It is an implementation choice whether to maintain a single counter for the node or multiple counters, e.g., one for each of the node's possible source addresses, or one for each active (source address, destination address) combination.

* “最近”是指在数据包的最大可能生存期内,包括从源到目的地的传输时间以及等待与同一数据包的其他片段重新组装所花费的时间。然而,不要求源节点知道最大数据包生存期。相反,假设可以通过将标识值保持为一个简单的32位“环绕”计数器来满足该要求,每次数据包必须分段时,该计数器都会递增。是为节点维护单个计数器还是多个计数器(例如,为节点的每个可能源地址维护一个计数器,还是为每个活动(源地址、目标地址)组合维护一个计数器)是一种实现选择。

The initial, large, unfragmented packet is referred to as the "original packet", and it is considered to consist of two parts, as illustrated:

初始的、大的、未分割的数据包被称为“原始数据包”,它被认为由两部分组成,如图所示:

original packet:

原始数据包:

   +------------------+----------------------//-----------------------+
   |  Unfragmentable  |                 Fragmentable                  |
   |       Part       |                     Part                      |
   +------------------+----------------------//-----------------------+
        
   +------------------+----------------------//-----------------------+
   |  Unfragmentable  |                 Fragmentable                  |
   |       Part       |                     Part                      |
   +------------------+----------------------//-----------------------+
        

The Unfragmentable Part consists of the IPv6 header plus any extension headers that must be processed by nodes en route to the destination, that is, all headers up to and including the Routing header if present, else the Hop-by-Hop Options header if present, else no extension headers.

不可分割的部分包括IPv6头加上节点在路由到目的地的过程中必须处理的任何扩展头,也就是说,路由头(如果存在)之前的所有头,包括路由头(如果存在),否则是逐跳选项头(如果存在),否则没有扩展头。

The Fragmentable Part consists of the rest of the packet, that is, any extension headers that need be processed only by the final destination node(s), plus the upper-layer header and data.

可分段部分包括数据包的其余部分,即仅需要由最终目的地节点处理的任何扩展头,加上上层头和数据。

The Fragmentable Part of the original packet is divided into fragments, each, except possibly the last ("rightmost") one, being an integer multiple of 8 octets long. The fragments are transmitted in separate "fragment packets" as illustrated:

原始数据包的可分割部分被分成片段,每个片段(可能除了最后一个(“最右边”)片段)是8个八位字节长的整数倍。片段在单独的“片段包”中传输,如图所示:

original packet:

原始数据包:

   +------------------+--------------+--------------+--//--+----------+
   |  Unfragmentable  |    first     |    second    |      |   last   |
   |       Part       |   fragment   |   fragment   | .... | fragment |
   +------------------+--------------+--------------+--//--+----------+
        
   +------------------+--------------+--------------+--//--+----------+
   |  Unfragmentable  |    first     |    second    |      |   last   |
   |       Part       |   fragment   |   fragment   | .... | fragment |
   +------------------+--------------+--------------+--//--+----------+
        

fragment packets:

片段数据包:

   +------------------+--------+--------------+
   |  Unfragmentable  |Fragment|    first     |
   |       Part       | Header |   fragment   |
   +------------------+--------+--------------+
        
   +------------------+--------+--------------+
   |  Unfragmentable  |Fragment|    first     |
   |       Part       | Header |   fragment   |
   +------------------+--------+--------------+
        
   +------------------+--------+--------------+
   |  Unfragmentable  |Fragment|    second    |
   |       Part       | Header |   fragment   |
   +------------------+--------+--------------+
                         o
                         o
                         o
   +------------------+--------+----------+
   |  Unfragmentable  |Fragment|   last   |
   |       Part       | Header | fragment |
   +------------------+--------+----------+
        
   +------------------+--------+--------------+
   |  Unfragmentable  |Fragment|    second    |
   |       Part       | Header |   fragment   |
   +------------------+--------+--------------+
                         o
                         o
                         o
   +------------------+--------+----------+
   |  Unfragmentable  |Fragment|   last   |
   |       Part       | Header | fragment |
   +------------------+--------+----------+
        

Each fragment packet is composed of:

每个片段数据包由以下部分组成:

(1) The Unfragmentable Part of the original packet, with the Payload Length of the original IPv6 header changed to contain the length of this fragment packet only (excluding the length of the IPv6 header itself), and the Next Header field of the last header of the Unfragmentable Part changed to 44.

(1) 原始数据包的不可分割部分,原始IPv6报头的有效负载长度更改为仅包含此片段数据包的长度(不包括IPv6报头本身的长度),不可分割部分最后一个报头的下一个报头字段更改为44。

(2) A Fragment header containing:

(2) 包含以下内容的片段标头:

The Next Header value that identifies the first header of the Fragmentable Part of the original packet.

下一个报头值,用于标识原始数据包可分段部分的第一个报头。

A Fragment Offset containing the offset of the fragment, in 8-octet units, relative to the start of the Fragmentable Part of the original packet. The Fragment Offset of the first ("leftmost") fragment is 0.

包含片段偏移量的片段偏移量,以8个八位字节为单位,相对于原始数据包的可分段部分的开始。第一个(“最左边”)片段的片段偏移量为0。

An M flag value of 0 if the fragment is the last ("rightmost") one, else an M flag value of 1.

如果片段是最后一个(“最右边”)片段,则M标志值为0,否则M标志值为1。

The Identification value generated for the original packet.

为原始数据包生成的标识值。

(3) The fragment itself.

(3) 碎片本身。

The lengths of the fragments must be chosen such that the resulting fragment packets fit within the MTU of the path to the packets' destination(s).

必须选择片段的长度,以使生成的片段数据包适合到数据包目的地的路径的MTU。

At the destination, fragment packets are reassembled into their original, unfragmented form, as illustrated:

在目的地,片段数据包被重新组装成其原始的未片段形式,如图所示:

reassembled original packet:

重新组装的原始数据包:

   +------------------+----------------------//------------------------+
   |  Unfragmentable  |                 Fragmentable                   |
   |       Part       |                     Part                       |
   +------------------+----------------------//------------------------+
        
   +------------------+----------------------//------------------------+
   |  Unfragmentable  |                 Fragmentable                   |
   |       Part       |                     Part                       |
   +------------------+----------------------//------------------------+
        

The following rules govern reassembly:

以下规则适用于重新组装:

An original packet is reassembled only from fragment packets that have the same Source Address, Destination Address, and Fragment Identification.

原始数据包仅从具有相同源地址、目标地址和片段标识的片段数据包重新组装。

The Unfragmentable Part of the reassembled packet consists of all headers up to, but not including, the Fragment header of the first fragment packet (that is, the packet whose Fragment Offset is zero), with the following two changes:

重新组装的数据包的不可分割部分包括第一个片段数据包(即其片段偏移量为零的数据包)的片段头之前的所有报头,但不包括这些报头,并且有以下两个变化:

The Next Header field of the last header of the Unfragmentable Part is obtained from the Next Header field of the first fragment's Fragment header.

不可分割部分的最后一个头的下一个头字段从第一个片段的片段头的下一个头字段中获取。

The Payload Length of the reassembled packet is computed from the length of the Unfragmentable Part and the length and offset of the last fragment. For example, a formula for computing the Payload Length of the reassembled original packet is:

根据不可分割部分的长度和最后一个片段的长度和偏移量计算重新组装的数据包的有效载荷长度。例如,用于计算重新组装的原始分组的有效载荷长度的公式为:

           PL.orig = PL.first - FL.first - 8 + (8 * FO.last) + FL.last
        
           PL.orig = PL.first - FL.first - 8 + (8 * FO.last) + FL.last
        

where PL.orig = Payload Length field of reassembled packet. PL.first = Payload Length field of first fragment packet. FL.first = length of fragment following Fragment header of first fragment packet. FO.last = Fragment Offset field of Fragment header of last fragment packet. FL.last = length of fragment following Fragment header of last fragment packet.

其中PL.orig=重新组装的数据包的有效载荷长度字段。PL.first=第一个片段数据包的有效负载长度字段。FL.first=第一个片段数据包的片段头之后的片段长度。FO.last=最后一个片段数据包的片段头的片段偏移量字段。FL.last=最后一个片段数据包的片段头之后的片段长度。

The Fragmentable Part of the reassembled packet is constructed from the fragments following the Fragment headers in each of the fragment packets. The length of each fragment is computed by subtracting from the packet's Payload Length the length of the

重新组装的数据包的可分段部分由每个片段数据包中片段头之后的片段构成。每个片段的长度是通过从数据包的有效负载长度中减去数据包的长度来计算的

headers between the IPv6 header and fragment itself; its relative position in Fragmentable Part is computed from its Fragment Offset value.

IPv6标头和片段本身之间的标头;其在可碎片部分中的相对位置由其碎片偏移值计算得出。

The Fragment header is not present in the final, reassembled packet.

片段头不存在于最终重新组装的数据包中。

The following error conditions may arise when reassembling fragmented packets:

重新组装碎片数据包时可能出现以下错误情况:

If insufficient fragments are received to complete reassembly of a packet within 60 seconds of the reception of the first-arriving fragment of that packet, reassembly of that packet must be abandoned and all the fragments that have been received for that packet must be discarded. If the first fragment (i.e., the one with a Fragment Offset of zero) has been received, an ICMP Time Exceeded -- Fragment Reassembly Time Exceeded message should be sent to the source of that fragment.

如果在收到第一个到达的数据包片段后的60秒内没有收到足够的片段来完成数据包的重新组装,则必须放弃该数据包的重新组装,并且必须丢弃为该数据包接收的所有片段。如果已接收到第一个片段(即片段偏移量为零的片段),则应向该片段的源发送ICMP Time EXCENDED--片段重组时间EXCENDED消息。

If the length of a fragment, as derived from the fragment packet's Payload Length field, is not a multiple of 8 octets and the M flag of that fragment is 1, then that fragment must be discarded and an ICMP Parameter Problem, Code 0, message should be sent to the source of the fragment, pointing to the Payload Length field of the fragment packet.

如果从片段数据包的有效负载长度字段派生的片段长度不是8个八位字节的倍数,并且该片段的M标志为1,则必须丢弃该片段,并且ICMP参数问题代码0消息应发送到片段源,指向片段数据包的有效负载长度字段。

If the length and offset of a fragment are such that the Payload Length of the packet reassembled from that fragment would exceed 65,535 octets, then that fragment must be discarded and an ICMP Parameter Problem, Code 0, message should be sent to the source of the fragment, pointing to the Fragment Offset field of the fragment packet.

如果片段的长度和偏移量使从该片段重新组装的数据包的有效负载长度超过65535个八位字节,则必须丢弃该片段,并将ICMP参数问题代码0消息发送到片段源,指向片段数据包的片段偏移量字段。

The following conditions are not expected to occur, but are not considered errors if they do:

以下情况预计不会发生,但如果发生,则不视为错误:

The number and content of the headers preceding the Fragment header of different fragments of the same original packet may differ. Whatever headers are present, preceding the Fragment header in each fragment packet, are processed when the packets arrive, prior to queueing the fragments for reassembly. Only those headers in the Offset zero fragment packet are retained in the reassembled packet.

相同原始分组的不同片段的片段报头之前的报头的数量和内容可能不同。在每个片段数据包中,在片段报头之前存在的任何报头都会在数据包到达时进行处理,然后再将片段排队进行重新组装。重新组装的数据包中只保留偏移量为零的片段数据包中的那些头。

The Next Header values in the Fragment headers of different fragments of the same original packet may differ. Only the value from the Offset zero fragment packet is used for reassembly.

同一原始分组的不同片段的片段报头中的下一报头值可能不同。只有来自偏移量零片段数据包的值用于重新组装。

4.6 Destination Options Header
4.6 目的地选项标题

The Destination Options header is used to carry optional information that need be examined only by a packet's destination node(s). The Destination Options header is identified by a Next Header value of 60 in the immediately preceding header, and has the following format:

Destination Options报头用于承载仅需要由数据包的目的地节点检查的可选信息。目标选项标头由前一个标头中的下一个标头值60标识,格式如下:

    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Next Header  |  Hdr Ext Len  |                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
    |                                                               |
    .                                                               .
    .                            Options                            .
    .                                                               .
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Next Header  |  Hdr Ext Len  |                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
    |                                                               |
    .                                                               .
    .                            Options                            .
    .                                                               .
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Next Header 8-bit selector. Identifies the type of header immediately following the Destination Options header. Uses the same values as the IPv4 Protocol field [RFC-1700 et seq.].

下一个标题8位选择器。标识紧跟在目标选项标头之后的标头类型。使用与IPv4协议字段相同的值[RFC-1700 et seq.]。

Hdr Ext Len 8-bit unsigned integer. Length of the Destination Options header in 8-octet units, not including the first 8 octets.

Hdr Ext Len 8位无符号整数。目标选项标头的长度,以8个八位字节为单位,不包括前8个八位字节。

Options Variable-length field, of length such that the complete Destination Options header is an integer multiple of 8 octets long. Contains one or more TLV-encoded options, as described in section 4.2.

Options可变长度字段,其长度应确保完整的目标选项标头为8个八位字节长的整数倍。包含一个或多个TLV编码选项,如第4.2节所述。

The only destination options defined in this document are the Pad1 and PadN options specified in section 4.2.

本文件中定义的唯一目的地选项是第4.2节中规定的Pad1和PadN选项。

Note that there are two possible ways to encode optional destination information in an IPv6 packet: either as an option in the Destination Options header, or as a separate extension header. The Fragment header and the Authentication header are examples of the latter approach. Which approach can be used depends on what action is desired of a destination node that does not understand the optional information:

请注意,在IPv6数据包中编码可选目标信息有两种可能的方法:作为目标选项标头中的选项,或作为单独的扩展标头。片段头和身份验证头是后一种方法的示例。可以使用哪种方法取决于不了解可选信息的目标节点需要采取什么行动:

o If the desired action is for the destination node to discard the packet and, only if the packet's Destination Address is not a multicast address, send an ICMP Unrecognized Type message to the packet's Source Address, then the information may be encoded either as a separate header or as an option in the

o 如果所需的操作是目的地节点丢弃该分组,并且仅当该分组的目的地地址不是多播地址时,才向该分组的源地址发送ICMP未识别类型的消息,则该信息可以被编码为单独的报头,或者作为该报头中的一个选项

Destination Options header whose Option Type has the value 11 in its highest-order two bits. The choice may depend on such factors as which takes fewer octets, or which yields better alignment or more efficient parsing.

目标选项标题,其选项类型在其最高两位中的值为11。选择可能取决于这样的因素,例如需要更少的八位字节,或者产生更好的对齐或更有效的解析。

o If any other action is desired, the information must be encoded as an option in the Destination Options header whose Option Type has the value 00, 01, or 10 in its highest-order two bits, specifying the desired action (see section 4.2).

o 如果需要任何其他操作,则必须将信息编码为目标选项标题中的选项,其选项类型的最高两位值为00、01或10,指定所需操作(见第4.2节)。

4.7 No Next Header
4.7 没有下一个标题

The value 59 in the Next Header field of an IPv6 header or any extension header indicates that there is nothing following that header. If the Payload Length field of the IPv6 header indicates the presence of octets past the end of a header whose Next Header field contains 59, those octets must be ignored, and passed on unchanged if the packet is forwarded.

IPv6标头或任何扩展标头的下一个标头字段中的值59表示该标头后面没有任何内容。如果IPv6报头的有效负载长度字段指示在下一个报头字段包含59个字节的报头末尾之后存在八位字节,则必须忽略这些八位字节,如果数据包被转发,则这些八位字节将被不变地传递。

5. Packet Size Issues
5. 数据包大小问题

IPv6 requires that every link in the internet have an MTU of 1280 octets or greater. On any link that cannot convey a 1280-octet packet in one piece, link-specific fragmentation and reassembly must be provided at a layer below IPv6.

IPv6要求internet中的每条链路都有1280个八位字节或更大的MTU。在任何不能完整传输1280个八位组数据包的链路上,必须在IPv6下的一层提供特定于链路的分段和重组。

Links that have a configurable MTU (for example, PPP links [RFC-1661]) must be configured to have an MTU of at least 1280 octets; it is recommended that they be configured with an MTU of 1500 octets or greater, to accommodate possible encapsulations (i.e., tunneling) without incurring IPv6-layer fragmentation.

具有可配置MTU的链路(例如,PPP链路[RFC-1661])必须配置为具有至少1280个八位字节的MTU;建议将其配置为1500个八位字节或更大的MTU,以适应可能的封装(即隧道),而不会导致IPv6层碎片。

From each link to which a node is directly attached, the node must be able to accept packets as large as that link's MTU.

从节点直接连接到的每个链路,节点必须能够接受与该链路的MTU一样大的数据包。

It is strongly recommended that IPv6 nodes implement Path MTU Discovery [RFC-1981], in order to discover and take advantage of path MTUs greater than 1280 octets. However, a minimal IPv6 implementation (e.g., in a boot ROM) may simply restrict itself to sending packets no larger than 1280 octets, and omit implementation of Path MTU Discovery.

强烈建议IPv6节点实施路径MTU发现[RFC-1981],以便发现并利用大于1280个八位字节的路径MTU。然而,最小IPv6实现(例如,在引导ROM中)可能仅限于发送不大于1280个八位字节的数据包,而忽略路径MTU发现的实现。

In order to send a packet larger than a path's MTU, a node may use the IPv6 Fragment header to fragment the packet at the source and have it reassembled at the destination(s). However, the use of such fragmentation is discouraged in any application that is able to adjust its packets to fit the measured path MTU (i.e., down to 1280 octets).

为了发送大于路径MTU的数据包,节点可以使用IPv6片段头在源处对数据包进行片段化,并在目的地重新组装数据包。然而,在任何能够调整其分组以适合测量路径MTU(即,低至1280个八位字节)的应用程序中,不鼓励使用这种分段。

A node must be able to accept a fragmented packet that, after reassembly, is as large as 1500 octets. A node is permitted to accept fragmented packets that reassemble to more than 1500 octets. An upper-layer protocol or application that depends on IPv6 fragmentation to send packets larger than the MTU of a path should not send packets larger than 1500 octets unless it has assurance that the destination is capable of reassembling packets of that larger size.

一个节点必须能够接受一个碎片数据包,在重新组装后,这个碎片数据包的大小可达1500个八位组。允许一个节点接受碎片数据包,这些碎片数据包重新组合到1500个八位组以上。依赖IPv6碎片发送大于路径MTU的数据包的上层协议或应用程序不应发送大于1500个八位字节的数据包,除非其确保目的地能够重新组合该较大的数据包。

In response to an IPv6 packet that is sent to an IPv4 destination (i.e., a packet that undergoes translation from IPv6 to IPv4), the originating IPv6 node may receive an ICMP Packet Too Big message reporting a Next-Hop MTU less than 1280. In that case, the IPv6 node is not required to reduce the size of subsequent packets to less than 1280, but must include a Fragment header in those packets so that the IPv6-to-IPv4 translating router can obtain a suitable Identification value to use in resulting IPv4 fragments. Note that this means the payload may have to be reduced to 1232 octets (1280 minus 40 for the IPv6 header and 8 for the Fragment header), and smaller still if additional extension headers are used.

作为对发送到IPv4目的地的IPv6数据包(即,经历从IPv6到IPv4转换的数据包)的响应,发起IPv6节点可能接收到报告下一跳MTU小于1280的ICMP数据包过大消息。在这种情况下,IPv6节点不需要将后续数据包的大小减小到1280以下,但必须在这些数据包中包含片段头,以便IPv6-to-IPv4转换路由器可以获得适当的标识值,以便在生成的IPv4片段中使用。请注意,这意味着有效负载可能必须减少到1232个八位字节(IPv6报头为1280减40,片段报头为8),如果使用额外的扩展报头,有效负载可能会更小。

6. Flow Labels
6. 流标签

The 20-bit Flow Label field in the IPv6 header may be used by a source to label sequences of packets for which it requests special handling by the IPv6 routers, such as non-default quality of service or "real-time" service. This aspect of IPv6 is, at the time of writing, still experimental and subject to change as the requirements for flow support in the Internet become clearer. Hosts or routers that do not support the functions of the Flow Label field are required to set the field to zero when originating a packet, pass the field on unchanged when forwarding a packet, and ignore the field when receiving a packet.

IPv6报头中的20位流标签字段可由源用于标记其请求IPv6路由器对其进行特殊处理的分组序列,例如非默认服务质量或“实时”服务。在撰写本文时,IPv6的这一方面仍处于试验阶段,随着互联网流量支持要求的日益明确,可能会发生变化。不支持流标签字段功能的主机或路由器需要在发起数据包时将该字段设置为零,在转发数据包时将该字段保持不变,在接收数据包时忽略该字段。

Appendix A describes the current intended semantics and usage of the Flow Label field.

附录A描述了流量标签字段的当前预期语义和用法。

7. Traffic Classes
7. 交通等级

The 8-bit Traffic Class field in the IPv6 header is available for use by originating nodes and/or forwarding routers to identify and distinguish between different classes or priorities of IPv6 packets. At the point in time at which this specification is being written, there are a number of experiments underway in the use of the IPv4 Type of Service and/or Precedence bits to provide various forms of "differentiated service" for IP packets, other than through the use of explicit flow set-up. The Traffic Class field in the IPv6 header is intended to allow similar functionality to be supported in IPv6.

IPv6报头中的8位流量类别字段可供发起节点和/或转发路由器使用,以识别和区分IPv6数据包的不同类别或优先级。在编写本规范时,除了通过使用显式流设置外,还正在进行大量实验,使用IPv4类型的服务和/或优先位为IP数据包提供各种形式的“区分服务”。IPv6标头中的Traffic Class字段旨在允许在IPv6中支持类似的功能。

It is hoped that those experiments will eventually lead to agreement on what sorts of traffic classifications are most useful for IP packets. Detailed definitions of the syntax and semantics of all or some of the IPv6 Traffic Class bits, whether experimental or intended for eventual standardization, are to be provided in separate documents.

人们希望,这些实验最终能够就什么样的流量分类对IP数据包最有用达成一致。所有或部分IPv6流量类位的语法和语义的详细定义(无论是实验性的还是最终标准化的)将在单独的文档中提供。

The following general requirements apply to the Traffic Class field:

以下一般要求适用于交通等级字段:

o The service interface to the IPv6 service within a node must provide a means for an upper-layer protocol to supply the value of the Traffic Class bits in packets originated by that upper-layer protocol. The default value must be zero for all 8 bits.

o 节点内IPv6服务的服务接口必须为上层协议提供一种方式,以提供由该上层协议发起的数据包中的流量类位的值。所有8位的默认值必须为零。

o Nodes that support a specific (experimental or eventual standard) use of some or all of the Traffic Class bits are permitted to change the value of those bits in packets that they originate, forward, or receive, as required for that specific use. Nodes should ignore and leave unchanged any bits of the Traffic Class field for which they do not support a specific use.

o 支持某些或所有业务类比特的特定(实验性或最终标准)使用的节点被允许根据该特定使用的需要更改其发起、转发或接收的分组中这些比特的值。节点应忽略不支持特定用途的流量类字段的任何位,并保持不变。

o An upper-layer protocol must not assume that the value of the Traffic Class bits in a received packet are the same as the value sent by the packet's source.

o 上层协议不得假设接收到的数据包中的流量类位的值与数据包源发送的值相同。

8. Upper-Layer Protocol Issues
8. 上层协议问题
8.1 Upper-Layer Checksums
8.1 上层校验和

Any transport or other upper-layer protocol that includes the addresses from the IP header in its checksum computation must be modified for use over IPv6, to include the 128-bit IPv6 addresses instead of 32-bit IPv4 addresses. In particular, the following illustration shows the TCP and UDP "pseudo-header" for IPv6:

任何在校验和计算中包含IP报头地址的传输协议或其他上层协议都必须进行修改,以便在IPv6上使用,以包含128位IPv6地址,而不是32位IPv4地址。特别是,下图显示了IPv6的TCP和UDP“伪标头”:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                         Source Address                        +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                      Destination Address                      +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   Upper-Layer Packet Length                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      zero                     |  Next Header  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                         Source Address                        +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                      Destination Address                      +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   Upper-Layer Packet Length                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      zero                     |  Next Header  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

o If the IPv6 packet contains a Routing header, the Destination Address used in the pseudo-header is that of the final destination. At the originating node, that address will be in the last element of the Routing header; at the recipient(s), that address will be in the Destination Address field of the IPv6 header.

o 如果IPv6数据包包含路由报头,则伪报头中使用的目的地地址是最终目的地的地址。在发起节点,该地址将位于路由报头的最后一个元素中;在收件人处,该地址将位于IPv6标头的目标地址字段中。

o The Next Header value in the pseudo-header identifies the upper-layer protocol (e.g., 6 for TCP, or 17 for UDP). It will differ from the Next Header value in the IPv6 header if there are extension headers between the IPv6 header and the upper-layer header.

o 伪报头中的下一个报头值标识上层协议(例如,TCP为6,UDP为17)。如果IPv6标头和上层标头之间存在扩展标头,则它将不同于IPv6标头中的下一个标头值。

o The Upper-Layer Packet Length in the pseudo-header is the length of the upper-layer header and data (e.g., TCP header plus TCP data). Some upper-layer protocols carry their own

o 伪报头中的上层数据包长度是上层报头和数据(例如,TCP报头加TCP数据)的长度。一些上层协议有自己的协议

length information (e.g., the Length field in the UDP header); for such protocols, that is the length used in the pseudo-header. Other protocols (such as TCP) do not carry their own length information, in which case the length used in the pseudo-header is the Payload Length from the IPv6 header, minus the length of any extension headers present between the IPv6 header and the upper-layer header.

长度信息(例如,UDP报头中的长度字段);对于此类协议,这是伪报头中使用的长度。其他协议(如TCP)不携带自己的长度信息,在这种情况下,伪报头中使用的长度是来自IPv6报头的有效负载长度减去IPv6报头和上层报头之间存在的任何扩展报头的长度。

o Unlike IPv4, when UDP packets are originated by an IPv6 node, the UDP checksum is not optional. That is, whenever originating a UDP packet, an IPv6 node must compute a UDP checksum over the packet and the pseudo-header, and, if that computation yields a result of zero, it must be changed to hex FFFF for placement in the UDP header. IPv6 receivers must discard UDP packets containing a zero checksum, and should log the error.

o 与IPv4不同,当UDP数据包由IPv6节点发起时,UDP校验和不是可选的。也就是说,每当发起UDP数据包时,IPv6节点必须计算该数据包和伪报头上的UDP校验和,如果该计算结果为零,则必须将其更改为十六进制FFFF以放置在UDP报头中。IPv6接收器必须丢弃包含零校验和的UDP数据包,并应记录错误。

The IPv6 version of ICMP [ICMPv6] includes the above pseudo-header in its checksum computation; this is a change from the IPv4 version of ICMP, which does not include a pseudo-header in its checksum. The reason for the change is to protect ICMP from misdelivery or corruption of those fields of the IPv6 header on which it depends, which, unlike IPv4, are not covered by an internet-layer checksum. The Next Header field in the pseudo-header for ICMP contains the value 58, which identifies the IPv6 version of ICMP.

IPv6版本的ICMP[ICMPv6]在其校验和计算中包含上述伪报头;这是对IPv4版本ICMP的更改,该版本的校验和中不包含伪报头。更改的原因是保护ICMP不受其所依赖的IPv6报头字段的误发或损坏,与IPv4不同,这些字段不受internet层校验和的覆盖。ICMP伪标头中的下一个标头字段包含值58,该值标识ICMP的IPv6版本。

8.2 Maximum Packet Lifetime
8.2 最大数据包生存期

Unlike IPv4, IPv6 nodes are not required to enforce maximum packet lifetime. That is the reason the IPv4 "Time to Live" field was renamed "Hop Limit" in IPv6. In practice, very few, if any, IPv4 implementations conform to the requirement that they limit packet lifetime, so this is not a change in practice. Any upper-layer protocol that relies on the internet layer (whether IPv4 or IPv6) to limit packet lifetime ought to be upgraded to provide its own mechanisms for detecting and discarding obsolete packets.

与IPv4不同,IPv6节点不需要强制执行最大数据包生存期。这就是IPv4“生存时间”字段在IPv6中重命名为“跃点限制”的原因。实际上,很少有IPv4实现符合限制数据包生存期的要求,因此这在实践中不是一个变化。任何依赖互联网层(IPv4或IPv6)来限制数据包生存期的上层协议都应该升级,以提供自己的机制来检测和丢弃过时的数据包。

8.3 Maximum Upper-Layer Payload Size
8.3 最大上层有效载荷大小

When computing the maximum payload size available for upper-layer data, an upper-layer protocol must take into account the larger size of the IPv6 header relative to the IPv4 header. For example, in IPv4, TCP's MSS option is computed as the maximum packet size (a default value or a value learned through Path MTU Discovery) minus 40 octets (20 octets for the minimum-length IPv4 header and 20 octets for the minimum-length TCP header). When using TCP over IPv6, the MSS must be computed as the maximum packet size minus 60 octets,

在计算上层数据可用的最大有效负载大小时,上层协议必须考虑IPv6报头相对于IPv4报头的较大大小。例如,在IPv4中,TCP的MSS选项计算为最大数据包大小(默认值或通过路径MTU发现学习的值)减去40个八位字节(最小长度IPv4报头为20个八位字节,最小长度TCP报头为20个八位字节)。在IPv6上使用TCP时,MSS必须计算为最大数据包大小减去60个八位字节,

because the minimum-length IPv6 header (i.e., an IPv6 header with no extension headers) is 20 octets longer than a minimum-length IPv4 header.

因为最小长度IPv6报头(即没有扩展报头的IPv6报头)比最小长度IPv4报头长20个八位字节。

8.4 Responding to Packets Carrying Routing Headers
8.4 响应承载路由头的数据包

When an upper-layer protocol sends one or more packets in response to a received packet that included a Routing header, the response packet(s) must not include a Routing header that was automatically derived by "reversing" the received Routing header UNLESS the integrity and authenticity of the received Source Address and Routing header have been verified (e.g., via the use of an Authentication header in the received packet). In other words, only the following kinds of packets are permitted in response to a received packet bearing a Routing header:

当上层协议发送一个或多个数据包以响应包含路由报头的接收数据包时,响应数据包不得包含通过“反向”自动导出的路由报头接收到的路由报头,除非已验证接收到的源地址和路由报头的完整性和真实性(例如,通过在接收到的分组中使用认证报头)。换句话说,仅允许以下类型的分组响应于承载路由报头的接收分组:

o Response packets that do not carry Routing headers.

o 不携带路由头的响应数据包。

o Response packets that carry Routing headers that were NOT derived by reversing the Routing header of the received packet (for example, a Routing header supplied by local configuration).

o 带有路由头的响应数据包,该路由头不是通过反转接收数据包的路由头(例如,由本地配置提供的路由头)而派生的。

o Response packets that carry Routing headers that were derived by reversing the Routing header of the received packet IF AND ONLY IF the integrity and authenticity of the Source Address and Routing header from the received packet have been verified by the responder.

o 当且仅当响应者已验证来自接收数据包的源地址和路由报头的完整性和真实性时,携带路由报头的响应数据包,该路由报头通过反转接收数据包的路由报头而派生。

Appendix A. Semantics and Usage of the Flow Label Field
附录A.流量标签字段的语义和用法

A flow is a sequence of packets sent from a particular source to a particular (unicast or multicast) destination for which the source desires special handling by the intervening routers. The nature of that special handling might be conveyed to the routers by a control protocol, such as a resource reservation protocol, or by information within the flow's packets themselves, e.g., in a hop-by-hop option. The details of such control protocols or options are beyond the scope of this document.

流是从特定源发送到特定(单播或多播)目的地的数据包序列,该目的地的源需要中间路由器对其进行特殊处理。该特殊处理的性质可通过控制协议(例如资源保留协议)或流的分组本身内的信息(例如,在逐跳选项中)传送到路由器。此类控制协议或选项的详细信息超出了本文件的范围。

There may be multiple active flows from a source to a destination, as well as traffic that is not associated with any flow. A flow is uniquely identified by the combination of a source address and a non-zero flow label. Packets that do not belong to a flow carry a flow label of zero.

可能存在从源到目的地的多个活动流,以及与任何流都不关联的流量。流由源地址和非零流标签的组合唯一标识。不属于流的数据包的流标签为零。

A flow label is assigned to a flow by the flow's source node. New flow labels must be chosen (pseudo-)randomly and uniformly from the range 1 to FFFFF hex. The purpose of the random allocation is to make any set of bits within the Flow Label field suitable for use as a hash key by routers, for looking up the state associated with the flow.

流标签由流的源节点指定给流。新流量标签必须在1到FFFFF十六进制范围内(伪)随机、均匀地选择。随机分配的目的是使流标签字段内的任何比特集适合由路由器用作散列密钥,用于查找与流相关联的状态。

All packets belonging to the same flow must be sent with the same source address, destination address, and flow label. If any of those packets includes a Hop-by-Hop Options header, then they all must be originated with the same Hop-by-Hop Options header contents (excluding the Next Header field of the Hop-by-Hop Options header). If any of those packets includes a Routing header, then they all must be originated with the same contents in all extension headers up to and including the Routing header (excluding the Next Header field in the Routing header). The routers or destinations are permitted, but not required, to verify that these conditions are satisfied. If a violation is detected, it should be reported to the source by an ICMP Parameter Problem message, Code 0, pointing to the high-order octet of the Flow Label field (i.e., offset 1 within the IPv6 packet).

属于同一流的所有数据包必须使用相同的源地址、目标地址和流标签发送。如果这些数据包中的任何一个包含逐跳选项标头,则它们都必须使用相同的逐跳选项标头内容(不包括逐跳选项标头的下一个标头字段)发起。如果这些数据包中的任何一个包含路由头,那么它们都必须在路由头之前(不包括路由头中的下一个头字段)的所有扩展头中使用相同的内容发起。允许但不要求路由器或目的地验证是否满足这些条件。如果检测到冲突,则应通过ICMP参数问题消息(代码0)向源报告,该消息指向流标签字段的高阶八位组(即IPv6数据包中的偏移量1)。

The maximum lifetime of any flow-handling state established along a flow's path must be specified as part of the description of the state-establishment mechanism, e.g., the resource reservation protocol or the flow-setup hop-by-hop option. A source must not re-use a flow label for a new flow within the maximum lifetime of any flow-handling state that might have been established for the prior use of that flow label.

必须将沿流路径建立的任何流处理状态的最大生存期指定为状态建立机制描述的一部分,例如,资源保留协议或流设置逐跳选项。在任何流处理状态的最长生存期内,源不得对新流重复使用流标签,该状态可能是为先前使用该流标签而建立的。

When a node stops and restarts (e.g., as a result of a "crash"), it must be careful not to use a flow label that it might have used for an earlier flow whose lifetime may not have expired yet. This may be accomplished by recording flow label usage on stable storage so that it can be remembered across crashes, or by refraining from using any flow labels until the maximum lifetime of any possible previously established flows has expired. If the minimum time for rebooting the node is known, that time can be deducted from the necessary waiting period before starting to allocate flow labels.

当节点停止并重新启动(例如,由于“崩溃”)时,必须小心不要使用可能用于生命周期可能尚未到期的早期流的流标签。这可以通过在稳定的存储器上记录流标签的使用情况来实现,以便在崩溃时能够记住它,或者通过在任何可能的先前建立的流的最长生存期到期之前避免使用任何流标签来实现。如果已知重新启动节点的最短时间,则可以在开始分配流标签之前从必要的等待时间中扣除该时间。

There is no requirement that all, or even most, packets belong to flows, i.e., carry non-zero flow labels. This observation is placed here to remind protocol designers and implementors not to assume otherwise. For example, it would be unwise to design a router whose performance would be adequate only if most packets belonged to flows, or to design a header compression scheme that only worked on packets that belonged to flows.

不要求所有甚至大部分数据包都属于流,即携带非零流标签。此处的观察是为了提醒协议设计者和实现者不要假设其他情况。例如,如果设计一个路由器,其性能仅在大多数数据包属于流时才足够,或者设计一个仅对属于流的数据包起作用的报头压缩方案,那将是不明智的。

Appendix B. Formatting Guidelines for Options
附录B.选项的格式指南

This appendix gives some advice on how to lay out the fields when designing new options to be used in the Hop-by-Hop Options header or the Destination Options header, as described in section 4.2. These guidelines are based on the following assumptions:

如第4.2节所述,本附录给出了在设计用于逐跳选项标题或目的地选项标题的新选项时如何布局字段的一些建议。这些指南基于以下假设:

o One desirable feature is that any multi-octet fields within the Option Data area of an option be aligned on their natural boundaries, i.e., fields of width n octets should be placed at an integer multiple of n octets from the start of the Hop-by-Hop or Destination Options header, for n = 1, 2, 4, or 8.

o 一个可取的特征是,选项的选项数据区域内的任何多个八位字节字段应在其自然边界上对齐,即,宽度为n个八位字节的字段应放置在距离逐跳或目标选项报头开始的n个八位字节的整数倍处,即n=1、2、4或8。

o Another desirable feature is that the Hop-by-Hop or Destination Options header take up as little space as possible, subject to the requirement that the header be an integer multiple of 8 octets long.

o 另一个可取的特征是逐跳或目的地选项报头占用尽可能少的空间,但报头必须是8个八位字节长的整数倍。

o It may be assumed that, when either of the option-bearing headers are present, they carry a very small number of options, usually only one.

o 可以假设,当存在任何一个带有选项的标题时,它们携带的选项数量非常少,通常只有一个。

These assumptions suggest the following approach to laying out the fields of an option: order the fields from smallest to largest, with no interior padding, then derive the alignment requirement for the entire option based on the alignment requirement of the largest field (up to a maximum alignment of 8 octets). This approach is illustrated in the following examples:

这些假设建议采用以下方法来布置选项的字段:将字段从最小到最大排序,无内部填充,然后根据最大字段的对齐要求(最多8个八位字节的最大对齐)推导整个选项的对齐要求。以下示例说明了该方法:

Example 1

例1

If an option X required two data fields, one of length 8 octets and one of length 4 octets, it would be laid out as follows:

如果选项X需要两个数据字段,一个长度为8个八位字节,另一个长度为4个八位字节,则其布局如下:

                                   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                   | Option Type=X |Opt Data Len=12|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         4-octet field                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                         8-octet field                         +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
                                   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                   | Option Type=X |Opt Data Len=12|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         4-octet field                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                         8-octet field                         +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Its alignment requirement is 8n+2, to ensure that the 8-octet field starts at a multiple-of-8 offset from the start of the enclosing header. A complete Hop-by-Hop or Destination Options header containing this one option would look as follows:

其对齐要求为8n+2,以确保8位字节字段从封闭标头开始的8倍偏移开始。包含这一选项的完整逐跳或目标选项标题如下所示:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Next Header  | Hdr Ext Len=1 | Option Type=X |Opt Data Len=12|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         4-octet field                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                         8-octet field                         +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Next Header  | Hdr Ext Len=1 | Option Type=X |Opt Data Len=12|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         4-octet field                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                         8-octet field                         +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Example 2

例2

If an option Y required three data fields, one of length 4 octets, one of length 2 octets, and one of length 1 octet, it would be laid out as follows:

如果选项Y需要三个数据字段,一个长度为4个八位字节,一个长度为2个八位字节,一个长度为1个八位字节,则其布局如下:

                                                   +-+-+-+-+-+-+-+-+
                                                   | Option Type=Y |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Opt Data Len=7 | 1-octet field |         2-octet field         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         4-octet field                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
                                                   +-+-+-+-+-+-+-+-+
                                                   | Option Type=Y |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Opt Data Len=7 | 1-octet field |         2-octet field         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         4-octet field                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Its alignment requirement is 4n+3, to ensure that the 4-octet field starts at a multiple-of-4 offset from the start of the enclosing header. A complete Hop-by-Hop or Destination Options header containing this one option would look as follows:

其对齐要求为4n+3,以确保4-octet字段从封闭标头开始的4倍偏移量开始。包含这一选项的完整逐跳或目标选项标题如下所示:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Next Header  | Hdr Ext Len=1 | Pad1 Option=0 | Option Type=Y |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Opt Data Len=7 | 1-octet field |         2-octet field         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         4-octet field                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | PadN Option=1 |Opt Data Len=2 |       0       |       0       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Next Header  | Hdr Ext Len=1 | Pad1 Option=0 | Option Type=Y |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Opt Data Len=7 | 1-octet field |         2-octet field         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         4-octet field                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | PadN Option=1 |Opt Data Len=2 |       0       |       0       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Example 3

例3

A Hop-by-Hop or Destination Options header containing both options X and Y from Examples 1 and 2 would have one of the two following formats, depending on which option appeared first:

包含示例1和2中的选项X和Y的逐跳或目标选项标题将具有以下两种格式之一,具体取决于最先出现的选项:

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Next Header  | Hdr Ext Len=3 | Option Type=X |Opt Data Len=12|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         4-octet field                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                         8-octet field                         +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | PadN Option=1 |Opt Data Len=1 |       0       | Option Type=Y |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Opt Data Len=7 | 1-octet field |         2-octet field         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         4-octet field                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | PadN Option=1 |Opt Data Len=2 |       0       |       0       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Next Header  | Hdr Ext Len=3 | Option Type=X |Opt Data Len=12|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         4-octet field                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                         8-octet field                         +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | PadN Option=1 |Opt Data Len=1 |       0       | Option Type=Y |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Opt Data Len=7 | 1-octet field |         2-octet field         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         4-octet field                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | PadN Option=1 |Opt Data Len=2 |       0       |       0       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Next Header  | Hdr Ext Len=3 | Pad1 Option=0 | Option Type=Y |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Opt Data Len=7 | 1-octet field |         2-octet field         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         4-octet field                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | PadN Option=1 |Opt Data Len=4 |       0       |       0       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       0       |       0       | Option Type=X |Opt Data Len=12|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         4-octet field                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                         8-octet field                         +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Next Header  | Hdr Ext Len=3 | Pad1 Option=0 | Option Type=Y |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Opt Data Len=7 | 1-octet field |         2-octet field         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         4-octet field                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | PadN Option=1 |Opt Data Len=4 |       0       |       0       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       0       |       0       | Option Type=X |Opt Data Len=12|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         4-octet field                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                         8-octet field                         +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
        

Security Considerations

安全考虑

The security features of IPv6 are described in the Security Architecture for the Internet Protocol [RFC-2401].

互联网协议的安全体系结构[RFC-2401]中描述了IPv6的安全特性。

Acknowledgments

致谢

The authors gratefully acknowledge the many helpful suggestions of the members of the IPng working group, the End-to-End Protocols research group, and the Internet Community At Large.

作者非常感谢IPng工作组、端到端协议研究组和整个互联网社区成员提出的许多有益建议。

Authors' Addresses

作者地址

Stephen E. Deering Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA

Stephen E.Deering Cisco Systems,Inc.美国加利福尼亚州圣何塞西塔斯曼大道170号,邮编95134-1706

   Phone: +1 408 527 8213
   Fax:   +1 408 527 8254
   EMail: deering@cisco.com
        
   Phone: +1 408 527 8213
   Fax:   +1 408 527 8254
   EMail: deering@cisco.com
        

Robert M. Hinden Nokia 232 Java Drive Sunnyvale, CA 94089 USA

Robert M.Hinden诺基亚232 Java Drive Sunnyvale,加利福尼亚州,美国94089

   Phone: +1 408 990-2004
   Fax:   +1 408 743-5677
   EMail: hinden@iprg.nokia.com
        
   Phone: +1 408 990-2004
   Fax:   +1 408 743-5677
   EMail: hinden@iprg.nokia.com
        

References

工具书类

[RFC-2401] Kent, S. and R. Atkinson, "Security Architecture for the Internet Protocol", RFC 2401, November 1998.

[RFC-2401]Kent,S.和R.Atkinson,“互联网协议的安全架构”,RFC 2401,1998年11月。

[RFC-2402] Kent, S. and R. Atkinson, "IP Authentication Header", RFC 2402, November 1998.

[RFC-2402]Kent,S.和R.Atkinson,“IP认证头”,RFC 2402,1998年11月。

[RFC-2406] Kent, S. and R. Atkinson, "IP Encapsulating Security Protocol (ESP)", RFC 2406, November 1998.

[RFC-2406]Kent,S.和R.Atkinson,“IP封装安全协议(ESP)”,RFC 2406,1998年11月。

[ICMPv6] Conta, A. and S. Deering, "ICMP for the Internet Protocol Version 6 (IPv6)", RFC 2463, December 1998.

[ICMPv6]Conta,A.和S.Deering,“互联网协议第6版(IPv6)的ICMP”,RFC 2463,1998年12月。

[ADDRARCH] Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC 2373, July 1998.

[ADDRARCH]Hinden,R.和S.Deering,“IP版本6寻址体系结构”,RFC 23731998年7月。

[RFC-1981] McCann, J., Mogul, J. and S. Deering, "Path MTU Discovery for IP version 6", RFC 1981, August 1996.

[RFC-1981]McCann,J.,Mogul,J.和S.Deering,“IP版本6的路径MTU发现”,RFC 1981,1996年8月。

[RFC-791] Postel, J., "Internet Protocol", STD 5, RFC 791, September 1981.

[RFC-791]Postel,J.,“互联网协议”,STD 5,RFC 7911981年9月。

   [RFC-1700]   Reynolds, J. and J. Postel, "Assigned Numbers", STD 2,
                RFC 1700, October 1994.  See also:
                http://www.iana.org/numbers.html
        
   [RFC-1700]   Reynolds, J. and J. Postel, "Assigned Numbers", STD 2,
                RFC 1700, October 1994.  See also:
                http://www.iana.org/numbers.html
        

[RFC-1661] Simpson, W., "The Point-to-Point Protocol (PPP)", STD 51, RFC 1661, July 1994.

[RFC-1661]辛普森,W.“点对点协议(PPP)”,STD 51,RFC 1661,1994年7月。

CHANGES SINCE RFC-1883

自RFC-1883以来的变化

This memo has the following changes from RFC-1883. Numbers identify the Internet-Draft version in which the change was made.

本备忘录与RFC-1883相比有以下变化。数字标识进行更改的互联网草稿版本。

02) Removed all references to jumbograms and the Jumbo Payload option (moved to a separate document).

02)删除了对巨型程序和巨型有效载荷选项的所有引用(移动到单独的文档)。

02) Moved most of Flow Label description from section 6 to (new) Appendix A.

02)将大部分流量标签说明从第6节移至(新)附录A。

02) In Flow Label description, now in Appendix A, corrected maximum Flow Label value from FFFFFF to FFFFF (i.e., one less "F") due to reduction of size of Flow Label field from 24 bits to 20 bits.

02)在流量标签说明中,现在在附录A中,由于流量标签字段的大小从24位减小到20位,修正了从FFFFFF到FFFFF的最大流量标签值(即,减去一个“F”)。

02) Renumbered (relettered?) the previous Appendix A to be Appendix B.

02)将之前的附录A重新编号为附录B。

02) Changed the wording of the Security Considerations section to avoid dependency loop between this spec and the IPsec specs.

02)更改了安全注意事项部分的措辞,以避免此规范和IPsec规范之间的依赖循环。

02) Updated R. Hinden's email address and company affiliation.

02)更新了R.Hinden的电子邮件地址和公司隶属关系。

        --------------------------------------------------------
        
        --------------------------------------------------------
        

01) In section 3, changed field name "Class" to "Traffic Class" and increased its size from 4 to 8 bits. Decreased size of Flow Label field from 24 to 20 bits to compensate for increase in Traffic Class field.

01)在第3节中,将字段名“Class”更改为“Traffic Class”,并将其大小从4位增加到8位。将流量标签字段的大小从24位减小到20位,以补偿流量类别字段的增加。

01) In section 4.1, restored the order of the Authentication Header and the ESP header, which were mistakenly swapped in the 00 version of this memo.

01)在第4.1节中,恢复了身份验证标头和ESP标头的顺序,这两个标头在本备忘录的00版本中被错误交换。

01) In section 4.4, deleted the Strict/Loose Bit Map field and the strict routing functionality from the Type 0 Routing header, and removed the restriction on number of addresses that may be carried in the Type 0 Routing header (was limited to 23 addresses, because of the size of the strict/loose bit map).

01)在第4.4节中,从类型0路由头中删除了严格/松散位图字段和严格路由功能,并删除了类型0路由头中可能携带的地址数量限制(由于严格/松散位图的大小,限制为23个地址)。

01) In section 5, changed the minimum IPv6 MTU from 576 to 1280 octets, and added a recommendation that links with configurable MTU (e.g., PPP links) be configured to have an MTU of at least 1500 octets.

01)在第5节中,将最小IPv6 MTU从576更改为1280个八位字节,并添加了一项建议,即将具有可配置MTU的链路(例如PPP链路)配置为具有至少1500个八位字节的MTU。

01) In section 5, deleted the requirement that a node must not send fragmented packets that reassemble to more than 1500 octets without knowledge of the destination reassembly buffer size, and replaced it with a recommendation that upper-layer protocols or applications should not do that.

01)在第5节中,删除了在不知道目的地重组缓冲区大小的情况下,节点不得发送重组到1500个八位字节以上的碎片数据包的要求,并将其替换为上层协议或应用程序不应这样做的建议。

01) Replaced reference to the IPv4 Path MTU Discovery spec (RFC-1191) with reference to the IPv6 Path MTU Discovery spec (RFC-1981), and deleted the Notes at the end of section 5 regarding Path MTU Discovery, since those details are now covered by RFC-1981.

01)将对IPv4路径MTU发现规范(RFC-1191)的引用替换为对IPv6路径MTU发现规范(RFC-1981)的引用,并删除了第5节末尾关于路径MTU发现的注释,因为RFC-1981现在涵盖了这些细节。

01) In section 6, deleted specification of "opportunistic" flow set-up, and removed all references to the 6-second maximum lifetime for opportunistically established flow state.

01)在第6节中,删除了“机会主义”流量设置规范,并删除了所有关于机会主义建立的流量状态的6秒最大寿命的参考。

01) In section 7, deleted the provisional description of the internal structure and semantics of the Traffic Class field, and specified that such descriptions be provided in separate documents.

01)在第7节中,删除了交通类别字段内部结构和语义的临时说明,并规定在单独的文件中提供此类说明。

        --------------------------------------------------------
        
        --------------------------------------------------------
        

00) In section 4, corrected the Code value to indicate "unrecognized Next Header type encountered" in an ICMP Parameter Problem message (changed from 2 to 1).

00)在第4节中,更正了代码值,以指示ICMP参数问题消息(从2更改为1)中的“遇到无法识别的下一个标头类型”。

00) In the description of the Payload Length field in section 3, and of the Jumbo Payload Length field in section 4.3, made it clearer that extension headers are included in the payload length count.

00)在第3节有效载荷长度字段和第4.3节巨型有效载荷长度字段的描述中,明确了有效载荷长度计数中包括扩展头。

00) In section 4.1, swapped the order of the Authentication header and the ESP header. (NOTE: this was a mistake, and the change was undone in version 01.)

00)在第4.1节中,交换了身份验证标头和ESP标头的顺序。(注意:这是一个错误,更改在版本01中撤消。)

00) In section 4.2, made it clearer that options are identified by the full 8-bit Option Type, not by the low-order 5 bits of an Option Type. Also specified that the same Option Type numbering space is used for both Hop-by-Hop Options and Destination Options headers.

00)在第4.2节中,更清楚地说明了选项由完整的8位选项类型标识,而不是由选项类型的低阶5位标识。还指定相同的选项类型编号空间用于逐跳选项和目标选项标题。

00) In section 4.4, added a sentence requiring that nodes processing a Routing header must send an ICMP Packet Too Big message in response to a packet that is too big to fit in the next hop link (rather than, say, performing fragmentation).

00)在第4.4节中,添加了一句话,要求处理路由报头的节点必须发送一个ICMP数据包过大消息,以响应一个数据包过大而无法放入下一跳链路(而不是执行分段)。

00) Changed the name of the IPv6 Priority field to "Class", and replaced the previous description of Priority in section 7 with a description of the Class field. Also, excluded this field from the set of fields that must remain the same for all packets in the same flow, as specified in section 6.

00)将IPv6优先级字段的名称更改为“类别”,并将第7节中先前的优先级描述替换为类别字段的描述。此外,根据第6节的规定,将此字段从必须对同一流中的所有数据包保持相同的字段集中排除。

00) In the pseudo-header in section 8.1, changed the name of the "Payload Length" field to "Upper-Layer Packet Length". Also clarified that, in the case of protocols that carry their own length info (like non-jumbogram UDP), it is the upper-layer-derived length, not the IP-layer-derived length, that is used in the pseudo-header.

00)在第8.1节的伪报头中,将“有效负载长度”字段的名称更改为“上层数据包长度”。还阐明,对于携带自身长度信息的协议(如非jumbogram UDP),伪报头中使用的是上层派生长度,而不是IP层派生长度。

00) Added section 8.4, specifying that upper-layer protocols, when responding to a received packet that carried a Routing header, must not include the reverse of the Routing header in the response packet(s) unless the received Routing header was authenticated.

00)增加了第8.4节,规定上层协议在响应带有路由报头的接收数据包时,不得在响应数据包中包含路由报头的反向,除非接收到的路由报头经过身份验证。

00) Fixed some typos and grammatical errors.

00)修复了一些打字错误和语法错误。

00) Authors' contact info updated.

00)更新了作者的联系信息。

        --------------------------------------------------------
        
        --------------------------------------------------------
        

Full Copyright Statement

完整版权声明

Copyright (C) The Internet Society (1998). All Rights Reserved.

版权所有(C)互联网协会(1998年)。版权所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。