<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">
<?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="info" docName="draft-mirsky-bfd-mpls-demand-11" ipr="trust200902" 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 Demand Mode over P2P MPLS LSP">BFD in Demand Mode over Point-to-Point MPLS LSP</title>
    <seriesInfo name="Internet-Draft" value="draft-mirsky-bfd-mpls-demand-11"/>
    
    <author fullname="Greg Mirsky" initials="G." surname="Mirsky">
      <organization>Ericsson</organization>
      <address>
        <postal>
          <street/>
          <city/>
          <code/>
          <country/>
        </postal>
        <email>gregimirsky@gmail.com</email>
      </address>
    </author>
    
    <date year="2022"/>
    <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" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
      <xref target="RFC5884" format="default"/> defined use of the Asynchronous method of Bidirectional 
      Detection (BFD) <xref target="RFC5880" format="default"/> 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" format="default"/>,
      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 numbered="true" toc="default">
      <name>Conventions used in this document</name>
      <section numbered="true" toc="default">
        <name>Terminology</name>
        <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 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 anchor="demand-bfd-section" numbered="true" toc="default">
      <name>Use of the BFD Demand Mode</name>
      <t>
      <xref target="RFC5880" format="default"/> defines that the Demand mode may be:
      </t>
      <ul spacing="normal">
        <li>asymmetric, i.e. used in one direction of a BFD session;</li>
        <li>switched to and from without bringing BFD session to Down state through using a Poll Sequence.</li>
      </ul>
      <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.
      If the BFD session is configured to use the Demand mode, once the BFD session
      is in Up state the ingress LER switches to the Demand mode 
      as defined in Section 6.6 <xref target="RFC5880" format="default"/>.
      The egress LER also follows procedures defined in Section 6.6 <xref target="RFC5880" format="default"/> and 
      ceases further transmission of periodic BFD control packets to the ingress LER.
      </t>
      <t>
      In this state BFD peers remains as long as the egress LER is in Up state. The ingress LER can
      periodically check continuity of a bidirectional path between the ingress and egress LERs by using the Poll Sequence,
      as described in Section 6.6 <xref target="RFC5880" format="default"/>. An implementation
      that supports using the Poll Sequence as the mechanism for
      bidirectional path continuity check must control the interval between consecutive
      Poll Sequences. The Rdefault value could be selected as 1 second.
      </t>
      <t>
      If the Detection timer at the egress
      LER expires, the BFD system on LER sends BFD Control packet to the ingress LER with the Poll (P) bit set,
      Status (Sta) field set to the Down value, and
      the Diagnostic (Diag) field set to Control Detection Time Expired value. The egress LER periodically transmits these
      Control packets to the ingress LER 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. An implementation that supports this specification
      provides control of the interval between consecutive Poll messages signaling the expiration of the Detection timer.
      The default value of the interval can be selected as 1 second.
      </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" format="default"/>,
      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:
      </t>
      <ul spacing="normal">
        <li>destination IP address is set to the destination IP address of the LSP Ping Echo request message <xref target="RFC8029" format="default"/>;</li>
        <li>destination UDP port set to 4784 <xref target="RFC5883" format="default"/>;</li>
        <li>Final (F) flag in BFD control packet is set;</li>
        <li>Demand (D) flag in BFD control packet is cleared.</li>
      </ul>
      <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 anchor="multipoint" numbered="true" toc="default">
      <name>The Applicability of BFD for Multipoint Networks</name>
      <t>
      <xref target="RFC8562" format="default"/> defines the use of BFD in multipoint networks. This specification analyzes the case of p2p LSP.
      In that scenario, the ingress of the LSP acts as the MultipointHead, and the egress - as MultipointTail. The BFD state machines for MultipointHead,
      MultipointClient, and MultipointTail don't use the three-way handshakes for session establishment and teardown. As a result,
      the Init state is absent, and the session transitions to the Up state once the BFD session is administratively enabled. Hence, a BFD
      session over a p2p LSP, using principles of <xref target="RFC8562" format="default"/> or <xref target="RFC8563" format="default"/>,
      can be established faster if the MultipointTail has been provisioned with the value of My Discriminator used by the MultipointHead for
      that BFD session. That value can be provided to the MultipointTail using different mechanisms, e.g., an extension to IGP.
      Description of mechanism to provide the value of My Discriminator used by the MultipointHead for the particular BFD session
      is outside the scope of this specification.
      </t>
      <t>
      Unsolicited notification of the detected failure by the MultipointTail to the MultipointClient performs as described above for the case
      when the ingress BFD system switches the remote peer into the Demand mode.
      </t>
    </section>
     
    </section>
    
    
  
    <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>TBD</t>
    </section>
    
    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
      This document does not introduce new security aspects but inherits all security considerations
      from <xref target="RFC5880" format="default"/>, <xref target="RFC5884" format="default"/>, <xref target="RFC7726" format="default"/>,
      <xref target="RFC8029" format="default"/>, and <xref target="RFC6425" format="default"/>.
      </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.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.6425.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7726.xml"/>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8562.xml"/>
    </references>
    
    <references title="Informative References">
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8563.xml"/>
    </references>

    <section anchor="Acknowledgements" numbered="true" toc="default">
      <name>Acknowledgements</name>
      <t>
      TBD
      </t>
    </section>
  </back>
</rfc>
