Network Working Group K. Kompella Internet-Draft JuniperNetworks, Inc.Networks Obsoletes: 4379, 6829 (if approved) C. Pignataro Intended status: Standards Track N. Kumar Expires:May 22,June 20, 2016 Cisco S. Aldrin Google M. Chen HuaweiNovember 19,December 18, 2015 Detecting Multi-Protocol Label Switched (MPLS) Data Plane Failuresdraft-smack-mpls-rfc4379bis-08draft-smack-mpls-rfc4379bis-09 Abstract This document describes a simple and efficient mechanism that can be used to detect data plane failures in Multi-Protocol Label Switching (MPLS) Label Switched Paths (LSPs). There are two parts to this document: information carried in an MPLS "echo request" and "echo reply" for the purposes of fault detection and isolation, and mechanisms for reliably sending the echo reply. This document obsoletes RFC 4379. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire onMay 22,June 20, 2016. Copyright Notice Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Conventions . . . . . . . . . . . . . . . . . . . . . . . 4 1.2. Structure of This Document . . . . . . . . . . . . . . . 4 1.3. Contributors . . . . . . . . . . . . . . . . . . . . . . 4 1.4. Scope of RFC4379bis work . . . . . . . . . . . . . . . . 5 1.5. ToDo . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2. Motivation . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.1. Use of Address Range 127/8 . . . . . . . . . . . . . . . 6 2.2. Router Alert Option . . . . . . . . . . . . . . . . . . . 8 3. Packet Format . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1. Return Codes . . . . . . . . . . . . . . . . . . . . . . 13 3.2. Target FEC Stack . . . . . . . . . . . . . . . . . . . . 13 3.2.1. LDP IPv4 Prefix . . . . . . . . . . . . . . . . . . . 15 3.2.2. LDP IPv6 Prefix . . . . . . . . . . . . . . . . . . . 15 3.2.3. RSVP IPv4 LSP . . . . . . . . . . . . . . . . . . . . 15 3.2.4. RSVP IPv6 LSP . . . . . . . . . . . . . . . . . . . . 16 3.2.5. VPN IPv4 Prefix . . . . . . . . . . . . . . . . . . . 16 3.2.6. VPN IPv6 Prefix . . . . . . . . . . . . . . . . . . . 17 3.2.7. L2 VPN Endpoint . . . . . . . . . . . . . . . . . . . 18 3.2.8. FEC 128 Pseudowire - IPv4 (Deprecated) . . . . . . . 18 3.2.9. FEC 128 Pseudowire - IPv4 (Current) . . . . . . . . .1918 3.2.10. FEC 129 Pseudowire - IPv4 . . . . . . . . . . . . . .2019 3.2.11. BGP Labeled IPv4 Prefix . . . . . . . . . . . . . . .2120 3.2.12. BGP Labeled IPv6 Prefix . . . . . . . . . . . . . . .2120 3.2.13. Generic IPv4 Prefix . . . . . . . . . . . . . . . . .2221 3.2.14. Generic IPv6 Prefix . . . . . . . . . . . . . . . . .2221 3.2.15. Nil FEC . . . . . . . . . . . . . . . . . . . . . . .2322 3.2.16. FEC 128 Pseudowire - IPv6 . . . . . . . . . . . . . .2322 3.2.17. FEC 129 Pseudowire - IPv6 . . . . . . . . . . . . . .2423 3.3. Downstream Mapping (Deprecated) . . . . . . . . . . . . . 24 3.4. Downstream Detailed Mapping . . . . . . . . .25 3.3.1.. . . . . . 24 3.4.1. Multipath Information Encoding . . . . . . . . . . .28 3.3.2.24 3.4.2. Downstream Router and Interface . . . . . . . . . . .30 3.4.26 3.5. Pad TLV . . . . . . . . . . . . . . . . . . . . . . . . .31 3.5.27 3.6. Vendor Enterprise Number . . . . . . . . . . . . . . . .31 3.6.27 3.7. Interface and Label Stack . . . . . . . . . . . . . . . .32 3.7.27 3.8. Errored TLVs . . . . . . . . . . . . . . . . . . . . . .33 3.8.29 3.9. Reply TOS Byte TLV . . . . . . . . . . . . . . . . . . .3329 4. Theory of Operation . . . . . . . . . . . . . . . . . . . . .3429 4.1. Dealing with Equal-Cost Multi-Path (ECMP) . . . . . . . .3430 4.2. Testing LSPs That Are Used to Carry MPLS Payloads . . . .3531 4.3. Sending an MPLS Echo Request . . . . . . . . . . . . . .3531 4.4. Receiving an MPLS Echo Request . . . . . . . . . . . . .3632 4.4.1. FEC Validation . . . . . . . . . . . . . . . . . . .4238 4.5. Sending an MPLS Echo Reply . . . . . . . . . . . . . . .4339 4.6. Receiving an MPLS Echo Reply . . . . . . . . . . . . . .4440 4.7. Issue with VPN IPv4 and IPv6 Prefixes . . . . . . . . . .4440 4.8. Non-compliant Routers . . . . . . . . . . . . . . . . . .4541 5. Security Considerations . . . . . . . . . . . . . . . . . . .4541 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . .4642 6.1. Message Types, Reply Modes, Return Codes . . . . . . . .4743 6.2. TLVs . . . . . . . . . . . . . . . . . . . . . . . . . .4743 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . .4844 8. References . . . . . . . . . . . . . . . . . . . . . . . . .4945 8.1. Normative References . . . . . . . . . . . . . . . . . .4945 8.2. Informative References . . . . . . . . . . . . . . . . .5046 Appendix A. Deprecated TLVs . . . . . . . . . . . . . . . . . . 47 A.1. FEC 128 Pseudowire . . . . . . . . . . . . . . . . . . . 47 A.2. Downstream Mapping(DSMAP) . . . . . . . . . . . . . . . . 48 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 51 1. Introduction This document describes a simple and efficient mechanism that can be used to detect data plane failures in MPLS Label Switched Paths (LSPs). There are two parts to this document: information carried in an MPLS "echo request" and "echo reply", and mechanisms for transporting the echo reply. The first part aims at providing enough information to check correct operation of the data plane, as well as a mechanism to verify the data plane against the control plane, and thereby localize faults. The second part suggests two methods of reliable reply channels for the echo request message for more robust fault isolation. An important consideration in this design is that MPLS echo requests follow the same data path that normal MPLS packets would traverse. MPLS echo requests are meant primarily to validate the data plane, and secondarily to verify the data plane against the control plane. Mechanisms to check the control plane are valuable, but are not covered in this document. This document makes special use of the address range 127/8. This is an exception to the behavior defined in RFC 1122 [RFC1122] and updates that RFC. The motivation for this change and the details of this exceptional use are discussed in section 2.1 below. 1.1. Conventions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119]. The term "Must Be Zero" (MBZ) is used in object descriptions for reserved fields. These fields MUST be set to zero when sent and ignored on receipt. Terminology pertaining to L2 and L3 Virtual Private Networks (VPNs) is defined in [RFC4026]. Since this document refers to the MPLS Time to Live (TTL) far more frequently than the IP TTL, the authors have chosen the convention of using the unqualified "TTL" to mean "MPLS TTL" and using "IP TTL" for the TTL value in the IP header. 1.2. Structure of This Document The body of this memo contains four main parts: motivation, MPLS echo request/reply packet format, LSP ping operation, and a reliable return path. It is suggested that first-time readers skip the actual packet formats and read the Theory of Operation first; the document is structured the way it is to avoid forward references. 1.3. Contributors A mechanism used to detect data plane failures in Multi-Protocol Label Switching (MPLS) Label Switched Paths (LSPs) was originally published as RFC 4379 in February 2006. It was produced by the MPLS Working Group of the IETF and was jointly authored by Kireeti Kompella and George Swallow. The following made vital contributions to all aspects of the original RFC 4379, and much of the material came out of debate and discussion among this group. Ronald P. Bonica, Juniper Networks, Inc. Dave Cooper, Global Crossing Ping Pan, Hammerhead Systems Nischal Sheth, Juniper Networks, Inc. Sanjay Wadhwa, Juniper Networks, Inc. 1.4. Scope of RFC4379bis work The goal of this document is to take LSP Ping to an Internet Standard. [RFC4379] defines the basic mechanism for MPLS LSP validation that can be used for fault detection and isolation. The scope of this document also is to address various updates to MPLS LSP Ping, including: 1. Updates to all references and citations. Obsoleted RFCs 2434, 2030, and 3036 are respectively replaced with RFCs 5226, 5905, and 5036. Additionally, these three documents published as RFCs: RFCs 4447, 5085, and 4761. 2. Incorporate all outstanding Errata. These include Erratum with IDs: 108, 1418, 1714, 1786, 3399, 742, and 2978. 3. Replace EXP with Traffic Class (TC), based on the update from RFC 5462. 4. Incorporate the updates from RFC 6829, adding the PW FECs advertised over IPv6. 5. Incorporate the updates from RFC 7506, adding IPv6 Router Alert Option for MPLS OAM. 1.5. ToDo This section should be empty, and removed, prior to publication. ToDos: 1. Evaluation of which of the RFCs that updated RFC 4379 need to be incorporated into this 4379bis document. Specifically, these RFCs updated RFC 4379: 6424, 6425, 6426 and 7537. RFCs that updated RFC 4379 and are incorporated into this 4379bis, will be Obsoleted by 4379bis. 2. Review IANA Allocations 2. Motivation When an LSP fails to deliver user traffic, the failure cannot always be detected by the MPLS control plane. There is a need to provide a tool that would enable users to detect such traffic "black holes" or misrouting within a reasonable period of time, and a mechanism to isolate faults. In this document, we describe a mechanism that accomplishes these goals. This mechanism is modeled after the ping/traceroute paradigm: ping (ICMP echo request [RFC0792]) is used for connectivity checks, and traceroute is used for hop-by-hop fault localization as well as path tracing. This document specifies a "ping" mode and a "traceroute" mode for testing MPLS LSPs. The basic idea is to verify that packets that belong to a particular Forwarding Equivalence Class (FEC) actually end their MPLS path on a Label Switching Router (LSR) that is an egress for that FEC. This document proposes that this test be carried out by sending a packet (called an "MPLS echo request") along the same data path as other packets belonging to this FEC. An MPLS echo request also carries information about the FEC whose MPLS path is being verified. This echo request is forwarded just like any other packet belonging to that FEC. In "ping" mode (basic connectivity check), the packet should reach the end of the path, at which point it is sent to the control plane of the egress LSR, which then verifies whether it is indeed an egress for the FEC. In "traceroute" mode (fault isolation), the packet is sent to the control plane of each transit LSR, which performs various checks that it is indeed a transit LSR for this path; this LSR also returns further information that helps check the control plane against the data plane, i.e., that forwarding matches what the routing protocols determined as the path. One way these tools can be used is to periodically ping an FEC to ensure connectivity. If the ping fails, one can then initiate a traceroute to determine where the fault lies. One can also periodically traceroute FECs to verify that forwarding matches the control plane; however, this places a greater burden on transit LSRs and thus should be used with caution. 2.1. Use of Address Range 127/8 As described above, LSP ping is intended as a diagnostic tool. It is intended to enable providers of an MPLS-based service to isolate network faults. In particular, LSP ping needs to diagnose situations where the control and data planes are out of sync. It performs this by routing an MPLS echo request packet based solely on its label stack. That is, the IP destination address is never used in a forwarding decision. In fact, the sender of an MPLS echo request packet may not know, a priori, the address of the router at the end of the LSP. Providers of MPLS-based services also need the ability to trace all of the possible paths that an LSP may take. Since most MPLS services are based on IP unicast forwarding, these paths are subject to equal- cost multi-path (ECMP) load sharing. This leads to the following requirements: 1. Although the LSP in question may be broken in unknown ways, the likelihood of a diagnostic packet being delivered to a user of an MPLS service MUST be held to an absolute minimum. 2. If an LSP is broken in such a way that it prematurely terminates, the diagnostic packet MUST NOT be IP forwarded. 3. A means of varying the diagnostic packets such that they exercise all ECMP paths is thus REQUIRED. Clearly, using general unicast addresses satisfies neither of the first two requirements. A number of other options for addresses were considered, including a portion of the private address space (as determined by the network operator) and the newly designated IPv4 link local addresses. Use of the private address space was deemed ineffective since the leading MPLS-based service is an IPv4 Virtual Private Network (VPN). VPNs often use private addresses. The IPv4 link local addresses are more attractive in that the scope over which they can be forwarded is limited. However, if one were to use an address from this range, it would still be possible for the first recipient of a diagnostic packet that "escaped" from a broken LSP to have that address assigned to the interface on which it arrived and thus could mistakenly receive such a packet. Furthermore, the IPv4 link local address range has only recently been allocated. Many deployed routers would forward a packet with an address from that range toward the default route. The 127/8 range for IPv4 and that same range embedded in as IPv4-mapped IPv6 addresses for IPv6 was chosen for a number of reasons. RFC 1122 allocates the 127/8 as "Internal host loopback address" and states: "Addresses of this form MUST NOT appear outside a host." Thus, the default behavior of hosts is to discard such packets. This helps to ensure that if a diagnostic packet is misdirected to a host, it will be silently discarded. RFC 1812 [RFC1812] states: A router SHOULD NOT forward, except over a loopback interface, any packet that has a destination address on network 127. A router MAY have a switch that allows the network manager to disable these checks. If such a switch is provided, it MUST default to performing the checks. This helps to ensure that diagnostic packets are never IP forwarded. The 127/8 address range provides 16M addresses allowing wide flexibility in varying addresses to exercise ECMP paths. Finally, as an implementation optimization, the 127/8 provides an easy means of identifying possible LSP packets. 2.2. Router Alert Option This document requires the use of the Router Alert Option (RAO) set in IP header in order to have the transit node process the MPLS OAM payload. [RFC2113] defines a generic Option Value 0x0 for IPv4 RAO that alerts transit router to examine the IPv4 packet. [RFC7506] defines MPLS OAM Option Value 69 for IPv6 RAO to alert transit routers to examine the IPv6 packet more closely for MPLS OAM purposes. The use of the Router Alert IP Option in this document is as follows: In case of an IPv4 header, the generic IPv4 RAO value 0x0 [RFC2113] SHOULD be used. In case of an IPv6 header, the IPv6 RAO value (69) for MPLS OAM [RFC7506] MUST be used. 3. Packet Format An MPLS echo request is a (possibly labeled) IPv4 or IPv6 UDP packet; the contents of the UDP packet have the following format: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version Number | Global Flags | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message Type | Reply mode | Return Code | Return Subcode| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sender's Handle | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TimeStamp Sent (seconds) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TimeStamp Sent (seconds fraction) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TimeStamp Received (seconds) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TimeStamp Received (seconds fraction) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TLVs ... | . . . . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Version Number is currently 1. (Note: the version number is to be incremented whenever a change is made that affects the ability of an implementation to correctly parse or process an MPLS echo request/ reply. These changes include any syntactic or semantic changes made to any of the fixed fields, or to any Type-Length-Value (TLV) or sub- TLV assignment or format that is defined at a certain version number. The version number may not need to be changed if an optional TLV or sub-TLV is added.) The Global Flags field is a bit vector with the following format: 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MBZ |V| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ One flag is defined for now, the V bit; the rest MUST be set to zero when sending and ignored on receipt. The V (Validate FEC Stack) flag is set to 1 if the sender wants the receiver to perform FEC Stack validation; if V is 0, the choice is left to the receiver. The Message Type is one of the following: Value Meaning ----- ------- 1 MPLS echo request 2 MPLS echo reply The Reply Mode can take one of the following values: Value Meaning ----- ------- 1 Do not reply 2 Reply via an IPv4/IPv6 UDP packet 3 Reply via an IPv4/IPv6 UDP packet with Router Alert 4 Reply via application level control channel An MPLS echo request with 1 (Do not reply) in the Reply Mode field may be used for one-way connectivity tests; the receiving router may log gaps in the Sequence Numbers and/or maintain delay/jitter statistics. An MPLS echo request would normally have 2 (Reply via an IPv4/IPv6 UDP packet) in the Reply Mode field. If the normal IP return path is deemed unreliable, one may use 3 (Reply via an IPv4/ IPv6 UDP packet with Router Alert). Note that this requires that all intermediate routers understand and know how to forward MPLS echo replies. The echo reply uses the same IP version number as the received echo request, i.e., an IPv4 encapsulated echo reply is sent in response to an IPv4 encapsulated echo request. Some applications support an IP control channel. One such example is the associated control channel defined in Virtual Circuit Connectivity Verification (VCCV) [RFC5085]. Any application that supports an IP control channel between its control entities may set the Reply Mode to 4 (Reply via application level control channel) to ensure that replies use that same channel. Further definition of this codepoint is application specific and thus beyond the scope of this document. Return Codes and Subcodes are described in the next section. The Sender's Handle is filled in by the sender, and returned unchanged by the receiver in the echo reply (if any). There are no semantics associated with this handle, although a sender may find this useful for matching up requests with replies. The Sequence Number is assigned by the sender of the MPLS echo request and can be (for example) used to detect missed replies. The TimeStamp Sent is the time-of-day (according to the sender's clock) in NTP format [RFC5905] when the MPLS echo request is sent. The TimeStamp Received in an echo reply is the time-of-day (according to the receiver's clock) in NTP format that the corresponding echo request was received. TLVs (Type-Length-Value tuples) have the following format: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Value | . . . . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Types are defined below; Length is the length of the Value field in octets. The Value field depends on the Type; it is zero padded to align to a 4-octet boundary. TLVs may be nested within other TLVs, in which case the nested TLVs are called sub-TLVs. Sub-TLVs have independent types and MUST also be 4-octet aligned. Two examplesfollow. The Label Distribution Protocol (LDP) IPv4 FECof how TLV and sub-TLVhas the following format:length are computed, and of how sub-TLVs are padded to be 4-octet aligned as follows: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type = 1 (LDP IPv4 FEC) | Length = 5 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 prefix | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Prefix Length | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Length for this TLV is 5. A Target FEC Stack TLV that contains an LDP IPv4 FEC sub-TLV and a VPN IPv4 prefix sub-TLV has the following format: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type = 1 (FEC TLV) | Length = 32 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | sub-Type = 1 (LDP IPv4 FEC) | Length = 5 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 prefix | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Prefix Length | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | sub-Type = 6 (VPN IPv4 prefix)| Length = 13 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Route Distinguisher | | (8 octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 prefix | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Prefix Length | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ A description of the Types and Values of the top-level TLVs for LSP ping are given below: Type # Value Field ------ ----------- 1 Target FEC Stack 2 Downstream Mapping 3 Pad 4 Not Assigned 5 Vendor Enterprise Number 6 Not Assigned 7 Interface and Label Stack 8 Not Assigned 9 Errored TLVs 10 Reply TOS Byte Types less than 32768 (i.e., with the high-order bit equal to 0) are mandatory TLVs that MUST either be supported by an implementation or result in the return code of 2 ("One or more of the TLVs was not understood") being sent in the echo response. Types greater than or equal to 32768 (i.e., with the high-order bit equal to 1) are optional TLVs that SHOULD be ignored if the implementation does not understand or support them. 3.1. Return Codes The Return Code is set to zero by the sender. The receiver can set it to one of the values listed below. The notation <RSC> refers to the Return Subcode. This field is filled in with the stack-depth for those codes that specify that. For all other codes, the Return Subcode MUST be set to zero. Value Meaning ----- ------- 0 No return code 1 Malformed echo request received 2 One or more of the TLVs was not understood 3 Replying router is an egress for the FEC at stack- depth <RSC> 4 Replying router has no mapping for the FEC at stack- depth <RSC> 5 Downstream Mapping Mismatch (See Note 1) 6 Upstream Interface Index Unknown (See Note 1) 7 Reserved 8 Label switched at stack-depth <RSC> 9 Label switched but no MPLS forwarding at stack-depth <RSC> 10 Mapping for this FEC is not the given label at stack- depth <RSC> 11 No label entry at stack-depth <RSC> 12 Protocol not associated with interface at FEC stack- depth <RSC> 13 Premature termination of ping due to label stack shrinking to a single label Note 1 The Return Subcode contains the point in the label stack where processing was terminated. If the RSC is 0, no labels were processed. Otherwise the packet would have been label switched at depth RSC. 3.2. Target FEC Stack A Target FEC Stack is a list of sub-TLVs. The number of elements is determined by looking at the sub-TLV length fields. Sub-Type Length Value Field -------- ------ ----------- 1 5 LDP IPv4 prefix 2 17 LDP IPv6 prefix 3 20 RSVP IPv4 LSP 4 56 RSVP IPv6 LSP 5 Not Assigned 6 13 VPN IPv4 prefix 7 25 VPN IPv6 prefix 8 14 L2 VPN endpoint 9 10 "FEC 128" Pseudowire - IPv4 (deprecated) 10 14 "FEC 128" Pseudowire - IPv4 11 16+ "FEC 129" Pseudowire - IPv4 12 5 BGP labeled IPv4 prefix 13 17 BGP labeled IPv6 prefix 14 5 Generic IPv4 prefix 15 17 Generic IPv6 prefix 16 4 Nil FEC 24 38 "FEC 128" Pseudowire - IPv6 25 40+ "FEC 129" Pseudowire - IPv6 Other FEC Types will be defined as needed. Note that this TLV defines a stack of FECs, the first FEC element corresponding to the top of the label stack, etc. An MPLS echo request MUST have a Target FEC Stack that describes the FEC Stack being tested. For example, if an LSR X has an LDP mapping [RFC5036] for 192.168.1.1 (say, label 1001), then to verify that label 1001 does indeed reach an egress LSR that announced this prefix via LDP, X can send an MPLS echo request with an FEC Stack TLV with one FEC in it, namely, of type LDP IPv4 prefix, with prefix 192.168.1.1/32, and send the echo request with a label of 1001. Say LSR X wanted to verify that a label stack of <1001, 23456> is the right label stack to use to reach a VPN IPv4 prefix [seesectionSection 3.2.5] of 10/8 in VPN foo. Say further that LSR Y with loopback address 192.168.1.1 announced prefix 10/8 with Route Distinguisher RD-foo-Y (which may in general be different from the Route Distinguisher that LSR X uses in its own advertisements for VPN foo), label 23456 and BGP next hop 192.168.1.1 [RFC4271]. Finally, suppose that LSR X receives a label binding of 1001 for 192.168.1.1 via LDP. X has two choices in sending an MPLS echo request: X can send an MPLS echo request with an FEC Stack TLV with a single FEC of type VPN IPv4 prefix with a prefix of 10/8 and a Route Distinguisher of RD-foo-Y. Alternatively, X can send an FEC Stack TLV with two FECs, the first of type LDP IPv4 with a prefix of 192.168.1.1/32 and the second of type of IP VPN with a prefix 10/8 with Route Distinguisher ofRD-foo- Y.RD-foo-Y. In either case, the MPLS echo request would have a label stack of <1001, 23456>. (Note: in this example, 1001 is the "outer" label and 23456 is the "inner" label.) 3.2.1. LDP IPv4 Prefix The IPv4 Prefix FEC is defined in [RFC5036]. When an LDP IPv4 prefix is encoded in a label stack, the following format is used. The value consists of 4 octets of an IPv4 prefix followed by 1 octet of prefix length in bits; the format is given below. The IPv4 prefix is in network byte order; if the prefix is shorter than 32 bits, trailing bits SHOULD be set to zero. See [RFC5036] for an example of a Mapping for an IPv4 FEC. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 prefix | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Prefix Length | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3.2.2. LDP IPv6 Prefix The IPv6 Prefix FEC is defined in [RFC5036]. When an LDP IPv6 prefix is encoded in a label stack, the following format is used. The value consists of 16 octets of an IPv6 prefix followed by 1 octet of prefix length in bits; the format is given below. The IPv6 prefix is in network byte order; if the prefix is shorter than 128 bits, the trailing bits SHOULD be set to zero. See [RFC5036] for an example of a Mapping for an IPv6 FEC. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv6 prefix | | (16 octets) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Prefix Length | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3.2.3. RSVP IPv4 LSP The value has the format below. The value fields are taken from RFC 3209, sections 4.6.1.1 and 4.6.2.1. See [RFC3209]. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 tunnel end point address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Must Be Zero | Tunnel ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Extended Tunnel ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 tunnel sender address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Must Be Zero | LSP ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3.2.4. RSVP IPv6 LSP The value has the format below. The value fields are taken from RFC 3209, sections 4.6.1.2 and 4.6.2.2. See [RFC3209]. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv6 tunnel end point address | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Must Be Zero | Tunnel ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Extended Tunnel ID | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv6 tunnel sender address | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Must Be Zero | LSP ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3.2.5. VPN IPv4 Prefix VPN-IPv4 Network Layer Routing Information (NLRI) is defined in [RFC4365]. This document uses the term VPN IPv4 prefix for a VPN- IPv4 NLRI that has been advertised with an MPLS label in BGP. See [RFC3107]. When a VPN IPv4 prefix is encoded in a label stack, the following format is used. The value field consists of the Route Distinguisher advertised with the VPN IPv4 prefix, the IPv4 prefix (with trailing 0 bits to make 32 bits in all), and a prefix length, as follows: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Route Distinguisher | | (8 octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 prefix | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Prefix Length | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Route Distinguisher (RD) is an 8-octet identifier; it does not contain any inherent information. The purpose of the RD is solely to allow one to create distinct routes to a common IPv4 address prefix. The encoding of the RD is not important here. When matching this field to the local FEC information, it is treated as an opaque value. 3.2.6. VPN IPv6 Prefix VPN-IPv6 Network Layer Routing Information (NLRI) is defined in [RFC4365]. This document uses the term VPN IPv6 prefix for a VPN- IPv6 NLRI that has been advertised with an MPLS label in BGP. See [RFC3107]. When a VPN IPv6 prefix is encoded in a label stack, the following format is used. The value field consists of the Route Distinguisher advertised with the VPN IPv6 prefix, the IPv6 prefix (with trailing 0 bits to make 128 bits in all), and a prefix length, as follows: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Route Distinguisher | | (8 octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv6 prefix | | | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Prefix Length | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Route Distinguisher is identical to the VPN IPv4 Prefix RD, except that it functions here to allow the creation of distinct routes to IPv6 prefixes. SeesectionSection 3.2.5. When matching this field to local FEC information, it is treated as an opaque value. 3.2.7. L2 VPN Endpoint VPLS stands for Virtual Private LAN Service. The terms VPLS BGP NLRI and VE ID (VPLS Edge Identifier) are defined in [RFC4761]. This document uses the simpler term L2 VPN endpoint when referring to a VPLS BGP NLRI. The Route Distinguisher is an 8-octet identifier used to distinguish information about various L2 VPNs advertised by a node. The VE ID is a 2-octet identifier used to identify a particular node that serves as the service attachment point within a VPLS. The structure of these two identifiers is unimportant here; when matching these fields to local FEC information, they are treated as opaque values. The encapsulation type is identical to the PW Type in section 3.2.8 below. When an L2 VPN endpoint is encoded in a label stack, the following format is used. The value field consists of a Route Distinguisher (8 octets), the sender (of the ping)'s VE ID (2 octets), the receiver's VE ID (2 octets), and an encapsulation type (2 octets), formatted as follows: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Route Distinguisher | | (8 octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sender's VE ID | Receiver's VE ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Encapsulation Type | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3.2.8. FEC 128 Pseudowire - IPv4 (Deprecated) See Appendix A.1 for details 3.2.9. FEC 128 Pseudowire - IPv4 (Current) FEC 128 (0x80) is defined in [RFC4447], as are the terms PW ID (Pseudowire ID) and PW Type (Pseudowire Type). A PW ID is a non-zero 32-bit connection ID. The PW Type is a 15-bit number indicating the encapsulation type. It is carried right justified in the field below termed encapsulation type with the high-order bit set to zero. Both of these fields are treated in this protocol as opaque values. When matching these field to the local FEC information, the match MUST be exact. When an FEC 128 is encoded in a label stack, the following format is used. The value field consists of the sender's PE IPv4 address (the source address of the targeted LDP session), the remote PE IPv4 address (the destination address of the targeted LDP session), the PW ID, and the encapsulation type as follows: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sender's PE IPv4 Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Remote PE IPv4 Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PW ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PW Type | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+This3.2.10. FECis deprecated and is retained only for backward compatibility. Implementations of LSP ping SHOULD accept129 Pseudowire - IPv4 FEC 129 (0x81) andprocess this TLV, but SHOULD send LSP ping echo requests with the new TLV (see next section), unless explicitly configured to use the old TLV. An LSR receiving this TLV SHOULD use the source IP address of the LSP echo request to infer the sender's PE address. 3.2.9. FEC 128 Pseudowire - IPv4 (Current) FEC 128 (0x80) is defined in [RFC4447], as arethe terms PWID (Pseudowire ID) and PWType, Attachment Group Identifier (AGI), Attachment Group Identifier Type(Pseudowire Type). A PW ID is a non-zero 32-bit connection ID.(AGI Type), Attachment Individual Identifier Type (AII Type), Source Attachment Individual Identifier (SAII), and Target Attachment Individual Identifier (TAII) are defined in [RFC4447]. The PW Type is a 15-bit number indicating the encapsulation type. It is carried right justified in the field belowtermed encapsulation typePW Type with the high-order bit set to zero.Both of theseAll the other fields are treatedin this protocolas opaquevalues. When matchingvalues and copied directly from the FEC 129 format. All of thesefield tovalues together uniquely define thelocalFECinformation,within thematch MUST be exact.scope of the LDP session identified by the source and remote PE IPv4 addresses. When an FEC128129 is encoded in a label stack, the following format is used. Thevalue field consistsLength of this TLV is 16 + AGI length + SAII length + TAII length. Padding is used to make thesender's PE IPv4 address (the source addresstotal length a multiple of 4; thetargeted LDP session), the remote PE IPv4 address (the destination addresslength of thetargeted LDP session), the PW ID, andpadding is not included in theencapsulation type as follows:Length field. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sender's PE IPv4 Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Remote PE IPv4 Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PWIDType | AGI Type | AGI Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ AGI Value ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |PWAII Type |Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3.2.10. FEC 129 Pseudowire - IPv4 FEC 129 (0x81) and the terms PW Type, Attachment Group Identifier (AGI), Attachment Group Identifier Type (AGI Type), Attachment Individual Identifier Type (AII Type), Source Attachment Individual Identifier (SAII), and Target Attachment Individual Identifier (TAII) are defined in [RFC4447]. The PW Type is a 15-bit number indicating the encapsulation type. It is carried right justified in the field below PW Type with the high-order bit set to zero. All the other fields are treated as opaque values and copied directly from the FEC 129 format. All of these values together uniquely define the FEC within the scope of the LDP session identified by the source and remote PE IPv4 addresses. When an FEC 129 is encoded in a label stack, the following format is used. The Length of this TLV is 16 + AGI length + SAII length + TAII length. Padding is used to make the total length a multiple of 4; the length of the padding is not included in the Length field. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sender's PE IPv4 Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Remote PE IPv4 Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PW Type | AGI Type | AGI Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ AGI Value ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AII Type | SAII Length | SAII ValueSAII Length | SAII Value | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ SAII Value (continued) ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AII Type | TAII Length | TAII Value | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ TAII Value (continued) ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TAII (cont.) | 0-3 octets of zero padding | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3.2.11. BGP Labeled IPv4 Prefix BGP labeled IPv4 prefixes are defined in [RFC3107]. When a BGP labeled IPv4 prefix is encoded in a label stack, the following format is used. The value field consists the IPv4 prefix (with trailing 0 bits to make 32 bits in all), and the prefix length, as follows: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 Prefix | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Prefix Length | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3.2.12. BGP Labeled IPv6 Prefix BGP labeled IPv6 prefixes are defined in [RFC3107]. When a BGP labeled IPv6 prefix is encoded in a label stack, the following format is used. The value consists of 16 octets of an IPv6 prefix followed by 1 octet of prefix length in bits; the format is given below. The IPv6 prefix is in network byte order; if the prefix is shorter than 128 bits, the trailing bits SHOULD be set to zero. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv6 prefix | | (16 octets) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Prefix Length | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3.2.13. Generic IPv4 Prefix The value consists of 4 octets of an IPv4 prefix followed by 1 octet of prefix length in bits; the format is given below. The IPv4 prefix is in network byte order; if the prefix is shorter than 32 bits, trailing bits SHOULD be set to zero. This FEC is used if the protocol advertising the label is unknown or may change during the course of the LSP. An example is an inter-AS LSP that may be signaled by LDP in one Autonomous System (AS), by RSVP-TE [RFC3209] in another AS, and by BGP between the ASes, such as is common for inter-AS VPNs. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv4 prefix | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Prefix Length | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3.2.14. Generic IPv6 Prefix The value consists of 16 octets of an IPv6 prefix followed by 1 octet of prefix length in bits; the format is given below. The IPv6 prefix is in network byte order; if the prefix is shorter than 128 bits, the trailing bits SHOULD be set to zero. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPv6 prefix | | (16 octets) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Prefix Length | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3.2.15. Nil FEC At times, labels from the reserved range, e.g., Router Alert and Explicit-null, may be added to the label stack for various diagnostic purposes such as influencing load-balancing. These labels may have no explicit FEC associated with them. The Nil FEC Stack is defined to allow a Target FEC Stack sub-TLV to be added to the Target FEC Stack to account for such labels so that proper validation can still be performed. The Length is 4. Labels are 20-bit values treated as numbers. 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 | MBZ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Label is the actual label value inserted in the label stack; the MBZ fields MUST be zero when sent and ignored on receipt. 3.2.16. FEC 128 Pseudowire - IPv6 The FEC 128 Pseudowire IPv6 sub-TLV has a structure consistent with the FEC 128 Pseudowire IPv4 sub-TLV as described in Section 3.2.9. The value field consists of the Sender's PE IPv6 address (the source address of the targeted LDP session), the remote PE IPv6 address (the destination address of the targeted LDP session), the PW ID, and the encapsulation type as follows: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ Sender's PE IPv6 Address ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ Remote PE IPv6 Address ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PW ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PW Type | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Sender's PE IPv6 Address: The source IP address of the target IPv6 LDP session. 16 octets. Remote PE IPv6 Address: The destination IP address of the target IPv6 LDP session. 16 octets. PW ID: Same as FEC 128 Pseudowire IPv4 in Section 3.2.9. PW Type: Same as FEC 128 Pseudowire IPv4 in Section 3.2.9. 3.2.17. FEC 129 Pseudowire - IPv6 The FEC 129 Pseudowire IPv6 sub-TLV has a structure consistent with the FEC 129 Pseudowire IPv4 sub-TLV as described in Section 3.2.10. When an FEC 129 is encoded in a label stack, the following format is used. The length of this TLV is 40 + AGI (Attachment Group Identifier) length + SAII (Source Attachment Individual Identifier) length + TAII (Target Attachment Individual Identifier) length. Padding is used to make the total length a multiple of 4; the length of the padding is not included in the Length field. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ Sender's PE IPv6 Address ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ Remote PE IPv6 Address ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PW Type | AGI Type | AGI Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ AGI Value ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AII Type | SAII Length | SAII Value | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ SAII Value (continued) ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AII Type | TAII Length | TAII Value | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ TAII Value (continued) ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TAII (cont.) | 0-3 octets of zero padding | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Sender's PE IPv6 Address: The source IP address of the target IPv6 LDP session. 16 octets. Remote PE IPv6 Address: The destination IP address of the target IPv6 LDP session. 16 octets. The other fields are the same as FEC 129 Pseudowire IPv4 in Section 3.2.10. 3.3. Downstream MappingThe(Deprecated) See Appendix A.2 for more details. 3.4. Downstream Detailed MappingobjectThe format of this TLV isa TLV that MAY be included in an echo request message. Only one Downstream Mapping object may appeardefined inan echo request. The presencesection 3.3 ofa Downstream Mapping object is a request[RFC6424] 3.4.1. Multipath Information Encoding The Multipath Information encodes labels or addresses thatDownstream Mapping objects be includedwill exercise this path. The Multipath Information depends on the Multipath Type. The contents of the field are shown in theecho reply. Iftable above. IPv4 addresses are drawn from thereplying router isrange 127/8; IPv6 addresses are drawn from thedestination ofrange 0:0:0:0:0:FFFF:7F00/104. Labels are treated as numbers, i.e., they are right justified in theFEC, then a Downstream Mapping TLV SHOULDfield. For Type 4, ranges indicated by Address pairs MUST NOT overlap and MUST beincludedinthe echo reply. Otherwise the replying router SHOULD include a Downstream Mapping object for each interface over which this FEC could be forwarded. Forascending sequence. Type 8 allows a moreprecise definition of the notiondense encoding of"downstream", see section 3.3.2, "Downstream Router and Interface".IP addresses. TheLength is K + M + 4*N octets, where MIP prefix is formatted as a base IP address with theMultipath Length, and Nnon-prefix low-order bits set to zero. The maximum prefix length is 27. Following thenumberprefix is a mask ofDownstream Labels. Valueslength 2^(32-prefix length) bits forK are found in the description of Address Type below.IPv4 and 2^(128-prefix length) bits for IPv6. Each bit set to 1 represents a valid address. TheValue fieldaddress is the base IPv4 address plus the position ofa Downstream Mapping hasthefollowing format:bit in the mask where the bits are numbered left to right beginning with zero. For example, the IPv4 addresses 127.2.1.0, 127.2.1.5-127.2.1.15, and 127.2.1.20-127.2.1.29 would be encoded as follows: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| MTU | Address Type | DS Flags ||0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Downstream IP Address (4 or 16 octets) ||1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Downstream Interface Address (4 or 16 octets) |Those same addresses embedded in IPv6 would be encoded as follows: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Multipath Type| Depth Limit | Multipath Length ||0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+. . . (Multipath Information) . . .|0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Downstream Label | Protocol ||0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+. . . . . .|0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Downstream Label | Protocol ||1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Maximum Transmission Unit (MTU)Type 9 allows a more dense encoding of labels. TheMTUlabel prefix isthe size in octets of the largest MPLS frame (includingformatted as a base labelstack) that fits onvalue with theinterfacenon-prefix low-order bits set tothe Downstream LSR. Address Typezero. TheAddress Type indicates if the interfacemaximum prefix (including leading zeros due to encoding) length isnumbered or unnumbered. It also determines27. Following thelengthprefix is a mask ofthe Downstream IP Address and Downstream Interface fields.length 2^(32-prefix length) bits. Each bit set to one represents a valid label. Theresulting total forlabel is theinitial partbase label plus the position of theTLV is listedbit in thetable below as "K Octets". The Address Type is setmask where the bits are numbered left tooneright beginning with zero. Label values of all thefollowing values: Type # Address Type K Octets ------ ------------ --------odd numbers between 1152 and 1279 would be encoded as follows: 0 1 2 3 0 1IPv4 Numbered 162IPv4 Unnumbered 163IPv6 Numbered 404IPv6 Unnumbered 28 DS Flags The DS Flags field is a bit vector with the following format:5 6 7 8 9 0 1 2 3 4 5 6 7+-+-+-+-+-+-+-+-+ | Rsvd(MBZ) |I|N| +-+-+-+-+-+-+-+-+ Two flags are defined currently, I8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ If the received Multipath Information is non-null, the labels andN. The remaining flagsIP addresses MUST be picked from the setto zero when sending and ignored on receipt. Flag Name and Meaning ---- ---------------- I Interface and Label Stack Object Request When this flag is set, it indicates that the replying router SHOULD include an Interface and Label Stack Object in the echo reply message. N Treat as a Non-IP Packet Echo request messages will be used to diagnose non-IP flows. However,provided. If none of thesemessages are carried in IP packets. For a router that alters its ECMP algorithm based on the FEClabels ordeep packet examination, this flag requests that the router treat this as it would if the determination of an IP payload had failed. Downstream IP Address and Downstream Interface Address IPv4 addresses and interface indices are encoded in 4 octets; IPv6addressesare encoded in 16 octets. If the interfacemap tothea particular downstreamLSR is numbered,interface, then for that interface, theAddress Typetype MUST be set toIPv40. If the received Multipath Information is null (i.e., Multipath Length = 0, orIPv6,for Types 8 and 9, a mask of all zeros), theDownstream IP Addresstype MUST be set toeither the0. For example, suppose LSR X at hop 10 has two downstreamLSR's Router ID orLSRs, Y and Z, for theinterface addressFEC in question. The received X could return Multipath Type 4, with low/high IP addresses ofthe127.1.1.1->127.1.1.255 for downstreamLSR,LSR Y andthe Downstream Interface Address MUST be set to the127.2.1.1->127.2.1.255 for downstreamLSR's interface address. If the interfaceLSR Z. The head end reflects this information tothe downstreamLSRis unnumbered, the Address Type MUST be IPv4 Unnumbered or IPv6 Unnumbered, the Downstream IP Address MUST be theY. Y, which has three downstreamLSR's Router ID,LSRs, U, V, andthe Downstream Interface Address MUST be setW, computes that 127.1.1.1->127.1.1.127 would go tothe index assigned by the upstream LSRU and 127.1.1.128-> 127.1.1.255 would go tothe interface. If an LSR does not know the IP address of its neighbor,V. Y would thenit MUST set the Address Type to either IPv4 Unnumbered or IPv6 Unnumbered. For IPv4, it must set the Downstream IP Addressrespond with 3 "Downstream Detailed Mapping" TLVs: to127.0.0.1; for IPv6 the address is setU, with Multipath Type 4 (127.1.1.1->127.1.1.127); to0::1. In both cases, the interface index MUST be setV, with Multipath Type 4 (127.1.1.127->127.1.1.255); and to0. If an LSR receives an Echo Request packetW, witheither of these addresses in the Downstream IP Address field, this indicatesMultipath Type 0. Note thatit MUST bypass interface verification but continue with label validation. Ifcomputing Multipath Information may impose a significant processing burden on theoriginatorreceiver. A receiver MAY thus choose to process a subset ofan Echo Request packet wishesthe received prefixes. The sender, on receiving a reply toobtaina Downstream Detailed Mappinginformation but does not know the expected label stack, then itwith partial information, SHOULDset the Address Type to either IPv4 Unnumbered or IPv6 Unnumbered. For IPv4, it MUST setassume that theDownstream IP Address to 224.0.0.2; for IPv6prefixes missing in theaddress MUST be set to FF02::2. In both cases,reply were skipped by theinterface index MUST be set to 0. If an LSR receives an Echo Request packet with the all-routers multicast address, then this indicates that it MUST bypass both interfacereceiver, andlabel stack validation, but return Downstream Mapping TLVs using theMAY re-request informationprovided. Multipath Typeabout them in a new echo request. Thefollowingencoding of MultipathTypesinformation in scenarios where few LSRs apply Entropy label based load balancing while other LSRs aredefined: Key Type Multipath Information --- ---------------- --------------------- 0 nonon-EL (IP based) load balancing will be defined in a different document. The encoding of multipathEmpty (Multipath Length = 0)information in scenarios where LSR have Layer 2IP address IP addresses 4 IP address range low/high address pairs 8 Bit-masked IP IP address prefix and bit mask address set 9 Bit-masked label set Label prefix and bit mask Type 0 indicates that all packetsECMP over Link Aggregation Group (LAG) interfaces will beforwarded out this one interface. Types 2, 4, 8,defined in different document. 3.4.2. Downstream Router and9 specify that the supplied Multipath Information will serve to exercise this path. Depth LimitInterface TheDepth Limit is applicable only tonotion of "downstream router" and "downstream interface" should be explained. Consider an LSR X. If a packet that was originated with TTL n>1 arrived with outermost labelstackL andis the maximum number of labels considered in the hash; this SHOULDTTL=1 at LSR X, X must besetable tozerocompute which LSRs could receive the packet ifunspecified or unlimited. Multipath Length The length in octets of the Multipath Information. Multipath Information Address or label values encoded according to the Multipath Type. See the next section below for encoding details. Downstream Label(s) The set of labels init was originated with TTL=n+1, over which interface the request would arrive and what label stackas itthose LSRs wouldhave appeared if this router were forwardingsee. (It is outside thepacket throughscope of thisinterface. Any Implicit Null labels are explicitly included. Labels are treated as numbers, i.e., they are right justified in the field. A Downstream Labeldocument to specify how this computation is24 bits, in the same format as an MPLS label minus the TTL field, i.e.,done.) The set of these LSRs/interfaces consists of theMSBitdownstream routers/ interfaces (and their corresponding labels) for X with respect to L. Each pair of downstream router and interface requires a separate Downstream Detailed Mapping to be added to thelabelreply. The case where X isbit 0,theLSBit is bit 19,LSR originating theTraffic Class (TC) bits are bits 20-22, and bit 23echo request is a special case. X needs to figure out what LSRs would receive theS bit.MPLS echo request for a given FEC Stack that X originates with TTL=1. Thereplying router SHOULD fill inset of downstream routers at X may be alternative paths (see theTC and S bits;discussion below on ECMP) or simultaneous paths (e.g., for MPLS multicast). In theLSR receivingformer case, theecho reply MAY chooseMultipath Information is used as a hint toignorethe sender as to how it may influence the choice of thesebits. Protocolalternatives. 3.5. Pad TLV TheProtocol is taken fromvalue part of thefollowing table: Protocol # Signaling Protocol ---------- ------------------ 0 Unknown 1 Static 2 BGP 3 LDP 4 RSVP-TE 3.3.1. Multipath Information Encoding The Multipath Information encodes labels or addresses that will exercise this path.Pad TLV contains a variable number (>= 1) of octets. TheMultipath Information depends onfirst octet takes values from theMultipath Type. The contents offollowing table; all thefieldother octets (if any) areshownignored. The receiver SHOULD verify that the TLV is received in its entirety, but otherwise ignores thetable above. IPv4 addresses are drawncontents of this TLV, apart from therange 127/8; IPv6 addresses are drawnfirst octet. Value Meaning ----- ------- 1 Drop Pad TLV fromthe range 0:0:0:0:0:FFFF:7F00/104. Labels are treated as numbers, i.e., theyreply 2 Copy Pad TLV to reply 3-255 Reserved for future use 3.6. Vendor Enterprise Number SMI Private Enterprise Numbers areright justified in the field. For Type 4, ranges indicatedmaintained byAddress pairs MUST NOT overlap and MUST be in ascending sequence. Type 8 allows a more dense encoding of IP addresses.IANA. TheIP prefixLength isformatted as a base IP address withalways 4; thenon-prefix low-order bits set to zero. The maximum prefix lengthvalue is27. Followingtheprefix is a maskSMI Private Enterprise code, in network octet order, oflength 2^(32-prefix length) bits for IPv4 and 2^(128-prefix length) bits for IPv6. Each bit set to 1 representsthe vendor with avalid address. The address isVendor Private extension to any of thebase IPv4 address plusfields in thepositionfixed part of thebitmessage, in which case this TLV MUST be present. If none of themask wherefields in thebitsfixed part of the message have Vendor Private extensions, inclusion of this TLV is OPTIONAL. Vendor Private ranges for Message Types, Reply Modes, and Return Codes have been defined. When any of these arenumbered left to right beginning with zero. For example,used, theIPv4 addresses 127.2.1.0, 127.2.1.5-127.2.1.15,Vendor Enterprise Number TLV MUST be included in the message. 3.7. Interface and127.2.1.20-127.2.1.29 wouldLabel Stack The Interface and Label Stack TLV MAY beencodedincluded in a reply message to report the interface on which the request message was received and the label stack that was on the packet when it was received. Only one such object may appear. The purpose of the object is to allow the upstream router to obtain the exact interface and label stack information asfollows:it appears at the replying LSR. The Length is K + 4*N octets; N is the number of labels in the label stack. Values for K are found in the description of Address Type below. The Value field of this TLV has the following format: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0|| Address Type | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0|| IP Address (4 or 16 octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Those same addresses embedded| Interface (4 or 16 octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . . . Label Stack . . . . . . . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Address Type The Address Type indicates if the interface is numbered or unnumbered. It also determines the length of the IP Address and Interface fields. The resulting total for the initial part of the TLV is listed inIPv6 would be encodedthe table below asfollows: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0"K Octets". The Address Type is set to one of the following values: Type # Address Type K Octets ------ ------------ -------- 1 IPv4 Numbered 12 2 IPv4 Unnumbered 12 3 IPv6 Numbered 36 45 6 7 8 9 0 1 2 3IPv6 Unnumbered 24 IP Address and Interface IPv4 addresses and interface indices are encoded in 45 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Type 9 allows a more dense encoding of labels. The label prefixoctets; IPv6 addresses are encoded in 16 octets. If the interface upon which the echo request message was received isformatted as a base label value withnumbered, then thenon-prefix low-order bitsAddress Type MUST be set tozero. The maximum prefix (including leading zeros dueIPv4 or IPv6, the IP Address MUST be set toencoding) length is 27. Followingeither theprefix is a mask of length 2^(32-prefix length) bits. Each bitLSR's Router ID or the interface address, and the Interface MUST be set toone represents a valid label. The labelthe interface address. If the interface is unnumbered, thebase label plusAddress Type MUST be either IPv4 Unnumbered or IPv6 Unnumbered, theposition ofIP Address MUST be thebit inLSR's Router ID, and themask whereInterface MUST be set to thebits are numbered leftindex assigned toright beginning with zero.the interface. LabelvaluesStack The label stack ofalltheodd numbers between 1152 and 1279 wouldreceived echo request message. If any TTL values have been changed by this router, they SHOULD beencoded as follows: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0restored. 3.8. Errored TLVs The following TLV is a TLV that MAY be included in an echo reply to inform the sender of an echo request of mandatory TLVs either not supported by an implementation or parsed and found to be in error. The Value field contains the TLVs that were not understood, encoded as sub-TLVs. 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+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 02 3 4 5 6 7 8 9 0 10 0 0 0 0 0 0|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1|| Type = 9 | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1| Value | . . . . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3.9. Reply TOS Byte TLV This TLV MAY be used by the originator of the echo request to request that an echo reply be sent with the IP header TOS byte set to the value specified in the TLV. This TLV has a length of 4 with the following value field. 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 10 1|+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1|| Reply-TOS Byte| Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+If the received Multipath Information is non-null, the labels and IP addresses MUST be picked from the set provided. If none4. Theory ofthese labels or addresses mapOperation An MPLS echo request is used to test a particulardownstream interface, thenLSP. The LSP to be tested is identified by the "FEC Stack"; forthat interface,example, if thetype MUST beLSP was set up via LDP, and is to0.an egress IP address of 10.1.1.1, the FEC Stack contains a single element, namely, an LDP IPv4 prefix sub-TLV with value 10.1.1.1/32. If thereceived Multipath InformationLSP being tested isnull (i.e., Multipath Length = 0, or for Types 8 and 9, a maskan RSVP LSP, the FEC Stack consists ofall zeros),a single element that captures thetype MUSTRSVP Session and Sender Template that uniquely identifies the LSP. FEC Stacks can beset to 0.more complex. For example,suppose LSR X at hop 10 hasone may wish to test a VPN IPv4 prefix of 10.1/8 that is tunneled over an LDP LSP with egress 10.10.1.1. The FEC Stack would then contain twodownstream LSRs, Ysub-TLVs, the bottom being a VPN IPv4 prefix, andZ, fortheFEC in question. The received Xtop being an LDP IPv4 prefix. If the underlying (LDP) tunnel were not known, or was considered irrelevant, the FEC Stack couldreturn Multipath Type 4,be a single element withlow/high IP addresses of 127.1.1.1->127.1.1.255 for downstream LSR Y and 127.2.1.1->127.2.1.255 for downstream LSR Z. The head end reflects this informationjust the VPN IPv4 sub-TLV. When an MPLS echo request is received, the receiver is expected toLSR Y. Y, which has three downstream LSRs, U, V,verify that the control plane and data plane are both healthy (for the FEC Stack being pinged) andW, computesthat127.1.1.1->127.1.1.127 would go to Uthe two planes are in sync. The procedures for this are in section 4.4 below. 4.1. Dealing with Equal-Cost Multi-Path (ECMP) LSPs need not be simple point-to-point tunnels. Frequently, a single LSP may originate at several ingresses, and127.1.1.128-> 127.1.1.255 would go to V. Y would then respondterminate at several egresses; this is very common with3 Downstream Mappings:LDP LSPs. LSPs for a given FEC may also have multiple "next hops" at transit LSRs. At an ingress, there may also be several different LSPs toU, with Multipath Type 4 (127.1.1.1->127.1.1.127);choose from toV, with Multipath Type 4 (127.1.1.127->127.1.1.255);get to the desired endpoint. Finally, LSPs may have backup paths, detour paths, and other alternative paths toW,take should the primary LSP go down. To deal withMultipath Type 0. Notethe last two first: it is assumed thatcomputing Multipath Information may impose a significant processing burden onthereceiver. A receiver MAY thus choose to process a subset ofLSR sourcing MPLS echo requests can force thereceived prefixes.echo request into any desired LSP, so choosing among multiple LSPs at the ingress is not an issue. Thesender, on receiving a reply to a Downstream Mapping with partial information, SHOULD assume thatproblem of probing theprefixes missing invarious flavors of backup paths that will typically not be used for forwarding data unless thereply were skipped byprimary LSP is down will not be addressed here. Since thereceiver,actual LSP andMAY re-request information about them inpath that anew echo request. 3.3.2. Downstream Router and Interface The notion of "downstream router" and "downstream interface" shouldgiven packet may take may not beexplained. Consider an LSR X. Ifknown apacketpriori, it is useful if MPLS echo requests can exercise all possible paths. This, although desirable, may not be practical, because the algorithms thatwas originated with TTL n>1 arrived with outermost label L and TTL=1 ata given LSRX, X must be ableuses tocompute which LSRs could receive the packet if it was originated with TTL=n+1,distribute packets overwhich interfacealternative paths may be proprietary. To achieve some degree of coverage of alternate paths, there is a certain latitude in choosing therequest would arrivedestination IP address andwhat label stack those LSRs would see. (Itsource UDP port for an MPLS echo request. This isoutsideclearly not sufficient; in thescopecase ofthis document to specify how this computationtraceroute, more latitude isdone.) The setoffered by means ofthese LSRs/interfaces consiststhe Multipath Information of thedownstream routers/ interfaces (and their corresponding labels) for X with respect to L. Each pair of downstream router and interface requires a separateDownstream Detailed Mappingto be added to the reply. The case where XTLV. This istheused as follows. An ingress LSRoriginating the echo request is a special case. X needs to figure out what LSRs would receive theperiodically sends an MPLSecho requesttraceroute message to determine whether there are multipaths for a givenFEC Stack that X originates with TTL=1. The setLSP. If so, each hop will provide some information how each of its downstreamrouters at X may be alternative paths (see the discussion below on ECMP) or simultaneouspaths(e.g., forcan be exercised. The ingress can then send MPLSmulticast). In the former case,echo requests that exercise these paths. If several transit LSRs have ECMP, theMultipath Information isingress may attempt to compose these to exercise all possible paths. However, full coverage may not be possible. 4.2. Testing LSPs That Are Used to Carry MPLS Payloads To detect certain LSP breakages, it may be necessary to encapsulate an MPLS echo request packet with at least one additional label when testing LSPs that are usedas a hinttothe sendercarry MPLS payloads (such as LSPs used tohow itcarry L2VPN and L3VPN traffic. For example, when testing LDP or RSVP-TE LSPs, just sending an MPLS echo request packet mayinfluencenot detect instances where thechoice of these alternatives. 3.4. Pad TLV The value partrouter immediately upstream of thePad TLV contains a variable number (>= 1)destination ofoctets. The first octet takes values fromthefollowing table; allLSP ping may forward theother octets (if any) are ignored. The receiver SHOULD verify thatMPLS echo request successfully over an interface not configured to carry MPLS payloads because of theTLV is received in its entirety, but otherwise ignoresuse of penultimate hop popping. Since thecontentsreceiving router has no means to differentiate whether the IP packet was sent unlabeled or implicitly labeled, the addition ofthis TLV, apart fromlabels shimmed above thefirst octet. Value Meaning ----- ------- 1 Drop Pad TLVMPLS echo request (using the Nil FEC) will prevent a router fromreply 2 Copy Pad TLV to reply 3-255 Reserved for future use 3.5. Vendor Enterprise Number SMI Private Enterprise Numbers are maintained by IANA.forwarding such a packet out unlabeled interfaces. 4.3. Sending an MPLS Echo Request An MPLS echo request is a UDP packet. TheLengthIP header isalways 4;set as follows: thevaluesource IP address isthe SMI Private Enterprise code, in network octet order, of the vendor withaVendor Private extension to anyroutable address of thefields insender; thefixed part ofdestination IP address is a (randomly chosen) IPv4 address from themessage, in which case this TLV MUST be present. If none ofrange 127/8 or IPv6 address from thefields inrange 0:0:0:0:0:FFFF:7F00/104. The IP TTL is set to 1. The source UDP port is chosen by thefixed part ofsender; themessage have Vendor Private extensions, inclusion of this TLVdestination UDP port isOPTIONAL. Vendor Private rangesset to 3503 (assigned by IANA forMessage Types, Reply Modes, and Return Codes have been defined. When anyMPLS echo requests). The Router Alert IP option ofthese are used, the Vendor Enterprise Number TLVvalue 0x0 [RFC2113] for IPv4 or value 69 [RFC7506] for IPv6 MUST beincludedset in IP header. An MPLS echo request is sent with a label stack corresponding to themessage. 3.6. Interface and Label Stack The Interface and LabelFEC StackTLV MAYbeing tested. Note that further labels could beincluded in a reply message to reportapplied if, for example, theinterface on whichnormal route to therequest message was received andtopmost FEC in thelabelstackthat was on the packet when it was received. Only one such object may appear. The purposeis via a Traffic Engineered Tunnel [RFC3209]. If all of theobject is to allowFECs in theupstream routerstack correspond toobtainImplicit Null labels, theexact interface and label stack information as it appears atMPLS echo request is considered unlabeled even if further labels will be applied in sending thereplying LSR. The Lengthpacket. If the echo request isK + 4*N octets; Nlabeled, one MAY (depending on what is being pinged) set thenumberTTL oflabels inthe innermost labelstack. Values for K are found into 1, to prevent thedescription of Address Type below. The Value fieldping request going farther than it should. Examples of where this SHOULD be done include pinging aDownstream Mapping hasVPN IPv4 or IPv6 prefix, an L2 VPN endpoint or a pseudowire. Preventing thefollowing format: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address Type | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IP Address (4 or 16 octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Interface (4 or 16 octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . . . Label Stack . . . . . . . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Address Type The Address Type indicates if the interface is numbered or unnumbered. Itping request from going too far can alsodeterminesbe accomplished by inserting a Router Alert label above this label; however, this may lead to thelength ofundesired side effect that MPLS echo requests take a different data path than actual data. For more information on how these mechanisms can be used for pseudowire connectivity verification, see [RFC5085]. In "ping" mode (end-to-end connectivity check), theIP AddressTTL in the outermost label is set to 255. In "traceroute" mode (fault isolation mode), the TTL is set successively to 1, 2, andInterface fields.so on. Theresulting total forsender chooses a Sender's Handle and a Sequence Number. When sending subsequent MPLS echo requests, theinitial partsender SHOULD increment the Sequence Number by 1. However, a sender MAY choose to send a group of echo requests with theTLVsame Sequence Number to improve the chance of arrival of at least one packet with that Sequence Number. The TimeStamp Sent islistedset to the time-of-day in NTP format that thetable below as "K Octets".echo request is sent. TheAddress TypeTimeStamp Received is set toone of the following values: Type # Address Type K Octets ------ ------------ -------- 1 IPv4 Numbered 12 2 IPv4 Unnumbered 12 3 IPv6 Numbered 36 4 IPv6 Unnumbered 24 IP Address and Interface IPv4 addresses and interface indices are encoded in 4 octets; IPv6 addresses are encoded in 16 octets. If the interface upon which thezero. An MPLS echo requestmessage was received is numbered, then the Address Type MUST be set to IPv4 or IPv6, the IP AddressMUSTbe set to either the LSR's Router ID or the interface address, andhave an FEC Stack TLV. Also, theInterface MUSTReply Mode must be set to theinterface address. If the interface is unnumbered, the Address Type MUST be either IPv4 Unnumbered or IPv6 Unnumbered, the IP Address MUST bedesired reply mode; theLSR's Router ID,Return Code andthe Interface MUST beSubcode are set to zero. In theindex assigned to the interface. Label Stack The label stack of"traceroute" mode, thereceivedecho requestmessage. If any TTL values have been changed by this router, theySHOULDbe restored. 3.7. Errored TLVs The following TLV isinclude aTLV that MAY be included inDownstream Detailed Mapping TLV. 4.4. Receiving anecho reply to inform the sender ofMPLS Echo Request Sending an MPLS echo requestof mandatory TLVs either not supportedto the control plane is triggered byan implementationone of the following packet processing exceptions: Router Alert option, IP TTL expiration, MPLS TTL expiration, MPLS Router Alert label, orparsed and found to bethe destination address inerror. The Value field containstheTLVs that were not understood, encoded as sub-TLVs. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type = 9 | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Value | . . . . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 3.8. Reply TOS Byte TLV This TLV MAY be used127/8 address range. The control plane further identifies it by UDP destination port 3503. For reporting purposes theoriginatorbottom ofthe echo requeststack is considered torequest that an echo replybesent with the IP header TOS byte setstack- depth of 1. This is to establish an absolute reference for thevalue specifiedcase where the actual stack may have more labels than there are FECs in theTLV. This TLV hasTarget FEC Stack. Furthermore, in all the error codes listed in this document, alengthstack- depth of40 means "no value specified". This allows compatibility with existing implementations that do not use thefollowing valueReturn Subcode field.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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reply-TOS Byte| Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 4. Theory of OperationAn LSR X that receives an MPLS echo request then processes it as follows. 1. General packet sanity isused to test a particular LSP. The LSP to be tested is identified by the "FEC Stack"; for example, ifverified. If theLSP was set up via LDP, andpacket isto an egress IP address of 10.1.1.1, the FEC Stack contains a single element, namely,not well- formed, LSR X SHOULD send anLDP IPv4 prefix sub-TLVMPLS Echo Reply withvalue 10.1.1.1/32. If the LSP being tested is an RSVP LSP, the FEC Stack consists of a single element that capturestheRSVP SessionReturn Code set to "Malformed echo request received" andSender Template that uniquely identifiestheLSP. FEC Stacks can be more complex. For example, one may wishSubcode totest a VPN IPv4 prefix of 10.1/8zero. If there are any TLVs not marked as "Ignore" thatis tunneled overLSR X does not understand, LSR X SHOULD send anLDP LSP with egress 10.10.1.1. The FEC Stack would then contain two sub-TLVs, the bottom being a VPN IPv4 prefix,MPLS "TLV not understood" (as appropriate), and thetop beingSubcode set to zero. In the latter case, the misunderstood TLVs (only) are included as sub-TLVs in anLDP IPv4 prefix. IfErrored TLVs TLV in theunderlying (LDP) tunnel werereply. The header fields Sender's Handle, Sequence Number, and Timestamp Sent are notknown, or was considered irrelevant,examined, but are included in theFEC Stack could be a single element with justMPLS echo reply message. The algorithm uses the following variables and identifiers: Interface-I: the interface on which theVPN IPv4 sub-TLV. When anMPLS echo requestis received,was received. Stack-R: thereceiver is expected to verify thatlabel stack on thecontrol plane and data plane are both healthy (forpacket as it was received. Stack-D: theFEC Stack being pinged) and that the two planes arelabel stack carried insync. The procedures for this arethe "Label Stack sub- TLV" insection 4.4 below. 4.1. Dealing with Equal-Cost Multi-Path (ECMP) LSPs need not be simple point-to-point tunnels. Frequently, a single LSP may originate at several ingresses, and terminate at several egresses; this is very common with LDP LSPs. LSPs for a given FEC may also have multiple "next hops" at transit LSRs. At an ingress, there may also be several different LSPs to chooseDownstream Detailed Mapping TLV (not always present) Label-L: the label fromto get tothedesired endpoint. Finally, LSPs may have backup paths, detour paths, and other alternative pathsactual stack currently being examined. Requires no initialization. Label-stack-depth: the depth of label being verified. Initialized totake shouldtheprimary LSP go down. To deal withnumber of labels in thelast two first: it is assumedreceived label stack S. FEC-stack-depth: depth of the FEC in the Target FEC Stack that should be used to verify theLSR sourcing MPLS echo requests can forcecurrent actual label. Requires no initialization. Best-return-code: contains the return code for the echorequest into any desired LSP, so choosing among multiple LSPs atreply packet as currently best known. As theingress is not an issue. The problem of probingalgorithm progresses, this code may change depending on thevarious flavorsresults ofbackup pathsfurther checks thatwill typically not be usedit performs. Best-rtn-subcode: similar to Best-return-code, but forforwarding data unlesstheprimary LSP is down will not be addressed here. SinceEcho Reply Subcode. FEC-status: result value returned by theactual LSP and path that a given packet may take may not be known a priori, it is useful if MPLS echo requests can exercise all possible paths. This, although desirable, may not be practical, becauseFEC Checking algorithm described in section 4.4.1. /* Save receive context information */ 2. If thealgorithms that a givenecho request is good, LSRuses to distribute packetsX stores the interface overalternative paths may be proprietary. To achieve some degree of coverage of alternate paths, there is a certain latitude in choosingwhich thedestination IP address and source UDP port for an MPLSechorequest. This is clearly not sufficient;was received in Interface-I, and thecaselabel stack with which it came in Stack-R. /* The rest oftraceroute, more latitude is offered by meansthe algorithm iterates over the labels in Stack-R, verifies validity of label values, reports associated label switching operations (for traceroute), verifies correspondence between theMultipath InformationStack-R and the Target FEC Stack description in the body of theDownstream Mapping TLV. This is usedecho request, and reports any errors. */ /* The algorithm iterates as follows.An ingress*/ 3. Label Validation: If Label-stack-depth is 0 { /* The LSRperiodically sends an MPLS traceroute messageneeds todetermine whether there are multipaths for a given LSP. If so, each hop will provide some information how each ofreport itsdownstream paths can be exercised. The ingress can then send MPLS echo requests that exercise these paths. If several transit LSRs have ECMP,being a tail-end for theingress may attempt to compose theseLSP */ Set FEC-stack-depth toexercise all possible paths. However, full coverage may not be possible. 4.2. Testing LSPs That Are Used1, set Label-L toCarry MPLS Payloads To detect certain LSP breakages, it may be necessary3 (Implicit Null). Set Best-return-code toencapsulate3 ("Replying router is anMPLS echo request packet withegress for the FEC atleast one additional label when testing LSPs that are used to carry MPLS payloads (such as LSPs usedstack depth"), set Best-rtn-subcode tocarry L2VPN and L3VPN traffic. For example, when testing LDP or RSVP-TE LSPs, just sending an MPLS echo request packet may not detect instances where the router immediately upstream ofthedestinationvalue ofthe LSP ping may forward the MPLS echo request successfully overFEC-stack-depth (1) and go to step 5 (Egress Processing). } /* This step assumes there is always aninterface not configuredentry for well-known label values */ Set Label-L tocarry MPLS payloads because oftheuse of penultimate hop popping. Sincevalue extracted from Stack-R at depth Label- stack-depth. Look up Label-L in thereceiving router has no meansIncoming Label Map (ILM) todifferentiate whether the IP packet was sent unlabeled or implicitly labeled, the addition of labels shimmed above the MPLS echo request (usingdetermine if theNil FEC) will prevent a router from forwarding such a packet out unlabeled interfaces. 4.3. Sendinglabel has been allocated and anMPLS Echo Request An MPLS echo request is a UDP packet. The IP headeroperation isset as follows: the source IP addressassociated with it. If there is no entry for L { /* Indicates aroutable address of the sender;temporary or permanent label synchronization problem thedestination IP address is a (randomly chosen) IPv4 address fromLSR needs to report an error */ Set Best-return-code to 11 ("No label entry at stack-depth") and Best-rtn-subcode to Label-stack-depth. Go to step 7 (Send Reply Packet). } Else { Retrieve therange 127/8 or IPv6 addressassociated label operation from therange 0:0:0:0:0:FFFF:7F00/104. The IP TTL is setcorresponding NHLFE and proceed to1. The source UDP port is chosen by the sender;step 4 (Label Operation check). } 4. Label Operation Check If thedestination UDP portlabel operation isset to 3503 (assigned by IANA for MPLS echo requests). The"Pop and Continue Processing" { /* Includes Explicit Null and Router AlertIP option of value 0x0 [RFC2113] for IPv4 or value 69 [RFC7506] for IPv6 MUST be set in IP header. An MPLS echo request is sent with alabelstack correspondingcases */ Iterate to theFEC Stack being tested. Note that further labels could be applied if, for example, the normal routenext label by decrementing Label-stack-depth and loop back to step 3 (Label Validation). } If thetopmost FEC in the stacklabel operation isvia a Traffic Engineered Tunnel [RFC3209]."Swap or Pop and Switch based on Popped Label" { Set Best-return-code to 8 ("Label switched at stack-depth") and Best-rtn-subcode to Label-stack-depth to report transit switching. Ifall of the FECsa Downstream Detailed Mapping TLV is present in thestack correspond to Implicit Null labels, the MPLSreceived echo requestis considered unlabeled even if further labels will be applied in sending the packet.{ If theecho request is labeled, one MAY (depending on what is being pinged) set the TTL ofIP address in theinnermost label to 1,TLV is 127.0.0.1 or 0::1 { Set Best-return-code toprevent the ping request going farther than it should. Examples of where this6 ("Upstream Interface Index Unknown"). An Interface and Label Stack TLV SHOULD bedone include pinging a VPN IPv4 or IPv6 prefix, an L2 VPN endpoint or a pseudowire. Preventingincluded in theping request from going too far can also be accomplished by inserting a Router Alertreply and filled with Interface-I and Stack-R. } Else { Verify that the IP address, interface address, and labelabove this label; however, this may lead tostack in theundesired side effect that MPLS echo requests takeDownstream Detailed Mapping TLV match Interface-I and Stack-R. If there is adifferent data path than actual data. For more information on how these mechanisms canmismatch, set Best-return-code to 5, "Downstream Mapping Mismatch". An Interface and Label Stack TLV SHOULD beused for pseudowire connectivity verification, see [RFC5085]. In "ping" mode (end-to-end connectivity check),included in theTTLreply and filled in based on Interface-I and Stack-R. Go to step 7 (Send Reply Packet). } } For each available downstream ECMP path { Retrieve output interface from theoutermost labelNHLFE entry. /* Note: this return code is setto 255. In "traceroute" mode (fault isolation mode),even if Label-stack-depth is one */ If theTTLoutput interface isset successivelynot MPLS enabled { Set Best-return-code to1, 2,Return Code 9, "Label switched but no MPLS forwarding at stack-depth" andso on. The sender chooses a Sender's Handleset Best-rtn- subcode to Label-stack-depth and goto Send_Reply_Packet. } If aSequence Number. When sending subsequent MPLS echo requests, the senderDownstream Detailed Mapping TLV is present { A Downstream Detailed Mapping TLV SHOULDincrementbe included in theSequence Number by 1. However, a sender MAY choose to send a group ofechorequestsreply (see Section 3.4) filled in with information about thesame Sequence Number to improvecurrent ECMP path. } } If no Downstream Detailed Mapping TLV is present, or thechance of arrival of at least one packet with that Sequence Number. The TimeStamp SentDownstream IP Address is set to thetime-of-day in NTP format thatALLROUTERS multicast address, go to step 7 (Send Reply Packet). If theecho request is sent. The TimeStamp Received"Validate FEC Stack" flag is not setto zero. An MPLS echo request MUST have an FEC Stack TLV. Also,and theReply Mode must be setLSR is not configured tothe desired reply mode; the Return Code and Subcode are setperform FEC checking by default, go tozero. Instep 7 (Send Reply Packet). /* Validate the"traceroute" mode,Target FEC Stack in the received echorequest SHOULD include arequest. First determine FEC-stack-depth from the Downstream Detailed Mapping TLV.4.4. Receiving an MPLS Echo Request Sending an MPLS echo request to the control planeThis istriggereddone byone ofwalking through Stack-D (the Downstream labels) from thefollowing packet processing exceptions: Router Alert option, IP TTL expiration, MPLS TTL expiration, MPLS Router Alert label, orbottom, decrementing thedestination address innumber of labels for each non-Implicit Null label, while incrementing FEC-stack-depth for each label. If the127/8 address range. The control plane further identifies it by UDP destination port 3503. For reporting purposesDownstream Detailed Mapping TLV contains one or more Implicit Null labels, FEC- stack-depth may be greater than Label-stack-depth. To be consistent with the above stack-depths, the bottomof stackis considered to bestack- depth ofentry 1.This is*/ Set FEC-stack-depth toestablish an absolute reference for the case where0. Set i to Label-stack-depth. While (i > 0 ) do { ++FEC-stack-depth. if Stack-D[FEC-stack-depth] != 3 (Implicit Null) --i. } If theactual stack may have more labels than there arenumber of FECs in theTargetFECStack. Furthermore, in allstack is greater than or equal to FEC-stack-depth { Perform theerror codes listed inFEC Checking procedure (see subsection 4.4.1 below). If FEC-status is 2, set Best-return-code to 10 ("Mapping for thisdocument, a stack- depth of 0 means "no value specified". This allows compatibility with existing implementations that doFEC is notusetheReturn Subcode field. An LSR X that receives an MPLS echo request then processes it as follows. 1. General packet sanity is verified.given label at stack-depth"). If thepacketreturn code isnot well- formed, LSR X SHOULD send an MPLS Echo Reply with the Return Code1, set Best-return-code to"Malformed echo request received"FEC-return- code andthe SubcodeBest-rtn-subcode tozero. If thereFEC-stack-depth. } Go to step 7 (Send Reply Packet). } 5. Egress Processing: /* These steps areany TLVs not marked as "Ignore" thatperformed by the LSRX does not understand,that identified itself as the tail-end LSRX SHOULD sendfor anMPLS "TLV not understood" (as appropriate), and the Subcode set to zero. In the latter case, the misunderstood TLVs (only) are included as sub-TLVs in an Errored TLVs TLV in the reply. The header fields Sender's Handle, Sequence Number, and Timestamp Sent are not examined, but are included in the MPLS echo reply message. The algorithm uses the following variables and identifiers: Interface-I: the interface on which the MPLSLSP. */ If received echo requestwas received. Stack-R: the label stack oncontains no Downstream Detailed Mapping TLV, or thepacket as it was received. Stack-D:Downstream IP Address is set to 127.0.0.1 or 0::1 go to step 6 (Egress FEC Validation). Verify that the IP address, interface address, and label stackcarriedin the Downstream Detailed Mapping TLV(not always present) Label-L: the label from the actual stack currently being examined. Requires no initialization. Label-stack-depth: the depth of label being verified. Initializedmatch Interface-I and Stack-R. If not, set Best-return-code tothe number of labels in the received label stack S. FEC-stack-depth: depth of the FEC in the Target FEC5, "Downstream Mapping Mis-match". A Received Interface and Label Stackthat shouldTLV SHOULD beused to verify the current actual label. Requires no initialization. Best-return-code: contains the return codecreated for the echoreply packet as currently best known. As the algorithm progresses, this code may change depending on the results of further checks that it performs. Best-rtn-subcode: similarresponse packet. Go toBest-return-code, butstep 7 (Send Reply Packet). 6. Egress FEC Validation: /* This is a loop for all entries in theEcho Reply Subcode. FEC-status: result value returnedTarget FEC Stack starting with FEC-stack-depth. */ Perform FEC checking by following theFEC Checkingalgorithm described insection 4.4.1. /* Save receive context information */ 2. If the echo request is good, LSR X stores the interface over which the echo was received in Interface-I,subsection 4.4.1 for Label-L and thelabel stack with which it came in Stack-R. /* The rest of the algorithm iterates over the labels in Stack-R, verifies validity of label values, reports associated label switching operations (for traceroute), verifies correspondence between the Stack-RFEC at FEC-stack-depth. Set Best-return-code to FEC-code and Best-rtn-subcode to theTarget FEC Stack descriptionvalue inthe bodyFEC-stack-depth. If FEC-status (the result of theecho request, and reports any errors. */ /* The algorithm iterates as follows. */ 3. Label Validation: If Label-stack-depthcheck) is0 { /* The LSR needs to report its being a tail-end for the LSP */ Set FEC-stack-depth to1,set Label-Lgo to3 (Implicit Null). Set Best-return-codestep 7 (Send Reply Packet). /* Iterate to3 ("Replying router is an egress forthe next FECat stack depth"), set Best-rtn-subcode toentry */ ++FEC-stack-depth. If FEC-stack-depth > thevaluenumber ofFEC-stack-depth (1) andFECs in the FEC-stack, go to step5 (Egress Processing). } /* This step assumes there7 (Send Reply Packet). If FEC-status isalways an entry for well-known label values */ Set Label-L to0 { ++Label-stack-depth. If Label-stack-depth > thevaluenumber of labels in Stack-R, Go to step 7 (Send Reply Packet). Label-L = extracted label from Stack-R at depthLabel- stack-depth. Look up Label-L in the Incoming Label Map (ILM)Label-stack-depth. Loop back todetermine if the label has been allocated andstep 6 (Egress FEC Validation). } 7. Send Reply Packet: Send anoperation is associatedMPLS echo reply withit. If there is no entrya Return Code of Best-return-code, and a Return Subcode of Best-rtn-subcode. Include any TLVs created during the above process. The procedures forL {sending the echo reply are found in subsection 4.5. 4.4.1. FEC Validation /*Indicates a temporary or permanent label synchronization problemThis subsection describes validation of an FEC entry within theLSR needs to reportTarget FEC Stack and accepts anerrorFEC, Label-L, and Interface-I. The algorithm performs the following steps. */ 1. Two return values, FEC-status and FEC-return-code, are initialized to 0. 2. If the FEC is the Nil FEC { If Label-L is either Explicit_Null or Router_Alert, return. Else { SetBest-return-codeFEC-return-code to11 ("No10 ("Mapping for this FEC is not the given labelentryatstack-depth") and Best-rtn-subcode to Label-stack-depth. Gostack-depth"). Set FEC-status tostep 7 (Send Reply Packet).1 Return. }Else { Retrieve} 3. Check theassociatedFEC labeloperation frommapping that describes how traffic received on thecorresponding NHLFE and proceedLSP is further switched or which application it is associated with. If no mapping exists, set FEC-return-code tostep 4 (Label Operation check). }Return 4, "Replying router has no mapping for the FEC at stack- depth". Set FEC-status to 1. Return. 4.Label Operation CheckIf the labeloperationmapping for FEC is"Pop and Continue Processing" { /* Includes Explicit Null and Router Alert label cases */ IterateImplicit Null, set FEC-status tothe next label by decrementing Label-stack-depth2 andloop backproceed to step3 (Label Validation). } If5. Otherwise, if the labeloperationmapping for FEC is"Swap or Pop and Switch based on Popped Label" { Set Best-return-codeLabel-L, proceed to8 ("Label switchedstep 5. Otherwise, set FEC-return-code to 10 ("Mapping for this FEC is not the given label atstack-depth") and Best-rtn-subcodestack- depth"), set FEC-status toLabel-stack-depth1, and return. 5. This is a protocol check. Check what protocol would be used toreport transit switching.advertise FEC. Ifa Downstream Mapping TLVit can be determined that no protocol associated with Interface-I would have advertised an FEC of that FEC-Type, set FEC-return-code to 12 ("Protocol not associated with interface at FEC stack-depth"). Set FEC-status to 1. 6. Return. 4.5. Sending an MPLS Echo Reply An MPLS echo reply ispresenta UDP packet. It MUST ONLY be sent inthe receivedresponse to an MPLS echorequest { If therequest. The source IP addressinis a routable address of theTLVreplier; the source port is127.0.0.1 or 0::1 { Set Best-return-code to 6 ("Upstream Interface Index Unknown"). An Interface and Label Stack TLV SHOULD be included inthereply and filled with Interface-Iwell-known UDP port for LSP ping. The destination IP address andStack-R. } Else { Verify thatUDP port are copied from the source IPaddress, interface address,address andlabel stack inUDP port of theDownstream Mapping TLV match Interface-I and Stack-R. If thereecho request. The IP TTL isa mismatch,setBest-return-codeto5, "Downstream Mapping Mismatch". An Interface and Label Stack TLV SHOULD be included in255. If thereply and filled in based on Interface-I and Stack-R. Go to step 7 (SendReplyPacket). } } For each available downstream ECMP path { Retrieve output interface fromMode in theNHLFE entry. /* Note:echo request is "Reply via an IPv4 UDP packet with Router Alert", then the IP header MUST contain the Router Alert IP option of value 0x0 [RFC2113] for IPv4 or 69 [RFC7506] for IPv6. If the reply is sent over an LSP, the topmost label MUST in thisreturn codecase be the Router Alert label (1) (see [RFC3032]). The format of the echo reply isset even if Label-stack-depththe same as the echo request. The Sender's Handle, the Sequence Number, and TimeStamp Sent are copied from the echo request; the TimeStamp Received isone */ Ifset to theoutput interfacetime-of- day that the echo request isnot MPLS enabled { Set Best-return-codereceived (note that this information is most useful if the time-of-day clocks on the requester and the replier are synchronized). The FEC Stack TLV from the echo request MAY be copied to the reply. The replier MUST fill in the Return Code9, "Label switched but no MPLS forwarding at stack-depth" and set Best-rtn- subcode to Label-stack-depthandgoto Send_Reply_Packet. }Subcode, as determined in the previous subsection. If the echo request contains aDownstream Mapping TLVPad TLV, the replier MUST interpret the first octet for instructions regarding how to reply. If the replying router ispresent { Athe destination of the FEC, then Downstream Detailed MappingTLVTLVs SHOULD NOT be included in the echoreply (see section 3.3) filled in with information about the current ECMP path. } }reply. Ifnothe echo request contains a Downstream Detailed MappingTLV is present, orTLV, and theDownstream IP Address is set to the ALLROUTERS multicast address, go to step 7 (Send Reply Packet). If the "Validate FEC Stack" flag is not set and the LSRreplying router is notconfigured to perform FEC checking by default, go to step 7 (Send Reply Packet). /* Validate the Target FEC Stack in the received echo request. First determine FEC-stack-depth fromtheDownstream Mapping TLV. This is done by walking through Stack-D (the Downstream labels) fromdestination of thebottom, decrementingFEC, thenumber ofreplier SHOULD compute its downstream routers and corresponding labels foreach non-Implicit Nullthe incoming label,while incrementing FEC-stack- depthand add Downstream Detailed Mapping TLVs for eachlabel.one to the echo reply it sends back. If the Downstream Detailed Mapping TLV containsone orMultipath Information requiring moreImplicit Null labels, FEC-stack-depth may be greaterprocessing thanLabel-stack-depth. To be consistent withtheabove stack-depths, the bottomreceiving router isconsidered to be entry 1. */ Set FEC-stack-depth to 0. Set iwilling toLabel-stack-depth. While (i > 0 ) do { ++FEC-stack-depth. if Stack-D[FEC-stack-depth] != 3 (Implicit Null) --i. } Ifperform, thenumberresponding router MAY choose to respond with only a subset ofFECsmultipaths contained in theFEC stack is greater than or equal to FEC-stack-depth { Performecho request Downstream Detailed Mapping. (Note: The originator of theFEC Checking procedure (see subsection 4.4.1 below). If FEC-status is 2, set Best-return-code to 10 ("Mapping for this FEC isecho request MAY send another echo request with the Multipath Information that was not included in thegiven label at stack-depth"). Ifreply.) Except in thereturn code is 1, set Best-return-code to FEC-return- code and Best-rtn-subcode to FEC-stack-depth. } Go to step 7 (Sendcase of ReplyPacket). } 5. Egress Processing: /* These stepsMode 4, "Reply via application level control channel", echo replies areperformed byalways sent in theLSR that identified itself ascontext of thetail-endIP/MPLS network. 4.6. Receiving an MPLS Echo Reply An LSRforX should only receive anLSP. */ If receivedMPLS echo reply in response to an MPLS echo requestcontains no Downstream Mapping TLV, orthat it sent. Thus, on receipt of an MPLS echo reply, X should parse theDownstream IP Address is setpacket to127.0.0.1 or 0::1 goensure that it is well-formed, then attempt tostep 6 (Egress FEC Validation). Verifymatch up the echo reply with an echo request that it had previously sent, using theIP address, interface address,destination UDP port andlabel stack intheDownstream Mapping TLV match Interface-I and Stack-R.Sender's Handle. Ifnot, set Best-return-codeno match is found, then X jettisons the echo reply; otherwise, it checks the Sequence Number to5, "Downstream Mapping Mis-match". A Received Interfacesee if it matches. If the echo reply contains Downstream Detailed Mappings, andLabel Stack TLVX wishes to traceroute further, it SHOULDbe created forcopy the Downstream Detailed Mapping(s) into its next echoresponse packet. Go to step 7 (Send Reply Packet). 6. Egress FEC Validation: /* Thisrequest(s) (with TTL incremented by one). 4.7. Issue with VPN IPv4 and IPv6 Prefixes Typically, an LSP ping for a VPN IPv4 prefix or VPN IPv6 prefix is sent with aloop for all entries in the Target FEC Stack startinglabel stack of depth greater than 1, withFEC-stack-depth. */ Perform FEC checking by followingthealgorithm described in subsection 4.4.1 for Label-L andinnermost label having a TTL of 1. This is to terminate theFECping atFEC-stack-depth. Set Best-return-code to FEC-code and Best-rtn-subcodethe egress PE, before it gets sent to thevalue in FEC-stack-depth. If FEC-status (the result ofcustomer device. However, under certain circumstances, thecheck) is 1, go to step 7 (Send Reply Packet). /* Iteratelabel stack can shrink to a single label before thenext FEC entry */ ++FEC-stack-depth. If FEC-stack-depth >ping hits thenumber of FECsegress PE; this will result in theFEC-stack, go to step 7 (Send Reply Packet). If FEC-statusping terminating prematurely. One such scenario is0 { ++Label-stack-depth. If Label-stack-depth >a multi-AS Carrier's Carrier VPN. To get around this problem, one approach is for thenumber of labels in Stack-R, GoLSR that receives such a ping tostep 7 (Send Reply Packet). Label-L = extracted label from Stack-R at depth Label-stack-depth. Looprealize that the ping terminated prematurely, and send back error code 13. In that case, the initiating LSR can retry the ping after incrementing the TTL on the VPN label. In this fashion, the ingress LSR will sequentially try TTL values until it finds one that allows the VPN ping tostep 6 (Egress FEC Validation). } 7. Send Reply Packet: Send an MPLS echo reply with a Return Code of Best-return-code, and a Return Subcode of Best-rtn-subcode. Include any TLVs created duringreach theabove process. The proceduresegress PE. 4.8. Non-compliant Routers If the egress forsendingtheecho reply are found in subsection 4.5. 4.4.1. FEC Validation /* This subsection describes validation of an FEC entry within the TargetFEC Stackand accepts an FEC, Label-L, and Interface-I. The algorithm performs the following steps. */ 1. Two return values, FEC-status and FEC-return-code, are initialized to 0. 2. If the FEC is the Nil FEC {being pinged does not support MPLS ping, then no reply will be sent, resulting in possible "false negatives". IfLabel-L is either Explicit_Null or Router_Alert, return. Else { Set FEC-return-code to 10 ("Mapping for this FEC isin "traceroute" mode, a transit LSR does notthe given label at stack-depth"). Set FEC-status to 1 Return. } } 3. Check the FEC label mapping that describes how traffic received on thesupport LSPis further switched or which application it is associated with. If no mapping exists, set FEC-return-code to Return 4, "Replying router hasping, then nomappingreply will be forthcoming from that LSR for some TTL, say, n. The LSR originating theFEC at stack- depth". Set FEC-status to 1. Return. 4. Ifecho request SHOULD try sending thelabel mapping for FEC is Implicit Null, set FEC-status to 2 and proceedecho request with TTL=n+1, n+2, ..., n+k tostep 5. Otherwise, ifprobe LSRs further down thelabel mappingpath. In such a case, the echo request forFEC is Label-L, proceed to step 5. Otherwise,TTL > n SHOULD be sent with Downstream Detailed Mapping TLV "Downstream IP Address" field setFEC-return-codeto10 ("Mapping for this FEC is notthegivenALLROUTERs multicast address until a reply is received with a Downstream Detailed Mapping TLV. The labelat stack- depth"), set FEC-status to 1, and return. 5. This is a protocol check. Check what protocol would be used to advertise FEC. If it canstack TLV MAY bedetermined that no protocol associated with Interface-I would have advertised anomitted from the Downstream Detailed Mapping TLV. Furthermore, the "Validate FECof that FEC-Type,Stack" flag SHOULD NOT be setFEC-return-code to 12 ("Protocol not associated with interface at FEC stack-depth"). Set FEC-status to 1. 6. Return. 4.5. Sendinguntil anMPLS Echo Reply An MPLSecho replyis a UDP packet. It MUST ONLY be sent in response to an MPLS echo request. The source IP address ispacket with aroutable address of the replier; the source portDownstream Detailed Mapping TLV is received. 5. Security Considerations Overall, thewell-known UDP portsecurity needs for LSP ping are similar to those of ICMP ping.The destination IP address and UDP portThere arecopied fromat least three approaches to attacking LSRs using thesource IP addressmechanisms defined here. One is a Denial-of-Service attack, by sending MPLS echo requests/replies to LSRs andUDP portthereby increasing their workload. The second is obfuscating the state of the MPLS data plane liveness by spoofing, hijacking, replaying, or otherwise tampering with MPLS echorequest.requests and replies. TheIP TTLthird issetan unauthorized source using an LSP ping to255. If the Reply Mode inobtain information about theecho requestnetwork. To avoid potential Denial-of-Service attacks, it is"Reply via an IPv4 UDP packet with Router Alert", thenRECOMMENDED that implementations regulate theIP header MUST containLSP ping traffic going to theRouter Alert IP option of value 0x0 [RFC2113] for IPv4 or 69 [RFC7506] for IPv6. Ifcontrol plane. A rate limiter SHOULD be applied to the well-known UDP port defined below. Unsophisticated replay and spoofing attacks involving faking or replaying MPLS echo replyis sent over an LSP, the topmost label MUST in this casemessages are unlikely to be effective. These replies would have to match theRouter Alert label (1) (see [RFC3032]). The formatSender's Handle and Sequence Number ofthean outstanding MPLS echoreply is the samerequest message. A non-matching replay would be discarded as theecho request. The Sender's Handle,sequence has moved on, thus a spoof has only a small window of opportunity. However, to provide a stronger defense, an implementation MAY also validate theSequence Number, andTimeStamp Sentare copied from theby requiring an exact match on this field. To protect against unauthorized sources using MPLS echorequest; the TimeStamp Received is setrequest messages tothe time-of- dayobtain network information, it is RECOMMENDED that implementations provide a means of checking the source addresses of MPLS echo request messages against an access list before accepting the message. It isreceived (note that this information is most usefulnot clear how to prevent hijacking (non-delivery) of echo requests or replies; however, ifthe time-of-day clocks on the requester and the replierthese messages aresynchronized). The FEC Stack TLV fromindeed hijacked, LSP ping will report that theecho request MAY be copieddata plane is not working as it should. It does not seem vital (at this point) to secure thereply. The replier MUST filldata carried inthe Return CodeMPLS echo requests andSubcode, as determined inreplies, although knowledge of theprevious subsection. Ifstate of theecho request containsMPLS data plane may be considered confidential by some. Implementations SHOULD, however, provide aPad TLV, the replier MUST interpret the first octet for instructions regarding how to reply. If the replying router is the destinationmeans of filtering theFEC, then Downstream Mapping TLVs SHOULD NOTaddresses to which echo reply messages may beincludedsent. Although this document makes special use of 127/8 address, these are used only in conjunction with theecho reply. If the echo request containsUDP port 3503. Furthermore, these packets are only processed by routers. All other hosts MUST treat all packets with aDownstream Mapping TLV, anddestination address in thereplyingrange 127/8 in accordance to RFC 1122. Any packet received by a routeris notwith a destination address in the range 127/8 without a destination UDP port ofthe FEC, the replier SHOULD compute its downstream routers and corresponding labels for the incoming label, and add Downstream Mapping TLVs for each one3503 MUST be treated in accordance to RFC 1812. In particular, theecho reply it sends back. If the Downstream Mapping TLV contains Multipath Information requiring more processing than the receiving routerdefault behavior iswillingtoperform, the responding router MAY choosetreat packets destined torespond with onlyasubset of multipaths contained in the127/8 address as "martians". 6. IANA Considerations The TCP and UDP port number 3503 has been allocated by IANA for LSP echorequest Downstream Mapping. (Note:requests and replies. Theoriginator offollowing sections detail theecho request MAY send another echo request with the Multipath Information that was not included innew name spaces to be managed by IANA. For each of these name spaces, thereply.) Except inspace is divided into assignment ranges; thecase of Reply Mode 4, "Reply via application level control channel", echo repliesfollowing terms arealways sentused in describing thecontext of the IP/MPLS network. 4.6. Receiving an MPLS Echo Reply An LSR X should only receive an MPLS echo replyprocedures by which IANA allocates values: "Standards Action" (as defined inresponse to an MPLS echo[RFC5226]), "Specification Required", and "Vendor Private Use". Values from "Specification Required" ranges MUST be registered with IANA. The requestthat it sent. Thus, on receipt ofMUST be made via anMPLS echo reply, X should parse the packet to ensureExperimental RFC thatit is well-formed, then attempt to match updescribes theecho reply with an echo request that it had previously sent,format and procedures for using thedestination UDP port andcode point; theSender's Handle. If no matchactual assignment isfound, then X jettisonsmade during theecho reply; otherwise,IANA actions for the RFC. Values from "Vendor Private" ranges MUST NOT be registered with IANA; however, the message MUST contain an enterprise code as registered with the IANA SMI Private Network Management Private Enterprise Numbers. For each name space that has a Vendor Private range, itchecksmust be specified where exactly theSequenceSMI Private Enterprise Numbertoresides; seeif it matches. Ifbelow for examples. In this way, several enterprises (vendors) can use theecho reply contains Downstream Mappings, and X wishes to traceroute further, it SHOULD copy the Downstream Mapping(s) into its next echo request(s) (with TTL incremented by one). 4.7. Issue with VPN IPv4same code point without fear of collision. 6.1. Message Types, Reply Modes, Return Codes The IANA has created andIPv6 Prefixes Typically, an LSP pingwill maintain registries fora VPN IPv4 prefix or VPN IPv6 prefix is sent with a label stack of depth greater than 1, with the innermost label having a TTLMessage Types, Reply Modes, and Return Codes. Each of1. This is to terminate the ping at the egress PE, before it gets sent to the customer device. However, under certain circumstances, the label stackthese canshrink to a single label before the ping hitstake values in theegress PE; this will resultrange 0-255. Assignments in theping terminating prematurely. One such scenario is a multi-AS Carrier's Carrier VPN. To get around this problem, one approach is forrange 0-191 are via Standards Action; assignments in theLSR that receives such a ping to realize thatrange 192-251 are made via "Specification Required"; values in theping terminated prematurely,range 252-255 are for Vendor Private Use, andsend back error code 13. In that case, the initiating LSR can retry the ping after incrementingMUST NOT be allocated. If any of these fields fall in theTTL onVendor Private range, a top-level Vendor Enterprise Number TLV MUST be present in theVPN label. Inmessage. Message Types defined in thisfashion,document are theingress LSR will sequentially try TTL values until it finds one that allows the VPN ping to reach the egress PE. 4.8. Non-compliant Routers If the egress for the FEC Stack being pinged does not supportfollowing: Value Meaning ----- ------- 1 MPLSping, then noecho request 2 MPLS echo replywill be sent, resulting in possible "false negatives". IfReply Modes defined in"traceroute" mode, a transit LSR doesthis document are the following: Value Meaning ----- ------- 1 Do notsupport LSP ping, then noreplywill be forthcoming from that LSR for some TTL, say, n. The LSR originating the echo request SHOULD try sending the echo request2 Reply via an IPv4/IPv6 UDP packet 3 Reply via an IPv4/IPv6 UDP packet withTTL=n+1, n+2, ..., n+k to probe LSRs further down the path. In suchRouter Alert 4 Reply via application level control channel Return Codes defined in this document are listed in section 3.1. 6.2. TLVs The IANA has created and will maintain acase, the echo requestregistry forTTL > n SHOULD be sent with Downstream Mapping TLV "Downstream IP Address"the Type fieldset toof top-level TLVs as well as for any associated sub-TLVs. Note theALLROUTERs multicast address untilmeaning of areplysub-TLV isreceived with a Downstream Mapping TLV. The label stack MAY be omitted fromscoped by theDownstream MappingTLV.Furthermore, the "Validate FEC Stack" flag SHOULD NOT be set until an echo reply packet with a Downstream Mapping TLV is received. 5. Security Considerations Overall, the security needsThe number spaces forLSP ping are similar to thosethe sub-TLVs ofICMP ping. Therevarious TLVs areat least three approaches to attacking LSRs using the mechanisms defined here. One is a Denial-of-Service attack, by sending MPLS echo requests/replies to LSRs and thereby increasing their workload.independent. Thesecond is obfuscating the state of the MPLS data plane liveness by spoofing, hijacking, replaying, or otherwise tampering with MPLS echo requestsvalid range for TLVs andreplies. The third is an unauthorized source using an LSP ping to obtain information about the network. To avoid potential Denial-of-Service attacks, itsub-TLVs isRECOMMENDED that implementations regulate the LSP ping traffic going to the control plane. A rate limiter SHOULD be applied to0-65535. Assignments in thewell-known UDP port defined below. Unsophisticated replayrange 0-16383 andspoofing attacks involving faking or replaying MPLS echo reply messages32768-49161 areunlikely to be effective. These replies would have to matchmade via Standards Action as defined in [RFC5226]; assignments in theSender's Handlerange 16384-31743 andSequence Number of an outstanding MPLS echo request message. A non-matching replay would be discarded49162-64511 are made via "Specification Required" as defined above; values in thesequence has moved on, thusrange 31744-32767 and 64512-65535 are for Vendor Private Use, and MUST NOT be allocated. If aspoofTLV or sub-TLV hasonlyasmall windowType that falls in the range for Vendor Private Use, the Length MUST be at least 4, and the first four octets MUST be that vendor's SMI Private Enterprise Number, in network octet order. The rest ofopportunity. However,the Value field is private toprovide a stronger defense, an implementation MAY also validatetheTimeStamp Sent by requiring an exact match onvendor. TLVs and sub-TLVs defined in thisfield. To protect against unauthorized sources using MPLS echo request messages to obtain network information, itdocument are the following: Type Sub-Type Value Field ---- -------- ----------- 1 Target FEC Stack 1 LDP IPv4 prefix 2 LDP IPv6 prefix 3 RSVP IPv4 LSP 4 RSVP IPv6 LSP 5 Not Assigned 6 VPN IPv4 prefix 7 VPN IPv6 prefix 8 L2 VPN endpoint 9 "FEC 128" Pseudowire - IPv4 (Deprecated) 10 "FEC 128" Pseudowire - IPv4 11 "FEC 129" Pseudowire - IPv4 12 BGP labeled IPv4 prefix 13 BGP labeled IPv6 prefix 14 Generic IPv4 prefix 15 Generic IPv6 prefix 16 Nil FEC 24 "FEC 128" Pseudowire - IPv6 25 "FEC 129" Pseudowire - IPv6 2 Downstream Mapping 3 Pad 4 Not Assigned 5 Vendor Enterprise Number 6 Not Assigned 7 Interface and Label Stack 8 Not Assigned 9 Errored TLVs Any value The TLV not understood 10 Reply TOS Byte 7. Acknowledgements The original acknowledgements from RFC 4379 state the following: This document isRECOMMENDED that implementations provide a meansthe outcome of many discussions among many people, including Manoj Leelanivas, Paul Traina, Yakov Rekhter, Der-Hwa Gan, Brook Bailey, Eric Rosen, Ina Minei, Shivani Aggarwal, and Vanson Lim. The description ofcheckingthesource addressesMultipath Information sub-field ofMPLS echo request messages against an access list before acceptingthemessage. It is not clear howDownstream Mapping TLV was adapted from text suggested by Curtis Villamizar. We would like toprevent hijacking (non-delivery)thank Loa Andersson for motivating the advancement ofecho requests or replies; however, if these messages are indeed hijacked, LSP ping will report that the data plane is not working as it should. It does not seem vital (atthispoint)bis specification. We also would like tosecure the data carried in MPLS echo requeststhank Alexander Vainshtein, Yimin Shen, Curtis Villamizar, David Allan for their review andreplies, although knowledge of the state of the MPLS data plane may be considered confidential by some. Implementations SHOULD, however, provide a means of filtering the addresses to which echo reply messages may be sent. Although this document makes specialcomments. 8. References 8.1. Normative References [RFC1122] Braden, R., Ed., "Requirements for Internet Hosts - Communication Layers", STD 3, RFC 1122, DOI 10.17487/RFC1122, October 1989, <http://www.rfc-editor.org/info/rfc1122>. [RFC1812] Baker, F., Ed., "Requirements for IP Version 4 Routers", RFC 1812, DOI 10.17487/RFC1812, June 1995, <http://www.rfc-editor.org/info/rfc1812>. [RFC2113] Katz, D., "IP Router Alert Option", RFC 2113, DOI 10.17487/RFC2113, February 1997, <http://www.rfc-editor.org/info/rfc2113>. [RFC2119] Bradner, S., "Key words for useof 127/8 address, these are used only in conjunction with the UDP port 3503. Furthermore, these packets are only processed by routers. All other hosts MUST treat all packets with a destination addressinthe range 127/8 in accordanceRFCs to Indicate Requirement Levels", BCP 14, RFC1122. Any packet received by a router with a destination address in the range 127/8 without a destination UDP port of 3503 MUST be treated in accordance to2119, DOI 10.17487/RFC2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>. [RFC3032] Rosen, E., Tappan, D., Fedorkow, G., Rekhter, Y., Farinacci, D., Li, T., and A. Conta, "MPLS Label Stack Encoding", RFC1812. In particular, the default behavior is to treat packets destined to a 127/8 address as "martians". 6. IANA Considerations The TCP3032, DOI 10.17487/RFC3032, January 2001, <http://www.rfc-editor.org/info/rfc3032>. [RFC4026] Andersson, L. andUDP port number 3503 has been allocated by IANA for LSP echo requestsT. Madsen, "Provider Provisioned Virtual Private Network (VPN) Terminology", RFC 4026, DOI 10.17487/RFC4026, March 2005, <http://www.rfc-editor.org/info/rfc4026>. [RFC4271] Rekhter, Y., Ed., Li, T., Ed., andreplies. The following sections detail the new name spaces to be managed by IANA. For each of these name spaces, the space is divided into assignment ranges; the following terms are used in describing the procedures by which IANA allocates values: "Standards Action" (as defined in [RFC5226]), "Specification Required",S. Hares, Ed., "A Border Gateway Protocol 4 (BGP-4)", RFC 4271, DOI 10.17487/RFC4271, January 2006, <http://www.rfc-editor.org/info/rfc4271>. [RFC4379] Kompella, K. and"Vendor Private Use". Values from "Specification Required" ranges MUST be registered with IANA. The request MUST be made via an ExperimentalG. Swallow, "Detecting Multi-Protocol Label Switched (MPLS) Data Plane Failures", RFCthat describes the format4379, DOI 10.17487/RFC4379, February 2006, <http://www.rfc-editor.org/info/rfc4379>. [RFC5226] Narten, T. andprocedures for using the code point; the actual assignment is made during the IANA actionsH. Alvestrand, "Guidelines forthe RFC. Values from "Vendor Private" ranges MUST NOT be registered with IANA; however, the message MUST containWriting anenterprise code as registered with theIANASMI Private Network Management Private Enterprise Numbers. For each name space that has a Vendor Private range, it must be specified where exactly the SMI Private Enterprise Number resides; see below for examples. In this way, several enterprises (vendors) can use the same code point without fear of collision. 6.1. Message Types, Reply Modes, Return Codes The IANA has createdConsiderations Section in RFCs", BCP 26, RFC 5226, DOI 10.17487/RFC5226, May 2008, <http://www.rfc-editor.org/info/rfc5226>. [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., andwill maintain registriesW. Kasch, "Network Time Protocol Version 4: Protocol and Algorithms Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, <http://www.rfc-editor.org/info/rfc5905>. [RFC6424] Bahadur, N., Kompella, K., and G. Swallow, "Mechanism for Performing Label Switched Path Ping (LSP Ping) over MPLS Tunnels", RFC 6424, DOI 10.17487/RFC6424, November 2011, <http://www.rfc-editor.org/info/rfc6424>. [RFC7506] Raza, K., Akiya, N., and C. Pignataro, "IPv6 Router Alert Option for MPLS Operations, Administration, and Maintenance (OAM)", RFC 7506, DOI 10.17487/RFC7506, April 2015, <http://www.rfc-editor.org/info/rfc7506>. 8.2. Informative References [RFC0792] Postel, J., "Internet Control MessageTypes, Reply Modes,Protocol", STD 5, RFC 792, DOI 10.17487/RFC0792, September 1981, <http://www.rfc-editor.org/info/rfc792>. [RFC3107] Rekhter, Y. andReturn Codes. Each of these can take values in the range 0-255. Assignments in the range 0-191 are via Standards Action; assignments in the range 192-251 are made via "Specification Required"; valuesE. Rosen, "Carrying Label Information inthe range 252-255 areBGP-4", RFC 3107, DOI 10.17487/RFC3107, May 2001, <http://www.rfc-editor.org/info/rfc3107>. [RFC3209] Awduche, D., Berger, L., Gan, D., Li, T., Srinivasan, V., and G. Swallow, "RSVP-TE: Extensions to RSVP forVendorLSP Tunnels", RFC 3209, DOI 10.17487/RFC3209, December 2001, <http://www.rfc-editor.org/info/rfc3209>. [RFC4365] Rosen, E., "Applicability Statement for BGP/MPLS IP Virtual PrivateUse,Networks (VPNs)", RFC 4365, DOI 10.17487/RFC4365, February 2006, <http://www.rfc-editor.org/info/rfc4365>. [RFC4447] Martini, L., Ed., Rosen, E., El-Aawar, N., Smith, T., andMUST NOT be allocated. If any of these fields fall inG. Heron, "Pseudowire Setup and Maintenance Using theVendor Private range, a top-level Vendor Enterprise Number TLV MUST be present in the message. Message TypesLabel Distribution Protocol (LDP)", RFC 4447, DOI 10.17487/RFC4447, April 2006, <http://www.rfc-editor.org/info/rfc4447>. [RFC4761] Kompella, K., Ed. and Y. Rekhter, Ed., "Virtual Private LAN Service (VPLS) Using BGP for Auto-Discovery and Signaling", RFC 4761, DOI 10.17487/RFC4761, January 2007, <http://www.rfc-editor.org/info/rfc4761>. [RFC5036] Andersson, L., Ed., Minei, I., Ed., and B. Thomas, Ed., "LDP Specification", RFC 5036, DOI 10.17487/RFC5036, October 2007, <http://www.rfc-editor.org/info/rfc5036>. [RFC5085] Nadeau, T., Ed. and C. Pignataro, Ed., "Pseudowire Virtual Circuit Connectivity Verification (VCCV): A Control Channel for Pseudowires", RFC 5085, DOI 10.17487/RFC5085, December 2007, <http://www.rfc-editor.org/info/rfc5085>. Appendix A. Deprecated TLVs A.1. FEC 128 Pseudowire FEC 128 (0x80) is defined inthis document[RFC4447], as are thefollowing: Value Meaning ----- ------- 1 MPLS echo request 2 MPLS echo reply Reply Modes definedterms PW ID (Pseudowire ID) and PW Type (Pseudowire Type). A PW ID is a non-zero 32-bit connection ID. The PW Type is a 15-bit number indicating the encapsulation type. It is carried right justified inthis document arethefollowing: Value Meaning ----- ------- 1 Do not reply 2 Reply via an IPv4/IPv6 UDP packet 3 Reply via an IPv4/IPv6 UDP packetfield below termed encapsulation type withRouter Alert 4 Reply via application level control channel Return Codes definedthe high-order bit set to zero. Both of these fields are treated in thisdocument are listedprotocol as opaque values. When an FEC 128 is encoded insection 3.1. 6.2. TLVs The IANA has created and will maintainaregistry forlabel stack, theTypefollowing format is used. The value field consists oftop-level TLVs as well as for any associated sub-TLVs. Notethemeaningremote PE IPv4 address (the destination address ofa sub-TLV is scoped by the TLV. The number spaces forthesub-TLVs of various TLVs are independent. The valid range for TLVs and sub-TLVs is 0-65535. Assignments intargeted LDP session), therange 0-16383PW ID, and32768-49161 are made via Standards Action as defined in [RFC5226]; assignments intherange 16384-31743 and 49162-64511 are made via "Specification Required"encapsulation type asdefined above; values in the range 31744-32767 and 64512-65535 are for Vendor Private Use, and MUST NOT be allocated. If a TLV or sub-TLV has a Type that falls in the range for Vendor Private Use, the Length MUST be at least 4, and the first four octets MUST be that vendor's SMI Private Enterprise Number, in network octet order. The rest of the Value field is private to the vendor. TLVs and sub-TLVs defined in this document are the following: Type Sub-Type Value Field ---- -------- -----------follows: 0 1Target FEC Stack2 3 0 1LDP IPv4 prefix2LDP IPv6 prefix3RSVP IPv4 LSP4RSVP IPv6 LSP5Not Assigned6VPN IPv4 prefix7VPN IPv6 prefix8L2 VPN endpoint9"FEC 128" Pseudowire - IPv4 (Deprecated) 10 "FEC 128" Pseudowire - IPv4 11 "FEC 129" Pseudowire - IPv4 12 BGP labeled IPv4 prefix 13 BGP labeled IPv6 prefix 14 Generic IPv4 prefix 15 Generic IPv6 prefix 16 Nil FEC 24 "FEC 128" Pseudowire - IPv6 25 "FEC 129" Pseudowire - IPv60 1 2Downstream Mapping3Pad4Not Assigned5Vendor Enterprise Number6Not Assigned7Interface and Label Stack8Not Assigned9Errored TLVs Any value The TLV not understood 10 Reply TOS Byte 7. Acknowledgements The original acknowledgements from RFC 4379 state the following:0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Remote PE IPv4 Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PW ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PW Type | Must Be Zero | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ThisdocumentFEC isthe outcomedeprecated and is retained only for backward compatibility. Implementations ofmany discussions among many people, including Manoj Leelanivas, Paul Traina, Yakov Rekhter, Der-Hwa Gan, Brook Bailey, Eric Rosen, Ina Minei, Shivani Aggarwal,LSP ping SHOULD accept andVanson Lim.process this TLV, but SHOULD send LSP ping echo requests with the new TLV (see next section), unless explicitly configured to use the old TLV. An LSR receiving this TLV SHOULD use the source IP address of the LSP echo request to infer the sender's PE address. A.2. Downstream Mapping(DSMAP) ThedescriptionDownstream Mapping object is a TLV that MAY be included in an echo request message. Only one Downstream Mapping object may appear in an echo request. The presence of a Downstream Mapping object is a request that Downstream Mapping objects be included in theMultipath Information sub-fieldecho reply. If the replying router is the destination of the FEC, then a Downstream Mapping TLVwas adapted from text suggested by Curtis Villamizar. We would like to thank Loa Andersson for motivatingSHOULD NOT be included in theadvancement of this bis specification. We also would like to thank Alexander Vainshteinecho reply. Otherwise the replying router SHOULD include a Downstream Mapping object forhis review and comments. 8. References 8.1. Normative References [RFC1122] Braden, R., Ed., "Requirementseach interface over which this FEC could be forwarded. For a more precise definition of the notion of "downstream", see section 3.3.2, "Downstream Router and Interface". The Length is K + M + 4*N octets, where M is the Multipath Length, and N is the number of Downstream Labels. Values forInternet Hosts - Communication Layers", STD 3, RFC 1122, DOI 10.17487/RFC1122, October 1989, <http://www.rfc-editor.org/info/rfc1122>. [RFC1812] Baker, F., Ed., "RequirementsK are found in the description of Address Type below. The Value field of a Downstream Mapping has the following format: 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MTU | Address Type | DS Flags | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Downstream IP Address (4 or 16 octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Downstream Interface Address (4 or 16 octets) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Multipath Type| Depth Limit | Multipath Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . (Multipath Information) . . . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Downstream Label | Protocol | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . . . . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Downstream Label | Protocol | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Maximum Transmission Unit (MTU) The MTU is the size in octets of the largest MPLS frame (including label stack) that fits on the interface to the Downstream LSR. Address Type The Address Type indicates if the interface is numbered or unnumbered. It also determines the length of the Downstream IP Address and Downstream Interface fields. The resulting total for the initial part of the TLV is listed in the table below as "K Octets". The Address Type is set to one of the following values: Type # Address Type K Octets ------ ------------ -------- 1 IPv4 Numbered 16 2 IPv4 Unnumbered 16 3 IPv6 Numbered 40 4 IPv6 Unnumbered 28 DS Flags The DS Flags field is a bit vector with the following format: 0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ | Rsvd(MBZ) |I|N| +-+-+-+-+-+-+-+-+ Two flags are defined currently, I and N. The remaining flags MUST be set to zero when sending and ignored on receipt. Flag Name and Meaning ---- ---------------- I Interface and Label Stack Object Request When this flag is set, it indicates that the replying router SHOULD include an Interface and Label Stack Object in the echo reply message. N Treat as a Non-IP Packet Echo request messages will be used to diagnose non-IP flows. However, these messages are carried in IP packets. For a router that alters its ECMP algorithm based on the FEC or deep packet examination, this flag requests that the router treat this as it would if the determination of an IP payload had failed. Downstream IP Address and Downstream Interface Address IPv4 addresses and interface indices are encoded in 4 octets; IPv6 addresses are encoded in 16 octets. If the interface to the downstream LSR is numbered, then the Address Type MUST be set to IPv4 or IPv6, the Downstream IP Address MUST be set to either the downstream LSR's Router ID or the interface address of the downstream LSR, and the Downstream Interface Address MUST be set to the downstream LSR's interface address. If the interface to the downstream LSR is unnumbered, the Address Type MUST be IPv4 Unnumbered or IPv6 Unnumbered, the Downstream IP Address MUST be the downstream LSR's Router ID, and the Downstream Interface Address MUST be set to the index assigned by the upstream LSR to the interface. If an LSR does not know the IP address of its neighbor, then it MUST set the Address Type to either IPv4 Unnumbered or IPv6 Unnumbered. For IPv4, it must set the Downstream IP Address to 127.0.0.1; for IPv6 the address is set to 0::1. In both cases, the interface index MUST be set to 0. If an LSR receives an Echo Request packet with either of these addresses in the Downstream IP Address field, this indicates that it MUST bypass interface verification but continue with label validation. If the originator of an Echo Request packet wishes to obtain Downstream Mapping information but does not know the expected label stack, then it SHOULD set the Address Type to either IPv4 Unnumbered or IPv6 Unnumbered. For IPv4, it MUST set the Downstream IPVersion 4 Routers", RFC 1812, DOI 10.17487/RFC1812, June 1995, <http://www.rfc-editor.org/info/rfc1812>. [RFC2113] Katz, D., "IP Router Alert Option", RFC 2113, DOI 10.17487/RFC2113, February 1997, <http://www.rfc-editor.org/info/rfc2113>. [RFC2119] Bradner, S., "Key wordsAddress to 224.0.0.2; foruse in RFCsIPv6 the address MUST be set toIndicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>. [RFC3032] Rosen, E., Tappan, D., Fedorkow, G., Rekhter, Y., Farinacci, D., Li, T., and A. Conta, "MPLS Label Stack Encoding", RFC 3032, DOI 10.17487/RFC3032, January 2001, <http://www.rfc-editor.org/info/rfc3032>. [RFC4026] Andersson, L. and T. Madsen, "Provider Provisioned Virtual Private Network (VPN) Terminology", RFC 4026, DOI 10.17487/RFC4026, March 2005, <http://www.rfc-editor.org/info/rfc4026>. [RFC4271] Rekhter, Y., Ed., Li, T., Ed.,FF02::2. In both cases, the interface index MUST be set to 0. If an LSR receives an Echo Request packet with the all-routers multicast address, then this indicates that it MUST bypass both interface andS. Hares, Ed., "A Border Gateway Protocollabel stack validation, but return Downstream Mapping TLVs using the information provided. Multipath Type The following Multipath Types are defined: Key Type Multipath Information --- ---------------- --------------------- 0 no multipath Empty (Multipath Length = 0) 2 IP address IP addresses 4(BGP-4)", RFC 4271, DOI 10.17487/RFC4271, January 2006, <http://www.rfc-editor.org/info/rfc4271>. [RFC4379] Kompella, K.IP address range low/high address pairs 8 Bit-masked IP IP address prefix andG. Swallow, "Detecting Multi-Protocolbit mask address set 9 Bit-masked label set LabelSwitched (MPLS) Data Plane Failures", RFC 4379, DOI 10.17487/RFC4379, February 2006, <http://www.rfc-editor.org/info/rfc4379>. [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 5226, DOI 10.17487/RFC5226, May 2008, <http://www.rfc-editor.org/info/rfc5226>. [RFC5905] Mills, D., Martin, J., Ed., Burbank, J.,prefix andW. Kasch, "Network Time Protocol Version 4: Protocolbit mask Type 0 indicates that all packets will be forwarded out this one interface. Types 2, 4, 8, andAlgorithms Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, <http://www.rfc-editor.org/info/rfc5905>. [RFC7506] Raza, K., Akiya, N.,9 specify that the supplied Multipath Information will serve to exercise this path. Depth Limit The Depth Limit is applicable only to a label stack andC. Pignataro, "IPv6 Router Alert Optionis the maximum number of labels considered in the hash; this SHOULD be set to zero if unspecified or unlimited. Multipath Length The length in octets of the Multipath Information. Multipath Information Address or label values encoded according to the Multipath Type. See the next section below forMPLS Operations, Administration, and Maintenance (OAM)", RFC 7506, DOI 10.17487/RFC7506, April 2015, <http://www.rfc-editor.org/info/rfc7506>. 8.2. Informative References [RFC0792] Postel, J., "Internet Control Message Protocol", STD 5, RFC 792, DOI 10.17487/RFC0792, September 1981, <http://www.rfc-editor.org/info/rfc792>. [RFC3107] Rekhter, Y. and E. Rosen, "Carryingencoding details. Downstream Label(s) The set of labels in the label stack as it would have appeared if this router were forwarding the packet through this interface. Any Implicit Null labels are explicitly included. Labels are treated as numbers, i.e., they are right justified in the field. A Downstream LabelInformationis 24 bits, inBGP-4", RFC 3107, DOI 10.17487/RFC3107, May 2001, <http://www.rfc-editor.org/info/rfc3107>. [RFC3209] Awduche, D., Berger, L., Gan, D., Li, T., Srinivasan, V., and G. Swallow, "RSVP-TE: Extensions to RSVP for LSP Tunnels", RFC 3209, DOI 10.17487/RFC3209, December 2001, <http://www.rfc-editor.org/info/rfc3209>. [RFC4365] Rosen, E., "Applicability Statement for BGP/MPLS IP Virtual Private Networks (VPNs)", RFC 4365, DOI 10.17487/RFC4365, February 2006, <http://www.rfc-editor.org/info/rfc4365>. [RFC4447] Martini, L., Ed., Rosen, E., El-Aawar, N., Smith, T.,the same format as an MPLS label minus the TTL field, i.e., the MSBit of the label is bit 0, the LSBit is bit 19, the Traffic Class (TC) bits are bits 20-22, andG. Heron, "Pseudowire Setupbit 23 is the S bit. The replying router SHOULD fill in the TC andMaintenance UsingS bits; theLabel DistributionLSR receiving the echo reply MAY choose to ignore these bits. Protocol(LDP)", RFC 4447, DOI 10.17487/RFC4447, April 2006, <http://www.rfc-editor.org/info/rfc4447>. [RFC4761] Kompella, K., Ed. and Y. Rekhter, Ed., "Virtual Private LAN Service (VPLS) UsingThe Protocol is taken from the following table: Protocol # Signaling Protocol ---------- ------------------ 0 Unknown 1 Static 2 BGPfor Auto-Discovery and Signaling", RFC 4761, DOI 10.17487/RFC4761, January 2007, <http://www.rfc-editor.org/info/rfc4761>. [RFC5036] Andersson, L., Ed., Minei, I., Ed., and B. Thomas, Ed., "LDP Specification", RFC 5036, DOI 10.17487/RFC5036, October 2007, <http://www.rfc-editor.org/info/rfc5036>. [RFC5085] Nadeau, T., Ed. and C. Pignataro, Ed., "Pseudowire Virtual Circuit Connectivity Verification (VCCV): A Control Channel for Pseudowires", RFC 5085, DOI 10.17487/RFC5085, December 2007, <http://www.rfc-editor.org/info/rfc5085>.3 LDP 4 RSVP-TE Authors' Addresses Kireeti Kompella Juniper Networks, Inc. Email: kireeti.kompella@gmail.com Carlos Pignataro Cisco Systems, Inc. Email: cpignata@cisco.com Nagendra Kumar Cisco Systems, Inc. Email: naikumar@cisco.com Sam Aldrin Google Email: aldrin.ietf@gmail.com Mach(Guoyi) Chen Huawei Email: mach.chen@huawei.com