[RFCs/IDs] [Plain Text] [From draft-ietf-mpls-lsp-ping]

PROPOSED STANDARD
Errata
Network Working Group                                        K. Kompella
Request for Comments: 4379                        Juniper Networks, Inc.
Updates: 1122                                                 G. Swallow
Category: Standards Track                            Cisco Systems, Inc.
                                                           February 2006


   Detecting Multi-Protocol Label Switched (MPLS) Data Plane Failures

Status of This Memo

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

Copyright Notice

   Copyright (C) The Internet Society (2006).

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.

Table of Contents

   1. Introduction ....................................................2
      1.1. Conventions ................................................3
      1.2. Structure of This Document .................................3
      1.3. Contributors ...............................................3
   2. Motivation ......................................................4
      2.1. Use of Address Range 127/8 .................................4
   3. Packet Format ...................................................6
      3.1. Return Codes ..............................................10
      3.2. Target FEC Stack ..........................................11
           3.2.1. LDP IPv4 Prefix ....................................12
           3.2.2. LDP IPv6 Prefix ....................................13
           3.2.3. RSVP IPv4 LSP ......................................13
           3.2.4. RSVP IPv6 LSP ......................................14
           3.2.5. VPN IPv4 Prefix ....................................14
           3.2.6. VPN IPv6 Prefix ....................................15
           3.2.7. L2 VPN Endpoint ....................................16



Kompella & Swallow          Standards Track                     [Page 1]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


           3.2.8. FEC 128 Pseudowire (Deprecated) ....................16
           3.2.9. FEC 128 Pseudowire (Current) .......................17
           3.2.10. FEC 129 Pseudowire ................................18
           3.2.11. BGP Labeled IPv4 Prefix ...........................19
           3.2.12. BGP Labeled IPv6 Prefix ...........................20
           3.2.13. Generic IPv4 Prefix ...............................20
           3.2.14. Generic IPv6 Prefix ...............................21
           3.2.15. Nil FEC ...........................................21
      3.3. Downstream Mapping ........................................22
           3.3.1. Multipath Information Encoding .....................26
           3.3.2. Downstream Router and Interface ....................28
      3.4. Pad TLV ...................................................29
      3.5. Vendor Enterprise Number ..................................29
      3.6. Interface and Label Stack .................................29
      3.7. Errored TLVs ..............................................31
      3.8. Reply TOS Byte TLV ........................................31
   4. Theory of Operation ............................................32
      4.1. Dealing with Equal-Cost Multi-Path (ECMP) .................32
      4.2. Testing LSPs That Are Used to Carry MPLS Payloads .........33
      4.3. Sending an MPLS Echo Request ..............................33
      4.4. Receiving an MPLS Echo Request ............................34
           4.4.1. FEC Validation .....................................40
      4.5. Sending an MPLS Echo Reply ................................41
      4.6. Receiving an MPLS Echo Reply ..............................42
      4.7. Issue with VPN IPv4 and IPv6 Prefixes .....................42
      4.8. Non-compliant Routers .....................................43
   5. References .....................................................43
      5.1. Normative References ......................................43
      5.2. Informative References ....................................44
   6. Security Considerations ........................................44
   7. IANA Considerations ............................................46
      7.1. Message Types, Reply Modes, Return Codes ..................46
      7.2. TLVs ......................................................47
   8. Acknowledgements ...............................................48

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.




Kompella & Swallow          Standards Track                     [Page 2]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


   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 [KEYWORDS].

   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

   The following made vital contributions to all aspects of this
   document, 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




Kompella & Swallow          Standards Track                     [Page 3]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


      Nischal Sheth, Juniper Networks, Inc.
      Sanjay Wadhwa, Juniper Networks, Inc.

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 [ICMP]) 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



Kompella & Swallow          Standards Track                     [Page 4]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


   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



Kompella & Swallow          Standards Track                     [Page 5]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


   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.

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 (microseconds)                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                  TimeStamp Received (seconds)                 |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                TimeStamp Received (microseconds)              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                            TLVs ...                           |
      .                                                               .
      .                                                               .
      .                                                               .
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



Kompella & Swallow          Standards Track                     [Page 6]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


   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



Kompella & Swallow          Standards Track                     [Page 7]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


   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) [VCCV].  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 (in seconds and microseconds,
   according to the sender's clock) in NTP format [NTP] 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.



Kompella & Swallow          Standards Track                     [Page 8]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


   Two examples follow.  The Label Distribution Protocol (LDP) IPv4 FEC
   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 (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 = 12          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  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                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+














Kompella & Swallow          Standards Track                     [Page 9]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


   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>




Kompella & Swallow          Standards Track                    [Page 10]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


              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 (deprecated)
            10           14            "FEC 128" Pseudowire
            11          16+            "FEC 129" Pseudowire
            12            5            BGP labeled IPv4 prefix



Kompella & Swallow          Standards Track                    [Page 11]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


            13           17            BGP labeled IPv6 prefix
            14            5            Generic IPv4 prefix
            15           17            Generic IPv6 prefix
            16            4            Nil FEC

   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
   [LDP] 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 [see section
   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 [BGP].  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 of 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 [LDP].  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 [LDP] for an example of a Mapping
   for an IPv4 FEC.






Kompella & Swallow          Standards Track                    [Page 12]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


       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 [LDP].  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 [LDP] 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 [RSVP-TE].

       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             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+




Kompella & Swallow          Standards Track                    [Page 13]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


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 [RSVP-TE].

       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
   [BGP-LABEL].

















Kompella & Swallow          Standards Track                    [Page 14]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


   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
   [BGP-LABEL].

   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                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+




Kompella & Swallow          Standards Track                    [Page 15]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


   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.  See section 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 [VPLS-BGP].  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 (Deprecated)

   FEC 128 (0x80) is defined in [PW-CONTROL], 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.







Kompella & Swallow          Standards Track                    [Page 16]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


   When an FEC 128 is encoded in a label stack, the following format is
   used.  The value field consists of the remote PE 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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Remote PE Address                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                             PW ID                             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |            PW Type            |          Must Be Zero         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   This FEC is deprecated and is retained only for backward
   compatibility.  Implementations of LSP ping SHOULD accept and 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.

3.2.9.  FEC 128 Pseudowire (Current)

   FEC 128 (0x80) is defined in [PW-CONTROL], 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.

















Kompella & Swallow          Standards Track                    [Page 17]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


   When an FEC 128 is encoded in a label stack, the following format is
   used.  The value field consists of the sender's PE address (the
   source address of the targeted LDP session), the remote PE 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 Address                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Remote PE Address                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                             PW ID                             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |            PW Type            |          Must Be Zero         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

3.2.10.  FEC 129 Pseudowire

   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 [PW-CONTROL].  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 addresses.




















Kompella & Swallow          Standards Track                    [Page 18]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


   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 Address                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                      Remote PE 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                   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

3.2.11.  BGP Labeled IPv4 Prefix

   BGP labeled IPv4 prefixes are defined in [BGP-LABEL].  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                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+








Kompella & Swallow          Standards Track                    [Page 19]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


3.2.12.  BGP Labeled IPv6 Prefix

   BGP labeled IPv6 prefixes are defined in [BGP-LABEL].  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 [RSVP-TE]
   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                          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+












Kompella & Swallow          Standards Track                    [Page 20]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


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.













Kompella & Swallow          Standards Track                    [Page 21]

RFC 4379           Detecting MPLS Data Plane Failures      February 2006


3.3.  Downstream Mapping

   The Downstream 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 the echo
   reply.  If the replying router is the destination of the FEC, then a
   Downstream Mapping TLV SHOULD NOT be included in the echo reply.
   Otherwise the replying router SHOULD include a Downstream Mapping
   object for each 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 for K 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.





Kompella & Swallow          Standards Track                    [Page 22]

RFC 4379           Detecting MPLS Data Plane Failures