<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rfc [
<!ENTITY nbsp "&#160;">
<!ENTITY zwsp "&#8203;">
<!ENTITY nbhy "&#8209;">
<!ENTITY wj "&#8288;">
]>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="exp" ipr="trust200902" docName="draft-ietf-mpls-bfd-directed-29" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" tocDepth="3" symRefs="true" sortRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.6.0 -->
  <?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<front>
    <title abbrev="BFD Directed Return Path for MPLS LSPs">Bidirectional Forwarding Detection (BFD) Directed Return Path for MPLS Label Switched Paths (LSPs)</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-mpls-bfd-directed-29"/>
    <author initials="G." surname="Mirsky" fullname="Greg Mirsky">
      <organization>Ericsson</organization>
      <address>
        <email>gregimirsky@gmail.com</email>
      </address>
    </author>
    <author initials="J." surname="Tantsura" fullname="Jeff  Tantsura">
      <organization>NVIDIA</organization>
      <address>
        <email>jefftant.ietf@gmail.com</email>
      </address>
    </author>
    <author initials="I." surname="Varlashkin" fullname="Ilya Varlashkin">
      <organization>Google</organization>
      <address>
        <email>imv@google.com</email>
      </address>
    </author>
    <author fullname="Mach(Guoyi) Chen" initials="M." surname="Chen">
      <organization>Huawei</organization>
      <address>
        <postal>
          <street/>
          <city/>
          <code/>
          <country/>
        </postal>
        <email>mach.chen@huawei.com</email>
      </address>
    </author>
    
    <date year="2024"/>
    
    <area>Routing</area>
    <workgroup>MPLS Working Group</workgroup>
    <keyword>Internet-Draft</keyword>
    <keyword>LSP Ping</keyword>
    <keyword>BFD </keyword>
    <abstract>
      <t>
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 rto equest that the remote BFD peer transmits BFD control packets
over the specified LSP.
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
 <xref target="RFC5880"/>, <xref target="RFC5881"/>, and <xref target="RFC5883"/>
 established the Bidirectional Forwarding Detection (BFD)
 protocol for IP networks. <xref target="RFC5884" format="default"/> and <xref target="RFC7726" format="default"/>
 set rules for using BFD Asynchronous mode over MPLS Label Switched Paths (LSPs),
 while not defining means to control the path an egress BFD system uses to send BFD
 control packets towards the ingress BFD system.
      </t>
      <t>
For the case when BFD is used to detect defects of the traffic engineered LSP the path
the BFD control packets transmitted by the egress BFD system toward the ingress may be disjoint
from the 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 producing 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>
 This document defines the BFD Reverse Path TLV as an extension to LSP Ping  
 <xref target="RFC8029" format="default"/> and proposes
 that it is to be used  to instruct the egress BFD system to use an explicit
 path for its BFD control packets associated with a particular BFD session.
 The TLV will be allocated from the
 TLV and sub-TLV registry defined in <xref target="RFC8029" format="default"/>.
 As a special case, forward and reverse
 directions of the BFD session can form a bi-directional co-routed associated channel.
      </t>
      <t>The LSP ping extension, described in this document, was developed
      and implemented resulting from the operational experiment. The lessons learned from
      the operational experiment enabled the use between systems conforming to this specification.
      More implementations are encouraged to understand better the operational impact
      of the mechanism described in the document.</t>
      <section numbered="true" toc="default">
        <name>Conventions used in this document</name>
  
         <section title="Terminology">

            <t>BFD:          Bidirectional Forwarding Detection</t>
            <t>FEC:          Forwarding Equivalency Class</t>
            <t>LSP:          Label Switched Path</t>
            <t>LSR:          Label-Switching router</t>

         </section>    
 
        <section numbered="true" toc="default">
          <name>Requirements Language</name>
          <t>
   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
   NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
   "MAY", and "OPTIONAL" in this document are to be interpreted as
   described in BCP 14 <xref target="RFC2119" format="default"/> <xref target="RFC8174" format="default"/> 
   when, and only when, they appear in all capitals, as shown here.
          </t>
        </section>
      </section>
    </section>
    <section anchor="problem-statement" numbered="true" toc="default">
      <name>Problem Statement</name>
      <t>
  <!--
  BFD is best suited to monitor bi-directional co-routed paths. 
  In most cases, given stable environments, the forward and reverse directions between two nodes are
  likely to be co-routed.
  -->
  When BFD is used to monitor explicitly routed unidirectional  path, e.g., MPLS-TE LSP, BFD control
  packets in forward direction would be in-band using the mechanism defined in <xref target="RFC5884" format="default"/><!-- and <xref target="RFC5586"/>-->. 
  But the reverse direction of the BFD session would follow the shortest path route and that might lead to the
 problem in detecting failures on an explicit unidirectional path, as described below:
</t>
      <ul spacing="normal">
        <li>
detection by an ingress node of a failure on the reverse path may not be
unambiguously interpreted as the failure of the path in the forward direction.
</li>
      </ul>
      <t>
To address this scenario, the egress BFD peer would be instructed to use a specific path for BFD control packets.
</t>
    </section>
    <section anchor="direct-reverse-bfd" numbered="true" toc="default">
      <name>Control of the Reverse BFD Path</name>
      <t>
 To bootstrap a BFD session over an MPLS LSP, LSP ping, defined in <xref target="RFC8029" format="default"/>, MUST be used with
 BFD Discriminator TLV <xref target="RFC5884" format="default"/>.
 This document defines a new TLV, BFD Reverse Path TLV, that MAY contain none, one or more sub-TLVs
 that can be used to carry information about the reverse path for 
 the BFD session that is specified by the value in BFD Discriminator TLV.
      </t>
      <section anchor="bfd-reverse-path-tlv" numbered="true" toc="default">
        <name>BFD Reverse Path TLV</name>
        <t>
The BFD Reverse Path TLV is an optional TLV within the LSP ping <xref target="RFC8029" format="default"/>. 
However, if used, the BFD Discriminator TLV MUST 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 MUST be treated as malformed Echo Request, as described in <xref target="RFC8029" format="default"/>.
</t>
        <t>
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 MUST transmit BFD control packets. The format of the BFD Reverse Path TLV is as presented in <xref target="mpls-bfd-tlv" format="default"/>.
</t>
        <figure anchor="mpls-bfd-tlv">
          <name>BFD Reverse Path TLV</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[    
  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>
        <t>
            BFD Reverse Path TLV Type is two octets in length and has a value of TBD1 (to be assigned by IANA
            as requested in <xref target="iana-consider" format="default"/>).
        </t>
        <t>
            Length field is two octets long and defines the length in octets of the Reverse Path field.
        </t>
        <t>
Reverse Path field MAY contain none, one, 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 of MPLS LSP Ping Parameters
registry MUST be used  in this field. Multicast Target FEC Stack sub-TLVs, i.e., p2mp and mp2mp,
            MUST NOT be included in Reverse Path field. If the egress Label-Switching Router (LSR) finds multicast
            Target Stack sub-TLV, it MUST send echo reply with the received Reverse Path TLV, 
            BFD Discriminator TLV and set the Return Code to "Inappropriate Target FEC Stack 
            sub-TLV present" (<xref target="return-codes" format="default"/>).
           None, one or more sub-TLVs MAY be included in the BFD Reverse Path TLV.
           However, the number of sub-TLVs in the Reverse Path field MUST be limited.
           The default limit is 128 sub-TLV entries, but an implementation MAY be able to control that limit.
           If no sub-TLVs are found in the BFD Reverse Path TLV, the egress BFD peer MUST revert to
           using the local policy-based decision as described in Section 7 of <xref target="RFC5884" format="default"/>, i.e., routed over IP network.
        </t>
        <t>
             If the egress peer LSR cannot find the path specified in the Reverse Path TLV it MUST send Echo
             Reply with the received BFD Discriminator TLV, Reverse Path TLV 
             and set the Return Code to "Failed to establish the
             BFD session. The specified reverse path was not found" (<xref target="return-codes" format="default"/>).
             An implementation MAY provide configuration options to define action at the egress BFD peer.
  <!-- For example, if the egress LSR cannot find the path specified in the Reverse Path
  TLV,  it  MAY establish the BFD session over an IP network, as defined in <xref target="RFC5884" format="default"/>. -->
  For example, optionally, if the egress peer LSR cannot find the path specified in the Reverse Path
  TLV,  it  will establish the BFD session over an IP network, as defined in <xref target="RFC5884" format="default"/>.
        </t>
        <t>
           The BFD Reverse Path TLV MAY be used in the bootstrapping of a BFD
   session process described in Section 6 of <xref target="RFC5884"/>.  A system that
   supports this specification MUST 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 has been established according to
   the previously received BFD Reverse Path TLV, the egress BFD peer MUST
   transition to transmitting periodic BFD Control messages as defined
   in Section 7 of <xref target="RFC5884"/>.
   </t>
      </section>
      <section anchor="return-codes" numbered="true" toc="default">
        <name>Return Codes</name>
        <t>
This document defines the following Return Codes for MPLS LSP Echo Reply:
</t>
        <ul spacing="normal">
          <li>
"Inappropriate Target FEC Stack sub-TLV present" (TBD3). When multicast Target FEC Stack sub-TLV found in
the received Echo Request, the egress BFD peer sends an Echo Reply with the return code set to
"Inappropriate Target FEC Stack sub-TLV present" to the ingress BFD peer <xref target="bfd-reverse-path-tlv" format="default"/>.
</li>
          <li>
"Failed to establish the BFD session. The specified reverse path was not found" (TBD4).
When a specified reverse path is unavailable, the egress BFD peer sends an Echo Reply with the return
code set to "Failed to establish the BFD session. The specified reverse path was not found"
to the ingress BFD peer <xref target="bfd-reverse-path-tlv" format="default"/>.
</li>
        </ul>
      </section>
    </section>
    <section anchor="use-case" numbered="true" toc="default">
      <name>Use Case Scenario</name>
      <t>
 In the network presented in <xref target="use-case-fig" format="default"/>, ingress LSR peer A monitors two
 tunnels to the 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, the ingress LSR peer A MUST include
 a BFD Discriminator TLV with Discriminator value (e.g., foobar-1) and MAY include
 a BFD Reverse Path TLV that references H-G-D-C-B-A tunnel. To bootstrap
 a BFD session to monitor the second tunnel, ingress LSR peer A, MUST include
 a BFD Discriminator TLV with a different Discriminator value (e.g., foobar-2)
  <xref target="RFC7726" format="default"/> and MAY include
 a BFD Reverse Path TLV that references H-G-F-E-B-A tunnel.
      </t>
      <figure anchor="use-case-fig">
        <name>Use Case for BFD Reverse Path TLV</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[    
        C---------D
        |         |
A-------B         G-----H
        |         |
        E---------F
]]></artwork>
      </figure>
      <t>
If an operator needs egress LSR peer H to monitor a path to the ingress LSR peer A, e.g.,
H-G-D-C-B-A tunnel, then by looking up the list of known Reverse Paths,
it MAY find and use the existing BFD session.
</t>
    </section>
    <section anchor="operational-sec" numbered="true" toc="default">
      <name>Operational Considerations</name>
      <t>
  When an explicit path is set either as Static or RSVP-TE LSP,
  corresponding sub-TLVs, defined in <xref target="RFC7110" format="default"/>, MAY be used
  to identify the explicit reverse path for the BFD session. If a particular set of sub-TLVs composes the Return Path TLV  <xref target="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 defined in <xref target="RFC7110" format="default"/>
  sub-TLVs used in BFD Reverse Path TLV, then the periodic verification of the control plane
  against the data plane, as recommended in Section 4 of <xref target="RFC5884" format="default"/>, MUST use
  the Return Path TLV, as per <xref target="RFC7110" format="default"/>, with that sub-TLV.
  By using the LSP Ping with Return Path TLV, an operator monitors whether
  at the egress BFD node the reverse LSP is mapped to the same FEC as the BFD session.
  Selection and control of the rate of LSP Ping with Return Path TLV
  follows the recommendation of <xref target="RFC5884" format="default"/>:
"The rate of generation of these LSP Ping Echo request
   messages SHOULD be significantly less than the rate of generation of
   the BFD Control packets.  An implementation MAY provide configuration
   options to control the rate of generation of the periodic LSP Ping
   Echo request messages."
      </t>
      <t>
    Suppose an operator planned network maintenance activity that possibly affects FEC used in
    the BFD Reverse Path TLV. In that case, the operator MUST avoid the unnecessary disruption 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 will be 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.
    In such a case, the ingress BFD peer SHOULD immediately transmit the LSP Ping Echo request with Return Path TLV
    to verify whether the FEC is still valid. If the failure was caused by the change in the FEC used for the
    reverse direction of the BFD session, the ingress BFD peer SHOULD bootstrap a new BFD session
 using another FEC in BFD Reverse Path TLV.
      </t>
    </section>
    <section anchor="iana-consider" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <section anchor="iana-TLV" numbered="true" toc="default">
        <name>BFD Reverse Path TLV</name>
        <t>
     The IANA is requested to assign a new value for BFD Reverse Path TLV from the 16384-31739 range in the "TLVs" registry of "Multiprotocol Label
     Switching Architecture (MPLS) Label Switched Paths (LSPs) Ping Parameters" registry.
        </t>
        <table anchor="bfdtlv-table" align="center">
          <name>New BFD Reverse Type TLV</name>
          <thead>
            <tr>
              <th align="left">Value</th>
              <th align="left">Description</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">&nbsp;(TBD1)</td>
              <td align="left">BFD Reverse Path TLV</td>
              <td align="left">This&nbsp;document</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="iana-return-code" numbered="true" toc="default">
        <name>Return Code</name>
        <t>
The IANA is requested to assign new Return Code values from the 192-247 range  of the "Multi-Protocol Label Switching (MPLS)
Label Switched Paths (LSPs) Ping Parameters" registry, "Return Codes" sub-registry, as follows using a
Standards Action value.
</t>
        <table anchor="return-code" align="center">
          <name>New Return Code</name>
          <thead>
            <tr>
              <th align="left">Value</th>
              <th align="left">Description</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">&nbsp;(TBD3)</td>
              <td align="left">Inappropriate Target FEC Stack sub-TLV present.</td>
              <td align="left">This&nbsp;document</td>
            </tr>
            <tr>
              <td align="left">&nbsp;(TBD4)</td>
              <td align="left">Failed to establish the BFD session. The specified reverse path was not found.</td>
              <td align="left">This&nbsp;document</td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Implementation Status</name>
      <t>Note to RFC Editor: This section MUST be removed before publication of the document.</t>
      <t>
    This section records the status of known implementations of the
     protocol defined by this specification at the time of posting of
     this Internet-Draft, and is based on a proposal described in
     <xref target="RFC7942"/>.  The description of implementations in this section is
     intended to assist the IETF in its decision processes in
     progressing drafts to RFCs.  Please note that the listing of any
     individual implementation here does not imply endorsement by the
     IETF.  Furthermore, no effort has been spent to verify the
     information presented here that was supplied by IETF contributors.
     This is not intended as, and must not be construed to be, a
     catalog of available implementations or their features.  Readers
     are advised to note that other implementations may exist.
      </t>
      <t>
      According to <xref target="RFC7942"/>, "this will allow reviewers and working
     groups to assign due consideration to documents that have the
     benefit of running code, which may serve as evidence of valuable
     experimentation and feedback that have made the implemented
     protocols more mature.  It is up to the individual working groups
     to use this information as they see fit".
      </t>
      <t>-  The organization responsible for the implementation: ZTE Corporation.</t>
      <t>-  The implementation's name ROSng empowers commonly used routers, e.g., ZXCTN 6000.</t>
      <t>-  A brief general description: A Return Path can be specified for a BFD session over RSVP tunnel or LSP. 
   The same can be specified for a backup RSVP tunnel/LSP.</t>
      <t>  The implementation's level of maturity: production.</t>
      <t>-  Coverage: RSVP LSP (no support for Static LSP)</t>
      <t> -  Version compatibility: draft-ietf-mpls-bfd-directed-10.</t>
      <t>-  Licensing: proprietary.</t>
      <t>-  Implementation experience: simple once you support RFC 7110.</t>
      <t>-  Contact information: Qian Xin qian.xin2@zte.com.cn</t>
      <t>-  The date when information about this particular implementation was last updated: 12/16/2019</t>

    </section>
    <section anchor="security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
 Security considerations discussed in <xref target="RFC5880" format="default"/>, <xref target="RFC5884" format="default"/>, <xref target="RFC7726" format="default"/>,
 <xref target="RFC8029" format="default"/>, and <xref target="RFC7110" format="default"/> apply to this document. 
      </t>
    </section>
  </middle>
  <back>
    <references>
      <name>Normative References</name>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5880.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5881.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5883.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5884.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8029.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7110.xml"/>
      <!-- <?rfc include="reference.RFC.5586"?> -->          
  <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7726.xml"/>
    </references>
      <references title="Informative References">
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7942.xml"/>
      </references>
    <section numbered="true" toc="default">
      <name>Acknowledgments</name>
      <t>
         The authors greatly appreciate a thorough review and the most helpful comments from Eric Gray
         and Carlos Pignataro.
         The authors much appreciate the help of Qian Xin, who provided information about the implementation of this specification.
      </t>
    </section>
  </back>
</rfc>
