<?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" docName="draft-mirsky-bfd-mpls-demand-04" ipr="trust200902">

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

  <front>
    <title abbrev="BFD Demand Mode over P2P MPLS LSP">BFD in Demand Mode over Point-to-Point MPLS LSP</title>

    <author fullname="Greg Mirsky" initials="G." surname="Mirsky">
      <organization>ZTE Corp.</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country/>
        </postal>

        <email>gregimirsky@gmail.com</email>
      </address>
    </author>

    <date year="2018"/>

    <area>Routing</area>

    <workgroup>BFD Working Group</workgroup>

    <keyword>Internet-Draft</keyword>
   
   <keyword>BFD</keyword>
   <keyword>Demand mode</keyword>   
   <keyword>LSP</keyword>

    <abstract>
      <t>
      This document describes procedures for using Bidirectional Forwarding Detection (BFD) in Demand mode
      to detect data plane failures in Multiprotocol Label Switching (MPLS) point-to-point
      Label Switched Paths.
      </t>
    </abstract>
  </front>
  
  <middle>
  
      <section anchor="intro-section" title="Introduction">
      <t>
      <xref target="RFC5884"/> defined use of the Asynchronous method of Bidirectional 
      Detection (BFD) <xref target="RFC5880"/> to monitor and detect failures in
      the data path of a Multiprotocol Label Switching (MPLS)
      Label Switched Path (LSP). Use of the Demand mode, also specified in <xref target="RFC5880"/>,
      has not been defined so far. This document describes procedures for using the Demand mode of BFD protocol
      to detect data plane failures in MPLS point-to-point (p2p) LSPs. 
      </t>
    </section>
    
  <section title="Conventions used in this document">
     <section title="Terminology">     
     <t>MPLS:       Multiprotocol Label Switching</t>
     <t>LSP:        Label Switched Path</t>
     <t>LER:        Label switching Edge Router</t>
     <t>BFD:        Bidirectional Forwarding Detection</t>
     <t>p2p:        Point-to-Point</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 anchor="demand-bfd-section" title="Use of the BFD Demand Mode">
      <t>
      <xref target="RFC5880"/> defines that the Demand mode MAY be:
      <list style="symbols">
      <t>asymmetric, i.e. used in one direction of a BFD session;</t>
      <t>switched to and from without bringing BFD session to Down state through using a Poll Sequence.</t>
      </list>
      </t>
      <t>
      For the case of BFD over MPLS LSP, ingress Label switching Edge Router (LER) usually acts as Active BFD peer
      and egress LER acts as Passive BFD peer. The Active peer bootstraps the BFD session by using LSP ping. Once the BFD session
      is in Up state the ingress LER that supports this specification MUST switch to the Demand mode 
      by setting Demand (D) bit in its Control packet and
      initiating a Poll Sequence. If the egress LER supports this specification it MUST respond with the Final (F) bit set
      in its BFD Control packet sent to the ingress LER and 
      ceases further transmission of periodic BFD control packets to the ingress LER.
      </t>
      <t>
      In this state BFD peers MAY remain as long as the egress LER is in Up state. The ingress LER MAY
      check liveness of the egress LER by setting the Poll flag. The egress LER will respond by transmitting
      BFD control packet with the Final flag set. If the ingress LER doesn't receive BFD packet 
      with the Final flag from its peer after the predetermined period of time, default wait time recommended 1 second,
      the ingress MAY transmit another packet with the Poll flag set. If ingress doesn't receive BFD control
      packet with the Final flag set in response to three consecutive packets with Poll flag, it MAY declare the BFD
      peer non-responsive and change state of the BFD session to Down state.
      </t>
      <t>
      If the Detection timer at the egress
      LER expires it MUST send BFD Control packet to the ingress LER with the Poll (P) bit set,
      Status (Sta) field set to Down value, and
      the Diagnostic (Diag) field set to Control Detection Time Expired value. The egress LER sends these
      Control packets to the ingress LER at the rate of one per second until either it receives the valid
      for this BFD session control packet with the Final (F) bit set from the ingress LER or the defect condition clears
      and the BFD session state reaches Up state at the egress LER.
      </t>
      <t>
      The ingress LER transmits BFD Control packets over the MPLS LSP
      with the Demand (D) flag set at negotiated interval per <xref target="RFC5880"/>,
      the greater of bfd.DesiredMinTxInterval and bfd.RemoteMinRxInterval, until it receives the valid BFD packet from
      the egress LER with the Poll (P) bit and the Diagnostic (Diag) field value Control Detection Time Expired.
      Reception of such BFD control packet by the ingress LER indicates that the monitored LSP has a failure 
      and sending BFD control packet with the Final flag set to acknowledge failure indication is likely to fail. 
      Instead, the ingress LER transmits the BFD Control packet to the egress LER over the IP network with:
      <list style="symbols">
      <t>destination IP address MUST be  set to the destination IP address of the LSP Ping Echo request message <xref target="RFC8029"/>;</t>
      <t>destination UDP port set to 4784 <xref target="RFC5883"/>;</t>
      <t>Final (F) flag in BFD control packet MUST be set;</t>
      <t>Demand (D) flag in BFD control packet MUST be cleared.</t>
      </list>
      </t>
      <t>
      The ingress LER changes the state of the BFD session to Down and changes rate of BFD Control packets transmission
      to one packet per second. The ingress LER in Down mode changes to Asynchronous mode until the BFD session comes
      to Up state once again. Then the ingress LER switches to the Demand mode.
      </t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
<t>TBD</t>
    </section>
    
    <section anchor="Security" title="Security Considerations">
      <t>
      This document does not introduce new security aspects but inherits all security considerations
      from <xref target="RFC5880"/>, <xref target="RFC5884"/>, <xref target="RFC7726"/>,
      <xref target="RFC8029"/>, and <xref target="RFC6425"/>.
      </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.5883'?>
      <?rfc include='reference.RFC.5884'?>

      <?rfc include='reference.RFC.8029'?>

      <?rfc include='reference.RFC.6425'?>   

      <?rfc include='reference.RFC.7726'?>         

    </references>

<!--
    <references title="Informative References">
      
    </references>
-->
    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>
      TBD
      </t>
    </section>

  </back>
</rfc>
