<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC5082 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5082.xml">
<!ENTITY RFC5880 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5880.xml">
<!ENTITY RFC5881 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5881.xml">
<!ENTITY RFC4271 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4271.xml">
<!ENTITY RFC7880 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7880.xml">
<!ENTITY RFC7911 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7911.xml">
<!ENTITY RFC7947 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7947.xml">
<!ENTITY RFC8446 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml">
<!ENTITY RFC6241 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6241.xml">
<!ENTITY RFC6242 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6242.xml">
<!ENTITY RFC8341 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8341.xml">
<!ENTITY RFC8040 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8040.xml">
<!ENTITY RFC8174 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC3688 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml">
<!ENTITY RFC6020 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml">
<!ENTITY RFC8340 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml">
<!ENTITY RFC8342 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8342.xml">
<!ENTITY RFC8349 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8349.xml">
<!ENTITY RFC9127 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9127.xml">

<!-- <!ENTITY RFC8174 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9127.xml"> -->
<!ENTITY I-D.ietf-idr-rs-bfd SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-rs-bfd.xml">
]>
<?rfc comments="yes"?>
<?rfc compact="yes"?>
<?rfc inline="yes"?>
<?rfc sortrefs="yes"?>
<?rfc subcompact="yes"?>
<?rfc symrefs="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc tocompact="yes"?>


<rfc category="std" ipr="trust200902" docName="draft-ietf-bfd-unsolicited-09">
    <front>
	<title>Unsolicited BFD for Sessionless Applications</title>

	<author fullname="Enke Chen" initials="E." surname="Chen">
	    <organization>Palo Alto Networks</organization>
	    <address>
		<postal>
		<street></street>
		<city></city>
		<region></region>
		<code></code>
		<country></country>
		</postal>
		<email>enchen@paloaltonetworks.com</email>
	    </address>
	</author>

	<author fullname="Naiming Shen" initials="N." surname="Shen">
	    <organization>Zededa</organization>
	    <address>
		<email>naiming@zededa.com</email>
	    </address>
	</author>
	<author fullname='Robert Raszuk' initials='R' surname='Raszuk'>
	    <organization>NTT Network Innovations</organization>
	    <address>
	        <postal>
	            <street>940 Stewart Dr</street>
	            <city>Sunnyvale</city>
	            <region>CA</region>
	            <code>94085</code>
	            <country>USA</country>
	        </postal>
	        <email>robert@raszuk.net</email>
	    </address>
	</author>
	<author fullname="Reshad Rahman" initials="R." surname="Rahman">
	    <organization></organization>
	    <address>
		<postal>
		<street></street>
		<city></city>
		<region></region>
		<code></code>
		<country>Canada</country>
		</postal>
		<email>reshad@yahoo.com</email>
	    </address>
	</author>
	<date day="3" month="December" year="2021" />

	<abstract>
	    <t>
	    For operational simplification of "sessionless" applications
	    using BFD, in this document we present procedures
	    for "unsolicited BFD" that allow a BFD session to be initiated
	    by only one side, and be established without explicit per-session
	    configuration or registration by the other side (subject to certain
	    per-interface or per-router policies). 
            </t>
            <t>
            We also introduce a new YANG module
            to configure and manage "unsolicited BFD". The YANG module in this document
            conforms to the Network Management Datastore Architecture (NMDA) <xref target="RFC8342"/>.
	    </t>
	</abstract>

	<note 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>
	</note>
    </front>

    <middle>
	<section anchor="intro" title="Introduction">
	    <t>
            The current implementation and deployment practice for BFD
            (<xref target="RFC5880"/> and <xref target="RFC5881"/>)
	    usually requires BFD sessions be explicitly
            configured or registered on both sides. This requirement is
            not an issue when an application like BGP <xref target="RFC4271"/>
            has the concept of a "session" that involves both sides for its
            establishment.
            However, this requirement can be operationally challenging
            when the prerequisite "session" does not
            naturally exist between two endpoints in an application.
            Simultaneous configuration and coordination
            may be required on both sides for BFD to take effect. For example:
	    </t>

	    <t>
                <list style="symbols">
	        <t>	      
             When BFD is used to keep track of the "liveness" of the nexthop
             of static routes. Although only one side may need the BFD
             functionality, currently both sides need to be involved in
             specific configuration and coordination and in some cases
             static routes are created unnecessarily just for BFD.
                </t>

                <t>
             When BFD is used to keep track of the "liveness" of the
             third-pary nexthop of BGP routes received from the Route Server
             <xref target="RFC7947"/> at an Internet Exchange Point (IXP).  As the
             third-party nexthop is different from the peering address of
             the Route Server, for BFD to work, currently two routers peering
             with the Route Server need to have routes and nexthops from each
             other (although indirectly via the Router Server), and the
             nexthop of each router must be present at the same time. These
             issues are also discussed in <xref target="I-D.ietf-idr-rs-bfd"/>.
	        </t>
		</list>
	    </t>

	    <t>
            Clearly it is beneficial and desirable to reduce or eliminate
            unnecessary configurations and coordination in these
            "sessionless" applications using BFD.
	    </t>

	    <t>
	    In this document we present procedures
	    for "unsolicited BFD" that allow a BFD session to be initiated
	    by only one side, and be established without explicit per-session
	    configuration or registration by the other side (subject to certain
	    per-interface or per-router policies).
	    </t>

	    <t>
	    With "unsolicited BFD" there is potential risk for
	    excessive resource usage by BFD from "unexpected" remote systems.
	    To mitigate such risks,
	    several mechanisms are recommended in the Security Considerations
	    section.
	    </t>

	    <t>
	    Compared to the "Seamless BFD" <xref target="RFC7880"/>, this proposal involves
	    only minor procedural enhancements to the widely deployed BFD itself.
	    Thus we believe that this proposal is inherently simpler in the
	    protocol itself and deployment.
	    As an example, it does not require the exchange of BFD
	    discriminators over an out-of-band channel before the BFD session bring-up.
	    </t>

	    <t>
	    When BGP Add-Path <xref target="RFC7911"/> is deployed at an IXP using the Route Server,
	    multiple BGP paths (when exist) can be made available to the clients of the
	    Router Server as described in <xref target="RFC7947"/>.
	    The "unsolicited BFD" can be used in BGP route selection
	    by these clients to eliminate paths with "inaccessible nexthops".
	    </t>
        </section>

	<section title="Procedures for Unsolicited BFD">
            <t>
	      With "unsolicited BFD", one side takes the "Active role"
	      and the other side takes only the "Passive role" as
	      described in <xref target="RFC5880"/>.
	    </t>

	    <t>
	      On the passive side, the "unsolicited BFD" SHOULD be explicitly
	      configured on an interface or globally (apply to 
	      all interfaces). The BFD parameters can be either per-interface 
	      or per-router based. It MAY also choose to use the parameters that 
	      the active side uses in its BFD Control packets. The "My Discriminator", 
	      however, MUST be chosen to allow multiple unsolicited BFD sessions.
	     </t>

	     <t>
	       The active side starts sending the BFD Control packets as specified in 
         <xref target="RFC5880"/>. The passive side does not send BFD Control packets.
	     </t>

	     <t>
	       When the passive side receives a BFD Control packet from the active side 
         with 0 as "Your Discriminator" and does not find an existing BFD session, 
         the passive side MAY create a matching BFD session toward the active side, 
         if permitted by local configuration.</t>

         <t>
         It would then start sending the BFD Control packets and perform necessary 
         procedure for bringing up, maintaining and tearing down the BFD session. 
         If the BFD session fails to get established within certain specified time, 
         or if an established BFD session goes down, the passive side would stop 
         sending BFD Control packets and MAY delete the BFD session created until 
         the BFD Control packets is initiated by the active side again.
	       </t>

        <t>
         When an Unsolicited BFD session goes down, an implementation MAY retain 
         the session state for a period of time, which may be configurable.
         Retaining this state can be useful for operational purposes.
        </t>

	     <t>
	       The "Passive role" may change to the "Active role" when a local client
	       registers for the same BFD session, and from the "Active role" to
	       the "Passive role" when there is no longer any locally registered
	       client for the BFD session.
	     </t>
	</section>

  <section title="State Variables">
      
    <t>
      This document defines a new state variable called Unsolicited Role. 
    </t>
    <t>
      bfd.UnsolicitedRole
    </t>
    <t>
      The operational mode of BFD interface when configured for unsolicited 
      behaviour. Options can be either PASSIVE, ACTIVE or NULL (NULL - not 
      initialized) for unsolicited BFD sessions. Default (not configured 
      for unsolicited behaviour) MUST be set to NULL if present on the interface. 
    </t>

  </section>

	<section title="YANG Data Model">
	    <t>
            This section extends the YANG data model for BFD <xref target="RFC9127"/>
	    to cover unsolicited BFD. We import <xref target="RFC8349"/> since the "bfd"
            container in <xref target="RFC9127"/> is under "control-plane-protocol".
	    </t>
            
            <section title="Unsolicited BFD Hierarchy">
            <t>Configuration for unsolicited BFD parameters for IP single-hop sessions can be done at 2 levels:
            <list style="symbols">
            <t>Globally, i.e. for all interfaces. This requires support for the "unsolicited-params-global" feature.</t>
            <t>For specific interfaces. This requires support for the "unsolicited-params-per-interface" feature.</t>
            </list>
            </t>
            <t>For operational data, a new "unsolicited" container has been added for BFD IP single-hop sessions.</t>
            <t>The tree diagram below uses the graphical representation of data models, as defined in <xref target="RFC8340"/>.</t>
        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
module: ietf-bfd-unsolicited

  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh:
    +--rw unsolicited {bfd-unsol:unsolicited-params-global}?
       +--rw enabled?                          boolean
       +--rw local-multiplier?                 multiplier
       +--rw (interval-config-type)?
          +--:(tx-rx-intervals)
          |  +--rw desired-min-tx-interval?    uint32
          |  +--rw required-min-rx-interval?   uint32
          +--:(single-interval) {single-minimum-interval}?
             +--rw min-interval?               uint32
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh
            /bfd-ip-sh:interfaces:
    +--rw unsolicited {bfd-unsol:unsolicited-params-per-interface}?
       +--rw enabled?                          boolean
       +--rw local-multiplier?                 multiplier
       +--rw (interval-config-type)?
          +--:(tx-rx-intervals)
          |  +--rw desired-min-tx-interval?    uint32
          |  +--rw required-min-rx-interval?   uint32
          +--:(single-interval) {single-minimum-interval}?
             +--rw min-interval?               uint32
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh
            /bfd-ip-sh:sessions/bfd-ip-sh:session:
    +--ro unsolicited
       +--ro role?   bfd-unsol:unsolicited-role

             ]]></artwork>
        </figure>
	  </section>
	  
	<section title="Unsolicited BFD Module">
        <figure align="left">
	  <preamble/>

          <artwork align="left"><![CDATA[
<CODE BEGINS> file "ietf-bfd-unsolicited@2021-11-23.yang"
module ietf-bfd-unsolicited {

  yang-version 1.1;

  namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-unsolicited";

  prefix "bfd-unsol";

  // RFC Ed.: replace occurences of YYYY with actual RFC numbers
  // and remove this note

  import ietf-bfd-types {
    prefix "bfd-types";
    reference 
      "RFC 9127: YANG Data Model for Bidirectional Forwarding Detection
      (BFD)";
  }

  import ietf-bfd {
    prefix "bfd";
    reference 
      "RFC 9127: YANG Data Model for Bidirectional Forwarding Detection
       (BFD)";
  }

  import ietf-bfd-ip-sh {
    prefix "bfd-ip-sh";
    reference
      "RFC 9127: YANG Data Model for Bidirectional Forwarding Detection
      (BFD)";
  }

  import ietf-routing {
    prefix "rt";
    reference
      "RFC 8349: A YANG Data Model for Routing Management
       (NMDA version)";
  }

  organization "IETF BFD Working Group";

  contact
    "WG Web:   <https://datatracker.ietf.org/wg/bfd/>
     WG List:  <rtg-bfd@ietf.org>

     Editors:  Enke Chen (enchen@paloaltonetworks.com),
               Naiming Shen (naiming@zededa.com),
               Robert Raszuk (robert@raszuk.net),
               Reshad Rahman (reshad@yahoo.com)";

  description
    "This module contains the YANG definition for BFD unsolicited
     as per RFC YYYY.

     Copyright (c) 2021 IETF Trust and the persons
     identified as authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the Simplified BSD License
     set forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (http://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC YYYY; see
     the RFC itself for full legal notices.";

  reference "RFC YYYY";

  revision 2021-11-23 {
    description
      "Initial revision.";
    reference
      "RFC YYYY: Unsolicited BFD for Sessionless Applications.";
  }

  /*
   * Feature definitions
   */
  feature unsolicited-params-global {
    description
      "This feature indicates that the server supports global
       parameters for unsolicited sessions.";
    reference
      "RFC YYYY: Unsolicited BFD for Sessionless Applications.";
  }

  feature unsolicited-params-per-interface {
    description
      "This feature indicates that the server supports per-interface
       parameters for unsolicited sessions.";
    reference
      "RFC YYYY: Unsolicited BFD for Sessionless Applications.";
  }

  /*
   * Type Definitions
   */
  typedef unsolicited-role {
    type enumeration {
      enum unsolicited-active {
        description "Active role";
      }
      enum unsolicited-passive {
        description "Passive role";
      }
    }
    description "Unsolicited role";
  }

  /*
   * Augments
   */
   augment "/rt:routing/rt:control-plane-protocols/"
         + "rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh" {
     if-feature bfd-unsol:unsolicited-params-global;
     description
       "Augmentation for BFD unsolicited parameters";
     container unsolicited {
       description
         "BFD unsolicited top level container";
       leaf enabled {
         type boolean;
         default false;
         description
           "BFD unsolicited enabled globally for IP single-hop.";
       }
       uses bfd-types:base-cfg-parms;
     }
   }

   augment "/rt:routing/rt:control-plane-protocols/"
         + "rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh/"
         + "bfd-ip-sh:interfaces" {
     if-feature bfd-unsol:unsolicited-params-per-interface;
     description
       "Augmentation for BFD unsolicited on IP single-hop interface";
     container unsolicited {
       description
         "BFD IP single-hop interface unsolicited top level 
          container";
       leaf enabled {
         type boolean;
         default false;
         description
           "BFD unsolicited enabled on this interface.";
       }
       uses bfd-types:base-cfg-parms;
     }
   }

  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh/"
        + "bfd-ip-sh:sessions/bfd-ip-sh:session" {
    description
      "Augmentation for BFD unsolicited on IP single-hop session";
    container unsolicited {
      config false;
      description
        "BFD IP single-hop session unsolicited top level container";
      leaf role {
        type bfd-unsol:unsolicited-role;
        description "Role.";
      }
    }
  }
}

<CODE ENDS>
        ]]></artwork>
        </figure>
	</section>
       </section>

	<section title="IANA Considerations">
	    <t>
            This document registers the following namespace URI in the "IETF XML Registry" <xref target="RFC3688"/>:
            </t>
            <t>URI:  urn:ietf:params:xml:ns:yang:ietf-bfd-unsolicited</t>
            <t>Registrant Contact:  The IESG.</t>
            <t>XML:  N/A; the requested URI is an XML namespace.</t>
            <t>
            This document registers the following YANG module in the "YANG Module Names" registry <xref target="RFC6020"/>:
            </t>
            <t>Name:  ietf-bfd-unsolicited</t>
            <t>Namespace:  urn:ietf:params:xml:ns:yang:ietf-bfd-unsolicited</t>
            <t>Prefix:  bfd-unsol</t>
            <t>Reference:  RFC YYYY</t>
	</section>


	<section title="Acknowledgments"> 

	<t>Authors would like to thank Acee Lindem, Greg Mirsky, Jeffrey Haas, 
      Raj Chetan and Tom Petch for their review and valuable input.</t> 

	</section> 

	<section title="Security Considerations">
	   <section anchor="BFD-Security" title="BFD Protocol Security Considerations">
	    <t>
	    The same security considerations and protection measures as those described 
      in <xref target="RFC5880"/> and <xref target="RFC5881"/> normatively apply 
      to this document. 

	    With "unsolicited BFD" there is potential risk for excessive resource usage 
      by BFD from "unexpected" remote systems. To mitigate such risks, the following 
      measures are mandatory:
	    </t>

	   <t>
     <list style="symbols">
	   <t>
     Limit the feature to specific interfaces, and to a single-hop BFD with "TTL=255" 
     <xref target="RFC5082"/>. For numbered interfaces, the source address of an incoming 
     BFD packet should belong to the subnet of the interface on which the BFD 
     packet is received. For unnumbered interfaces the above check should be aligned 
     with routing protocol addresses running on such pair of interfaces.
     </t>
     <t>
     Apply "policy" to allow BFD packets only from certain subnets or hosts.
      </t>
	    <t>
     Deploy the feature only in certain "trustworthy" environment, e.g., at an IXP, 
     or between a provider and its customers.
	   </t>
	   <t>
     Adjust BFD parameters as needed for the particular deployment and scale.
     </t>
	   <t>
     Use BFD authentication.
     </t>
	   </list>
	    </t>
	   </section>
	   <section title="YANG Module Security Considerations">
      <t>The YANG module specified in this document defines a schema for data
      that is designed to be accessed via network management protocols such as
      NETCONF <xref target="RFC6241"/> or RESTCONF <xref target="RFC8040"/>.
      The lowest NETCONF layer is the secure transport layer, and the
      mandatory-to-implement secure transport is Secure Shell (SSH) <xref
      target="RFC6242"/>. The lowest RESTCONF layer is HTTPS, and the
      mandatory-to-implement secure transport is TLS <xref
      target="RFC8446"/>.</t>

      <t>The NETCONF access control model <xref target="RFC8341"/> provides
      the means to restrict access for particular NETCONF or RESTCONF users to
      a preconfigured subset of all available NETCONF or RESTCONF protocol
      operations and content.</t>

      <t>There are a number of data nodes defined in this YANG module that are
      writable/creatable/deletable (i.e., config true, which is the default).
      These data nodes may be considered sensitive or vulnerable in some
      network environments. Write operations (e.g., edit-config) to these data
      nodes without proper protection can have a negative effect on network
      operations. These are the subtrees and data nodes and their
      sensitivity/vulnerability:</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/ip-sh
         /unsolicited:
      <list style="symbols">
      <t>data node "enabled" enables creation of unsolicited BFD IP single-hop sessions globally, i.e. on all interfaces.
         See <xref target="BFD-Security"/>.</t>
      <t>data nodes local-multiplier, desired-min-tx-interval,
      required-min-rx-interval and min-interval all impact the parameters of the unsolicited
      BFD IP single-hop sessions.</t>
      </list>
      </t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/ip-sh
         /interfaces/interface/unsolicited:
      <list style="symbols">
      <t>data node "enabled" enables creation of unsolicited BFD IP single-hop sessions on a specific interface.
         See <xref target="BFD-Security"/>.</t>
      <t>data nodes local-multiplier, desired-min-tx-interval,
      required-min-rx-interval and min-interval all impact the parameters of the unsolicited
      BFD IP single-hop sessions on the interface.</t>
      </list>
      </t>

      <t>Some of the readable data nodes in this YANG module may be considered
      sensitive or vulnerable in some network environments. It is thus
      important to control read access (e.g., via get, get-config, or
      notification) to these data nodes. These are the subtrees and data nodes
      and their sensitivity/vulnerability:</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/ip-sh
         /sessions/session/unsolicited:
      access to this information discloses the role of the local system in the creation of the unsolicited BFD session.</t>

	   </section>
	</section>

    </middle>

    <back>
	<references title="Normative References">
	    &RFC2119;
	    &RFC3688;
	    &RFC5082;
	    &RFC5880;
	    &RFC5881;
	    &RFC6020;
	    &RFC6241;
	    &RFC6242;
	    &RFC8040;
	    &RFC8174;
	    &RFC8340;
	    &RFC8341;
	    &RFC8349;
	    &RFC8446;
	    &RFC9127;
	</references>
	<references title="Informative References">
	    &RFC4271;
	    &RFC7880;
	    &RFC7911;
	    &RFC7947;
	    &RFC8342;
	    &I-D.ietf-idr-rs-bfd;
	</references>
    </back>
</rfc>

