<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd"[
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC5880 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5880.xml">
<!ENTITY RFC5881 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5881.xml">
<!ENTITY RFC5883 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5883.xml">
<!ENTITY RFC5884 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5884.xml">
<!ENTITY RFC4379 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4379.xml">
<!ENTITY RFC7110 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7110.xml">
<!ENTITY RFC5586 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5586.xml">
<!ENTITY RFC7726 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7726.xml">

]>
<?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-03">

<?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>Ericsson</organization>
		<address>
			<email>gregory.mirsky@ericsson.com</email>
		</address> 
	</author>
 	<author initials='J.' surname="Tantsura" fullname='Jeff  Tantsura'>
		<organization></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 day="17" month="August" year="2016" />

    <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 monitor any kind of paths between systems.
When a BFD session monitors an explicitly routed uni-directional path there may be a need to direct
egress BFD peer to use specific path for the reverse direction of the BFD session.
	 </t>
	</abstract>
</front>

<middle>
  <section anchor="intro" title="Introduction">
 <t>
 RFC 5880 <xref target="RFC5880"/>, RFC 5881 <xref target="RFC5881"/>, and RFC 5883 <xref target="RFC5883"/> established the BFD
 protocol for IP networks and RFC 5884 <xref target="RFC5884"/> set rules of using BFD asynchronous mode over IP/MPLS LSPs.
 These four standards implicitly assume that the egress BFD peer will use the shortest path route regardless of route being used to send BFD
 control packets towards it. 
 <!-- As result, if the ingress BFD peer sends its BFD control packets over explicitly routed path that is diverging from
 the best IP route, then the reverse direction of the BFD session is likely not to form co-routed bi-directional path with
 the forward direction of that BFD session. And because
 BFD control packets are not guaranteed to cross the same
 links and nodes in both directions detection of Loss of Continuity (LoC) defect
 in forward direction may produce false positive defect notifications, i.e. false alarms.
 -->
 </t>
 <t>
 For the case where an LSP is explicitly routed, if it is desired that BFD control packets follow the same path in the reverse direction 
 (for support of common fault detection for explicitly routed bidirectional co-routed LSPs, for example), it is likely that the shortest return 
 path to the ingress BFD peer may not follow the same path as the LSP in the forward direction.  
 The fact that BFD control packets are not guaranteed to cross the same links 
 and nodes in both forward and reverse directions is a
 significant factor in producing false positive defect notifications, i.e. false 
 alarms, if used by the ingress BFD peer to deduce the state of the forward direction.
 </t>
 <t>
 This document defines the BFD Reverse Path TLV as an extension to LSP Ping  
 <xref target="RFC4379"/> and proposes
 that it to be used  to instruct the egress BFD
 peer to use explicit
 path for its BFD control packets associated with the particular BFD session.
 The TLV will be allocated from the
 TLV and sub-TLV registry defined by RFC 4379 <xref target="RFC4379"/>.
 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 
	  <xref target="RFC2119"></xref>.
             </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, in IP and IP/MPLS networks the best
  route between two IP nodes is likely to be co-routed in the stable network environment so that implicit BF
D
  requirement is being fulfilled. -->
  In most cases, given stable environments, the forward and reverse directions between two nodes are
  likely to be co-routed.
  If BFD is used to monitor unidirectional explicitly routed 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 still follow the shortest path route and that might lead to the
  following problem in detecting failures on a unidirectional explicit path:
<list style="symbols">
<t>
a failure detection by ingress node on the reverse path cannot be
  interpreted as bi-directional failure with all the certainty and thus trigger, for
  example, protection switchover of the forward direction without possibility of 
  being a false positive defect notification.
</t>
</list>
 </t>
<t>
To address this scenario the egress BFD peer should be instructed to use a specific path for BFD control packets.
</t>
</section>

<section anchor="direct-reverse-bfd" title="Direct Reverse BFD Path">

          <section anchor="mpls-plane" title="Case of MPLS Data Plane">
<t>
 LSP ping, defined in <xref target="RFC4379"/>, uses BFD Discriminator TLV <xref target="RFC5884"/> to bootstrap a BFD
 session over an MPLS LSP.
 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 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 protocol. 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="RFC4379"/>.
</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 2 octets in length and has a value of TB1 (to be assigned by IANA
            as requested in <xref target="iana-consider"/>).
            </t>
            <t>
            Length field is 2 octets long and defines the length in octets of the Reverse Path field.
            </t>   
            <t>
            Reverse Path field contains a sub-TLV. Any Target FEC 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.
           Exactly one sub-TLV MUST be included in the Reverse Path TLV. If more than one sub-TLV is present
           in the Reverse Path TLV, then, in order to avoid ambiguity of which of TLVs to use,
           the egress BFD peer MUST send Echo Reply with the received Reverse Path TLVs and set
           the Return Code to "Too Many TLVs Detected" <xref target="return-codes"/>.
             </t>         
             <t>
             If the egress LSR cannot find
 the path specified in the Reverse Path TLV it MUST send Echo
             Reply with the received 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
  respective sub-TLVs defined in <xref target="RFC7110"/> MAY be used
  to identify the explicit reverse path for the BFD session.          
           </t>
           </section>
 
           <section anchor="spring-sub-tlv" title="Segment Routing: MPLS Data Plane Case">
                       <t>
 In addition to Static and RSVP-TE, Segment Routing with MPLS data plane
 can be used to set an explicit path.
 In this case a new sub-TLV is defined in this document as presented in <xref target="spring-mpls-sub-tlv"/>.
 </t>
             <t>
          <figure align="left" anchor="spring-mpls-sub-tlv"
                title="Segment Routing MPLS Tunnel sub-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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  SegRouting MPLS sub-TLV Type |          Length             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                          Label Entry 1                      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                          Label Entry 2                      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~                                                             ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                          Label Entry N                      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]></artwork>
        </figure>
            </t> 
<t>
The Segment Routing Tunnel sub-TLV Type is two octets in length, and has a value of TB2 
 (to be assigned by IANA as requested in <xref target="iana-consider"/>).
</t>
<t>
The egress LSR MUST use the Value field as label stack for BFD control packets
for the BFD session identified by the source IP address of the MPLS LSP Ping packet
and the value in the BFD Discriminator TLV.
 Label Entries MUST be  in network order.
</t>
<t>
The Segment Routing Tunnel sub-TLV MAY be used in Reply Path TLV defined in <xref target="RFC7110"/>
</t>
           </section>
           </section>

<!--
          <section anchor="ipv6-plane" title="Segment Routing: IPv6 Data Plane Case">
          <t>
          IPv6 can be used as the data plane of choice for Segment Routed tunnels <xref target="I-D.previdi-6man-segment-routing-header"/>.
          In this case the BFD Reverse Path TLV described in <xref target="bfd-reverse-path-tlv"/> can be used as well.

          To specify the reverse path of a BFD session for an IPv6 explicitly routed path 
          the BFD Discriminator TLV MUST be used along with
          the BFD Reverse Path TLV. The BFD Reverse Path TLV in IPv6 network MUST include 
          the Segment Routing IPv6 Tunnel sub-TLV.
          </t>
             <t>
          <figure align="left" anchor="spring-ipv6-sub-tlv"
                title="Segment Routing IPv6 Tunnel sub-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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  SegRouting IPv6 sub-TLV Type |          Length             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                             |
 |                         IPv6 Prefix                         |
 |                                                             |
 |                                                             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                             |
 |                         IPv6 Prefix                         |
 |                                                             |
 |                                                             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~                                                             ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
            </t> 

<t>
The Segment Routing IPv6 Tunnel sub-TLV Type is two octets in length, and has a value of TB3 
 (to be assigned by IANA as requested in <xref target="iana-consider"/>).
</t>

          </section> 
-->

<section anchor="seg-rout-oper" title="Bootstrapping BFD session with BFD Reverse Path over Segment Routed tunnel">
<t>
As discussed in <xref target="I-D.ietf-mpls-spring-lsp-ping"/> introduction of Segment Routing network domains
with an MPLS data plane adds three new sub-TLVs that MAY be used with Target FEC TLV. Section 6.1 addresses use of
 the
new sub-TLVs in Target FEC TLV in LSP ping and LSP traceroute. For the case of LSP ping the <xref target="I-D.ietf-mpls-spring-lsp-ping"/>
states that:</t>
<t>
        "Initiator MUST include FEC(s) corresponding to the destination
         segment.
"
</t>
<t>
         "Initiator, i.e. ingress LSR, MAY include FECs corresponding to some or all of
         segments imposed in the label stack by the ingress LSR to
         communicate the segments traversed.
"
</t>
<t>
When LSP ping is used to bootstrap BFD session this document updates the statement and defines that LSP Ping MUST include the FEC corresponding
to the destination segment and SHOULD NOT include FECs corresponding to some or all of other segments imposed by the ingress LSR. Operationally
such restriction would not cause any problem or uncertainty as LSP ping with FECs corresponding to some or all segments or traceroute
 that validate the
segment route MAY precede the LSP ping that bootstraps the BFD session.
</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>
&quot;Too Many TLVs Detected&quot;, (TBD3). When more than one Reverse Path TLV found in
the received Echo Request by the egress BFD peer, an Echo Reply with the return code set to
&quot;Too Many TLVs Detected&quot; MUST be sent to the ingress BFD peer <xref target="bfd-reverse-path-tlv"/>.
</t>
<t>
&quot;Failed to establish the BFD session. The specified reverse path was not found&quot;,  (TBD4).
When a specified reverse path is not available at the egress BFD peer, an Echo Reply with the return
code set to &quot;Failed to establish the BFD session. The specified reverse path was not found&quot;
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 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="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>X&nbsp;(TBD1)</c>
    <c>BFD Reverse Path TLV</c>
    <c>This&nbsp;document</c>
    </texttable>

    </section>
    
         <section anchor="iana-sub-TLV" title="Sub-TLV">
<t>
The IANA is requested to assign new sub-TLV type from "Multiprotocol Label Switching Architecture (MPLS)
Label Switched Paths (LSPs) Ping Parameters - TLVs" registry, "Sub-TLVs for TLV Types 1, 16, and 21" sub-registry.
</t>
     <texttable anchor="spring-sub-tlv-table" title="New Segment Routing Tunnel sub-TLV">
    <ttcol align='left'>Value</ttcol>
    <ttcol align='left'>Description</ttcol>
    <ttcol align='left'>Reference</ttcol>
    <c>X&nbsp;(TBD2)</c>
    <c>Segment Routing MPLS Tunnel sub-TLV</c>
    <c>This&nbsp;document</c>
<!--
    <c>X&nbsp;(TBD3)</c>
    <c>Segment Routing IPv6 Tunnel sub-TLV</c>
    <c>This&nbsp;document</c>
-->
    </texttable>
</section>


<section anchor="iana-return-code" title="Return Codes">

<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>X&nbsp;(TBD3)</c>
    <c>Too Many TLVs Detected.</c>
    <c>This&nbsp;document</c>
    <c>X&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"/>, and <xref target="RFC4379"/>, apply to this document. 
     </t>
     </section>
      
     
      <section title="Acknowledgements">
         <t>
         Authors greatly appreciate thorough review and the most helpful comments from Eric Gray.
         </t>  
      </section>

  </middle>
  
    <back>
    <references title="Normative References">
     
     &RFC2119;
     
     &RFC5880;
     
     &RFC5881;
     
     &RFC5883;
     
     &RFC5884;
     
     &RFC4379;
     
     &RFC7110;
     
     &RFC5586;
     
     &RFC7726;
     
     <?rfc include='reference.I-D.ietf-mpls-spring-lsp-ping'?>

 <!--     <?rfc include='reference.I-D.previdi-6man-segment-routing-header'?>
 -->

   </references>


 </back>
 </rfc>   
    
