<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?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 category="std" ipr="trust200902" docName="draft-ietf-mpls-bfd-directed-09">

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<front>
	<title abbrev="BFD Directed Return Path">Bidirectional Forwarding Detection (BFD) Directed Return Path</title>

	<author initials="G." surname="Mirsky" fullname="Greg Mirsky">
		<organization>ZTE</organization>
		<address>
			<email>gregimirsky@gmail.com</email>
		</address> 
	</author>
 	<author initials="J." surname="Tantsura" fullname="Jeff  Tantsura">
		<organization>Nuage Networks</organization>
		<address>
			<email>jefftant.ietf@gmail.com</email>
		</address> 
	</author>

 	<author initials="I." surname="Varlashkin" fullname="Ilya Varlashkin">
		<organization>Google</organization>
		<address>
			<email>Ilya@nobulus.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="2018"/>

    <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
egress BFD peer to use a specific path for the reverse direction of the BFD session.
	 </t>
	</abstract>
</front>

<middle>
  <section anchor="intro" title="Introduction">
 <t>
 <xref target="RFC5880"/>, <xref target="RFC5881"/>, and <xref target="RFC5883"/> established the BFD
 protocol for IP networks. <xref target="RFC5884"/> and <xref target="RFC7726"/>
 set rules for using BFD asynchronous mode over IP/MPLS LSPs.
 These standards do not define means to control the path selection at the egress BFD peer 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 contributes to
   producing false positive defect notifications, i.e., false alarms, at
   the ingress BFD peer.

 </t>
 <t>
 This document defines the BFD Reverse Path TLV as an extension to LSP Ping  
 <xref target="RFC8029"/> and proposes
 that it is to be used  to instruct the egress BFD peer 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"/>.
 As a special case, forward and reverse
 directions of the BFD session can form a bi-directional co-routed associated channel.
 </t>
         
     <section title="Conventions used in this document">
 <!--
         <section title="Terminology">

            <t>BFD:          Bidirectional Forwarding Detection</t>
           <t>MPLS:          Multiprotocol Label Switching</t>
            <t>LSP:          Label Switching Path</t>
            <t>LoC:          Loss of Continuity</t>
         </section>    
-->        
        <section title="Requirements Language">
             <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"/> <xref target="RFC8174"/> 
   when, and only when, they appear in all capitals, as shown here.
             </t>
          </section>
      </section>
     </section>
      
     <section anchor="problem-statement" title="Problem Statement">
  <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"/> 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:
<list style="symbols">
<t>
a failure detection by ingress node on the reverse path cannot be
  interpreted as bi-directional failure unambiguously and thus trigger, for
  example, protection switchover of the forward direction without the possibility of 
  being a false positive.
</t>
</list>
 </t>
<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" title="Control of the Reverse BFD Path">

<t>
 To bootstrap a BFD session over an MPLS LSP, LSP ping, defined in <xref target="RFC8029"/>, MUST be used with
 BFD Discriminator TLV <xref target="RFC5884"/>.
 This document defines a new TLV, BFD Reverse Path TLV, that MUST contain a single sub-TLV
 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" title="BFD Reverse Path TLV">
<t>
The BFD Reverse Path TLV is an optional TLV within the LSP ping <xref target="RFC8029"/>. 
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"/>.
</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"/>.
</t>
<t>
          <figure align="left" anchor="mpls-bfd-tlv" title="BFD Reverse Path TLV">
          <artwork><![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>
            <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"/>).
            </t>
            <t>
            Length field is two octets long and defines the length in octets of the Reverse Path field.
            </t>   
            <t>
            Reverse Path field contains a sub-TLV. Any non-multicast Target FEC Stack 
            sub-TLV (already defined, or to be defined in the future) 
            for TLV Types 1, 16, and 21 of MPLS LSP Ping Parameters registry MAY be 
            used in this field. Multicast Target FEC Stack sub-TLVs, i.e., p2mp and mp2mp,
            SHOULD NOT be included in Reverse Path field. If the egress 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"/>.
           None, one or more sub-TLVs MAY be included in the BFD Reverse Path TLV. 
           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 <xref target="RFC5884"/>, i.e., routed over IP network.
             </t>         
             <t>
             If the egress 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"/>.
             The egress BFD peer MAY establish the BFD session over IP network as defined in <xref target="RFC5884"/>.
             </t>
           </section>
           
           <section anchor="explicit-sub-tlv" title="Static and RSVP-TE sub-TLVs">
           <t>
  When an explicit path on an MPLS data plane is set either as Static or RSVP-TE LSP,
  corresponding sub-TLVs, defined in <xref target="RFC7110"/>, MAY be used
  to identify the explicit reverse path for the BFD session. If any of defined in <xref target="RFC7110"/>
  sub-TLVs used in BFD Reverse Path TLV, then the periodic verification of the control plane
  against the data plane, as recommended in Section 3.2 <xref target="RFC5884"/>, MUST use
  the Return Path TLV, as per <xref target="RFC7110"/>, with that sub-TLV.
  By using the LSP Ping with Return Path TLV an operator will be able to verify
  that the forward LSP and the reverse LSP are mapped to the same FECs as BFD session
  both at the ingress and the egress systems.
           </t>
</section>

<section anchor="return-codes" title="Return Codes">
<t>
This document defines the following Return Codes for MPLS LSP Echo Reply:
<list style="symbols">

<t>
"Inappropriate Target FEC Stack sub-TLV present", (TBD3). When multicast Target FEC Stack sub-TLV found in
the received Echo Request by the egress BFD peer, an Echo Reply with the return code set to
"Inappropriate Target FEC Stack sub-TLV present" MUST be sent to the ingress BFD peer <xref target="bfd-reverse-path-tlv"/>.
</t>

<t>
"Failed to establish the BFD session. The specified reverse path was not found",  (TBD4).
When a specified reverse path is not available at the egress BFD peer, an Echo Reply with the return
code set to "Failed to establish the BFD session. The specified reverse path was not found"
MUST be sent back to the ingress BFD peer <xref target="bfd-reverse-path-tlv"/>.
</t>
</list>
</t>
</section>
 
 </section>         
 
 <section anchor="use-case" title="Use Case Scenario">
 <t>
 In the network presented in <xref target="use-case-fig"/> node A monitors two
 tunnels to node H: A-B-C-D-G-H and A-B-E-F-G-H.
 To bootstrap a BFD session to monitor the first tunnel, node 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, node A MUST include
 a BFD Discriminator TLV with a different Discriminator value (e.g., foobar-2)
  <xref target="RFC7726"/> and MAY include
 a BFD Reverse Path TLV that references H-G-F-E-B-A tunnel.
 </t>
             <t>
          <figure align="left" anchor="use-case-fig" title="Use Case for BFD Reverse Path TLV">
          <artwork><![CDATA[    
        C---------D
        |         |
A-------B         G-----H
        |         |
        E---------F
]]></artwork>
        </figure>
            </t> 
<t>
If an operator needs node H to monitor a path to node 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="iana-consider" title="IANA Considerations">

     <section anchor="iana-TLV" title="BFD Reverse Path TLV">
     <t>
     The IANA is requested to assign a new value for BFD Reverse Path TLV from the "Multiprotocol Label
     Switching Architecture (MPLS) Label Switched Paths (LSPs) Ping Parameters - TLVs" registry, "TLVs and
   sub-TLVs" sub-registry.
 </t>
     <texttable anchor="bfdtlv-table" title="New BFD Reverse Type TLV">
    <ttcol align="left">Value</ttcol>
    <ttcol align="left">Description</ttcol>
    <ttcol align="left">Reference</ttcol>
    <c>&nbsp;(TBD1)</c>
    <c>BFD Reverse Path TLV</c>
    <c>This&nbsp;document</c>
    </texttable>

    </section>
    
<section anchor="iana-return-code" title="Return Code">
<t>
The IANA is requested to assign a new Return Code value from 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>


     <texttable anchor="return-code" title="New Return Code">
    <ttcol align="left">Value</ttcol>
    <ttcol align="left">Description</ttcol>
    <ttcol align="left">Reference</ttcol>
     <c>&nbsp;(TBD3)</c>
    <c>Inappropriate Target FEC Stack sub-TLV present.</c>
    <c>This&nbsp;document</c>
        <c>&nbsp;(TBD4)</c>
    <c>Failed to establish the BFD session. The specified reverse path was not found.</c>
    <c>This&nbsp;document</c>
     </texttable>
     </section>
     </section>
     
     <section anchor="security" title="Security Considerations">
     <t>
 Security considerations discussed in <xref target="RFC5880"/>, <xref target="RFC5884"/>, <xref target="RFC7726"/>,
 and <xref target="RFC8029"/>, apply to this document. 
     </t>
     </section>
           


  </middle>
  
    <back>
    <references title="Normative References">
     
  <?rfc include="reference.RFC.2119"?>
  <?rfc include="reference.RFC.8174"?>
  <?rfc include="reference.RFC.5880"?>          
  <?rfc include="reference.RFC.5881"?>
  <?rfc include="reference.RFC.5883"?>          
  <?rfc include="reference.RFC.5884"?>
  <?rfc include="reference.RFC.8029"?>               
  <?rfc include="reference.RFC.7110"?>
  <?rfc include="reference.RFC.5586"?>          
  <?rfc include="reference.RFC.7726"?>  
     
   </references>
   
         <section title="Acknowledgments">
         <t>
         Authors greatly appreciate thorough review and the most helpful comments from Eric Gray
         and Carlos Pignataro.
         </t>  
      </section>
      
 </back>
 </rfc>
