<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="exp" ipr="trust200902" docName="draft-ietf-mpls-bfd-directed-31" number="9612" consensus="true" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" tocDepth="3" symRefs="true" sortRefs="true" prepTime="2024-07-23T17:57:46" indexInclude="true" scripts="Common,Latin">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-mpls-bfd-directed-31" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc9612" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="BFD Directed Reverse Path for MPLS LSPs">Bidirectional Forwarding Detection (BFD) Reverse Path for MPLS Label Switched Paths (LSPs)</title>
    <seriesInfo name="RFC" value="9612" stream="IETF"/>
    <author initials="G." surname="Mirsky" fullname="Greg Mirsky">
      <organization showOnFrontPage="true">Ericsson</organization>
      <address>
        <email>gregimirsky@gmail.com</email>
      </address>
    </author>
    <author initials="J." surname="Tantsura" fullname="Jeff  Tantsura">
      <organization showOnFrontPage="true">NVIDIA</organization>
      <address>
        <email>jefftant.ietf@gmail.com</email>
      </address>
    </author>
    <author initials="I." surname="Varlashkin" fullname="Ilya Varlashkin">
      <organization showOnFrontPage="true">Google</organization>
      <address>
        <email>imv@google.com</email>
      </address>
    </author>
    <author fullname="Mach(Guoyi) Chen" initials="M." surname="Chen">
      <organization showOnFrontPage="true">Huawei</organization>
      <address>
        <email>mach.chen@huawei.com</email>
      </address>
    </author>
    <date month="07" year="2024"/>
    <area>RTG</area>
    <workgroup>mpls</workgroup>
    <keyword>LSP Ping</keyword>
    <keyword>BFD</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">
Bidirectional Forwarding Detection (BFD) is expected to be able to 
monitor a wide variety of encapsulations of paths between systems.
When a BFD session monitors an explicitly routed unidirectional path, there may be a need to direct
the egress BFD peer to use a specific path for the reverse direction of the BFD session.
This document describes an extension to the MPLS Label Switched Path (LSP) echo request that
allows a BFD system to request that the remote BFD peer transmit BFD control packets
over the specified LSP.
      </t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This document is not an Internet Standards Track specification; it is
            published for examination, experimental implementation, and
            evaluation.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document defines an Experimental Protocol for the Internet
            community.  This document is a product of the Internet Engineering
            Task Force (IETF).  It represents the consensus of the IETF community.
            It has received public review and has been approved for publication
            by the Internet Engineering Steering Group (IESG).  Not all documents
            approved by the IESG are candidates for any level of Internet
            Standard; see Section 2 of RFC 7841. 
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc9612" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2024 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Revised BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Revised BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-conventions-used-in-this-do">Conventions Used in This document</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2.1.2">
                  <li pn="section-toc.1-1.1.2.1.2.1">
                    <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.2.1.1"><xref derivedContent="1.1.1" format="counter" sectionFormat="of" target="section-1.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t>
                  </li>
                  <li pn="section-toc.1-1.1.2.1.2.2">
                    <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.2.2.1"><xref derivedContent="1.1.2" format="counter" sectionFormat="of" target="section-1.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-requirements-language">Requirements Language</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-problem-statement">Problem Statement</xref></t>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-control-of-the-bfd-reverse-">Control of the BFD Reverse Path</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2">
              <li pn="section-toc.1-1.3.2.1">
                <t indent="0" pn="section-toc.1-1.3.2.1.1"><xref derivedContent="3.1" format="counter" sectionFormat="of" target="section-3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-bfd-reverse-path-tlv">BFD Reverse Path TLV</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.2">
                <t indent="0" pn="section-toc.1-1.3.2.2.1"><xref derivedContent="3.2" format="counter" sectionFormat="of" target="section-3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-return-codes">Return Codes</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.3">
                <t indent="0" pn="section-toc.1-1.3.2.3.1"><xref derivedContent="3.3" format="counter" sectionFormat="of" target="section-3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-failure-characterization">Failure Characterization</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-use-case-scenario">Use Case Scenario</xref></t>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-operational-considerations">Operational Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2">
              <li pn="section-toc.1-1.6.2.1">
                <t indent="0" pn="section-toc.1-1.6.2.1.1"><xref derivedContent="6.1" format="counter" sectionFormat="of" target="section-6.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-bfd-reverse-path-tlv-3">BFD Reverse Path TLV</xref></t>
              </li>
              <li pn="section-toc.1-1.6.2.2">
                <t indent="0" pn="section-toc.1-1.6.2.2.1"><xref derivedContent="6.2" format="counter" sectionFormat="of" target="section-6.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-return-codes-2">Return Codes</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.a"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgments">Acknowledgments</xref></t>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="intro" numbered="true" toc="include" removeInRFC="false" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">
 <xref target="RFC5880" format="default" sectionFormat="of" derivedContent="RFC5880"/>, <xref target="RFC5881" format="default" sectionFormat="of" derivedContent="RFC5881"/>, and <xref target="RFC5883" format="default" sectionFormat="of" derivedContent="RFC5883"/>
 established the Bidirectional Forwarding Detection (BFD)
 protocol for IP networks. <xref target="RFC5884" format="default" sectionFormat="of" derivedContent="RFC5884"/> and <xref target="RFC7726" format="default" sectionFormat="of" derivedContent="RFC7726"/>
 set rules for using BFD Asynchronous mode over MPLS Label Switched Paths (LSPs),
 while not defining means to control the path that an egress BFD system uses to send BFD
 control packets towards the ingress BFD system.
      </t>
      <t indent="0" pn="section-1-2">
When BFD is used to detect defects of the traffic-engineered LSP,
the path of the BFD control packets transmitted by the egress BFD system
toward the ingress may be disjoint from the monitored LSP in the forward direction.
The fact that BFD control packets are not
   guaranteed to follow the same links and nodes in both forward and
   reverse directions may be one of the factors contributing to false positive defect
   notifications (i.e., false alarms) at the ingress BFD peer.  Ensuring that both directions 
   of the BFD session use co-routed paths may, in some environments, improve the 
   determinism of the failure detection and localization.

      </t>
      <t indent="0" pn="section-1-3">
 This document defines the BFD Reverse Path TLV as an extension to LSP ping
 <xref target="RFC8029" format="default" sectionFormat="of" derivedContent="RFC8029"/> and proposes that it be used to
 instruct the egress BFD system to use an explicit path for its BFD control
 packets associated with a particular BFD session.  IANA has registered this
 TLV in the "TLVs" registry defined by <xref target="RFC8029" format="default" sectionFormat="of" derivedContent="RFC8029"/> (see <xref target="iana-TLV" format="default" sectionFormat="of" derivedContent="Section 6.1"/>).  As a special case, forward and reverse directions of the
 BFD session can form a bidirectional co-routed associated channel.
      </t>
      <t indent="0" pn="section-1-4">The LSP ping extension described in this document was developed and
      implemented as a result of an operational experiment. The lessons
      learned from the operational experiment enabled the use of this
      extension between systems conforming to this specification.  Further
      implementation is encouraged to better understand the operational impact
      of the mechanism described in the document.</t>
      <section numbered="true" toc="include" removeInRFC="false" pn="section-1.1">
        <name slugifiedName="name-conventions-used-in-this-do">Conventions Used in This document</name>
        <section numbered="true" removeInRFC="false" toc="include" pn="section-1.1.1">
          <name slugifiedName="name-terminology">Terminology</name>
          <dl newline="false" spacing="normal" indent="7" pn="section-1.1.1-1">
            <dt pn="section-1.1.1-1.1">BFD:</dt>
            <dd pn="section-1.1.1-1.2">Bidirectional Forwarding Detection</dd>
            <dt pn="section-1.1.1-1.3">FEC:</dt>
            <dd pn="section-1.1.1-1.4">Forwarding Equivalence Class</dd>
            <dt pn="section-1.1.1-1.5">LSP:</dt>
            <dd pn="section-1.1.1-1.6">Label Switched Path</dd>
            <dt pn="section-1.1.1-1.7">LSR:</dt>
            <dd pn="section-1.1.1-1.8">Label Switching Router</dd>
          </dl>
        </section>
        <section numbered="true" toc="include" removeInRFC="false" pn="section-1.1.2">
          <name slugifiedName="name-requirements-language">Requirements Language</name>
          <t indent="0" pn="section-1.1.2-1">
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
    "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
    "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are
    to be interpreted as described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/>
            <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and only when, they appear in all capitals,
    as shown here.
          </t>
        </section>
      </section>
    </section>
    <section anchor="problem-statement" numbered="true" toc="include" removeInRFC="false" pn="section-2">
      <name slugifiedName="name-problem-statement">Problem Statement</name>
      <t indent="0" pn="section-2-1">
   When BFD is used to monitor an explicitly routed unidirectional path
   (e.g., MPLS-TE LSP), BFD control packets in the forward direction would
   be in-band using the mechanism defined in <xref target="RFC5884" format="default" sectionFormat="of" derivedContent="RFC5884"/>. However, the
   reverse direction of the BFD session would follow the shortest path
   route, which could be completely or partially disjoint from the
   forward path. This creates the potential for the failure of a
   disjoint resource on the reverse path to trigger a BFD failure
   detection, even though the forward path is unaffected.
</t>
      <t indent="0" pn="section-2-2">
   If the reverse path is congruent with the forward path, the potential
   for such false positives is greatly reduced. For this purpose, this
   specification provides a means for the egress BFD peer to be
   instructed to use a specific path for BFD control packets.
</t>
    </section>
    <section anchor="direct-reverse-bfd" numbered="true" toc="include" removeInRFC="false" pn="section-3">
      <name slugifiedName="name-control-of-the-bfd-reverse-">Control of the BFD Reverse Path</name>
      <t indent="0" pn="section-3-1">
 To bootstrap a BFD session over an MPLS LSP, LSP ping <xref target="RFC8029" format="default" sectionFormat="of" derivedContent="RFC8029"/> <bcp14>MUST</bcp14> be used with the BFD Discriminator TLV
 <xref target="RFC5884" format="default" sectionFormat="of" derivedContent="RFC5884"/>.  This document defines a new TLV,
 the BFD Reverse Path TLV, that can be used to carry information about the
 reverse path for the BFD session that is specified by the value in the BFD
 Discriminator TLV. The BFD Reverse Path TLV <bcp14>MAY</bcp14> contain zero
 or more sub-TLVs.
      </t>
      <section anchor="bfd-reverse-path-tlv" numbered="true" toc="include" removeInRFC="false" pn="section-3.1">
        <name slugifiedName="name-bfd-reverse-path-tlv">BFD Reverse Path TLV</name>
        <t indent="0" pn="section-3.1-1">
The BFD Reverse Path TLV is an optional TLV within the LSP ping <xref target="RFC8029" format="default" sectionFormat="of" derivedContent="RFC8029"/>. 
However, if used, the BFD Discriminator TLV <bcp14>MUST</bcp14> be included in an echo request message 
as well. If the BFD Discriminator TLV is not present when the BFD Reverse
Path TLV is included, then it <bcp14>MUST</bcp14> be treated as a malformed echo request, as described in <xref target="RFC8029" format="default" sectionFormat="of" derivedContent="RFC8029"/>.
</t>
        <t indent="0" pn="section-3.1-2">
The BFD Reverse Path TLV carries information about the path onto which the egress BFD peer of the BFD session referenced by the BFD
Discriminator TLV <bcp14>MUST</bcp14> transmit BFD control packets. The format of the BFD Reverse Path TLV is presented in <xref target="mpls-bfd-tlv" format="default" sectionFormat="of" derivedContent="Figure 1"/>.
</t>
        <figure anchor="mpls-bfd-tlv" align="left" suppress-title="false" pn="figure-1">
          <name slugifiedName="name-bfd-reverse-path-tlv-2">BFD Reverse Path TLV</name>
          <artwork name="" type="" align="left" alt="" pn="section-3.1-3.1">
  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |   BFD Reverse Path TLV Type   |           Length              |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                          Reverse Path                         |
 ~                                                               ~
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
</artwork>
        </figure>
        <dl newline="true" spacing="normal" indent="3" pn="section-3.1-4">
          <dt pn="section-3.1-4.1">BFD Reverse Path TLV Type:</dt>
          <dd pn="section-3.1-4.2">This two-octet field has a value of 16384 (see <xref target="iana-consider" format="default" sectionFormat="of" derivedContent="Section 6"/>).
  </dd>
          <dt pn="section-3.1-4.3">Length:</dt>
          <dd pn="section-3.1-4.4">This two-octet field defines the length in octets of the
  Reverse Path field.
  </dd>
          <dt pn="section-3.1-4.5">Reverse Path:</dt>
          <dd pn="section-3.1-4.6">This field contains zero or more sub-TLVs. Only non-multicast Target FEC
  Stack sub-TLVs (already defined or to be defined in the future) for TLV
  Types 1, 16, and 21 in the "Multiprotocol Label Switching (MPLS) Label
  Switched Paths (LSPs) Ping Parameters" registry are permitted to be used in
  this field. Other sub-TLVs <bcp14>MUST NOT</bcp14> be used. (This implies
  that multicast Target FEC Stack sub-TLVs, e.g., the Multicast P2MP LDP FEC
  Stack sub-TLV and the Multicast MP2MP LDP FEC Stack sub-TLV, are not
  permitted in the Reverse Path field.)
  </dd>
        </dl>
        <t indent="0" pn="section-3.1-5">If the egress LSR finds a multicast Target FEC Stack sub-TLV, it
  <bcp14>MUST</bcp14> send an echo reply with the received BFD Reverse Path
  TLV and BFD Discriminator TLV and set the Return Code to 192 ("Inappropriate
  Target FEC Stack sub-TLV present") (see <xref target="return-codes" format="default" sectionFormat="of" derivedContent="Section 3.2"/>).  The BFD Reverse Path TLV includes zero or more
  sub-TLVs.  However, the number of sub-TLVs in the Reverse Path field
  <bcp14>MUST</bcp14> be limited.  The default limit is 128 sub-TLV entries,
  but an implementation <bcp14>MAY</bcp14> be able to control that limit.  An
  empty BFD Reverse Path TLV (i.e., a BFD Reverse Path TLV with no sub-TLVs)
  is used to withdraw any previously set reverse path for the BFD session
  identified in the BFD Discriminator TLV.  If no sub-TLVs are found in the
  BFD Reverse Path TLV, the egress BFD peer <bcp14>MUST</bcp14> revert to
  using the decision based on local policy, i.e., routing over an IP
  network, as described in <xref target="RFC5884" format="default" sectionFormat="of" section="7" derivedLink="https://rfc-editor.org/rfc/rfc5884#section-7" derivedContent="RFC5884"/>.</t>
        <t indent="0" pn="section-3.1-6">
             If the egress peer LSR cannot find the path specified in the BFD
             Reverse Path TLV, it <bcp14>MUST</bcp14> send an echo reply with
             the received BFD Discriminator TLV and BFD Reverse Path TLV and set
             the Return Code to 193 ("Failed to establish the BFD session. The
             specified reverse path was not found.") (see <xref target="return-codes" format="default" sectionFormat="of" derivedContent="Section 3.2"/>).  If an implementation
             provides additional configuration options, these can control
             actions at the egress BFD peer, including when the path specified
             in the BFD Reverse Path TLV cannot be found.  For example,
             if the egress peer LSR cannot find the path specified
             in the BFD Reverse Path TLV, it <bcp14>MAY</bcp14> establish the
             BFD session over an IP network, as defined in <xref target="RFC5884" format="default" sectionFormat="of" derivedContent="RFC5884"/>.  Note that the Return Code
             required by the "<bcp14>MUST</bcp14>" clause in this paragraph does not preclude
             the session from being established over a different path as
             discussed in the "<bcp14>MAY</bcp14>" clause.
        </t>
        <t indent="0" pn="section-3.1-7">
           The BFD Reverse Path TLV <bcp14>MAY</bcp14> be used in the process
           of bootstrapping the BFD session as described in <xref target="RFC5884" section="6" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5884#section-6" derivedContent="RFC5884"/>.  A system that
           supports this specification <bcp14>MUST</bcp14> support using the
           BFD Reverse Path TLV after the BFD session has been established. If
           a system that supports this specification receives an LSP ping with
           the BFD Discriminator TLV and no BFD Reverse Path TLV even though
           the reverse path for the specified BFD session was established
           according to the previously received BFD Reverse Path TLV, the
           egress BFD peer <bcp14>MUST</bcp14> transition to transmitting
           periodic BFD Control messages as described in <xref target="RFC5884" section="7" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5884#section-7" derivedContent="RFC5884"/>. If a BFD system
           that received an LSP ping with the BFD Reverse Path TLV does not
           support this specification, it will result in an echo response with
           the Return Code set to 2 ("One or more of the TLVs was not
           understood"), as described in <xref target="RFC8029" section="3" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8029#section-3" derivedContent="RFC8029"/>.
        </t>
      </section>
      <section anchor="return-codes" numbered="true" toc="include" removeInRFC="false" pn="section-3.2">
        <name slugifiedName="name-return-codes">Return Codes</name>
        <t indent="0" pn="section-3.2-1">
This document defines the following Return Codes for the MPLS LSP echo reply:
</t>
        <dl spacing="normal" newline="true" indent="3" pn="section-3.2-2">
          <dt pn="section-3.2-2.1">"Inappropriate Target FEC Stack sub-TLV present" (192):</dt>
          <dd pn="section-3.2-2.2">When a multicast Target FEC Stack sub-TLV is found in
the received echo request, the egress BFD peer sends an echo reply with the Return Code set to 192
("Inappropriate Target FEC Stack sub-TLV present") to the ingress BFD peer, as described in <xref target="bfd-reverse-path-tlv" format="default" sectionFormat="of" derivedContent="Section 3.1"/>.
</dd>
          <dt pn="section-3.2-2.3">"Failed to establish the BFD session. The specified reverse path was not found." (193):</dt>
          <dd pn="section-3.2-2.4">When a specified reverse path is unavailable, the egress BFD peer sends an
echo reply with the Return Code set to 193 ("Failed to establish the BFD
session. The specified reverse path was not found.") to the ingress BFD peer, as
described in <xref target="bfd-reverse-path-tlv" format="default" sectionFormat="of" derivedContent="Section 3.1"/>.
</dd>
        </dl>
      </section>
      <section anchor="failure-character-sec" numbered="true" toc="include" removeInRFC="false" pn="section-3.3">
        <name slugifiedName="name-failure-characterization">Failure Characterization</name>
        <t indent="0" pn="section-3.3-1">
         
         A failure detected by a BFD session that uses the BFD Reverse Path
         TLV could be due to a change in the FEC used in the BFD Reverse Path
         TLV.  Upon detection of the network failure, the ingress BFD peer
         <bcp14>MUST</bcp14> transmit the LSP ping echo request with the Reply
         Path TLV <xref target="RFC7110" format="default" sectionFormat="of" derivedContent="RFC7110"/> to verify whether the FEC is still
         valid. If the failure was caused by a change in the FEC used for the
         reverse direction of the BFD session, the ingress BFD peer
         <bcp14>MUST</bcp14> redirect the reverse path of the BFD session
         using another FEC in the BFD Reverse Path TLV and notify an operator.
        </t>
      </section>
    </section>
    <section anchor="use-case" numbered="true" toc="include" removeInRFC="false" pn="section-4">
      <name slugifiedName="name-use-case-scenario">Use Case Scenario</name>
      <t indent="0" pn="section-4-1">
 In the network presented in <xref target="use-case-fig" format="default" sectionFormat="of" derivedContent="Figure 2"/>,
 ingress LSR peer A monitors two tunnels to egress LSR peer H: A-B-C-D-G-H and
 A-B-E-F-G-H.  To bootstrap a BFD session to monitor the first tunnel, ingress
 LSR peer A includes a BFD Discriminator TLV with a Discriminator value (e.g.,
 foobar-1) <xref target="RFC7726" format="default" sectionFormat="of" derivedContent="RFC7726"/>. Ingress LSR peer A includes a BFD
 Reverse Path TLV referencing the H-G-D-C-B-A tunnel to control the path from
 the egress LSR.  To bootstrap a BFD session to monitor the second tunnel,
 ingress LSR peer A includes a BFD Discriminator TLV with a different
 Discriminator value (e.g., foobar-2) and a BFD Reverse Path TLV that
 references the H-G-F-E-B-A tunnel.
      </t>
      <figure anchor="use-case-fig" align="left" suppress-title="false" pn="figure-2">
        <name slugifiedName="name-use-case-for-bfd-reverse-pa">Use Case for BFD Reverse Path TLV</name>
        <artwork name="" type="" align="left" alt="" pn="section-4-2.1">
        C---------D
        |         |
A-------B         G-----H
        |         |
        E---------F
</artwork>
      </figure>
      <t indent="0" pn="section-4-3">
If an operator needs egress LSR peer H to monitor a path to ingress LSR peer A, e.g.,
the H-G-D-C-B-A tunnel, then by looking up the list of known reverse paths,
it <bcp14>MAY</bcp14> find and use the existing BFD session.
</t>
    </section>
    <section anchor="operational-sec" numbered="true" toc="include" removeInRFC="false" pn="section-5">
      <name slugifiedName="name-operational-considerations">Operational Considerations</name>
      <t indent="0" pn="section-5-1">
  When an explicit path is set as either Static or RSVP-TE LSP,
  corresponding sub-TLVs (defined in <xref target="RFC7110" format="default" sectionFormat="of" derivedContent="RFC7110"/>) <bcp14>MAY</bcp14> be used
  to identify the explicit reverse path for the BFD session. If a particular set of sub-TLVs composes the Reply Path TLV <xref target="RFC7110" format="default" sectionFormat="of" derivedContent="RFC7110"/>
  and does not increase the length of the Maximum  Transmission Unit for the given LSP, that set can be safely used in the BFD Reverse Path TLV.
  If any of the sub-TLVs defined in <xref target="RFC7110" format="default" sectionFormat="of" derivedContent="RFC7110"/>
   are used in the BFD Reverse Path TLV, then the periodic verification of the control plane
  against the data plane, as recommended in <xref target="RFC5884" section="4" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc5884#section-4" derivedContent="RFC5884"/>, <bcp14>MUST</bcp14> use
  the Reply Path TLV, as per <xref target="RFC7110" format="default" sectionFormat="of" derivedContent="RFC7110"/>, with that sub-TLV.
  By using the LSP ping with the Reply Path TLV, an operator monitors whether
   the reverse LSP is mapped to the same FEC as the BFD session at the egress BFD node.
  Selection and control of the rate of the LSP ping with the Reply Path TLV
      follows the recommendation in <xref target="RFC5884" format="default" sectionFormat="of" derivedContent="RFC5884"/>:</t>
      <blockquote pn="section-5-2">      
The rate of generation of these LSP Ping Echo request messages
<bcp14>SHOULD</bcp14> be significantly less than the rate of generation of the
BFD Control packets.  An implementation <bcp14>MAY</bcp14> provide
configuration options to control the rate of generation of the periodic LSP
Ping Echo request messages.
</blockquote>
      <t indent="0" pn="section-5-3">
    Suppose an operator planned a network maintenance activity that
   possibly affects the FEC used in the BFD Reverse Path TLV. In that case,
   the operator can avoid unnecessary disruption by using the LSP ping
   with a new FEC in the BFD Reverse Path TLV. But in some scenarios, proactive measures cannot be taken
    because the frequency of LSP ping messages is lower than the defect detection time provided by the BFD session.
    As a result, a change in the reverse-path FEC will first be detected as the BFD session's failure.
   An operator will be notified as described in <xref target="failure-character-sec" format="default" sectionFormat="of" derivedContent="Section 3.3"/>.
      </t>
    </section>
    <section anchor="iana-consider" numbered="true" toc="include" removeInRFC="false" pn="section-6">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <section anchor="iana-TLV" numbered="true" toc="include" removeInRFC="false" pn="section-6.1">
        <name slugifiedName="name-bfd-reverse-path-tlv-3">BFD Reverse Path TLV</name>
        <t indent="0" pn="section-6.1-1">
     IANA has assigned the following value for the BFD Reverse Path TLV from the 16384-31739 range in the "TLVs" subregistry within the "Multiprotocol Label Switching (MPLS) Label Switched Paths (LSPs) Ping Parameters" registry.
        </t>
        <table anchor="bfdtlv-table" align="center" pn="table-1">
          <name slugifiedName="name-new-bfd-reverse-path-tlv">New BFD Reverse Path TLV</name>
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Type</th>
              <th align="left" colspan="1" rowspan="1">TLV Name</th>
              <th align="left" colspan="1" rowspan="1">Reference</th>
              <th align="left" colspan="1" rowspan="1">Sub-TLV Registry</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">16384</td>
              <td align="left" colspan="1" rowspan="1">BFD Reverse Path</td>
              <td align="left" colspan="1" rowspan="1">RFC 9612</td>
              <td align="left" colspan="1" rowspan="1">Only non-multicast sub-TLVs (already defined or
              to be defined in the future) in the "Sub-TLVs for TLV Types 1,
              16, and 21" registry at <eref brackets="angle" target="https://www.iana.org/assignments/mpls-lsp-ping-parameters/mpls-lsp-ping-parameters.xml#sub-tlv-1-16-21"/>
              are permitted to be used in this field. Other sub-TLVs
              <bcp14>MUST NOT</bcp14> be used.
               </td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="iana-return-code" numbered="true" toc="include" removeInRFC="false" pn="section-6.2">
        <name slugifiedName="name-return-codes-2">Return Codes</name>
        <t indent="0" pn="section-6.2-1">
IANA has assigned the following Return Code values from the 192-247 range in the "Return Codes" subregistry
within the "Multiprotocol Label Switching (MPLS) Label Switched Paths (LSPs) Ping Parameters" registry.
</t>
        <table anchor="return-code" align="center" pn="table-2">
          <name slugifiedName="name-new-return-codes">New Return Codes</name>
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Value</th>
              <th align="left" colspan="1" rowspan="1">Meaning</th>
              <th align="left" colspan="1" rowspan="1">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">192</td>
              <td align="left" colspan="1" rowspan="1">Inappropriate Target FEC Stack sub-TLV present</td>
              <td align="left" colspan="1" rowspan="1">RFC 9612</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">193</td>
              <td align="left" colspan="1" rowspan="1">Failed to establish the BFD session. The specified reverse path was not found.</td>
              <td align="left" colspan="1" rowspan="1">RFC 9612</td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>
    <section anchor="security" numbered="true" toc="include" removeInRFC="false" pn="section-7">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-7-1">
 Security considerations discussed in <xref target="RFC5880" format="default" sectionFormat="of" derivedContent="RFC5880"/>, <xref target="RFC5884" format="default" sectionFormat="of" derivedContent="RFC5884"/>, <xref target="RFC7726" format="default" sectionFormat="of" derivedContent="RFC7726"/>,
 <xref target="RFC8029" format="default" sectionFormat="of" derivedContent="RFC8029"/>, and <xref target="RFC7110" format="default" sectionFormat="of" derivedContent="RFC7110"/> apply to this document. 
      </t>
      <t indent="0" pn="section-7-2">
      The BFD Reverse Path TLV may be exploited as an attack vector by inflating the number of included sub-TLVs.
      The number of sub-TLVs <bcp14>MUST</bcp14> be limited to mitigate that threat. The default limit for the number of sub-TLVs is
      set to 128 (see <xref target="bfd-reverse-path-tlv" format="default" sectionFormat="of" derivedContent="Section 3.1"/>). An implementation <bcp14>MAY</bcp14> use a mechanism to control that limit.
      </t>
    </section>
  </middle>
  <back>
    <references pn="section-8">
      <name slugifiedName="name-normative-references">Normative References</name>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
          <abstract>
            <t indent="0">In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC5880" target="https://www.rfc-editor.org/info/rfc5880" quoteTitle="true" derivedAnchor="RFC5880">
        <front>
          <title>Bidirectional Forwarding Detection (BFD)</title>
          <author fullname="D. Katz" initials="D." surname="Katz"/>
          <author fullname="D. Ward" initials="D." surname="Ward"/>
          <date month="June" year="2010"/>
          <abstract>
            <t indent="0">This document describes a protocol intended to detect faults in the bidirectional path between two forwarding engines, including interfaces, data link(s), and to the extent possible the forwarding engines themselves, with potentially very low latency. It operates independently of media, data protocols, and routing protocols. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="5880"/>
        <seriesInfo name="DOI" value="10.17487/RFC5880"/>
      </reference>
      <reference anchor="RFC5881" target="https://www.rfc-editor.org/info/rfc5881" quoteTitle="true" derivedAnchor="RFC5881">
        <front>
          <title>Bidirectional Forwarding Detection (BFD) for IPv4 and IPv6 (Single Hop)</title>
          <author fullname="D. Katz" initials="D." surname="Katz"/>
          <author fullname="D. Ward" initials="D." surname="Ward"/>
          <date month="June" year="2010"/>
          <abstract>
            <t indent="0">This document describes the use of the Bidirectional Forwarding Detection (BFD) protocol over IPv4 and IPv6 for single IP hops. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="5881"/>
        <seriesInfo name="DOI" value="10.17487/RFC5881"/>
      </reference>
      <reference anchor="RFC5883" target="https://www.rfc-editor.org/info/rfc5883" quoteTitle="true" derivedAnchor="RFC5883">
        <front>
          <title>Bidirectional Forwarding Detection (BFD) for Multihop Paths</title>
          <author fullname="D. Katz" initials="D." surname="Katz"/>
          <author fullname="D. Ward" initials="D." surname="Ward"/>
          <date month="June" year="2010"/>
          <abstract>
            <t indent="0">This document describes the use of the Bidirectional Forwarding Detection (BFD) protocol over multihop paths, including unidirectional links. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="5883"/>
        <seriesInfo name="DOI" value="10.17487/RFC5883"/>
      </reference>
      <reference anchor="RFC5884" target="https://www.rfc-editor.org/info/rfc5884" quoteTitle="true" derivedAnchor="RFC5884">
        <front>
          <title>Bidirectional Forwarding Detection (BFD) for MPLS Label Switched Paths (LSPs)</title>
          <author fullname="R. Aggarwal" initials="R." surname="Aggarwal"/>
          <author fullname="K. Kompella" initials="K." surname="Kompella"/>
          <author fullname="T. Nadeau" initials="T." surname="Nadeau"/>
          <author fullname="G. Swallow" initials="G." surname="Swallow"/>
          <date month="June" year="2010"/>
          <abstract>
            <t indent="0">One desirable application of Bidirectional Forwarding Detection (BFD) is to detect a Multiprotocol Label Switching (MPLS) Label Switched Path (LSP) data plane failure. LSP Ping is an existing mechanism for detecting MPLS data plane failures and for verifying the MPLS LSP data plane against the control plane. BFD can be used for the former, but not for the latter. However, the control plane processing required for BFD Control packets is relatively smaller than the processing required for LSP Ping messages. A combination of LSP Ping and BFD can be used to provide faster data plane failure detection and/or make it possible to provide such detection on a greater number of LSPs. This document describes the applicability of BFD in relation to LSP Ping for this application. It also describes procedures for using BFD in this environment. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="5884"/>
        <seriesInfo name="DOI" value="10.17487/RFC5884"/>
      </reference>
      <reference anchor="RFC7110" target="https://www.rfc-editor.org/info/rfc7110" quoteTitle="true" derivedAnchor="RFC7110">
        <front>
          <title>Return Path Specified Label Switched Path (LSP) Ping</title>
          <author fullname="M. Chen" initials="M." surname="Chen"/>
          <author fullname="W. Cao" initials="W." surname="Cao"/>
          <author fullname="S. Ning" initials="S." surname="Ning"/>
          <author fullname="F. Jounay" initials="F." surname="Jounay"/>
          <author fullname="S. Delord" initials="S." surname="Delord"/>
          <date month="January" year="2014"/>
          <abstract>
            <t indent="0">This document defines extensions to the data-plane failure-detection protocol for Multiprotocol Label Switching (MPLS) Label Switched Paths (LSPs) known as "LSP ping". These extensions allow a selection of the LSP to be used for the echo reply return path. Enforcing a specific return path can be used to verify bidirectional connectivity and also increase LSP ping robustness.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="7110"/>
        <seriesInfo name="DOI" value="10.17487/RFC7110"/>
      </reference>
      <reference anchor="RFC7726" target="https://www.rfc-editor.org/info/rfc7726" quoteTitle="true" derivedAnchor="RFC7726">
        <front>
          <title>Clarifying Procedures for Establishing BFD Sessions for MPLS Label Switched Paths (LSPs)</title>
          <author fullname="V. Govindan" initials="V." surname="Govindan"/>
          <author fullname="K. Rajaraman" initials="K." surname="Rajaraman"/>
          <author fullname="G. Mirsky" initials="G." surname="Mirsky"/>
          <author fullname="N. Akiya" initials="N." surname="Akiya"/>
          <author fullname="S. Aldrin" initials="S." surname="Aldrin"/>
          <date month="January" year="2016"/>
          <abstract>
            <t indent="0">This document clarifies the procedures for establishing, maintaining, and removing multiple, concurrent BFD (Bidirectional Forwarding Detection) sessions for a given as described in RFC 5884.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="7726"/>
        <seriesInfo name="DOI" value="10.17487/RFC7726"/>
      </reference>
      <reference anchor="RFC8029" target="https://www.rfc-editor.org/info/rfc8029" quoteTitle="true" derivedAnchor="RFC8029">
        <front>
          <title>Detecting Multiprotocol Label Switched (MPLS) Data-Plane Failures</title>
          <author fullname="K. Kompella" initials="K." surname="Kompella"/>
          <author fullname="G. Swallow" initials="G." surname="Swallow"/>
          <author fullname="C. Pignataro" initials="C." role="editor" surname="Pignataro"/>
          <author fullname="N. Kumar" initials="N." surname="Kumar"/>
          <author fullname="S. Aldrin" initials="S." surname="Aldrin"/>
          <author fullname="M. Chen" initials="M." surname="Chen"/>
          <date month="March" year="2017"/>
          <abstract>
            <t indent="0">This document describes a simple and efficient mechanism to detect data-plane failures in Multiprotocol Label Switching (MPLS) Label Switched Paths (LSPs). It defines a probe message called an "MPLS echo request" and a response message called an "MPLS echo reply" for returning the result of the probe. The MPLS echo request is intended to contain sufficient information to check correct operation of the data plane and to verify the data plane against the control plane, thereby localizing faults.</t>
            <t indent="0">This document obsoletes RFCs 4379, 6424, 6829, and 7537, and updates RFC 1122.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8029"/>
        <seriesInfo name="DOI" value="10.17487/RFC8029"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
          <abstract>
            <t indent="0">RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
    </references>
    <section numbered="false" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-acknowledgments">Acknowledgments</name>
      <t indent="0" pn="section-appendix.a-1">The authors greatly appreciate the thorough reviews and helpful
      comments from <contact fullname="Eric Gray"/> and <contact fullname="Carlos Pignataro"/>.  The authors much appreciate the help of
      <contact fullname="Qian Xin"/>, who provided information about the
      implementation of this specification.
      </t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.b">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author initials="G." surname="Mirsky" fullname="Greg Mirsky">
        <organization showOnFrontPage="true">Ericsson</organization>
        <address>
          <email>gregimirsky@gmail.com</email>
        </address>
      </author>
      <author initials="J." surname="Tantsura" fullname="Jeff  Tantsura">
        <organization showOnFrontPage="true">NVIDIA</organization>
        <address>
          <email>jefftant.ietf@gmail.com</email>
        </address>
      </author>
      <author initials="I." surname="Varlashkin" fullname="Ilya Varlashkin">
        <organization showOnFrontPage="true">Google</organization>
        <address>
          <email>imv@google.com</email>
        </address>
      </author>
      <author fullname="Mach(Guoyi) Chen" initials="M." surname="Chen">
        <organization showOnFrontPage="true">Huawei</organization>
        <address>
          <email>mach.chen@huawei.com</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
