<?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-mirsky-spring-bfd-03">

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

<front>
	<title abbrev="BFD in SPRING MPLS">Bidirectional Forwarding Detection (BFD) in Segment Routing Networks Using MPLS Dataplane</title>

	<author initials="G." surname="Mirsky" fullname="Greg Mirsky">
		<organization>ZTE Corp.</organization>
		<address>
			<email>gregimirsky@gmail.com</email>
		</address> 
	</author>
	
	 	<author initials="J." surname="Tantsura" fullname="Jeff  Tantsura">
		<organization>Individual</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="4" month="December" year="2017"/>

    <area>Routing</area>

    <workgroup>SPRING Working Group</workgroup>

    <keyword>Internet-Draft</keyword>

   <keyword>LSP Ping</keyword>
   
   <keyword>BFD </keyword>
	
	<abstract>
	<t>
   Segment Routing architecture leverages the paradigm of source routing. It
   can be realized in the Multiprotocol Label Switching (MPLS) network without any change to the data plane. 
   A segment is encoded as an MPLS label and  an ordered list of segments 
   is encoded as a stack of labels.
   Bidirectional Forwarding Detection (BFD) is expected 
   to monitor any kind of paths between systems. This document defines
   how to use Label Switched Path Ping to bootstrap and control path 
   in reverse direction of
   a BFD session on the Segment Routing static MPLS tunnel.  
	 </t>
	</abstract>
</front>

<middle>
  <section anchor="intro" title="Introduction">
 <t>
 <xref target="RFC5880"/>, <xref target="RFC5881"/>, and <xref target="RFC5883"/> 
 established the Bidirectional Forwarding Detection (BFD) 
 protocol for IP networks. <xref target="RFC5884"/> and <xref target="RFC7726"/> set rules 
 of using BFD Asynchronous mode over Multiprotocol Label Switching (MPLS)
 Label Switched Path (LSP). These latter standards implicitly assume that the egress 
 BFD peer, which is the egress Label Edge Router (LER),
 will use the shortest path route regardless of the path the ingress LER
 uses to send BFD control packets towards it. 
 </t>

 <t>
 This document defines use of LSP Ping for Segment Routing networks over MPLS
 dataplane <xref target="I-D.ietf-mpls-spring-lsp-ping"/> to bootstrap 
 and control path of a BFD session from the egress to ingress LER
 using static MPLS tunnel.
 </t>
         
     <section title="Conventions used in this document">
         <section title="Terminology">

            <t>BFD:         Bidirectional Forwarding Detection</t>
            <t>FEC:         Forwarding Equivalence Class</t>
           <t>MPLS:         Multiprotocol Label Switching</t>
            <t>LSP:         Label Switching Path</t>
            <t>LER:         Label Edge Router</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="seg-rout-oper" title="Bootstrapping BFD session over Segment Routed tunnel">
<t>
As demonstrated in <xref target="I-D.ietf-mpls-spring-lsp-ping"/> 
introduction of Segment Routing network domains
with an MPLS data plane requires three new sub-TLVs that 
MAY be used with Target Forwarding Equivalence Class (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:
<list>
<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>
</list>
</t>         
<t>
It has been noted in <xref target="RFC5884"/> that a BFD session monitors for 
defects particular &lt;MPLS LSP, FEC&gt; tuple. <xref target="RFC7726"/> clarified
how to establish and operate multiple BFD sessions for the same &lt;MPLS LSP, FEC&gt; tuple.
Because only ingress edge router is aware of the SR-based explicit route the egress edge router
can associate the LSP ping with BFD Discriminator TLV with only one of the FECs it advertised for
the particular segment. Thus this document clarifies that:
<list>
<t>
When LSP Ping is used to bootstrap a BFD session
the FEC corresponding
to the destination segment to be associated with the BFD session
MUST be as the very last sub-TLV in the Target FEC TLV.
</t>
</list>

</t>
<t>
Encapsulation of a BFD Control packet in Segment Routing network with MPLS dataplane
MUST follow Section 7 <xref target="RFC5884"/> when IP/UDP header used and
MUST follow Section 3.4 <xref target="RFC6428"/> without IP/UDP header being used. 
</t>
</section>      

<section anchor="seg-rout-return" title="Use BFD Reverse Path TLV over Segment Routed MPLS Tunnel">
<t>
For BFD over MPLS LSP case, per <xref target="RFC5884"/>, egress LER MAY 
send BFD control packet to the ingress LER either over IP network or an MPLS LSP. 
Similarly, for the case of BFD over p2p segment tunnel with MPLS data plane, the ingress LER
MAY route BFD control packet over IP network, as described in <xref target="RFC5883"/>, or
transmit over a segment tunnel, as described in Section 7 <xref target="RFC5884"/>.
   In some cases there may be a need to direct egress BFD peer to use specific path
   for the reverse direction of the BFD session by using the BFD Reverse Path TLV and following all
   procedures as defined in <xref target="I-D.ietf-mpls-bfd-directed"/>. 
</t>
</section>

<section anchor="non-fec-tlv" title="Use Non-FEC Path TLV">
<t>
 For the case of MPLS dataplane, 
Segment Routing Architecture <xref target="I-D.ietf-spring-segment-routing"/> 
explains that "a segment is encoded as an MPLS label. An ordered list of segments is encoded as a stack of labels." 
YANG Data Model for MPLS Static LSPs <xref target="I-D.ietf-mpls-static-yang"/>
models outgoing MPLS labels to be imposed as leaf-list <xref target="RFC6020"/>,
i.e., as array of rt-types:mpls-label <xref target="I-D.ietf-rtgwg-routing-types"/>.
</t>
<t>
This document defines new optional Non-FEC Path TLV.
The format of the Non-FEC Path TLV is presented in <xref target="non-fec-tlv-fig"/>
          <figure align="left" anchor="non-fec-tlv-fig" title="Non-FEC Path TLV Format">
          <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
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |    Non-FEC Path TLV Type    |           Length              |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                             |
    ~                        Non-FEC Path                         ~
    |                                                             |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure>
</t>
<t>
Non-FEC Path TLV Type is 2 octets in length and has a value of
   TBD1 (to be assigned by IANA as requested in <xref target="spring-non-fec-tlv-table"/>).
   </t>
<t>
   Length field is 2 octets long and defines the length in octets of the
   Non-FEC Path field.
   </t>
   <t>
  Non-FEC Path field contains a sub-TLV. Any Non-FEC Path sub-TLV
   (defined in this document or to be defined in the future) for Non-FEC 
   Path TLV type MAY be used in this
   field.  None or one sub-TLV MAY be included in the Non-FEC
   Path TLV. If no sub-TLV has been found in the Non-FEC Path TLV, the
   egress BFD peer MUST revert to using the reverse path selected
   based on its local policy. If there are more than one sub-TLV, then
   the Return Code in echo reply MUST be set to "Too Many TLVs Detected"
<xref target="return-code-iana"/>.
   </t>
    <t>
Non-FEC Path TLV MAY be used to specify the reverse path of the BFD session identified in the BFD Discriminator TLV.
If the Non-FEC Path TLV is present in the echo request message the  BFD Discriminator TLV MUST
be present as well. If the BFD Discriminator TLV is absent when the Non-FEC Path TLV is
   included, then it MUST be treated as malformed Echo Request, as
   described in <xref target="RFC8029"/>.
   </t>
   <t>
This document defines Static Routing MPLS Tunnel sub-TLV that MAY be used with the Non-FEC Path TLV.
The format of the sub-TLV is 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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 | SR MPLS Tunnel sub-TLV Type |           Length              |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                       Label Entry 1                         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                       Label Entry 2                         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 ~                                                             ~
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                       Label Entry N                         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]></artwork>
        </figure>
            </t> 
<t>
The Segment Routing MPLS Tunnel sub-TLV Type is two octets in length, and has a value of TBD 
(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>
As in <xref target="I-D.ietf-mpls-bfd-directed"/>, empty BFD Reverse TLV requires the egress
BFD peer switch the reverse path of the BFD session, specified by BFD Discriminator TLV,
to the path selected based on locally defined policy. If more than one SR Static MPLS Tunnel sub-TLV is present, then
the egress BFD peer MUST send Echo Reply with Return Code field set to "Too Many TLVs Detected"
<xref target="return-code-iana"/>.
</t>
-->
<!-- 
<t>
The Non-FEC Path TLV and Segment Routing MPLS Tunnel sub-TLV MAY be used in Reply Path TLV defined in <xref target="RFC7110"/>
</t>
-->
</section>

<section anchor="dynamic-protocol" title="BFD Reverse Path TLV over Segment Routed MPLS Tunnel with Dynamic Control Plane">
<t>
When Segment Routed domain with MPLS data plane uses distributed tunnel computation BFD Reverse Path TLV MAY
use Target FEC sub-TLVs defined in <xref target="I-D.ietf-mpls-spring-lsp-ping"/>.
</t>
</section>

     <section anchor="iana-consider" title="IANA Considerations">
     <section anchor="iana-sub-TLV" title="Segment Routing Static MPLS Tunnel sub-TLV">    
<t>
IANA is requested to assign new TLV type from the from Standards Action range
of the registry "Multiprotocol Label Switching Architecture (MPLS)
Label Switched Paths (LSPs) Ping Parameters - TLVs" as defined in the <xref target="spring-non-fec-tlv-table"/>.
</t>
     <texttable anchor="spring-non-fec-tlv-table" title="New Non-FEC Path TLV">
    <ttcol align="left">Value</ttcol>
    <ttcol align="left">TLV Name</ttcol>
    <ttcol align="left">Reference</ttcol>
    <c>&nbsp;TBD1</c>
    <c>Non-FEC Path TLV</c>
    <c>This&nbsp;document</c>
    </texttable>
    
<t>
IANA is requested to create new Non-FEC Path sub-TLV registry for the Non-FEC Path TLV as described in <xref target="iana-non-fec-sub-tlv-reg-tbl"/>.
</t>
      <texttable anchor="iana-non-fec-sub-tlv-reg-tbl" title="Non-FEC Path sub-TLV registry">
    <ttcol align="left">Range</ttcol>
    <ttcol align="center">Registration Procedures</ttcol>
    <ttcol align="left">Note</ttcol>
     <c>0-16383</c>
    <c>Standards Action</c>
    <c>This range is for mandatory TLVs or for optional TLVs that require an error message if not recognized.</c>
     <c>16384-31743</c>
    <c>Specification Required</c>
    <c>Experimental RFC needed</c>
     <c>32768-49161</c>
    <c>Standards Action</c>
    <c>This range is for optional TLVs that can be silently dropped if not recognized.</c>
     <c>49162-64511</c>
    <c>Specification Required</c>
    <c>Experimental RFC needed</c>
    <c>64512-65535</c>
    <c>Private Use</c>
    <c/>
    </texttable> 
   
    <t>IANA is requested to allocate following values from the Non-FEC Path sub-TLV registry as defined in <xref target="spring-sub-tlv-table"/>.</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>0</c>
    <c>Reserved</c>
    <c>This document</c>
       <c>&nbsp;TBD2</c>
    <c>Segment Routing MPLS Tunnel sub-TLV</c>
    <c>This&nbsp;document</c>
         <c>65535</c>
    <c>Reserved</c>
    <c>This document</c>
   </texttable>
</section>

<section anchor="iana-return-code" title="Return Code">
<t>
IANA is requested to create Non-FEC Path sub-TLV subregistry for the new Non-FEC Path TLV. 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-iana" 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>
     </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>
      
     
      <section title="Acknowledgements">
         <t>
         TBD
         </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.7726"?>
  <?rfc include="reference.RFC.6428"?>
       
  <?rfc include='reference.I-D.ietf-mpls-spring-lsp-ping'?>
  <?rfc include='reference.I-D.ietf-spring-segment-routing'?>
  <?rfc include='reference.I-D.ietf-mpls-bfd-directed'?>
 
  <!--  <?rfc include='reference.I-D.previdi-6man-segment-routing-header'?> -->

   </references>
   
    <references title="Informative References">
  <?rfc include="reference.RFC.6020"?>   
    <?rfc include='reference.I-D.ietf-rtgwg-routing-types'?>     
       <?rfc include='reference.I-D.ietf-mpls-static-yang'?>
    </references>


 </back>
 </rfc>
