Network Working Group                                           E. Rosen
Request for Comments: 3032                                     D. Tappan
Category: Standards Track                                    G. Fedorkow
                                                     Cisco Systems, Inc.
                                                              Y. Rekhter
                                                        Juniper Networks
                                                            D. Farinacci
                                                                   T. Li
                                                  Procket Networks, Inc.
                                                                A. Conta
                                                  TranSwitch Corporation
                                                            January 2001
        
Network Working Group                                           E. Rosen
Request for Comments: 3032                                     D. Tappan
Category: Standards Track                                    G. Fedorkow
                                                     Cisco Systems, Inc.
                                                              Y. Rekhter
                                                        Juniper Networks
                                                            D. Farinacci
                                                                   T. Li
                                                  Procket Networks, Inc.
                                                                A. Conta
                                                  TranSwitch Corporation
                                                            January 2001
        

MPLS Label Stack Encoding

标签栈编码

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 (2001). All Rights Reserved.

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

Abstract

摘要

"Multi-Protocol Label Switching (MPLS)" [1] requires a set of procedures for augmenting network layer packets with "label stacks", thereby turning them into "labeled packets". Routers which support MPLS are known as "Label Switching Routers", or "LSRs". In order to transmit a labeled packet on a particular data link, an LSR must support an encoding technique which, given a label stack and a network layer packet, produces a labeled packet. This document specifies the encoding to be used by an LSR in order to transmit labeled packets on Point-to-Point Protocol (PPP) data links, on LAN data links, and possibly on other data links as well. On some data links, the label at the top of the stack may be encoded in a different manner, but the techniques described here MUST be used to encode the remainder of the label stack. This document also specifies rules and procedures for processing the various fields of the label stack encoding.

“多协议标签交换(MPLS)”[1]需要一套程序,用“标签堆栈”扩充网络层数据包,从而将它们转换为“标签数据包”。支持MPLS的路由器称为“标签交换路由器”或“LSR”。为了在特定数据链路上传输带标签的数据包,LSR必须支持一种编码技术,该技术在给定标签堆栈和网络层数据包的情况下,产生带标签的数据包。本文件规定了LSR使用的编码,以便在点对点协议(PPP)数据链路、LAN数据链路以及可能的其他数据链路上传输带标签的数据包。在某些数据链路上,堆栈顶部的标签可能以不同的方式进行编码,但必须使用此处描述的技术对标签堆栈的其余部分进行编码。本文档还规定了处理标签堆栈编码各个字段的规则和过程。

Table of Contents

目录

    1      Introduction  ...........................................  2
    1.1    Specification of Requirements  ..........................  3
    2      The Label Stack  ........................................  3
    2.1    Encoding the Label Stack  ...............................  3
    2.2    Determining the Network Layer Protocol  .................  5
    2.3    Generating ICMP Messages for Labeled IP Packets  ........  6
    2.3.1  Tunneling through a Transit Routing Domain  .............  7
    2.3.2  Tunneling Private Addresses through a Public Backbone  ..  7
    2.4    Processing the Time to Live Field  ......................  8
    2.4.1  Definitions  ............................................  8
    2.4.2  Protocol-independent rules  .............................  8
    2.4.3  IP-dependent rules  .....................................  9
    2.4.4  Translating Between Different Encapsulations  ...........  9
    3      Fragmentation and Path MTU Discovery  ................... 10
    3.1    Terminology  ............................................ 11
    3.2    Maximum Initially Labeled IP Datagram Size  ............. 12
    3.3    When are Labeled IP Datagrams Too Big?  ................. 13
    3.4    Processing Labeled IPv4 Datagrams which are Too Big  .... 13
    3.5    Processing Labeled IPv6 Datagrams which are Too Big  .... 14
    3.6    Implications with respect to Path MTU Discovery  ........ 15
    4      Transporting Labeled Packets over PPP  .................. 16
    4.1    Introduction  ........................................... 16
    4.2    A PPP Network Control Protocol for MPLS  ................ 17
    4.3    Sending Labeled Packets  ................................ 18
    4.4    Label Switching Control Protocol Configuration Options  . 18
    5      Transporting Labeled Packets over LAN Media  ............ 18
    6      IANA Considerations  .................................... 19
    7      Security Considerations  ................................ 19
    8      Intellectual Property  .................................. 19
    9      Authors' Addresses  ..................................... 20
   10      References  ............................................. 22
   11      Full Copyright Statement  ............................... 23
        
    1      Introduction  ...........................................  2
    1.1    Specification of Requirements  ..........................  3
    2      The Label Stack  ........................................  3
    2.1    Encoding the Label Stack  ...............................  3
    2.2    Determining the Network Layer Protocol  .................  5
    2.3    Generating ICMP Messages for Labeled IP Packets  ........  6
    2.3.1  Tunneling through a Transit Routing Domain  .............  7
    2.3.2  Tunneling Private Addresses through a Public Backbone  ..  7
    2.4    Processing the Time to Live Field  ......................  8
    2.4.1  Definitions  ............................................  8
    2.4.2  Protocol-independent rules  .............................  8
    2.4.3  IP-dependent rules  .....................................  9
    2.4.4  Translating Between Different Encapsulations  ...........  9
    3      Fragmentation and Path MTU Discovery  ................... 10
    3.1    Terminology  ............................................ 11
    3.2    Maximum Initially Labeled IP Datagram Size  ............. 12
    3.3    When are Labeled IP Datagrams Too Big?  ................. 13
    3.4    Processing Labeled IPv4 Datagrams which are Too Big  .... 13
    3.5    Processing Labeled IPv6 Datagrams which are Too Big  .... 14
    3.6    Implications with respect to Path MTU Discovery  ........ 15
    4      Transporting Labeled Packets over PPP  .................. 16
    4.1    Introduction  ........................................... 16
    4.2    A PPP Network Control Protocol for MPLS  ................ 17
    4.3    Sending Labeled Packets  ................................ 18
    4.4    Label Switching Control Protocol Configuration Options  . 18
    5      Transporting Labeled Packets over LAN Media  ............ 18
    6      IANA Considerations  .................................... 19
    7      Security Considerations  ................................ 19
    8      Intellectual Property  .................................. 19
    9      Authors' Addresses  ..................................... 20
   10      References  ............................................. 22
   11      Full Copyright Statement  ............................... 23
        
1. Introduction
1. 介绍

"Multi-Protocol Label Switching (MPLS)" [1] requires a set of procedures for augmenting network layer packets with "label stacks", thereby turning them into "labeled packets". Routers which support MPLS are known as "Label Switching Routers", or "LSRs". In order to transmit a labeled packet on a particular data link, an LSR must support an encoding technique which, given a label stack and a network layer packet, produces a labeled packet.

“多协议标签交换(MPLS)”[1]需要一套程序,用“标签堆栈”扩充网络层数据包,从而将它们转换为“标签数据包”。支持MPLS的路由器称为“标签交换路由器”或“LSR”。为了在特定数据链路上传输带标签的数据包,LSR必须支持一种编码技术,该技术在给定标签堆栈和网络层数据包的情况下,产生带标签的数据包。

This document specifies the encoding to be used by an LSR in order to transmit labeled packets on PPP data links and on LAN data links. The specified encoding may also be useful for other data links as well.

本文件规定了LSR使用的编码,以便在PPP数据链路和LAN数据链路上传输带标签的数据包。指定的编码也可能对其他数据链路有用。

This document also specifies rules and procedures for processing the various fields of the label stack encoding. Since MPLS is independent of any particular network layer protocol, the majority of such procedures are also protocol-independent. A few, however, do differ for different protocols. In this document, we specify the protocol-independent procedures, and we specify the protocol-dependent procedures for IPv4 and IPv6.

本文档还规定了处理标签堆栈编码各个字段的规则和过程。由于MPLS独立于任何特定的网络层协议,因此大多数此类过程也独立于协议。然而,对于不同的协议,有一些协议是不同的。在本文档中,我们指定了与协议无关的过程,并为IPv4和IPv6指定了与协议相关的过程。

LSRs that are implemented on certain switching devices (such as ATM switches) may use different encoding techniques for encoding the top one or two entries of the label stack. When the label stack has additional entries, however, the encoding technique described in this document MUST be used for the additional label stack entries.

在某些交换设备(例如ATM交换机)上实现的LSR可以使用不同的编码技术来编码标签堆栈的顶部一个或两个条目。但是,当标签堆栈具有附加项时,必须将本文档中描述的编码技术用于附加标签堆栈项。

1.1. Specification of Requirements
1.1. 需求说明

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [2].

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

2. The Label Stack
2. 标签堆栈
2.1. Encoding the Label Stack
2.1. 对标签堆栈进行编码

The label stack is represented as a sequence of "label stack entries". Each label stack entry is represented by 4 octets. This is shown in Figure 1.

标签堆栈表示为一系列“标签堆栈条目”。每个标签堆栈条目由4个八位字节表示。这如图1所示。

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Label
|                Label                  | Exp |S|       TTL     | Stack
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Entry
        
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Label
|                Label                  | Exp |S|       TTL     | Stack
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Entry
        

Label: Label Value, 20 bits Exp: Experimental Use, 3 bits S: Bottom of Stack, 1 bit TTL: Time to Live, 8 bits

标签:标签值,20位Exp:实验使用,3位S:堆栈底部,1位TTL:生存时间,8位

Figure 1

图1

The label stack entries appear AFTER the data link layer headers, but BEFORE any network layer headers. The top of the label stack appears earliest in the packet, and the bottom appears latest. The network layer packet immediately follows the label stack entry which has the S bit set.

标签堆栈条目出现在数据链路层标题之后,但出现在任何网络层标题之前。标签堆栈的顶部在数据包中最早出现,底部最晚出现。网络层数据包紧跟着设置了S位的标签堆栈条目。

Each label stack entry is broken down into the following fields:

每个标签堆栈条目被分解为以下字段:

1. Bottom of Stack (S)

1. 堆栈底部(S)

This bit is set to one for the last entry in the label stack (i.e., for the bottom of the stack), and zero for all other label stack entries.

对于标签堆栈中的最后一个条目(即,对于堆栈的底部),该位设置为1,对于所有其他标签堆栈条目,该位设置为0。

2. Time to Live (TTL)

2. 生存时间(TTL)

This eight-bit field is used to encode a time-to-live value. The processing of this field is described in section 2.4.

此八位字段用于对生存时间值进行编码。第2.4节描述了该字段的处理。

3. Experimental Use

3. 实验用途

This three-bit field is reserved for experimental use.

此三位字段保留供实验使用。

4. Label Value

4. 标签值

This 20-bit field carries the actual value of the Label.

此20位字段携带标签的实际值。

When a labeled packet is received, the label value at the top of the stack is looked up. As a result of a successful lookup one learns:

当接收到带标签的数据包时,将查找堆栈顶部的标签值。通过成功查找,您可以了解:

a) the next hop to which the packet is to be forwarded;

a) 分组要转发到的下一跳;

b) the operation to be performed on the label stack before forwarding; this operation may be to replace the top label stack entry with another, or to pop an entry off the label stack, or to replace the top label stack entry and then to push one or more additional entries on the label stack.

b) 转发前在标签堆栈上执行的操作;此操作可能是将顶部标签堆栈条目替换为另一个条目,或从标签堆栈弹出一个条目,或替换顶部标签堆栈条目,然后在标签堆栈上推送一个或多个附加条目。

In addition to learning the next hop and the label stack operation, one may also learn the outgoing data link encapsulation, and possibly other information which is needed in order to properly forward the packet.

除了学习下一跳和标签堆栈操作之外,还可以学习传出数据链路封装,以及可能需要的其他信息,以便正确地转发分组。

There are several reserved label values:

有几个保留标签值:

i. A value of 0 represents the "IPv4 Explicit NULL Label". This label value is only legal at the bottom of the label stack. It indicates that the label stack must be popped, and the forwarding of the packet must then be based on the IPv4 header.

i. 值0表示“IPv4显式空标签”。此标签值仅在标签堆栈底部合法。它表示必须弹出标签堆栈,然后数据包的转发必须基于IPv4报头。

ii. A value of 1 represents the "Router Alert Label". This label value is legal anywhere in the label stack except at the bottom. When a received packet contains this label value at the top of the label stack, it is delivered to a local software module for processing. The actual forwarding of the packet is determined by the label beneath it in the stack. However, if the packet is forwarded further, the Router Alert Label should be pushed back onto the label stack before forwarding. The use of this label is analogous to the use of the "Router Alert Option" in IP packets [5]. Since this label cannot occur at the bottom of the stack, it is not associated with a particular network layer protocol.

二,。值1表示“路由器警报标签”。此标签值在标签堆栈中除底部以外的任何位置都是合法的。当接收到的数据包在标签堆栈顶部包含此标签值时,它将被传送到本地软件模块进行处理。数据包的实际转发由堆栈中数据包下面的标签决定。但是,如果数据包被进一步转发,则在转发之前,路由器警报标签应该被推回到标签堆栈上。此标签的使用类似于IP数据包中“路由器警报选项”的使用[5]。由于此标签不能出现在堆栈的底部,因此它与特定的网络层协议没有关联。

iii. A value of 2 represents the "IPv6 Explicit NULL Label". This label value is only legal at the bottom of the label stack. It indicates that the label stack must be popped, and the forwarding of the packet must then be based on the IPv6 header.

iii.值2表示“IPv6显式空标签”。此标签值仅在标签堆栈底部合法。它表示必须弹出标签堆栈,然后数据包的转发必须基于IPv6报头。

iv. A value of 3 represents the "Implicit NULL Label". This is a label that an LSR may assign and distribute, but which never actually appears in the encapsulation. When an LSR would otherwise replace the label at the top of the stack with a new label, but the new label is "Implicit NULL", the LSR will pop the stack instead of doing the replacement. Although this value may never appear in the encapsulation, it needs to be specified in the Label Distribution Protocol, so a value is reserved.

iv.值3表示“隐式空标签”。这是一个LSR可以分配和分发的标签,但它实际上从未出现在封装中。如果LSR以其他方式使用新标签替换堆栈顶部的标签,但新标签为“隐式NULL”,则LSR将弹出堆栈,而不是进行替换。尽管此值可能永远不会出现在封装中,但需要在标签分发协议中指定,因此保留一个值。

v. Values 4-15 are reserved.

v. 保留值4-15。

2.2. Determining the Network Layer Protocol
2.2. 确定网络层协议

When the last label is popped from a packet's label stack (resulting in the stack being emptied), further processing of the packet is based on the packet's network layer header. The LSR which pops the last label off the stack must therefore be able to identify the packet's network layer protocol. However, the label stack does not contain any field which explicitly identifies the network layer

当最后一个标签从数据包的标签堆栈弹出时(导致堆栈清空),数据包的进一步处理基于数据包的网络层报头。因此,从堆栈中弹出最后一个标签的LSR必须能够识别数据包的网络层协议。但是,标签堆栈不包含任何明确标识网络层的字段

protocol. This means that the identity of the network layer protocol must be inferable from the value of the label which is popped from the bottom of the stack, possibly along with the contents of the network layer header itself.

协议这意味着网络层协议的标识必须可以从堆栈底部弹出的标签值推断出来,可能还有网络层头本身的内容。

Therefore, when the first label is pushed onto a network layer packet, either the label must be one which is used ONLY for packets of a particular network layer, or the label must be one which is used ONLY for a specified set of network layer protocols, where packets of the specified network layers can be distinguished by inspection of the network layer header. Furthermore, whenever that label is replaced by another label value during a packet's transit, the new value must also be one which meets the same criteria. If these conditions are not met, the LSR which pops the last label off a packet will not be able to identify the packet's network layer protocol.

因此,当第一标签被推到网络层分组上时,标签必须是仅用于特定网络层分组的标签,或者标签必须是仅用于指定网络层协议集的标签,其中,可以通过检查网络层报头来区分指定网络层的分组。此外,每当该标签在数据包传输期间被另一标签值替换时,新值也必须是满足相同标准的值。如果不满足这些条件,则从数据包上弹出最后一个标签的LSR将无法识别数据包的网络层协议。

Adherence to these conditions does not necessarily enable intermediate nodes to identify a packet's network layer protocol. Under ordinary conditions, this is not necessary, but there are error conditions under which it is desirable. For instance, if an intermediate LSR determines that a labeled packet is undeliverable, it may be desirable for that LSR to generate error messages which are specific to the packet's network layer. The only means the intermediate LSR has for identifying the network layer is inspection of the top label and the network layer header. So if intermediate nodes are to be able to generate protocol-specific error messages for labeled packets, all labels in the stack must meet the criteria specified above for labels which appear at the bottom of the stack.

遵守这些条件并不一定能使中间节点识别数据包的网络层协议。在一般情况下,这是不必要的,但在某些错误条件下,这是可取的。例如,如果中间LSR确定标记的分组不可递送,则该LSR可能希望生成特定于分组的网络层的错误消息。中间LSR用于识别网络层的唯一方法是检查顶部标签和网络层标头。因此,如果中间节点要能够为标记的数据包生成特定于协议的错误消息,堆栈中的所有标签必须满足上面为出现在堆栈底部的标签指定的标准。

If a packet cannot be forwarded for some reason (e.g., it exceeds the data link MTU), and either its network layer protocol cannot be identified, or there are no specified protocol-dependent rules for handling the error condition, then the packet MUST be silently discarded.

如果数据包由于某种原因(例如,它超出了数据链路MTU)而无法转发,并且其网络层协议无法识别,或者没有指定的协议相关规则来处理错误情况,则必须以静默方式丢弃该数据包。

2.3. Generating ICMP Messages for Labeled IP Packets
2.3. 为标记的IP数据包生成ICMP消息

Section 2.4 and section 3 discuss situations in which it is desirable to generate ICMP messages for labeled IP packets. In order for a particular LSR to be able to generate an ICMP packet and have that packet sent to the source of the IP packet, two conditions must hold:

第2.4节和第3节讨论了需要为标记的IP数据包生成ICMP消息的情况。为了使特定LSR能够生成ICMP数据包并将该数据包发送到IP数据包的源,必须满足两个条件:

1. it must be possible for that LSR to determine that a particular labeled packet is an IP packet;

1. LSR必须能够确定特定标记的分组是IP分组;

2. it must be possible for that LSR to route to the packet's IP source address.

2. LSR必须能够路由到数据包的IP源地址。

Condition 1 is discussed in section 2.2. The following two subsections discuss condition 2. However, there will be some cases in which condition 2 does not hold at all, and in these cases it will not be possible to generate the ICMP message.

第2.2节讨论了条件1。以下两小节讨论条件2。但是,在某些情况下,条件2根本不成立,在这些情况下,将无法生成ICMP消息。

2.3.1. Tunneling through a Transit Routing Domain
2.3.1. 通过传输路由域的隧道

Suppose one is using MPLS to "tunnel" through a transit routing domain, where the external routes are not leaked into the domain's interior routers. For example, the interior routers may be running OSPF, and may only know how to reach destinations within that OSPF domain. The domain might contain several Autonomous System Border Routers (ASBRs), which talk BGP to each other. However, in this example the routes from BGP are not distributed into OSPF, and the LSRs which are not ASBRs do not run BGP.

假设其中一个使用MPLS通过传输路由域进行“隧道”,其中外部路由不会泄漏到域的内部路由器中。例如,内部路由器可能正在运行OSPF,并且可能只知道如何到达该OSPF域内的目的地。该域可能包含多个自治系统边界路由器(ASBR),这些路由器可以相互通信BGP。然而,在本例中,来自BGP的路由不分布到OSPF中,并且不是ASBR的LSR不运行BGP。

In this example, only an ASBR will know how to route to the source of some arbitrary packet. If an interior router needs to send an ICMP message to the source of an IP packet, it will not know how to route the ICMP message.

在本例中,只有ASBR知道如何路由到某个任意数据包的源。如果内部路由器需要向IP数据包的源发送ICMP消息,它将不知道如何路由ICMP消息。

One solution is to have one or more of the ASBRs inject "default" into the IGP. (N.B.: this does NOT require that there be a "default" carried by BGP.) This would then ensure that any unlabeled packet which must leave the domain (such as an ICMP packet) gets sent to a router which has full routing information. The routers with full routing information will label the packets before sending them back through the transit domain, so the use of default routing within the transit domain does not cause any loops.

一种解决方案是让一个或多个ASBR将“默认”注入IGP。(注意:这并不要求BGP携带“默认值”)这将确保任何必须离开域的未标记数据包(如ICMP数据包)被发送到具有完整路由信息的路由器。具有完整路由信息的路由器将在通过传输域将数据包发送回之前标记数据包,因此在传输域内使用默认路由不会导致任何循环。

This solution only works for packets which have globally unique addresses, and for networks in which all the ASBRs have complete routing information. The next subsection describes a solution which works when these conditions do not hold.

此解决方案仅适用于具有全局唯一地址的数据包,以及所有ASBR具有完整路由信息的网络。下一小节描述了当这些条件不成立时有效的解决方案。

2.3.2. Tunneling Private Addresses through a Public Backbone
2.3.2. 通过公共主干网隧道传输私有地址

In some cases where MPLS is used to tunnel through a routing domain, it may not be possible to route to the source address of a fragmented packet at all. This would be the case, for example, if the IP addresses carried in the packet were private (i.e., not globally unique) addresses, and MPLS were being used to tunnel those packets through a public backbone. Default routing to an ASBR will not work in this environment.

在使用MPLS通过路由域进行隧道的某些情况下,可能根本不可能路由到碎片数据包的源地址。例如,如果包中携带的IP地址是私有(即,不是全局唯一的)地址,并且MPLS正被用于通过公共主干对这些包进行隧道传输,则情况就是这样。到ASBR的默认路由在此环境中不起作用。

In this environment, in order to send an ICMP message to the source of a packet, one can copy the label stack from the original packet to the ICMP message, and then label switch the ICMP message. This will

在此环境中,为了向数据包源发送ICMP消息,可以将标签堆栈从原始数据包复制到ICMP消息,然后对ICMP消息进行标签切换。这将

cause the message to proceed in the direction of the original packet's destination, rather than its source. Unless the message is label switched all the way to the destination host, it will end up, unlabeled, in a router which does know how to route to the source of original packet, at which point the message will be sent in the proper direction.

使消息沿着原始数据包的目的地而不是其源的方向进行。除非消息一直被标签交换到目的主机,否则它将在一个不知道如何路由到原始数据包源的路由器中结束,没有标签,此时消息将以正确的方向发送。

This technique can be very useful if the ICMP message is a "Time Exceeded" message or a "Destination Unreachable because fragmentation needed and DF set" message.

如果ICMP消息是“超时”消息或“由于需要碎片和DF set而无法到达目的地”消息,则此技术非常有用。

When copying the label stack from the original packet to the ICMP message, the label values must be copied exactly, but the TTL values in the label stack should be set to the TTL value that is placed in the IP header of the ICMP message. This TTL value should be long enough to allow the circuitous route that the ICMP message will need to follow.

将标签堆栈从原始数据包复制到ICMP消息时,必须准确复制标签值,但标签堆栈中的TTL值应设置为放置在ICMP消息IP头中的TTL值。此TTL值应足够长,以允许ICMP消息需要遵循的迂回路线。

Note that if a packet's TTL expiration is due to the presence of a routing loop, then if this technique is used, the ICMP message may loop as well. Since an ICMP message is never sent as a result of receiving an ICMP message, and since many implementations throttle the rate at which ICMP messages can be generated, this is not expected to pose a problem.

请注意,如果数据包的TTL过期是由于存在路由循环,那么如果使用此技术,ICMP消息也可能会循环。由于接收ICMP消息时不会发送ICMP消息,而且由于许多实现会限制ICMP消息的生成速率,因此预计这不会造成问题。

2.4. Processing the Time to Live Field
2.4. 处理生存时间字段
2.4.1. Definitions
2.4.1. 定义

The "incoming TTL" of a labeled packet is defined to be the value of the TTL field of the top label stack entry when the packet is received.

标签数据包的“传入TTL”定义为接收数据包时顶部标签堆栈条目的TTL字段的值。

The "outgoing TTL" of a labeled packet is defined to be the larger of:

标记数据包的“传出TTL”定义为以下两者中的较大值:

a) one less than the incoming TTL, b) zero.

a) 比输入TTL小一个,b)零。

2.4.2. Protocol-independent rules
2.4.2. 协议无关规则

If the outgoing TTL of a labeled packet is 0, then the labeled packet MUST NOT be further forwarded; nor may the label stack be stripped off and the packet forwarded as an unlabeled packet. The packet's lifetime in the network is considered to have expired.

如果标记数据包的传出TTL为0,则标记数据包不得进一步转发;也不能剥离标签堆栈,并将数据包作为未标记数据包转发。该数据包在网络中的生存期被视为已过期。

Depending on the label value in the label stack entry, the packet MAY be simply discarded, or it may be passed to the appropriate "ordinary" network layer for error processing (e.g., for the generation of an ICMP error message, see section 2.3).

根据标签堆栈条目中的标签值,可以简单地丢弃数据包,或者将其传递到适当的“普通”网络层进行错误处理(例如,对于ICMP错误消息的生成,请参见第2.3节)。

When a labeled packet is forwarded, the TTL field of the label stack entry at the top of the label stack MUST be set to the outgoing TTL value.

转发带标签的数据包时,标签堆栈顶部标签堆栈项的TTL字段必须设置为传出TTL值。

Note that the outgoing TTL value is a function solely of the incoming TTL value, and is independent of whether any labels are pushed or popped before forwarding. There is no significance to the value of the TTL field in any label stack entry which is not at the top of the stack.

请注意,传出TTL值仅是传入TTL值的函数,与转发前是否推送或弹出任何标签无关。在任何不在堆栈顶部的标签堆栈条目中,TTL字段的值没有意义。

2.4.3. IP-dependent rules
2.4.3. IP相关规则

We define the "IP TTL" field to be the value of the IPv4 TTL field, or the value of the IPv6 Hop Limit field, whichever is applicable.

我们将“IP TTL”字段定义为IPv4 TTL字段的值,或IPv6跃点限制字段的值,以适用的为准。

When an IP packet is first labeled, the TTL field of the label stack entry MUST BE set to the value of the IP TTL field. (If the IP TTL field needs to be decremented, as part of the IP processing, it is assumed that this has already been done.)

首次标记IP数据包时,标签堆栈项的TTL字段必须设置为IP TTL字段的值。(如果作为IP处理的一部分,需要减少IP TTL字段,则假定已完成此操作。)

When a label is popped, and the resulting label stack is empty, then the value of the IP TTL field SHOULD BE replaced with the outgoing TTL value, as defined above. In IPv4 this also requires modification of the IP header checksum.

当弹出标签时,结果标签堆栈为空,则IP TTL字段的值应替换为传出TTL值,如上所述。在IPv4中,这还需要修改IP报头校验和。

It is recognized that there may be situations where a network administration prefers to decrement the IPv4 TTL by one as it traverses an MPLS domain, instead of decrementing the IPv4 TTL by the number of LSP hops within the domain.

可以认识到,可能存在这样的情况,即网络管理在IPv4 TTL穿越MPLS域时倾向于将其递减1,而不是将IPv4 TTL递减域内的LSP跳数。

2.4.4. Translating Between Different Encapsulations
2.4.4. 不同封装之间的转换

Sometimes an LSR may receive a labeled packet over, e.g., a label switching controlled ATM (LC-ATM) interface [9], and may need to send it out over a PPP or LAN link. Then the incoming packet will not be received using the encapsulation specified in this document, but the outgoing packet will be sent using the encapsulation specified in this document.

有时,LSR可能通过标签交换控制的ATM(LC-ATM)接口[9]接收标签数据包,并且可能需要通过PPP或LAN链路将其发送出去。然后,将不会使用本文档中指定的封装接收传入数据包,而是使用本文档中指定的封装发送传出数据包。

In this case, the value of the "incoming TTL" is determined by the procedures used for carrying labeled packets on, e.g., LC-ATM interfaces. TTL processing then proceeds as described above.

在这种情况下,“传入TTL”的值由用于在例如LC-ATM接口上承载标记分组的过程确定。然后,TTL处理如上所述进行。

Sometimes an LSR may receive a labeled packet over a PPP or a LAN link, and may need to send it out, say, an LC-ATM interface. Then the incoming packet will be received using the encapsulation specified in this document, but the outgoing packet will not be sent using the encapsulation specified in this document. In this case, the procedure for carrying the value of the "outgoing TTL" is determined by the procedures used for carrying labeled packets on, e.g., LC-ATM interfaces.

有时,LSR可能通过PPP或LAN链路接收带标签的数据包,并且可能需要将其发送出去,例如,LC-ATM接口。然后,将使用本文档中指定的封装接收传入数据包,但不会使用本文档中指定的封装发送传出数据包。在这种情况下,承载“传出TTL”值的过程由用于在例如LC-ATM接口上承载标记分组的过程确定。

3. Fragmentation and Path MTU Discovery
3. 碎片和路径MTU发现

Just as it is possible to receive an unlabeled IP datagram which is too large to be transmitted on its output link, it is possible to receive a labeled packet which is too large to be transmitted on its output link.

正如可以接收太大而无法在其输出链路上传输的未标记IP数据报一样,也可以接收太大而无法在其输出链路上传输的标记数据包。

It is also possible that a received packet (labeled or unlabeled) which was originally small enough to be transmitted on that link becomes too large by virtue of having one or more additional labels pushed onto its label stack. In label switching, a packet may grow in size if additional labels get pushed on. Thus if one receives a labeled packet with a 1500-byte frame payload, and pushes on an additional label, one needs to forward it as frame with a 1504-byte payload.

由于将一个或多个附加标签推到其标签堆栈上,接收到的数据包(带标签或未带标签)原本小到足以在该链路上传输,也可能变得过大。在标签交换中,如果附加标签被推上,数据包的大小可能会增加。因此,如果接收到一个带有1500字节帧有效载荷的标记数据包,并推送一个额外的标签,则需要将其作为带有1504字节有效载荷的帧转发。

This section specifies the rules for processing labeled packets which are "too large". In particu