<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->


<rfc category="std" docName="draft-ietf-mpls-entropy-lsp-ping-05" ipr="trust200902" updates="6790">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN"
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <title abbrev="LSP Ping over Entropy">
	Label Switched Path (LSP) and Pseudowire (PW) Ping/Trace over MPLS&nbsp;Network using Entropy Labels (EL)
    </title>

    <!-- add 'role="editor"' below for the editors if appropriate -->
    <!-- Another author who claims to be an editor -->

    <author fullname="Nobo Akiya" initials="N."
            surname="Akiya">
      <organization>Big Switch Networks</organization>
      <address>
        <email>nobo.akiya.dev@gmail.com</email>
      </address>
    </author>

    <author fullname="George Swallow" initials="G."
            surname="Swallow">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>
      <address>
        <email>swallow@cisco.com</email>
      </address>
    </author>

    <author fullname="Carlos Pignataro" initials="C."
            surname="Pignataro">
      <organization abbrev="Cisco">Cisco Systems, Inc.</organization>
      <address>
        <email>cpignata@cisco.com</email>
      </address>
    </author>

    <author fullname="Andrew G. Malis" initials="A."
            surname="Malis">
      <organization>Huawei Technologies</organization>
      <address>
        <email>agmalis@gmail.com</email>
      </address>
    </author>

    <author fullname="Sam Aldrin" initials="S."
            surname="Aldrin">
      <organization>Google</organization>
      <address>
        <email>aldrin.ietf@gmail.com</email>
      </address>
    </author>

    <date  />

    <area>Internet Engineering Task Force</area>
    <workgroup>MPLS Working Group</workgroup>

    <!-- WG name at the upperleft corner of the doc,
    IETF is fine for individual submissions.
	If this element is not present, the default is "Network Working Group",
    which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>MPLS</keyword>
    <keyword>LSP Ping</keyword>
    <keyword>Entropy</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>Multiprotocol Label Switching (MPLS) Label Switched Path
	(LSP) Ping and Traceroute are methods used to test Equal-Cost
	Multipath (ECMP) paths. Ping is known as a connectivity verification method and Traceroute as a fault isolation method, as described in RFC 4379. When an LSP is signaled using the Entropy
	Label (EL) described in RFC 6790, the ability for LSP
	Ping and Traceroute operations to discover and exercise ECMP paths is lost for scenarios where Label Switching Routers (LSRs) apply different load balancing
	techniques. One such scenario is when some LSRs apply EL-based load
	balancing while other LSRs apply non-EL-based load balancing (e.g., IP).
	Another scenario is when an EL-based LSP is stitched with another LSP
	which can be EL-based or non-EL-based.
      </t>

      <t>This document extends the MPLS LSP Ping and Traceroute multipath
        mechanisms in RFC 6424 to allow the ability of exercising LSPs which make use of the EL. This
        document updates RFC 6790.
      </t>

    </abstract>

	<note title="Requirements Language">
	<t>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 <xref target="RFC2119">RFC 2119</xref>.</t>
	</note>
  </front>

  <middle>

    <section title="Introduction" anchor="INTRO">

    <section title="Terminology">

<t>The following acronyms and terms are used in this document:

<list style="symbols">
<t>MPLS - Multiprotocol Label Switching.</t>
<t>LSP - Label Switched Path.</t>
<t>Stitched LSP - Stitched Label Switched Paths combine several LSPs such that a single end-to-end (e2e) LSP is realized. <xref target="RFC6424" /> describes LSP Ping for Stitched LSPs.</t>
<t>LSR - Label Switching Router.</t>
<t>FEC - Forwarding Equivalence Class.</t>
<t>ECMP - Equal-Cost Multipath.</t>
<t>EL - Entropy Label.</t>
<t>ELI - Entropy Label Indicator.</t>
<t>GAL - Generic Associated Channel Label.</t>
<t>MS-PW - Multi-Segment Pseudowire.</t>
<t>Initiating LSR - LSR which sends an MPLS echo request.</t>
<t>Responder LSR - LSR which receives an MPLS echo request and sends an MPLS echo reply.</t>
<t>IP-Based Load Balancer - LSR which load balances on fields from an IP header (and possibly fields from upper layers), and does not consider an entropy label from an MPLS label stack (i.e., flow label <xref target="RFC6391" /> or entropy label <xref target="RFC6790" />) for load balancing purposes.</t>
<t>Label-Based Load Balancer - LSR which load balances on an entropy label from an MPLS label stack (i.e., flow label or entropy label), and does not consider fields from an IP header (and possibly fields from upper layers) for load balancing purposes.</t>
<t>Label and IP-Based Load Balancer - LSR which load balances on both entropy labels from an MPLS label stack and fields from an IP header (and possibly fields from upper layers).</t>
</list>
</t>

    </section>

    <section title="Background">

<t>MPLS implementations employ a wide variety of load balancing techniques in terms of fields used for hash &quot;keys&quot;. The mechanisms in <xref target="RFC4379" /> and updated by <xref target="RFC6424" /> are designed to provide multipath support for a subset of techniques. The intent of this document is to provide multipath support for the supported techniques which are compromised by the use of ELs <xref target="RFC6790" />. <xref target="_CASES" /> describes supported and unsupported cases, and it may be useful for the reader to first review this section.</t>

      <t>The Downstream Detailed Mapping (DDMAP) TLV <xref target="RFC6424" /> provides Multipath Information which can be used by an LSP Ping initiator to trace and validate ECMP paths between an ingress and egress. The Multipath Information encodings defined by <xref target="RFC6424" /> are sufficient when all the LSRs along
      the path(s), between ingress and egress, consider the same set of
      &quot;keys&quot; as input for load balancing algorithms, e.g., either all IP-based or all label-based.</t>

      <t>With the introduction of <xref target="RFC6790" />, some LSRs may perform load balancing based on
        labels while others may be IP-based. This results in an LSP Ping initiator that is unable to
        trace and validate all the ECMP paths in the following scenarios:

	<list style="symbols">

	  <t>One or more transit LSRs along an LSP with ELI/EL in the label
	  stack do not perform ECMP load balancing based on EL
	  (hashes based on &quot;keys&quot; including the IP destination
	  address). This scenario is not only possible but quite common
	  due to transit LSRs not implementing <xref target="RFC6790" />
	  or transit LSRs implementing <xref target="RFC6790" />, but
	  not implementing the suggested transit LSR behavior in Section
	  4.3 of <xref target="RFC6790" />.</t>

	  <t>Two or more LSPs stitched together with at least one of these
	  LSPs pushing ELI/EL into the label stack.
	  </t>

	</list>

	These scenarios can be quite common because deployments
	of <xref target="RFC6790" /> typically have a mixture of nodes
	that support ELI/EL and nodes that do not. There will
	also typically be a mixture of areas that support ELI/EL and areas that do
	not.</t>

      <t>As pointed out in <xref target="RFC6790" />, the procedures of
	<xref target="RFC4379" /> (and consequently of <xref target="RFC6424" />) with respect to Multipath
	Information Type {9} are incomplete.  However,
	<xref target="RFC6790" /> does not actually update
	<xref target="RFC4379" />.  Further, the specific EL location
	is not clearly defined, particularly in the case of Flow Aware
       Pseudowires <xref target="RFC6391" />. This document
	defines a new FEC Stack sub-TLV for the entropy label.
	<xref target="MPT9-Sec" /> of this document updates the
	procedures for Multipath Information Type {9} described in
	<xref target="RFC4379" /> and applicable to <xref target="RFC6424" />. The rest of this document describes
	extensions required to restore ECMP discovery and tracing
	capabilities for the scenarios described.
      </t>

      <t><xref target="RFC4379" />, <xref target="RFC6424" />, and this document will support IP-based
   load balancers and label-based load balancers which limit their hash
   to the first (top-most) or only entropy label in the label stack. Other
   use cases (refer to <xref target="_CASES" />) are out of scope.  </t>

    </section>

    </section>

    <section title="Overview">

      <t><xref target="RFC4379" /> describes LSP traceroute as an operation where the initiating LSR sends a series of MPLS echo requests towards the same destination. The first packet in the series has the TTL set to 1. When the echo reply is received from the LSR one hop away, the second echo request in the series is sent with the TTL set to 2. For each additional echo request the TLL is incremented by one until a response is received from the intended destination. The initiating LSR discovers and exercises ECMP by
      obtaining Multipath Information from each transit LSR and using
      a specific destination IP address or specific entropy label.</t>

      <t>From here on, the notation {x, y, z} refers to Multipath Information Types x, y, or z. Multipath Information Types are defined in Section 3.3 of <xref target="RFC4379" />.</t>

      <t>The LSR initiating LSP Ping sends an MPLS echo request with Multipath Information. This Multipath Information is described in the echo request's
      DDMAP TLV, and may contain a set of IP
      addresses or a set of labels. Multipath Information Types
      {2, 4, 8} carry a set of IP addresses, and Multipath Information Type {9} carries a set of labels. The responder LSR (the receiver of the MPLS
      echo request) will determine the subset of initiator-specified
      Multipath Information which load balances to each downstream
      (outgoing) interface. The responder LSR sends an MPLS echo reply with
      resulting Multipath Information per downstream (outgoing
      interface) back to the initiating LSR. The initiating LSR is then able
      to use a specific IP destination address or a specific label to
      exercise a specific ECMP path on the responder LSR.</t>

      <t>The current behavior is problematic in the following scenarios:

	<list style="symbols">

	  <t>The initiating LSR sends IP Multipath Information, but
	    the responder LSR load balances on labels.</t>

	  <t>The initiating LSR sends Label Multipath Information, but
	    the responder LSR load balances on IP addresses.</t>

	  <t>The initiating LSR sends existing Multipath Information
	    to an LSR which pushes ELI/EL in the label stack, but the initiating
	    LSR can only continue to discover and exercise specific
	    paths of the ECMP, if the LSR which pushes ELI/EL responds with both
	    IP addresses and the associated EL corresponding to each IP
	    address. This is because:

	    <list style="symbols">

	      <t>An ELI/EL-pushing LSR that is a stitching point will
	      load balance based on the IP address.</t>

	      <t>Downstream LSR(s) of an ELI/EL-pushing LSR may load
	      balance based on ELs.</t>

	    </list>

	  </t>

	  <t>The initiating LSR sends existing Multipath Information
             to an ELI/EL-pushing LSR, but the initiating LSR can only
             continue to discover and exercise specific paths of ECMP,
             if the ELI/EL-pushing LSR responds with both labels and
             the associated EL corresponding to the label. This is because:

	    <list style="symbols">

	      <t>An ELI/EL-pushing LSR that is a stitching point will
	      load balance based on the EL from the previous LSP and pushes
	      a new EL.</t>

	      <t>Downstream LSR(s) of ELI/EL-pushing LSR may load
	      balance based on new ELs.</t>

	    </list>

	  </t>

	</list>

	The above scenarios demonstrate the existing Multipath
	Information is insufficient when LSP traceroute is used on
	an LSP with entropy labels <xref target="RFC6790"/>.
	This document defines a new Multipath Information
	Type to be used in the DDMAP of MPLS echo request/reply
	packets for <xref target="RFC6790"/> LSPs.
      </t>

      <t>The responder LSR can reply with empty Multipath
      Information if no IP address is set or label set is received
      with the Multipath Information. An empty return is also
      possible if an initiating LSR sends
      Multipath Information of one type, IP Address or Label, but the
      responder LSR load balances on the other type. To disambiguate
      between the two results, this document introduces new flags in
      the DDMAP TLV to allow the responder LSR to describe the load
      balancing technique being used.</t>

      <t>To use this enhanced method end-to-end, all LSRs
      along the LSP need to be able to understand the new
      flags and the new Multipath Information Type.
Mechanisms to verify this condition are outside of the scope of this document.
The rest of the requirements are detailed in the initiating LSR and responder LSR procedures.
      Two additional DS Flags are defined for the
      DDMAP TLV in <xref target="DS_Flags" />. These two flags are used by the responder LSR to describe its load balance behavior on a received MPLS echo request.</t>

<t>Note that the terms &quot;IP-Based Load Balancer&quot; and &quot;Label-Based Load Balancer&quot; are in context of how a received MPLS echo request is handled by the responder LSR.</t>

    </section>

    <section title="Multipath Type 9" anchor="MPT9-Sec">

      <t>
	<xref target="RFC4379" /> defined Multipath Type {9} for
        tracing of LSPs where label-based load balancing is used.
        However, as pointed out in <xref target="RFC6790" />, the
        procedures for using this type are incomplete as the specific
        location of the label was not defined.  It was assumed that
        the presence of Multipath Type {9} implied the value of the
        bottom-of-stack label should be varied by the values indicated
        by multipath to determine the respective outgoing
        interfaces.
      </t>

      <t>
	<xref target="EL_FEC" /> defines a new FEC-Stack sub-TLV to
	indicate an entropy label. These labels MAY appear anywhere in
	a label stack.
      </t>

      <t>
	Multipath Type {9} applies to the first label in the
	label stack that corresponds to an EL-FEC.  If no such label
	is found, it applies to the label at the bottom of the label
	stack.
      </t>
    </section>

    <section title="Pseudowire Tracing">

      <t>
	This section defines procedures for tracing pseudowires.
	These procedures pertain to the use of Multipath Information
	Type {9} as well as Type {TBD4}.  In all cases below, when a
	control word is in use, the N-flag in the DDMAP MUST
	be set.  Note that when a control word is not in use, the
	returned DDMAPs may not be accurate.
      </t>

      <t>
	In order to trace a non-flow-aware Pseudowire, the initiator
	includes an EL-FEC instead of the appropriate PW FEC at the
	bottom of the FEC stack.  Tracing in this way will cause
	compliant routers to return the proper outgoing interface.
	Note that this procedure only traces to the end of the MPLS
	LSP that is under test and will not verify the PW FEC.  To
	actually verify the PW FEC or in the case of a MS-PW, to
	determine the next pseudowire label value, the initiator MUST
	repeat that step of the trace (i.e., repeating the TTL value
	used) but with the FEC Stack modified to contain the
	appropriate PW FEC. Note that these procedures are applicable to scenarios where an initiator is able to vary the bottom label (i.e., Pseudowire label). Possible scenarios are tracing multiple non-flow-aware Pseudowires on the same endpoints or tracing a non-flow-aware Pseudowire provisioned with multiple Pseudowire labels.
      </t>

      <t>In order to trace a flow-aware Pseudowire <xref target="RFC6391" />, the initiator
	includes an EL FEC at the bottom of the FEC Stack and pushes
	the appropriate PW FEC onto the FEC Stack.
      </t>

      <t>
	In order to trace through non-compliant routers, the initiator
	forms an MPLS echo request message and includes a DDMAP
	with Multipath Type {9}. For a non-flow-aware Pseudowire
	it includes the appropriate PW FEC in the FEC Stack.  For a
	flow-aware Pseudowire, the initiator includes a Nil FEC at the
	bottom of the FEC Stack and pushes the appropriate PW FEC onto
	the FEC Stack.
      </t>

    </section>

    <section anchor="EL_FEC" title="Entropy Label FEC">

      <t>The entropy label indicator (ELI) is a reserved label that has no
        explicit FEC associated, and has label value 7 assigned from
        the reserved range. Use the Nil FEC as the Target FEC Stack sub-TLV to
        account for ELI in a Target FEC Stack TLV.</t>

      <t>The entropy label (EL) is a special purpose label with the label
        value being discretionary (i.e., the label value is not from
        the reserved range). For LSP verification mechanics to perform
        its purpose, it is necessary for a Target FEC Stack sub-TLV to
        clearly describe the EL, particularly in the scenario where the label
        stack does not carry ELI (e.g., flow-aware Pseudowire <xref target="RFC6391"
        />). Therefore, this document defines an EL FEC sub-TLV (TBD1, see <xref target="ELFEC" />) to allow a
        Target FEC Stack sub-TLV to be added to the Target FEC Stack
        to account for EL.</t>

      <t>The Length is 4. Labels are 20-bit values treated as numbers.

      <figure align="left"><preamble></preamble><artwork align="left">
 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          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

        Figure 1: Entropy Label FEC
        </artwork></figure>

        Label is the actual label value inserted in the label stack;
        the MBZ field MUST be zero when sent and ignored on
        receipt.</t>

    </section>

    <section title="DS Flags: L and E" anchor="DS_Flags">

      <t>Two flags, L and E, are added to the DS Flags field of the
      DDMAP TLV. Both flags MUST NOT be set in echo request
      packets when sending, and SHOULD be ignored when received. Zero, one or
      both new flags MUST be set in echo reply packets.

	<figure align="left"><preamble></preamble><artwork align="left">
 DS Flags
 --------

     0 1 2 3 4 5 6 7
    +-+-+-+-+-+-+-+-+
    |  MBZ  |L|E|I|N|
    +-+-+-+-+-+-+-+-+
</artwork></figure>

RFC-Editor-Note: Please update the above figure to place the flag E in the bit number TBD2 and the flag L in the bit number TBD3.

       <figure align="left"><preamble></preamble><artwork align="left">
 Flag  Name and Meaning
 ----  ----------------
    L  Label-based load balance indicator
       This flag MUST be cleared in the echo request. An LSR
       which performs load balancing on a label MUST set this
       flag in the echo reply. An LSR which performs load
       balancing on IP MUST NOT set this flag in the echo
       reply.

    E  ELI/EL push indicator
       This flag MUST be cleared in the echo request. An LSR
       which pushes ELI/EL MUST set this flag in the echo
       reply. An LSR which does not push ELI/EL MUST NOT set
       this flag in the echo reply.
       </artwork></figure>

        The two flags result in four load balancing techniques which the echo
        reply generating LSR can indicate:

        <list style="symbols">
          <t>{L=0, E=0} LSR load balances based on IP and does not
          push ELI/EL.</t>
          <t>{L=0, E=1} LSR load balances based on IP and pushes
          ELI/EL.</t>
          <t>{L=1, E=0} LSR load balances based on labels and does not
          push ELI/EL.</t>
          <t>{L=1, E=1} LSR load balances based on labels and pushes
          ELI/EL.</t>
        </list>
      </t>

    </section>

    <section title="New Multipath Information Type: TBD4" anchor="MPT10">

      <t>One new Multipath Information Type is added to be used in
      DDMAP TLV. This new Multipath Type has the value of TBD4.

      <figure align="left"><preamble></preamble><artwork align="left">
  Key   Type                  Multipath Information
  ---   ----------------      ---------------------
 TBD4   IP and Label set      IP addresses and label prefixes
      </artwork></figure>
      </t>
      <t>Multipath Type TBD4 is comprised of three sections. The first section
     describes the IP address set. The second section describes the label
      set. The third section describes another label set which associates
      to either the IP address set or the label set specified in the other
      sections.</t>
      <t>Multipath Information Type TBD4 has following format:

      <figure align="left"><preamble></preamble><artwork align="left">
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|IPMultipathType|     IP Multipath Length       | Reserved(MBZ) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                                                               ~
|                  (IP Multipath Information)                   |
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|LbMultipathType|    Label Multipath Length     | Reserved(MBZ) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                                                               ~
|                 (Label Multipath Information)                 |
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Assoc Label Multipath Length |         Reserved(MBZ)         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~                                                               ~
|            (Associated Label Multipath Information)           |
~                                                               ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

        Figure 2: Multipath Information Type TBD4
        </artwork></figure>

        <list style="symbols">

	  <t>IPMultipathType
	    <list>
	      <t>0 when &quot;IP Multipath Information" is omitted.
	      Otherwise, one of the IP Multipath Information values:
	      {2, 4, 8}.</t>
	    </list>
	  </t>

	  <t>IP Multipath Information
	    <list>
	      <t>This section is omitted when &quot;IPMultipathType&quot;
	      is 0. Otherwise, this section reuses IP Multipath Information
	      from <xref target="RFC4379" />. Specifically, Multipath
	      Information for values {2, 4, 8} can be used.</t>
	    </list>
	  </t>

	  <t>LbMultipathType
	    <list>
	      <t>0 when &quot;Label Multipath Information" is omitted.
	      Otherwise, Label Multipath Information value {9}.</t>
	    </list>
	  </t>

	  <t>Label Multipath Information
	    <list>
	      <t>This section is omitted when &quot;LbMultipathType&quot;
	      is 0. Otherwise, this section reuses Label Multipath
	      Information from <xref target="RFC4379" />. Specifically,
	      Multipath Information for value {9} can be used.</t>
	    </list>
	  </t>

	  <t>Associated Label Multipath Information
	    <list>
	      <t>&quot;Assoc Label Multipath Length&quot; is a 16-bit field of Multipath Information which indicates the length in octets of the Associated Label Multipath Information.</t>
	      <t>&quot;Associated Label Multipath Information&quot; is a list of labels with each label described in 24 bits. This section MUST be omitted in an MPLS echo request message. A midpoint which pushes ELI/EL labels SHOULD include &quot;Assoc Label Multipath Information&quot; in its MPLS echo reply message, along with either &quot;IP Multipath Information&quot; or &quot;Label Multipath Information&quot;. Each specified associated label described in this section maps to a specific IP address OR label described in the &quot;IP Multipath Information&quot; section or &quot;Label Multipath Information&quot; section. For example, if three IP addresses are specified in the &quot;IP Multipath Information&quot; section, then there MUST be three labels described in this section. The first label maps to the first IP address specified, the second label maps to the second  IP address specified, and the third label maps to the third IP address specified.</t>
	    </list>
	  </t>

	</list>

      </t>

      <t>When a section is omitted, the length for that section MUST be set to zero.</t>
            </section>

    <section title="Initiating LSR Procedures">

      <t>The following procedure is described in terms of an EL_LSP boolean maintained by the
	initiating LSR. This value controls the Multipath Information Type to be
	used in the transmitted echo request packets. When the initiating LSR is
	transmitting an echo request packet with DDMAP with a non-zero
	Multipath Information Type, then the EL_LSP boolean MUST be consulted to
	determine the Multipath Information Type to use.
      </t>

      <t>In addition to procedures described in <xref target="RFC4379" />, as updated by <xref target="MPT9-Sec" /> and <xref target="RFC6424" />, the initiating LSR MUST operate
	with the following procedures:

	<list style="symbols">

	  <t>When the initiating LSR pushes ELI/EL, initialize EL_LSP=True. Else set EL_LSP=False.</t>

	  <t>When the initiating LSR is transmitting a non-zero Multipath
	    Information Type:
	    <list>
	      <t>If (EL_LSP), the initiating LSR MUST use Multipath
		Information Type {TBD4} unless the responder LSR cannot handle Type {TBD4}. When the initiating LSR is transmitting Multipath Information
            Type {TBD4}, both &quot;IP Multipath Information&quot; and
            &quot;Label Multipath Information&quot; MUST be included,
            and &quot;Associated Label Multipath Information&quot;
            MUST be omitted (NULL).</t>
	      <t>Else the initiating LSR MAY use Multipath
		Information Type {2, 4, 8, 9, TBD4}. When the initiating LSR is transmitting Multipath Information
            Type {TBD4} in this case, &quot;IP Multipath Information&quot; MUST be included,
            and
            &quot;Label Multipath Information&quot; and &quot;Associated Label Multipath Information&quot;
            MUST be omitted (NULL).</t>
	    </list>
	  </t>

	  <t>When the initiating LSR receives an echo reply with {L=0, E=1} in
            the DS flags with valid contents, set EL_LSP=True.</t>

	</list>

      </t>

      <t>In the following conditions, the initiating LSR may have lost the
        ability to exercise specific ECMP paths. The initiating LSR MAY
        continue with &quot;best effort&quot; in the following cases:

	<list style="symbols">

	  <t>Received echo reply contains empty Multipath
	  Information.</t>

	  <t>Received echo reply contains {L=0, E=&lt;any&gt;} DS
	  flags, but does not contain IP Multipath Information.</t>

	  <t>Received echo reply contains {L=1, E=&lt;any&gt;} DS
	  flags, but does not contain Label Multipath Information.</t>

	  <t>Received echo reply contains {L=&lt;any&gt;, E=1} DS
	  flags, but does not contain Associated Label Multipath
	  Information.</t>

	  <t>IP Multipath Information Types {2, 4, 8} sent, and
	  received echo reply with {L=1, E=0} in DS flags.</t>

	  <t>Multipath Information Type {TBD4} sent, and received echo
	  reply with Multipath Information Type other than {TBD4}.</t>

	</list>

      </t>

    </section>

    <section title="Responder LSR Procedures" anchor="Res_LSR_Proc">

      <t>Common Procedures:

      <list style="symbols">
      <t>The responder LSR receiving an MPLS echo request packet
        MUST first determine whether or not the initiating LSR
        supports this LSP Ping and Traceroute extension for Entropy
        Labels. If either of the following conditions are met,
        the responder LSR SHOULD determine that the initiating LSR
        supports this LSP Ping and Traceroute extension for
        entropy labels.

        <list style="numbers">
        <t>Received MPLS echo request contains the Multipath Information Type {TBD4}.</t>
        <t>Received MPLS echo request contains a Target FEC Stack
           TLV that includes the entropy label FEC.</t>
        </list>

        If the initiating LSR is determined not to support this LSP
        Ping and Traceroute extension for entropy labels, then the
        responder LSR MUST NOT follow further procedures described in this
        section. Specifically, MPLS echo reply packets:

        <list style="symbols">
        <t>MUST have the following DS Flags cleared (i.e., not set): &quot;ELI/EL push
        indicator&quot; and &quot;Label-based load balance indicator&quot;.</t>
        <t>MUST NOT use Multipath Information Type {TBD4}.</t>
        </list>
      </t>
      <t>The responder LSR receiving an MPLS echo request
        packet with Multipath Information Type {TBD4} MUST validate
        the following contents. Any deviation MUST result in the responder LSR
        considering the packet as malformed and returning code 1
        ("Malformed echo request received") in the MPLS echo reply packet.

	<list style="symbols">
	  <t>IP Multipath Information MUST be included.</t>
	  <t>Label Multipath Information MAY be included.</t>
	  <t>Associated Label Multipath Information MUST be omitted (NULL).</t>
	</list>
      </t>
      </list>

	The following subsections describe expected responder LSR
	procedures when the echo reply is to include DDMAP TLVs,
	based on the local load balance technique being employed. In case
	the responder LSR performs deviating load balance techniques on a per
	downstream basis, appropriate procedures matched to each
	downstream load balance technique MUST be followed.

      </t>

      <section title="IP-based Load Balancer &amp; Not Pushing ELI/EL">

	<t>
	  <list style="symbols">

	    <t>The responder MUST set {L=0, E=0} in DS flags.</t>

	    <t>If Multipath Information Type {2, 4, 8} is received,
	    the responder MUST comply with <xref target="RFC4379"
	    /> and <xref target="RFC6424" />.</t>

	    <t>If Multipath Information Type {9} is received,
	    the responder MUST reply with Multipath Type {0}.</t>

           <t>If Multipath Information Type {TBD4} is received, the following procedures are to be used:
           <list style="symbols">
               <t>The responder MUST reply with Multipath Information Type {TBD4}.</t>
               <t>The &quot;Label Multipath Information&quot; and &quot;Associated Label Multipath Information&quot; sections MUST be omitted (NULL).</t>
               <t>If no matching IP address is found, then the &quot;IPMultipathType&quot; field MUST be set to Multipath Information Type {0} and the &quot;IP Multipath Information&quot; section MUST also be omitted (NULL).</t>
               <t>If at least one matching IP address is found, then the &quot;IPMultipathType&quot; field MUST be set to appropriate Multipath Information Type {2, 4, 8} and the &quot;IP Multipath Information&quot; section MUST be included.</t>
           </list>
           </t>

	  </list>
	</t>
      </section>

      <section title="IP Based Load Balancer &amp; Pushes ELI/EL">
	<t>
	  <list style="symbols">

	    <t>The responder MUST set {L=0, E=1} in DS flags.</t>

	    <t>If Multipath Information Type {9} is received,
	      the responder MUST reply with Multipath Type {0}.
	    </t>

             <t>If Multipath Type {2, 4, 8, TBD4} is received, the following procedures are to be used:
             <list style="symbols">
                 <t>The responder MUST respond with Multipath Type {TBD4}. See <xref target="MPT10" /> for details of Multipath Type {TBD4}.</t>
                 <t>The &quot;Label Multipath Information&quot; section MUST be omitted (i.e., it is not there).</t>
                 <t>The IP address set specified in the received IP Multipath Information MUST be used to determine the returned IP/Label pairs.</t>
                 <t>If the received Multipath Information Type was {TBD4}, the received &quot;Label Multipath Information&quot; sections MUST NOT be used to determine the associated label portion of the returned IP/Label pairs.</t>
                 <t>If no matching IP address is found, then the &quot;IPMultipathType&quot; field MUST be set to Multipath Information Type {0} and the &quot;IP Multipath Information&quot; section MUST be omitted. In addition, the &quot;Assoc Label Multipath Length&quot; MUST be set to 0, and the &quot;Associated Label Multipath Information&quot; section MUST also be omitted.</t>
                 <t>If at least one matching IP address is found, then the &quot;IPMultipathType&quot; field MUST be set to appropriate Multipath Information Type {2, 4, 8} and the &quot;IP Multipath Information&quot; section MUST be included. In addition, the &quot;Associated Label Multipath Information&quot; section MUST be populated with a list of labels corresponding to each IP address specified in the &quot;IP Multipath Information&quot; section. &quot;Assoc Label Multipath Length&quot; MUST be set to a value representing the length in octets of the &quot;Associated Label Multipath Information&quot; field.</t>
             </list>
             </t>

	  </list>
	</t>
      </section>

      <section title="Label-based Load Balancer &amp; Not Pushing ELI/EL" anchor="ResLSR_Label_No_ELI">
	<t>
	  <list style="symbols">

	    <t>The responder MUST set {L=1, E=0} in DS flags.</t>

	    <t>If Multipath Information Type {2, 4, 8} is received,
	      the responder MUST reply with Multipath Type {0}.</t>

	    <t>If Multipath Information Type {9} is received,
	      the responder MUST comply with <xref target="RFC4379" />
	       and <xref target="RFC6424" /> as updated by
	      <xref target="MPT9-Sec" />.
	    </t>

             <t>If Multipath Information Type {TBD4} is received, the following procedures are to be used:
             <list style="symbols">
                 <t>The responder MUST reply with Multipath Information Type {TBD4}.</t>
                 <t>The &quot;IP Multipath Information&quot; and &quot;Associated Label Multipath Information&quot; sections MUST be omitted (NULL).</t>
                 <t>If no matching label is found, then the &quot;LbMultipathType&quot; field MUST be set to Multipath Information Type {0} and the &quot;Label Multipath Information&quot; section MUST also be omitted (NULL).</t>
                 <t>If at least one matching label is found, then the &quot;LbMultipathType&quot; field MUST be set to the appropriate Multipath Information Type {9} and the &quot;Label Multipath Information&quot; section MUST be included.</t>
             </list>
             </t>

	  </list>
	</t>
      </section>

      <section title="Label-based Load Balancer &amp; Pushes ELI/EL" anchor="ResLSR_Label_ELI">
	<t>
	  <list style="symbols">

	    <t>The responder MUST set {L=1, E=1} in DS flags.</t>

	    <t>If Multipath Information Type {2, 4, 8} is received,
	    the responder MUST reply with Multipath Type {0}.</t>

             <t>If Multipath Type {9, TBD4} is received, the following procedures are to be used:
             <list style="symbols">
                 <t>The responder MUST respond with Multipath Type {TBD4}.</t>
                 <t>The &quot;IP Multipath Information&quot; section MUST be omitted.</t>
                 <t>The label set specified in the received Label Multipath Information MUST be used to determine the returned Label/Label pairs.</t>
                 <t>If received Multipath Information Type was {TBD4}, received &quot;Label Multipath Information&quot; sections MUST NOT be used to determine the associated label portion of the returned Label/Label pairs.</t>
                 <t>If no matching label is found, then the &quot;LbMultipathType&quot; field MUST be set to Multipath Information Type {0} and &quot;Label Multipath Information&quot; section MUST be omitted. In addition, &quot;Assoc Label Multipath Length&quot; MUST be set to 0, and the &quot;Associated Label Multipath Information&quot; section MUST also be omitted.</t>
                 <t>If at least one matching label is found, then the &quot;LbMultipathType&quot; field MUST be set to the appropriate Multipath Information Type {9} and the &quot;Label Multipath Information&quot; section MUST be included. In addition, the &quot;Associated Label Multipath Information&quot; section MUST be populated with a list of labels corresponding to each label specified in the &quot;Label Multipath Information&quot; section. &quot;Assoc Label Multipath Length&quot; MUST be set to a value representing the length in octets of the &quot;Associated Label Multipath Information&quot; field.</t>
             </list>
             </t>

	  </list>
	</t>
      </section>

	<section title="Flow-Aware MS-PW Stitching LSR">

	<t>A stitching LSR that cross-connects flow-aware
	Pseudowires	behaves in one of two ways:

	<list style="symbols">
	<t>Load balances on the previous flow label, and carries over the
	same flow label. For this case, the stitching LSR is to behave as described in <xref target="ResLSR_Label_No_ELI" />.</t>
	<t>Load balances on the previous flow label, and replaces the flow label
	with a newly computed label. For this case, the stitching LSR is to behave
	as  described in <xref target="ResLSR_Label_ELI" />.</t>
	</list>
	</t>
	</section>

    </section>

    <section title="Supported and Unsupported Cases" anchor="_CASES">

<?rfc subcompact="yes" ?>

      <t>The MPLS architecture does not define strict rules on how implementations are to identify hash &quot;keys&quot; for load balancing purposes. As a result, implementations may be of the following load balancer types:

<list style="numbers">
<t>IP-based load balancer.</t>
<t>Label-based load balancer.</t>
<t>Label- and IP-based load balancer.</t>
</list>

For cases (2) and (3), an implementation can include different sets of labels from the label stack for load balancing purpose. Thus the following sub-cases are possible:

<list style="letters">
<t>Entire label stack.</t>
<t>Top N labels from label stack where the number of labels in label stack is &gt; N.</t>
<t>Bottom N labels from label stack where the number of labels in label stack is &gt; N.</t>
</list>

In a scenario where there is one flow label or entropy label present in the label stack, the following further cases are possible for (2b), (2c), (3b) and (3c):

<list style="numbers">
<t>N labels from label stack include flow label or entropy label.</t>
<t>N labels from label stack do not include flow label or entropy label.</t>
</list>

Also in a scenario where there are multiple entropy labels present in the label stack, it is possible for implementations to employ deviating techniques:

<list style="symbols">
<t>Search for entropy stops at the first entropy label.</t>
<t>Search for entropy includes any entropy label found plus continues to search for entropy in the label stack.</t>
</list>

Furthermore, handling of reserved (i.e., special) labels varies among implementations:

<list style="symbols">
<t>Reserved labels are used in the hash as any other label would be (not a recommended  practice.)</t>
<t>Reserved labels are skipped over and, for implementations limited to N labels, the reserved labels do not count towards the limit of N.</t>
<t>Reserved labels are skipped over and, for implementations limited to N labels, the reserved labels count towards the limit of N.</t>
</list>

It is important to point this out since the presence of GAL will affect those implementations which include reserved labels for load balancing purposes.</t>

<t>As can be seen from the above, there are many types of potential load balancing implementations. Attempting for any OAM tools to support ECMP discovery and traversal over all types would require fairly complex procedures. Complexities in OAM tools have minimal benefit if the majority of implementations are expected to employ only a small subset of the cases described above.

<?rfc subcompact="no" ?>

<list style="symbols">

<t>Section 4.3 of <xref target="RFC6790" /> states that in implementations, for load balancing purposes, parsing beyond the label stack after finding an entropy label has &quot;limited incremental value&quot;. Therefore, it is expected that most implementations will be of types &quot;IP-based load balancer&quot; or &quot;Label-based load balancer&quot;.</t>

<t>Section 2.4.5.1 of <xref target="RFC7325" /> recommends that searching for entropy labels in the label stack should terminate upon finding the first entropy label. Therefore, it is expected that implementations will only include the first (top-most) entropy label when there are multiple entropy labels in the label stack.</t>

<t>It is expected that, in most cases, the number of labels in the label stack will not exceed the number of labels (N) which implementations can include for load balancing purposes.</t>

<t>It is expected that labels in the label stack, besides the flow label and entropy label, are constant for the lifetime of a single LSP multipath traceroute operation. Therefore, deviating load balancing implementations with respect to reserved labels should not affect this tool.</t>

</list>

Thus <xref target="RFC4379" />, <xref target="RFC6424" />, and this document support cases (1) and (2a1), where only the first (top-most) entropy label is included when there are multiple entropy labels in the label stack.</t>

    </section>

    <section anchor="Security" title="Security Considerations">

      <t>While <xref target="RFC4379" /> and <xref target="RFC6424" /> already allow for the 
discovery and exercise of ECMP paths,
      this document extends the LSP Ping and Traceroute mechanisms to more precisely discover
	and exercise ECMP paths when an LSP uses ELI/EL in the label stack.
Sourcing or inspecting LSP Ping packets can be used for network
reconnaissance.
</t><t>
The extended capability defined in this document requires small
	additional processing for the responder and initiator
	nodes. The responder node that pushes ELI/EL will need to compute
	and return multipath data including associated EL. The initiator
	node will need to store and handle both IP Multipath and Label
	Multipath Information, and include destination IP addresses
	and/or ELs in MPLS echo request packets as well as in
	Multipath Information sent to downstream nodes.
The security considerations of <xref target="RFC4379" /> already
cover Denial-of-Service attacks by regulating LSP Ping traffic going to the control plane.
</t><t>
 Finally, the security measures
	described in <xref target="RFC4379" />,
	<xref target="RFC6424" />, and <xref target="RFC6790" /> are applicable. <xref target="RFC6424" /> provides guidelines if a network operator wants to prevent tracing or does not want to expose details of the tunnel and <xref target="RFC6790" /> provides guidance on the use of the EL.</t>

    </section>

    <section anchor="IANA" title="IANA Considerations">

      <section title="Entropy Label FEC" anchor="ELFEC">

<t>The IANA is requested to assign a new sub-TLV from the &quot;Sub-TLVs for TLV Types 1, 16, and 21&quot; section from the &quot;Multi-Protocol Label Switching (MPLS) Label Switched Paths (LSPs) Ping Parameters - TLVs&quot; registry (<xref target="IANA-MPLS-LSP-PING" />).

          <figure align="left"><preamble></preamble><artwork align="left">
 Sub-Type Sub-TLV Name          Reference
 -------- ------------          ---------
 TBD1     Entropy label FEC     this document
          </artwork></figure>

	</t>
      </section>
<section title="DS Flags">

<t>The IANA is requested to assign new bit numbers from the &quot;DS flags&quot; sub-registry from the &quot;Multi-Protocol Label Switching (MPLS) Label Switched Paths (LSPs) Ping Parameters - TLVs&quot; registry (<xref target="IANA-MPLS-LSP-PING" />).</t>

<t>Note: the &quot;DS flags&quot; sub-registry is created by <xref target="RFC7537" />.

<figure align="left"><preamble></preamble><artwork align="left">
 Bit number Name                                        Reference
 ---------- ----------------------------------------    ---------
 TBD2       E: ELI/EL push indicator                    this document
 TBD3       L: Label-based load balance indicator       this document
</artwork></figure>

</t>
</section>

<section title="Multipath Type">

<t>The IANA is requested to assign a new value from the &quot;Multipath Type&quot; sub-registry from the &quot;Multi-Protocol Label Switching (MPLS) Label Switched Paths (LSPs) Ping Parameters - TLVs&quot; registry (<xref target="IANA-MPLS-LSP-PING" />).</t>

<t>Note: The &quot;Multipath Type&quot; sub-registry is created by <xref target="RFC7537" />.

<figure align="left"><preamble></preamble><artwork align="left">
 Value      Meaning                                  Reference
 ---------- ---------------------------------------- ---------
  TBD4      IP and label set                         this document
</artwork></figure>

</t>
</section>

  </section>

    <section title="Acknowledgements">

      <t>The authors would like to thank Loa Andersson, Curtis Villamizar, Daniel King, Sriganesh Kini, Victor Ji, Acee Lindem, Deborah Brungard, Shawn M Emery, Scott O.&nbsp;Bradner, and Peter Yee for performing thorough reviews and providing most valuable comments.</t>

<t>
Carlos Pignataro would like to acknowledge his lifetime friend Martin Rigueiro, with deep gratutide and esteem, for sharing his contagious passion for engineering and sciences, and for selflessly teaching so many lessons.
</t>

    </section>

    <section title="Contributing Authors">

      <t>Nagendra Kumar
	<vspace blankLines="0" />
	Cisco Systems, Inc.
	<vspace blankLines="1" />
	Email: naikumar@cisco.com</t>

    </section>

  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <references title="Normative References">
	  <?rfc include="reference.RFC.2119"?>
         <?rfc include="reference.RFC.4379"?>
       <?rfc include="reference.RFC.6424"?>
	  <?rfc include="reference.RFC.6790"?>
       <?rfc include="reference.RFC.7537"?>
    </references>

    <references title="Informative References">
       <?rfc include="reference.RFC.6391"?>
       <?rfc include="reference.RFC.7325"?>
<reference anchor="IANA-MPLS-LSP-PING" target="http://www.iana.org/assignments/mpls-lsp-ping-parameters/mpls-lsp-ping-parameters.xhtml">
  <front>
    <title>Multi-Protocol Label Switching (MPLS) Label Switched Paths (LSPs) Ping Parameters</title>
    <author><organization>IANA</organization></author>
    <date/>
  </front>
</reference>
    </references>



    <!-- Change Log
v00-a 2013-05-29 Nobo: Initial version
v02-a 2014-01-25 Nobo: Addressed MPLS-RT review comments
v04 2016-08-11 Andy: Addressed many review comments from Acee and Deborah.
    -->
  </back>
</rfc>
