tech-invite   World Map     

3GPP     Specs     Glossaries     Architecture     IMS     UICC       IETF     RFCs     Groups     SIP     ABNFs       Search

RFC 8029

 Errata 
Proposed STD
Pages: 78
Top     in Index     Prev     Next
in Group Index     Prev in Group     Next in Group     Group: MPLS

Detecting Multiprotocol Label Switched (MPLS) Data-Plane Failures

Part 1 of 4, p. 1 to 17
None       Next Section

Obsoletes:    4379    6424    6829    7537
Updates:    1122


Top       ToC       Page 1 
Internet Engineering Task Force (IETF)                       K. Kompella
Request for Comments: 8029                        Juniper Networks, Inc.
Obsoletes: 4379, 6424, 6829, 7537                             G. Swallow
Updates: 1122                                          C. Pignataro, Ed.
Category: Standards Track                                       N. Kumar
ISSN: 2070-1721                                                    Cisco
                                                               S. Aldrin
                                                                  Google
                                                                 M. Chen
                                                                  Huawei
                                                              March 2017


   Detecting Multiprotocol Label Switched (MPLS) Data-Plane Failures

Abstract

   This document describes a simple and efficient mechanism to detect
   data-plane failures in Multiprotocol Label Switching (MPLS) Label
   Switched Paths (LSPs).  It defines a probe message called an "MPLS
   echo request" and a response message called an "MPLS echo reply" for
   returning the result of the probe.  The MPLS echo request is intended
   to contain sufficient information to check correct operation of the
   data plane and to verify the data plane against the control plane,
   thereby localizing faults.

   This document obsoletes RFCs 4379, 6424, 6829, and 7537, and updates
   RFC 1122.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 7841.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   http://www.rfc-editor.org/info/rfc8029.

Top      ToC       Page 2 
Copyright Notice

   Copyright (c) 2017 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.

   This document may contain material from IETF Documents or IETF
   Contributions published or made publicly available before November
   10, 2008.  The person(s) controlling the copyright in some of this
   material may not have granted the IETF Trust the right to allow
   modifications of such material outside the IETF Standards Process.
   Without obtaining an adequate license from the person(s) controlling
   the copyright in such materials, this document may not be modified
   outside the IETF Standards Process, and derivative works of it may
   not be created outside the IETF Standards Process, except to format
   it for publication as an RFC or to translate it into languages other
   than English.

Top       Page 3 
Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   5
     1.1.  Conventions . . . . . . . . . . . . . . . . . . . . . . .   5
     1.2.  Structure of This Document  . . . . . . . . . . . . . . .   6
     1.3.  Scope of This Specification . . . . . . . . . . . . . . .   6
   2.  Motivation  . . . . . . . . . . . . . . . . . . . . . . . . .   7
     2.1.  Use of Address Range 127/8  . . . . . . . . . . . . . . .   8
     2.2.  Router Alert Option . . . . . . . . . . . . . . . . . . .  10
   3.  Packet Format . . . . . . . . . . . . . . . . . . . . . . . .  11
     3.1.  Return Codes  . . . . . . . . . . . . . . . . . . . . . .  16
     3.2.  Target FEC Stack  . . . . . . . . . . . . . . . . . . . .  17
       3.2.1.  LDP IPv4 Prefix . . . . . . . . . . . . . . . . . . .  19
       3.2.2.  LDP IPv6 Prefix . . . . . . . . . . . . . . . . . . .  19
       3.2.3.  RSVP IPv4 LSP . . . . . . . . . . . . . . . . . . . .  20
       3.2.4.  RSVP IPv6 LSP . . . . . . . . . . . . . . . . . . . .  20
       3.2.5.  VPN IPv4 Prefix . . . . . . . . . . . . . . . . . . .  21
       3.2.6.  VPN IPv6 Prefix . . . . . . . . . . . . . . . . . . .  22
       3.2.7.  L2 VPN Endpoint . . . . . . . . . . . . . . . . . . .  23
       3.2.8.  FEC 128 Pseudowire - IPv4 (Deprecated)  . . . . . . .  23
       3.2.9.  FEC 128 Pseudowire - IPv4 (Current) . . . . . . . . .  24
       3.2.10. FEC 129 Pseudowire - IPv4 . . . . . . . . . . . . . .  25
       3.2.11. FEC 128 Pseudowire - IPv6 . . . . . . . . . . . . . .  26
       3.2.12. FEC 129 Pseudowire - IPv6 . . . . . . . . . . . . . .  27
       3.2.13. BGP Labeled IPv4 Prefix . . . . . . . . . . . . . . .  28
       3.2.14. BGP Labeled IPv6 Prefix . . . . . . . . . . . . . . .  28
       3.2.15. Generic IPv4 Prefix . . . . . . . . . . . . . . . . .  29
       3.2.16. Generic IPv6 Prefix . . . . . . . . . . . . . . . . .  29
       3.2.17. Nil FEC . . . . . . . . . . . . . . . . . . . . . . .  29
     3.3.  Downstream Mapping (Deprecated) . . . . . . . . . . . . .  30
     3.4.  Downstream Detailed Mapping TLV . . . . . . . . . . . . .  30
       3.4.1.  Sub-TLVs  . . . . . . . . . . . . . . . . . . . . . .  34
       3.4.2.  Downstream Router and Interface . . . . . . . . . . .  40
     3.5.  Pad TLV . . . . . . . . . . . . . . . . . . . . . . . . .  41
     3.6.  Vendor Enterprise Number  . . . . . . . . . . . . . . . .  41
     3.7.  Interface and Label Stack . . . . . . . . . . . . . . . .  42
     3.8.  Errored TLVs  . . . . . . . . . . . . . . . . . . . . . .  43
     3.9.  Reply TOS Octet TLV . . . . . . . . . . . . . . . . . . .  44
   4.  Theory of Operation . . . . . . . . . . . . . . . . . . . . .  44
     4.1.  Dealing with Equal-Cost Multipath (ECMP)  . . . . . . . .  44
     4.2.  Testing LSPs That Are Used to Carry MPLS Payloads . . . .  45
     4.3.  Sending an MPLS Echo Request  . . . . . . . . . . . . . .  46
     4.4.  Receiving an MPLS Echo Request  . . . . . . . . . . . . .  47
       4.4.1.  FEC Validation  . . . . . . . . . . . . . . . . . . .  53

Top      ToC       Page 4 
     4.5.  Sending an MPLS Echo Reply  . . . . . . . . . . . . . . .  54
       4.5.1.  Addition of a New Tunnel  . . . . . . . . . . . . . .  55
       4.5.2.  Transition between Tunnels  . . . . . . . . . . . . .  56
     4.6.  Receiving an MPLS Echo Reply  . . . . . . . . . . . . . .  56
     4.7.  Issue with VPN IPv4 and IPv6 Prefixes . . . . . . . . . .  58
     4.8.  Non-compliant Routers . . . . . . . . . . . . . . . . . .  59
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .  59
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  61
     6.1.  TCP and UDP Port Number . . . . . . . . . . . . . . . . .  61
     6.2.  MPLS LSP Ping Parameters  . . . . . . . . . . . . . . . .  61
       6.2.1.  Message Types, Reply Modes, Return Codes  . . . . . .  61
       6.2.2.  TLVs  . . . . . . . . . . . . . . . . . . . . . . . .  62
       6.2.3.  Global Flags  . . . . . . . . . . . . . . . . . . . .  64
       6.2.4.  Downstream Detailed Mapping Address Type  . . . . . .  64
       6.2.5.  DS Flags  . . . . . . . . . . . . . . . . . . . . . .  65
       6.2.6.  Multipath         Types . . . . . . . . . . . . . . .  66
       6.2.7.  Pad Type  . . . . . . . . . . . . . . . . . . . . . .  66
       6.2.8.  Interface and Label Stack Address Type  . . . . . . .  67
     6.3.  IPv4 Special-Purpose Address Registry . . . . . . . . . .  67
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  67
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .  67
     7.2.  Informative References  . . . . . . . . . . . . . . . . .  68
   Appendix A.  Deprecated TLVs and Sub-TLVs (Non-normative) . . . .  72
     A.1.  Target FEC Stack  . . . . . . . . . . . . . . . . . . . .  72
       A.1.1.  FEC 128 Pseudowire - IPv4 (Deprecated)  . . . . . . .  72
     A.2.  Downstream Mapping (Deprecated) . . . . . . . . . . . . .  72
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  77
   Contributors  . . . . . . . . . . . . . . . . . . . . . . . . . .  77
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  78

Top      ToC       Page 5 
1.  Introduction

   This document describes a simple and efficient mechanism to detect
   data-plane failures in MPLS Label Switched Paths (LSPs).  It defines
   a probe message called an "MPLS echo request" and a response message
   called an "MPLS echo reply" for returning the result of the probe.
   The MPLS echo request is intended to contain sufficient information
   to check correct operation of the data plane, as well as a mechanism
   to verify the data plane against the control plane, thereby
   localizing faults.

   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 this
   specification updates that RFC.  The motivation for this change and
   the details of this exceptional use are discussed in Section 2.1
   below.

   This document obsoletes RFC 4379 [RFC4379], RFC 6424 [RFC6424], RFC
   6829 [RFC6829], and RFC 7537 [RFC7537].

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.

Top      ToC       Page 6 
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" (Section 4) first;
   the document is structured the way it is to avoid forward references.

1.3.  Scope of This Specification

   The primary goal of this document is to provide a clean and updated
   LSP ping specification.

   [RFC4379] defines the basic mechanism for MPLS LSP validation that
   can be used for fault detection and isolation.  The scope of this
   document also includes various updates to MPLS LSP ping, including:

   o  Update all references and citations.

      *  Obsoleted RFCs 2434, 2030, and 3036 are respectively replaced
         with RFCs 5226, 5905, and 5036.

      *  Additionally, some informative references were published as
         RFCs: RFCs 4761, 5085, 5885, and 8077.

   o  Incorporate all outstanding RFC errata.

      *  See [Err108], [Err742], [Err1418], [Err1714], [Err1786],
         [Err2978], [Err3399].

   o  Replace EXP with Traffic Class (TC), based on the update from RFC
      5462.

   o  Incorporate the updates from RFC 6829, by adding the pseudowire
      (PW) Forwarding Equivalence Classes (FECs) advertised over IPv6
      and obsoleting RFC 6829.

   o  Incorporate the updates from RFC 7506, by adding the IPv6 Router
      Alert Option (RAO) for MPLS Operations, Administration, and
      Maintenance (OAM).

   o  Incorporate newly defined bits on the Global Flags field from RFCs
      6425 and 6426.

   o  Update the IPv4 addresses used in examples to utilize the
      documentation prefix.  Add examples with IPv6 addresses.

Top      ToC       Page 7 
   o  Incorporate the updates from RFC 6424, by deprecating the
      Downstream Mapping TLV (DSMAP) and adding the Downstream Detailed
      Mapping TLV (DDMAP); updating two new Return Codes; adding the
      motivations of tunneled or stitched LSPs; updating the procedures,
      IANA considerations, and security considerations; and obsoleting
      RFC 6424.

   o  Incorporate the updates from RFC 7537, by updating the IANA
      Considerations section and obsoleting RFC 7537.

   o  Finally, obsolete RFC 4379.

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
   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 to
   confirm 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.

Top      ToC       Page 8 
   An LSP traceroute may cross a tunneled or stitched LSP en route to
   the destination.  While performing end-to-end LSP validation in such
   scenarios, the FEC information included in the packet by the
   Initiator may be different from the one assigned by the transit node
   in a different segment of a stitched LSP or tunnel.  Let us consider
   a simple case.

   A          B          C           D           E
   o -------- o -------- o --------- o --------- o
     \_____/  | \______/   \______/  | \______/
       LDP    |   RSVP       RSVP    |    LDP
              |                      |
               \____________________/
                       LDP

   When an LSP traceroute is initiated from Router A to Router E, the
   FEC information included in the packet will be LDP while Router C
   along the path is a pure RSVP node and does not run LDP.
   Consequently, node C will be unable to perform FEC validation.  The
   MPLS echo request should contain sufficient information to allow any
   transit node within a stitched or tunneled LSP to perform FEC
   validations to detect any misrouted echo requests.

   One way these tools can be used is to periodically ping a 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 Multipath (ECMP) load sharing.

Top      ToC       Page 9 
   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 IPv4 link-local
   addresses.  Use of the private address space was deemed ineffective
   since the leading MPLS-based service is an IPv4 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.  Older
   deployed routers may not (correctly) implement IPv4 link-local
   addresses and 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 an
   IPv4-mapped IPv6 address for IPv6 was chosen for a number of reasons.

   RFC 1122 allocates the 127/8 as the "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.

Top      ToC       Page 10 
   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 range provides an easy
   means of identifying possible LSP packets.

2.2.  Router Alert Option

   This document requires the use of the RAO set in an 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
   the 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.

Top      ToC       Page 11 
3.  Packet Format

   An MPLS echo request/reply 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.)

Top      ToC       Page 12 
   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           |R|T|V|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   At the time of writing, three flags are defined: the R, T, and V
   bits; 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 T (Respond Only If TTL Expired) flag MUST be set only in the echo
   request packet by the sender.  If the T flag is set to 1 in an
   incoming echo request, and the TTL of the incoming MPLS label is more
   than 1, then the receiving node MUST drop the incoming echo request
   and MUST NOT send any echo reply to the sender.  This flag MUST NOT
   be set in the echo reply packet.  If this flag is set in an echo
   reply packet, then it MUST be ignored.  The T flag is defined in
   Section 3.4 of [RFC6425].

   The R (Validate Reverse Path) flag is defined in [RFC6426].  When
   this flag is set in the echo request, the Responder SHOULD return
   reverse-path FEC information, as described in Section 3.4.2 of
   [RFC6426].

   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

Top      ToC       Page 13 
   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][RFC5885].  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 code point is application specific and thus beyond the scope of
   this document.

   Return Codes and Subcodes are described in Section 3.1.

   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 64-bit NTP timestamp 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 64-bit NTP timestamp
   format in which the corresponding echo request was received.

Top      ToC       Page 14 
   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 examples of how TLV and sub-TLV lengths are computed, and how
   sub-TLVs are padded to be 4-octet aligned, are 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                          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Top      ToC       Page 15 
   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 (Deprecated)
               3                  Pad
               4                  Unassigned
               5                  Vendor Enterprise Number
               6                  Unassigned
               7                  Interface and Label Stack
               8                  Unassigned
               9                  Errored TLVs
              10                  Reply TOS Byte
              20                  Downstream Detailed Mapping

   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.

Top      ToC       Page 16 
   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.

   In Sections 3.2 through 3.9 and their various subsections, only the
   Value field of the TLV is included.

3.1.  Return Codes

   The Return Code is set to zero by the sender of an echo request.  The
   receiver of said echo request can set it to one of the values listed
   below in the corresponding echo reply that it generates.  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
      14    See DDMAP TLV for meaning of Return Code and Return
            Subcode (See Note 2)
      15    Label switched with FEC change

   Note 1

      The Return Subcode (RSC) contains the point in the label stack
      where processing was terminated.  If the RSC is 0, no labels were
      processed.  Otherwise, the packet was label switched at depth RSC.

Top      ToC       Page 17 
   Note 2

      The Return Code is per "Downstream Detailed Mapping TLV"
      (Section 3.4).  This Return Code MUST be used only in the message
      header and MUST be set only in the MPLS echo reply message.  If
      the Return Code is set in the MPLS echo request message, then it
      MUST be ignored.  When this Return Code is set, each Downstream
      Detailed Mapping TLV MUST have an appropriate Return Code and
      Return Subcode.  This Return Code MUST be used when there are
      multiple downstreams for a given node (such as Point-to-Multipoint
      (P2MP) or ECMP), and the node needs to return a Return Code/Return
      Subcode for each downstream.  This Return Code MAY be used even
      when there is only one downstream for a given node.



(page 17 continued on part 2)

Next Section