<?xml version="1.0" encoding="US-ASCII"?> encoding="UTF-8"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="no"?>
<?rfc tocdepth="6"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?> "rfc2629-xhtml.ent">

<rfc category="std" xmlns:xi="http://www.w3.org/2001/XInclude"
     docName="draft-ietf-bfd-yang-17" ipr="trust200902"> number="9127" ipr="trust200902"
     obsoletes="" updates="" submissionType="IETF" category="std"
     consensus="true" xml:lang="en" tocInclude="true" tocDepth="6"
     symRefs="true" sortRefs="true" version="3">

  <!-- xml2rfc v2v3 conversion 2.47.0 -->

  <front>
    <title abbrev="BFD YANG">YANG Data Model for Bidirectional Forwarding
    Detection (BFD)</title>
    <seriesInfo name="RFC" value="9127"/>
    <author fullname="Reshad Rahman" initials="R." role="editor" surname="Rahman">
      <organization>Cisco Systems</organization>
      <organization></organization>
      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>
          <country>Canada</country>
        </postal>

        <email>rrahman@cisco.com</email>
        <email>reshad@yahoo.com</email>
      </address>
    </author>
    <author fullname="Lianshu Zheng" initials="L." role="editor" surname="Zheng">
      <organization>Huawei Technologies</organization>
      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>
          <country>China</country>
        </postal>

        <email>vero.zheng@huawei.com</email>
        <email>veronique_cheng@hotmail.com</email>
      </address>
    </author>
    <author fullname="Mahesh Jethanandani" initials="M." role="editor" surname="Jethanandani">
      <organization>Xoriant Corporation</organization>
      <address>
        <postal>
          <street>1248 Reamwood Ave</street>
          <city>Sunnyvale</city>
          <region>California</region>
          <code>94089</code>

          <country>USA</country>
          <country>United States of America</country>
        </postal>
        <email>mjethanandani@gmail.com</email>
      </address>
    </author>
    <author fullname="Santosh Pallagatti" initials="S." surname="Pallagatti">
      <organization>Rtbrick</organization>
      <organization>VMware</organization>
      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>
          <country>India</country>
        </postal>
        <email>santosh.pallagatti@gmail.com</email>
      </address>
    </author>
    <author fullname="Greg Mirsky" initials="G." surname="Mirsky">
      <organization>ZTE Corporation</organization>
      <organization>Ericsson</organization>
      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>
        <email>gregimirsky@gmail.com</email>
      </address>
    </author>
    <date day="1" month="August" year="2018"/> month="October" year="2021"/>

<keyword>Liveliness check</keyword>
<keyword>BGP</keyword>
<keyword>OSPF</keyword>
<keyword>IS-IS</keyword>
<keyword>TCP-AO</keyword>
<keyword>MD5</keyword>

    <abstract>
      <t>This document defines a YANG data model that can be used to configure
      and manage Bidirectional Forwarding Detection (BFD).</t>
      <t>The YANG modules in this document conform to the Network Management
      Datastore Architecture (NMDA).</t> (NMDA) (RFC 8342).</t>
    </abstract>
  </front>
  <middle>
    <section title="Introduction"> numbered="true" toc="default">
      <name>Introduction</name>
      <t>This document defines a YANG data model that can be used to configure
      and manage Bidirectional Forwarding Detection (BFD) <xref
      target="RFC5880">(BFD) </xref>. target="RFC5880"
      format="default"></xref>. BFD is a network protocol which that is used
      for liveness detection of arbitrary paths between systems. Some examples
      of different types of paths over which we have BFD:</t>

      <t>1) Two BFD are as follows:</t>

     <ol spacing="normal" type="1">
      <li>Two systems directly connected via IP. This is known as BFD over
      single-hop IP, a.k.a. <xref target="RFC5881">BFD a.k.a.&nbsp;<xref target="RFC5881" format="default">BFD for
      IPv4 and IPv6
      </xref></t>

      <t>2) Two IPv6</xref>.</li>
      <li>Two systems connected via multiple hops as described in <xref
      target="RFC5883">BFD
      target="RFC5883" format="default">"Bidirectional Forwarding Detection
      (BFD) for Multiple Hops.</xref></t>

      <t>3) Two Multihop Paths"</xref>.</li>
      <li>Two systems connected via MPLS Label Switched Paths (LSPs) as
      described in <xref target="RFC5884">BFD target="RFC5884" format="default">"Bidirectional
      Forwarding Detection (BFD) for MPLS LSP </xref></t>

      <t>4) Two Label Switched Paths (LSPs)"</xref>.</li>
      <li>Two systems connected via a Link Aggregation Group (LAG) interface
      as described in <xref target="RFC7130">BFD target="RFC7130" format="default">"Bidirectional
      Forwarding Detection (BFD) on LAG Interfaces </xref></t>

      <t>5) Two Link Aggregation Group (LAG) Interfaces"</xref>.</li>
      <li>Two systems connected via pseudowires (PWs), this (PWs). This is known as
      Virtual Circuit Connectivity Verification (VCCV) (VCCV), as described in <xref
      target="RFC5885">BFD
      target="RFC5885" format="default">"Bidirectional
      Forwarding Detection (BFD) for PW VCCV </xref>. the Pseudowire Virtual
      Circuit Connectivity Verification (VCCV)"</xref>. This scenario is not
      addressed in this
      document.</t> document.</li>
     </ol>
      <t>BFD typically does not operate on its own. Various control protocols,
      also known as BFD clients, use the services provided by BFD for their
      own operation operation, as described in <xref target="RFC5882">Generic target="RFC5882"
      format="default">"Generic Application of BFD </xref>. Bidirectional Forwarding
      Detection (BFD)"</xref>. The obvious
      candidates which that use BFD are those which that do not have "hellos" to detect
      failures, e.g. e.g., static routes, and routing protocols whose "hellos" do
      not support sub-second failure detection,
      e.g. e.g., OSPF and IS-IS.</t>
      <t>The YANG modules in this document conform to the <xref
      target="RFC8342">Network
      target="RFC8342" format="default">Network Management Datastore
      Architecture (NMDA)</xref>. This means that the data models do not have
      separate top-level or sibling containers for configuration data and
      operational state data.</t>

      <section title="Requirements Language">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
        "SHOULD", "SHOULD 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 title="Tree Diagrams"> numbered="true" toc="default">
        <name>Tree Diagrams</name>
        <t>This document uses the graphical representation of data models models, as defined in
            <xref target="RFC8340"/>.</t> target="RFC8340" format="default"/>.</t>
      </section>
    </section>
    <section anchor="DESIGN-DATA" title="Design numbered="true" toc="default">
      <name>Design of the Data Model"> Model</name>
      <t>Since BFD is used for liveliness liveness detection of various forwarding
      paths, there is no uniform key to identify a BFD session, and so the BFD
      data model is split in into multiple YANG modules where each module
      corresponds to one type of forwarding path. For example, BFD for IP
      single-hop is in one YANG module module, and BFD for MPLS-TE MPLS is in another YANG
      module. The main difference between these modules is how a BFD session
      is uniquely identified, i.e i.e., the key for the list containing the BFD
      sessions for that forwarding path. To avoid duplication of BFD
      definitions, we have common types and groupings which that are used by all
      the modules.</t>
      <t>A new control-plane protocol "bfdv1" protocol, "bfdv1", is defined defined, and a "bfd" container
      is created under control-plane-protocol "control-plane-protocol" as specified in <xref
      target="RFC8349">"A
      target="RFC8349" format="default">"A YANG Data Model for Routing
      Management (NMDA Version)"</xref>. This new "bfd" container is augmented
      by all the following YANG modules for their respective specific information:<list
          style="numbers">
          <t>ietf-bfd-ip-sh.yang information:
      </t>
      <ol spacing="normal" type="1">
        <li>The "ietf-bfd-ip-sh" module (<xref target="bfd-ip-single-hop-module"/>) augments
          "/routing/control-plane-protocols/control-plane-protocol/bfd/" with
          the "ip-sh" container for BFD sessions over IP single-hop.</t>

          <t>ietf-bfd-ip-mh.yang single-hop.</li>
        <li>The "ietf-bfd-ip-mh" module (<xref target="bfd-ip-multihop-module"/>) augments
          "/routing/control-plane-protocols/control-plane-protocol/bfd/" with
          the "ip-mh" container for BFD sessions over IP multi-hop.</t>

          <t>ietf-bfd-lag.yang multihop.</li>
        <li>The "ietf-bfd-lag" module (<xref target="bfd-over-lag-module"/>) augments
          "/routing/control-plane-protocols/control-plane-protocol/bfd/" with
          the "lag" container for BFD sessions over LAG.</t>

          <t>ietf-bfd-mpls.yang a LAG.</li>
        <li>The "ietf-bfd-mpls" module (<xref target="bfd-over-mpls-module"/>) augments
          "/routing/control-plane-protocols/control-plane-protocol/bfd/" with
          the "mpls" container for BFD over MPLS LSPs.</t>

          <t>ietf-bfd-mpls-te.yang augments
          "/routing/control-plane-protocols/control-plane-protocol/bfd/" with
          the "mpls-te" container for BFD over MPLS-TE.</t>
        </list></t> BFD-over-MPLS LSPs.</li>
      </ol>
      <t>BFD can operate in the following contexts: <list style="numbers">
          <t>At contexts:</t>
      <ol spacing="normal" type="1">
        <li>At the network device level</t>

          <t>In Logical Network Elements level.</li>
        <li>In logical network elements (LNEs) as described in <xref
          target="I-D.ietf-rtgwg-lne-model">YANG
        target="RFC8530" format="default">"YANG Model for Logical Network
          Element</xref></t>

          <t>In Network Instances Elements"</xref>.</li>
        <li>In network instances as described in <xref
          target="I-D.ietf-rtgwg-ni-model">YANG Logical
        target="RFC8529" format="default">"YANG Data Model for Network
          Element</xref></t>
        </list> Instances"</xref>.</li>
      </ol>
      <t> When used at the network device level, the BFD YANG data model is
        used "as-is". "as is". When the BFD YANG data model is used in a Logical Network
        Element an LNE or in a Network Instance, then network instance, the BFD YANG data model augments
        the mounted routing model for the Logical Network Element LNE or the
        Network Instance.</t> network instance.</t>
      <section anchor="CFG-MODEL" title="Design numbered="true" toc="default">
        <name>Design of the Configuration Model"> Model</name>
        <t>The configuration model consists mainly of the parameters specified
        in <xref target="RFC5880">BFD</xref>. Some examples are target="RFC5880" format="default">BFD</xref> -- for example, desired
        minimum transmit interval, required minimum receive interval, and
        detection multiplier, etc</t> multiplier.</t>
        <t>BFD clients are applications that use BFD for fast detection of
        failures. Some implementations have BFD session configuration under
        the BFD clients. For clients -- for example, BFD session configuration under routing
        applications such as OSPF, IS-IS, BGP etc. or BGP. Other implementations have
        BFD session configuration centralized under BFD, i.e. i.e., outside the
        multiple BFD clients.</t>
        <t>The main BFD parameters of interest to a BFD client are mainly those
        related to the
        multiplier and interval(s) interval(s), since those parameters impact the
        convergence time of the BFD clients when a failure occurs. Other
        parameters
        parameters, such as BFD authentication authentication, are not specific to the
        requirements of the BFD client. Ideally Configuration of BFD for all configuration
        clients should be
        centralized under BFD. centralized. However, this is a problem for clients of BFD
        which clients
        that auto-discover their peers. For example, IGPs do not have the
        peer address configured, instead configured; instead, the IGP is enabled on an interface interface,
        and the IGP peers are auto-discovered. So So, for an operator to configure
        BFD to an IGP peer, the operator would first have to determine the
        peer addresses. And when a new peer is discovered, BFD configuration
        would need to be added. To avoid this issue, we define the grouping
        client-cfg-parms
        "client-cfg-parms" in <xref target="BFD-TYPES"/> target="BFD-TYPES" format="default"/> for BFD clients to
        configure BFD: this allows BFD clients clients, such as the IGPs IGPs, to have
        configuration (multiplier and intervals) for the BFD sessions they
        need. For example, when a new IGP peer is discovered, the IGP would
        create a BFD session to the newly discovered peer and similarly peer; similarly, when
        an IGP peer goes away, the IGP would remove the BFD session to that
        peer. The mechanism for how the BFD sessions are created and removed by
        the BFD clients is outside the scope of this document, but typically
        this would typically be done by use of using an API implemented by the BFD module on
        the system. For In the case of BFD clients which that create BFD sessions via their own
        configuration, authentication parameters (if required) are still
        specified in BFD.</t>
        <section anchor="BFD-COMMON-CFG"
                 title="Common numbered="true" toc="default">
          <name>Common BFD configuration parameters"> Configuration Parameters</name>
          <t>The basic BFD configuration parameters are: <list hangIndent="8"
              style="hanging">
              <t hangText="local-multiplier"><vspace/>This are as follows:</t>
          <dl newline="true" spacing="normal">
            <dt>local-multiplier</dt>
            <dd>This is the detection time multiplier as defined in <xref
              target="RFC5880">BFD</xref>.</t>

              <t hangText="desired-min-tx-interval"><vspace/>This
            target="RFC5880" format="default">BFD</xref>.</dd>
            <dt>desired-min-tx-interval</dt>
            <dd>This is the Desired Min TX Interval as defined in <xref
              target="RFC5880">BFD</xref>.</t>

              <t hangText="required-min-rx-interval"><vspace/>This
            target="RFC5880" format="default">BFD</xref>.</dd>
            <dt>required-min-rx-interval</dt>
            <dd>This is the Required Min RX Interval as defined in <xref
              target="RFC5880">BFD</xref>.</t>
            </list>Although
            target="RFC5880" format="default">BFD</xref>.</dd>
          </dl>
          <t>Although <xref target="RFC5880">BFD</xref> target="RFC5880" format="default">BFD</xref>
          allows for different values for transmit and receive intervals, some
          implementations allow users to specify just one interval which that is
          used for both transmit and receive intervals intervals, or separate values for
          transmit and receive intervals. The BFD YANG data model supports this:
          there is a choice between "min-interval", used for both transmit and
          receive intervals, and "desired-min-tx-interval" and
          "required-min-rx-interval". This is supported via a the
          "base-cfg-parms" grouping (<xref target="BFD-TYPES"/>), which
          is used by the YANG modules for the various forwarding paths.</t>
          <t>For BFD authentication authentication, we have: <list hangIndent="8"
              style="hanging">
              <t hangText="key-chain"><vspace/>This have the following:</t>
          <dl newline="true" spacing="normal">
            <dt>key-chain</dt>
            <dd>This is a reference to
              key-chain "key-chain" as defined in <xref target="RFC8177">YANG
            target="RFC8177" format="default">"YANG Data Model for Key Chains </xref>.
            Chains"</xref>. The keys, cryptographic algorithms, key
              lifetime etc lifetime,
            etc. are all defined in the key-chain model.</t>

              <t hangText="meticulous"><vspace/>This "key-chain" model.</dd>
            <dt>meticulous</dt>
            <dd>This enables a meticulous mode as per <xref target="RFC5880">BFD </xref>.</t>
            </list></t> target="RFC5880"
            format="default">BFD </xref>.</dd>
          </dl>
        </section>
        <section anchor="IP-SH-CFG" title="Single-hop IP"> numbered="true" toc="default">
          <name>Single-Hop IP</name>
          <t>For single-hop IP, there is an augment of the "bfd" data node node, as
          described in
          <xref target="DESIGN-DATA"/>. target="DESIGN-DATA" format="default"/>. The "ip-sh" node
          contains a list of IP single-hop sessions where each session is
          uniquely identified by the interface and destination address
          pair. For We use the configuration parameters we use what is defined in
          <xref
          target="BFD-COMMON-CFG"/>. target="BFD-COMMON-CFG" format="default"/>. The "ip-sh" node
          also contains a list of
          interfaces, this interfaces and is used to specify
          authentication parameters for BFD sessions which that are created by BFD clients, see
          clients. See <xref
          target="CFG-MODEL"/>.</t> target="CFG-MODEL" format="default"/>.</t>
          <t><xref target="RFC5880"/> target="RFC5880" format="default"/> and <xref target="RFC5881"/>
          target="RFC5881" format="default"/> do not specify whether echo
          the Echo function is continuous operates continuously or on demand. Therefore Therefore, the mechanism used to
          start and stop echo the Echo function is implementation specific and should
          be done by augmentation: <list>
              <t>1) Configuration. augmentation:</t>
          <ol spacing="normal" type="1">
            <li>Configuration. This is suitable for continuous echo
              function. an Echo function that
            operates continuously. An example is provided in <xref
              target="ECHO-CONFIG"/>.</t>

              <t>2) RPC. target="ECHO-CONFIG"
            format="default"/>.</li>
            <li>RPC. This is suitable for on-demand echo function.</t>
            </list></t> an Echo function that operates
            on demand.</li>
          </ol>
        </section>
        <section title="Multihop IP"> numbered="true" toc="default">
          <name>Multihop IP</name>
          <t>For multihop IP, there is an augment of the "bfd" data node node, as described in
          <xref target="DESIGN-DATA"/>.</t> target="DESIGN-DATA" format="default"/>.</t>
          <t>Because of multiple paths, there could be multiple multihop IP
          sessions between a source and a destination address. We identify
          this set of sessions as a "session-group". The key for each "session-group" consists
          of: <list hangIndent="8" style="hanging">
              <t hangText="source address"><vspace/>Address
          of the following:</t>
          <dl newline="true" spacing="normal">
            <dt>Source address</dt>
            <dd>Address belonging to the local system as per <xref target="RFC5883">BFD
            target="RFC5883" format="default">"Bidirectional Forwarding
            Detection (BFD) for Multiple Hops
              </xref></t>

              <t hangText="destination address"><vspace/>Address Multihop Paths"</xref>.</dd>
            <dt>Destination address</dt>
            <dd>Address belonging to the remote system as per <xref target="RFC5883">BFD for Multiple
              Hops </xref></t>
            </list></t>

          <t>For
            target="RFC5883" format="default"></xref>.</dd>
          </dl>
          <t>We use the configuration parameters we use what is defined in <xref
          target="BFD-COMMON-CFG"/></t>

          <t>Here are some extra parameters: <list hangIndent="8"
              style="hanging">
              <t hangText="tx-ttl"><vspace/>TTL
          target="BFD-COMMON-CFG" format="default"/>.</t>
          <t>This document also provides the following parameters:</t>
          <dl newline="true" spacing="normal">
            <dt>tx-ttl</dt>
            <dd>TTL of outgoing BFD control
              packets.</t>

              <t hangText="rx-ttl"><vspace/>Minimum packets.</dd>
            <dt>rx-ttl</dt>
            <dd>Minimum TTL of incoming BFD control packets.</t>
            </list></t> packets.</dd>
          </dl>
        </section>
        <section anchor="BFD-MPLS-TE-CFG"
                 title="MPLS Traffic Engineering Tunnels">
          <t>For MPLS-TE tunnels, BFD is configured under the MPLS-TE tunnel
          since the desired failure detection parameters are a property of the
          MPLS-TE tunnel. This is achieved by augmenting the MPLS-TE data
          model in <xref target="I-D.ietf-teas-yang-te">YANG Data Model for TE
          Topologies </xref>. For BFD parameters which are specific to the TE
          application, e.g. whether to tear down the tunnel in the event of a
          BFD session failure, these parameters will be defined in the YANG
          model of the MPLS-TE application.</t>

          <t>On top of the usual BFD parameters, we have the following per
          MPLS-TE tunnel: <list hangIndent="8" style="hanging">
              <t hangText="encap"><vspace/>Encapsulation for the BFD packets:
              choice between IP, G-ACh and IP with G-ACh as per <xref
              target="RFC5586">MPLS Generic Associated Channel </xref></t>
            </list></t>

          <t>For general MPLS-TE data, "mpls-te" data node is added under the
          "bfd" node in <xref target="DESIGN-DATA"/>. Since some MPLS-TE
          tunnels are uni-directional there is no MPLS-TE configuration for
          these tunnels on the egress node (note that this does not apply to
          bi-directional MPLS-TP tunnels). The BFD parameters for the egress
          node are added under "mpls-te".</t>
        </section>

        <section title="MPLS numbered="true" toc="default">
          <name>MPLS Label Switched Paths">
          <t>Here Paths</name>
          <t>Here, we address MPLS LSPs whose FEC
          Forwarding Equivalence Class (FEC) <xref target="RFC3031"/> is an IP
          address. The "bfd"
          node in <xref target="DESIGN-DATA"/> (<xref target="DESIGN-DATA" format="default"/>) is augmented
          with "mpls" "mpls", which contains a list of sessions uniquely identified by
          an IP prefix. Because of multiple paths, there could be multiple
          MPLS sessions to an MPLS FEC. We identify this set of sessions as a
          "session-group".</t>
          <t>Since these LSPs are uni-directional unidirectional, there is no LSP
          configuration on the egress node.</t>
          <t>The BFD parameters for the egress node are added under
          "mpls".</t>
        </section>
        <section title="Link numbered="true" toc="default">
          <name>Link Aggregation Groups"> Groups</name>
          <t>Per <xref target="RFC7130">BFD target="RFC7130" format="default">"Bidirectional
          Forwarding Detection (BFD) on LAG Interfaces </xref>, Link Aggregation Group (LAG)
          Interfaces"</xref>, configuring BFD on a LAG consists of having micro-BFD
          sessions on each LAG member link. Since the BFD parameters are an
          attribute of the LAG, they should be under the LAG. However However, there is
          no LAG YANG data model which that we can augment. So So, a "lag" data node is
          added to the "bfd" node in node; see <xref target="DESIGN-DATA"/>, the target="DESIGN-DATA"
          format="default"/>. The configuration is
          per-LAG: per LAG: we have a list of
          LAGs. The destination IP address of the micro-BFD sessions is
          configured per-LAG per LAG and per address-family address family (IPv4 and IPv6)</t> IPv6).</t>
        </section>
      </section>
      <section title="Design numbered="true" toc="default">
        <name>Design of the Operational State Model"> Model</name>
        <t>The operational state model contains both the overall statistics of for
        the BFD sessions running on the device and the per session per-session operational
        information.</t>
        <t>The overall statistics of for the BFD sessions consist of the number of BFD
        sessions, the number of BFD sessions up that are up, etc. This information is available
        globally (i.e. (i.e., for all BFD sessions) under the "bfd" node in <xref
        target="DESIGN-DATA"/>
        (<xref target="DESIGN-DATA" format="default"/>) and also per type of
        forwarding path.</t>
        <t>For each BFD session, mainly three main categories of operational state
        data are shown. The shown.</t>

       <ol spacing="normal" type="1">
       <li>The first category includes fundamental information of regarding a BFD session session, such as
        the local discriminator, the remote discriminator discriminator, and the capability of
        supporting demand detect mode are shown in the first category. The ability to
        support Demand mode.</li>

        <li>The
        second category includes a BFD session running "session-running" information, e.g. e.g., the
        remote BFD state and the diagnostic code received. Another example is
        the actual transmit interval between the control packets, which may be
        different from the configured desired minimum transmit interval configured, is
        shown in this category.
        interval. Similar examples are include the actual received receive interval
        between the control packets and the actual transmit interval between
        the echo packets. Echo packets.</li>
        <li> The third category contains the detailed statistics
        of
        for the session, e.g. e.g., when the session transitioned up/down and how
        long it has been in that state.</t> state.</li>
       </ol>

        <t>For some path types, there may be more than 1 one session on the
        virtual path to the destination. For example, with IP multihop and
        MPLS LSPs, there could be multiple BFD sessions from the source to the
        same destination to test the various paths (ECMP) to the destination.
        This is represented by having multiple "sessions" under each
        "session-group".</t>
      </section>
      <section title="Notifications"> numbered="true" toc="default">
        <name>Notifications</name>
        <t>This YANG data model defines notifications to inform end-users end users of
        important events detected during the protocol operation. Pair of The
        local discriminator identifies the corresponding BFD session on the
        local system, and the remote discriminator identifies a the BFD session
        on local the remote system.
        Notifications also give more important details about BFD sessions;
        e.g. sessions,
        e.g., new state, time in previous state, network-instance network instance, and the
        reason that the BFD session state changed. The notifications are
        defined for each type of forwarding path but use groupings for common
        information.</t>
      </section>
      <section title="RPC Operations"> numbered="true" toc="default">
        <name>RPC Operations</name>
        <t>None.</t>
      </section>
      <section title="BFD top level hierarchy"> numbered="true" toc="default">
        <name>BFD Top-Level Hierarchy</name>
        <t>At the "bfd" node under control-plane-protocol, "control-plane-protocol", there is no
        configuration data, data -- only operational state data. The operational state
        data consist consists of overall BFD session statistics, i.e. i.e., for BFD on all
        types of forwarding paths.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
        <sourcecode type="yangtree"><![CDATA[
module: ietf-bfd
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol:
    +--rw bfd
       +--ro summary
          +--ro number-of-sessions?              yang:gauge32
          +--ro number-of-sessions-up?           yang:gauge32
          +--ro number-of-sessions-down?         yang:gauge32
          +--ro number-of-sessions-admin-down?   yang:gauge32
                     ]]></artwork>
        </figure>
]]></sourcecode>
      </section>
      <section title="BFD numbered="true" toc="default">
        <name>BFD IP single-hop hierarchy"> Single-Hop Hierarchy</name>
        <t>An "ip-sh" node is added under the "bfd" node in
        control-plane-protocol.
        "control-plane-protocol". The configuration data and operational state data
        for each BFD IP single-hop session is are under this "ip-sh" node.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
        <sourcecode type="yangtree"><![CDATA[
module: ietf-bfd-ip-sh
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bfd:bfd:
    +--rw ip-sh
       +--ro summary
       |  +--ro number-of-sessions?              yang:gauge32
       |  +--ro number-of-sessions-up?           yang:gauge32
       |  +--ro number-of-sessions-down?         yang:gauge32
       |  +--ro number-of-sessions-admin-down?   yang:gauge32
       +--rw sessions
       |  +--rw session* [interface dest-addr]
       |     +--rw interface                         if:interface-ref
       |     +--rw dest-addr                         inet:ip-address
       |     +--rw source-addr?                      inet:ip-address
       |     +--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
       |     +--rw demand-enabled?                   boolean
       |     |       {demand-mode}?
       |     +--rw admin-down?                       boolean
       |     +--rw authentication! {authentication}?
       |     |  +--rw key-chain?    kc:key-chain-ref    key-chain:key-chain-ref
       |     |  +--rw meticulous?   boolean
       |     +--ro path-type?                        identityref
       |     +--ro ip-encapsulation?                 boolean
       |     +--ro local-discriminator?              discriminator
       |     +--ro remote-discriminator?             discriminator
       |     +--ro remote-multiplier?                multiplier
       |     +--ro demand-capability?                boolean
       |     |       {demand-mode}?
       |     +--ro source-port?                      inet:port-number
       |     +--ro dest-port?                        inet:port-number
       |     +--ro session-running
       |     |  +--ro session-index?                uint32
       |     |  +--ro local-state?                  state
       |     |  +--ro remote-state?                 state
       |     |  +--ro local-diagnostic?
       |     |  |       iana-bfd-types:diagnostic
       |     |  +--ro remote-diagnostic?
       |     |  |       iana-bfd-types:diagnostic
       |     |  +--ro remote-authenticated?         boolean
       |     |  +--ro remote-authentication-type?
       |     |  |       iana-bfd-types:auth-type {authentication}?
       |     |  +--ro detection-mode?               enumeration
       |     |  +--ro negotiated-tx-interval?       uint32
       |     |  +--ro negotiated-rx-interval?       uint32
       |     |  +--ro detection-time?               uint32
       |     |  +--ro echo-tx-interval-in-use?      uint32
       |     |          {echo-mode}?
       |     +--ro session-statistics
       |        +--ro create-time?
       |        |       yang:date-and-time
       |        +--ro last-down-time?
       |        |       yang:date-and-time
       |        +--ro last-up-time?
       |        |       yang:date-and-time
       |        +--ro down-count?                     yang:counter32
       |        +--ro admin-down-count?               yang:counter32
       |        +--ro receive-packet-count?           yang:counter64
       |        +--ro send-packet-count?              yang:counter64
       |        +--ro receive-invalid-packet-count?   yang:counter64
       |        +--ro send-failed-packet-count?       yang:counter64
       +--rw interfaces* [interface]
          +--rw interface         if:interface-ref
          +--rw authentication! {authentication}?
             +--rw key-chain?    kc:key-chain-ref    key-chain:key-chain-ref
             +--rw meticulous?   boolean

  notifications:
    +---n singlehop-notification
       +--ro local-discr?                 discriminator
       +--ro remote-discr?                discriminator
       +--ro new-state?                   state
       +--ro state-change-reason?         iana-bfd-types:diagnostic
       +--ro time-of-last-state-change?   yang:date-and-time
       +--ro dest-addr?                   inet:ip-address
       +--ro source-addr?                 inet:ip-address
       +--ro session-index?               uint32
       +--ro path-type?                   identityref
       +--ro interface?                   if:interface-ref
       +--ro echo-enabled?                boolean

]]></artwork>
        </figure>
]]></sourcecode>
      </section>
      <section title="BFD numbered="true" toc="default">
        <name>BFD IP multihop hierarchy"> Multihop Hierarchy</name>
        <t>An "ip-mh" node is added under the "bfd" node in
        cntrol-plane-protocol.
        "control-plane-protocol". The configuration data and operational state data
        for each BFD IP multihop session is are under this "ip-mh" node. In the
        operational state model model, we support multiple BFD multihop sessions per
        remote address (ECMP), (ECMP); the local discriminator is used as the key.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
<sourcecode type="yangtree"><![CDATA[
module: ietf-bfd-ip-mh
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bfd:bfd:
    +--rw ip-mh
       +--ro summary
       |  +--ro number-of-sessions?              yang:gauge32
       |  +--ro number-of-sessions-up?           yang:gauge32
       |  +--ro number-of-sessions-down?         yang:gauge32
       |  +--ro number-of-sessions-admin-down?   yang:gauge32
       +--rw session-groups
          +--rw session-group* [source-addr dest-addr]
             +--rw source-addr                       inet:ip-address
             +--rw dest-addr                         inet:ip-address
             +--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
             +--rw demand-enabled?                   boolean
             |       {demand-mode}?
             +--rw admin-down?                       boolean
             +--rw authentication! {authentication}?
             |  +--rw key-chain?    kc:key-chain-ref    key-chain:key-chain-ref
             |  +--rw meticulous?   boolean
             +--rw tx-ttl?                           bfd-types:hops
             +--rw rx-ttl                            bfd-types:hops
             +--ro sessions* []
                +--ro path-type?              identityref
                +--ro ip-encapsulation?       boolean
                +--ro local-discriminator?    discriminator
                +--ro remote-discriminator?   discriminator
                +--ro remote-multiplier?      multiplier
                +--ro demand-capability?      boolean {demand-mode}?
                +--ro source-port?            inet:port-number
                +--ro dest-port?              inet:port-number
                +--ro session-running
                |  +--ro session-index?                uint32
                |  +--ro local-state?                  state
                |  +--ro remote-state?                 state
                |  +--ro local-diagnostic?
                |  |       iana-bfd-types:diagnostic
                |  +--ro remote-diagnostic?
                |  |       iana-bfd-types:diagnostic
                |  +--ro remote-authenticated?         boolean
                |  +--ro remote-authentication-type?
                |  |       iana-bfd-types:auth-type {authentication}?
                |  +--ro detection-mode?               enumeration
                |  +--ro negotiated-tx-interval?       uint32
                |  +--ro negotiated-rx-interval?       uint32
                |  +--ro detection-time?               uint32
                |  +--ro echo-tx-interval-in-use?      uint32
                |          {echo-mode}?
                +--ro session-statistics
                   +--ro create-time?
                   |       yang:date-and-time
                   +--ro last-down-time?
                   |       yang:date-and-time
                   +--ro last-up-time?
                   |       yang:date-and-time
                   +--ro down-count?
                   |       yang:counter32
                   +--ro admin-down-count?
                   |       yang:counter32
                   +--ro receive-packet-count?
                   |       yang:counter64
                   +--ro send-packet-count?
                   |       yang:counter64
                   +--ro receive-invalid-packet-count?
                   |       yang:counter64
                   +--ro send-failed-packet-count?
                           yang:counter64

  notifications:
    +---n multihop-notification
       +--ro local-discr?                 discriminator
       +--ro remote-discr?                discriminator
       +--ro new-state?                   state
       +--ro state-change-reason?         iana-bfd-types:diagnostic
       +--ro time-of-last-state-change?   yang:date-and-time
       +--ro dest-addr?                   inet:ip-address
       +--ro source-addr?                 inet:ip-address
       +--ro session-index?               uint32
       +--ro path-type?                   identityref
                     ]]></artwork>
        </figure>
]]></sourcecode>
      </section>
      <section title="BFD over LAG hierarchy"> numbered="true" toc="default">
        <name>BFD-over-LAG Hierarchy</name>
        <t>A "lag" node is added under the "bfd" node in
        control-plane-protocol.
        "control-plane-protocol". The configuration data and operational state data
        for each BFD LAG session is are under this "lag" node.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
        <sourcecode type="yangtree"><![CDATA[
module: ietf-bfd-lag
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bfd:bfd:
    +--rw lag
       +--rw micro-bfd-ipv4-session-statistics
       |  +--ro summary
       |     +--ro number-of-sessions?              yang:gauge32
       |     +--ro number-of-sessions-up?           yang:gauge32
       |     +--ro number-of-sessions-down?         yang:gauge32
       |     +--ro number-of-sessions-admin-down?   yang:gauge32
       +--rw micro-bfd-ipv6-session-statistics
       |  +--ro summary
       |     +--ro number-of-sessions?              yang:gauge32
       |     +--ro number-of-sessions-up?           yang:gauge32
       |     +--ro number-of-sessions-down?         yang:gauge32
       |     +--ro number-of-sessions-admin-down?   yang:gauge32
       +--rw sessions
          +--rw session* [lag-name]
             +--rw lag-name                          if:interface-ref
             +--rw ipv4-dest-addr?
             |       inet:ipv4-address
             +--rw ipv6-dest-addr?
             |       inet:ipv6-address
             +--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
             +--rw demand-enabled?                   boolean
             |       {demand-mode}?
             +--rw admin-down?                       boolean
             +--rw authentication! {authentication}?
             |  +--rw key-chain?    kc:key-chain-ref    key-chain:key-chain-ref
             |  +--rw meticulous?   boolean
             +--rw use-ipv4?                         boolean
             +--rw use-ipv6?                         boolean
             +--ro member-links* [member-link]
                +--ro member-link       if:interface-ref
                +--ro micro-bfd-ipv4
                |  +--ro path-type?              identityref
                |  +--ro ip-encapsulation?       boolean
                |  +--ro local-discriminator?    discriminator
                |  +--ro remote-discriminator?   discriminator
                |  +--ro remote-multiplier?      multiplier
                |  +--ro demand-capability?      boolean
                |  |       {demand-mode}?
                |  +--ro source-port?            inet:port-number
                |  +--ro dest-port?              inet:port-number
                |  +--ro session-running
                |  |  +--ro session-index?                uint32
                |  |  +--ro local-state?                  state
                |  |  +--ro remote-state?                 state
                |  |  +--ro local-diagnostic?
                |  |  |       iana-bfd-types:diagnostic
                |  |  +--ro remote-diagnostic?
                |  |  |       iana-bfd-types:diagnostic
                |  |  +--ro remote-authenticated?         boolean
                |  |  +--ro remote-authentication-type?
                |  |  |       iana-bfd-types:auth-type
                |  |  |       {authentication}?
                |  |  +--ro detection-mode?               enumeration
                |  |  +--ro negotiated-tx-interval?       uint32
                |  |  +--ro negotiated-rx-interval?       uint32
                |  |  +--ro detection-time?               uint32
                |  |  +--ro echo-tx-interval-in-use?      uint32
                |  |          {echo-mode}?
                |  +--ro session-statistics
                |     +--ro create-time?
                |     |       yang:date-and-time
                |     +--ro last-down-time?
                |     |       yang:date-and-time
                |     +--ro last-up-time?
                |     |       yang:date-and-time
                |     +--ro down-count?
                |     |       yang:counter32
                |     +--ro admin-down-count?
                |     |       yang:counter32
                |     +--ro receive-packet-count?
                |     |       yang:counter64
                |     +--ro send-packet-count?
                |     |       yang:counter64
                |     +--ro receive-invalid-packet-count?
                |     |       yang:counter64
                |     +--ro send-failed-packet-count?
                |             yang:counter64
                +--ro micro-bfd-ipv6
                   +--ro path-type?              identityref
                   +--ro ip-encapsulation?       boolean
                   +--ro local-discriminator?    discriminator
                   +--ro remote-discriminator?   discriminator
                   +--ro remote-multiplier?      multiplier
                   +--ro demand-capability?      boolean
                   |       {demand-mode}?
                   +--ro source-port?            inet:port-number
                   +--ro dest-port?              inet:port-number
                   +--ro session-running
                   |  +--ro session-index?                uint32
                   |  +--ro local-state?                  state
                   |  +--ro remote-state?                 state
                   |  +--ro local-diagnostic?
                   |  |       iana-bfd-types:diagnostic
                   |  +--ro remote-diagnostic?
                   |  |       iana-bfd-types:diagnostic
                   |  +--ro remote-authenticated?         boolean
                   |  +--ro remote-authentication-type?
                   |  |       iana-bfd-types:auth-type
                   |  |       {authentication}?
                   |  +--ro detection-mode?               enumeration
                   |  +--ro negotiated-tx-interval?       uint32
                   |  +--ro negotiated-rx-interval?       uint32
                   |  +--ro detection-time?               uint32
                   |  +--ro echo-tx-interval-in-use?      uint32
                   |          {echo-mode}?
                   +--ro session-statistics
                      +--ro create-time?
                      |       yang:date-and-time
                      +--ro last-down-time?
                      |       yang:date-and-time
                      +--ro last-up-time?
                      |       yang:date-and-time
                      +--ro down-count?
                      |       yang:counter32
                      +--ro admin-down-count?
                      |       yang:counter32
                      +--ro receive-packet-count?
                      |       yang:counter64
                      +--ro send-packet-count?
                      |       yang:counter64
                      +--ro receive-invalid-packet-count?
                      |       yang:counter64
                      +--ro send-failed-packet-count?
                              yang:counter64

  notifications:
    +---n lag-notification
       +--ro local-discr?                 discriminator
       +--ro remote-discr?                discriminator
       +--ro new-state?                   state
       +--ro state-change-reason?         iana-bfd-types:diagnostic
       +--ro time-of-last-state-change?   yang:date-and-time
       +--ro dest-addr?                   inet:ip-address
       +--ro source-addr?                 inet:ip-address
       +--ro session-index?               uint32
       +--ro path-type?                   identityref
       +--ro lag-name?                    if:interface-ref
       +--ro member-link?                 if:interface-ref
                     ]]></artwork>
        </figure>
]]></sourcecode>
      </section>
      <section title="BFD over MPLS LSPs hierarchy"> numbered="true" toc="default">
        <name>BFD-over-MPLS-LSPs Hierarchy</name>
        <t>An "mpls" node is added under the "bfd" node in
        control-plane-protocol.
        "control-plane-protocol". The configuration is per MPLS FEC under this
        "mpls" node. In the operational state model model, we support multiple BFD
        sessions per MPLS FEC (ECMP), (ECMP); the local discriminator is used as the key.
        The "mpls" node can be used in a network device (top-level), (top level) or can be
        mounted in an LNE or in a network instance.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
        <sourcecode type="yangtree"><![CDATA[
module: ietf-bfd-mpls
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bfd:bfd:
    +--rw mpls
       +--ro summary
       |  +--ro number-of-sessions?              yang:gauge32
       |  +--ro number-of-sessions-up?           yang:gauge32
       |  +--ro number-of-sessions-down?         yang:gauge32
       |  +--ro number-of-sessions-admin-down?   yang:gauge32
       +--rw egress
       |  +--rw enable? 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
       |  +--rw authentication! {authentication}?
       |     +--rw key-chain?    kc:key-chain-ref    key-chain:key-chain-ref
       |     +--rw meticulous?   boolean
       +--rw session-groups
          +--rw session-group* [mpls-fec]
             +--rw mpls-fec                          inet:ip-prefix
             +--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
             +--rw demand-enabled?                   boolean
             |       {demand-mode}?
             +--rw admin-down?                       boolean
             +--rw authentication! {authentication}?
             |  +--rw key-chain?    kc:key-chain-ref    key-chain:key-chain-ref
             |  +--rw meticulous?   boolean
             +--ro sessions* []
                +--ro path-type?              identityref
                +--ro ip-encapsulation?       boolean
                +--ro local-discriminator?    discriminator
                +--ro remote-discriminator?   discriminator
                +--ro remote-multiplier?      multiplier
                +--ro demand-capability?      boolean {demand-mode}?
                +--ro source-port?            inet:port-number
                +--ro dest-port?              inet:port-number
                +--ro session-running
                |  +--ro session-index?                uint32
                |  +--ro local-state?                  state
                |  +--ro remote-state?                 state
                |  +--ro local-diagnostic?
                |  |       iana-bfd-types:diagnostic
                |  +--ro remote-diagnostic?
                |  |       iana-bfd-types:diagnostic
                |  +--ro remote-authenticated?         boolean
                |  +--ro remote-authentication-type?
                |  |       iana-bfd-types:auth-type {authentication}?
                |  +--ro detection-mode?               enumeration
                |  +--ro negotiated-tx-interval?       uint32
                |  +--ro negotiated-rx-interval?       uint32
                |  +--ro detection-time?               uint32
                |  +--ro echo-tx-interval-in-use?      uint32
                |          {echo-mode}?
                +--ro session-statistics
                |  +--ro create-time?
                |  |       yang:date-and-time
                |  +--ro last-down-time?
                |  |       yang:date-and-time
                |  +--ro last-up-time?
                |  |       yang:date-and-time
                |  +--ro down-count?
                |  |       yang:counter32
                |  +--ro admin-down-count?
                |  |       yang:counter32
                |  +--ro receive-packet-count?
                |  |       yang:counter64
                |  +--ro send-packet-count?
                |  |       yang:counter64
                |  +--ro receive-invalid-packet-count?
                |  |       yang:counter64
                |  +--ro send-failed-packet-count?
                |          yang:counter64
                +--ro mpls-dest-address?      inet:ip-address

  notifications:
    +---n mpls-notification
       +--ro local-discr?                 discriminator
       +--ro remote-discr?                discriminator
       +--ro new-state?                   state
       +--ro state-change-reason?         iana-bfd-types:diagnostic
       +--ro time-of-last-state-change?   yang:date-and-time
       +--ro dest-addr?                   inet:ip-address
       +--ro source-addr?                 inet:ip-address
       +--ro session-index?               uint32
       +--ro path-type?                   identityref
       +--ro mpls-dest-address?           inet:ip-address
                     ]]></artwork>
        </figure>
]]></sourcecode>
      </section>
      <section title="BFD over MPLS-TE hierarchy">
        <t><xref target="I-D.ietf-teas-yang-te">YANG Data Model for TE
        Topologies </xref> is augmented. BFD is configured per MPLS-TE tunnel,
        and BFD session operational state data is provided per MPLS-TE
        LSP.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[

module: ietf-bfd-mpls-te
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bfd:bfd:
    +--rw mpls-te
       +--rw egress
       |  +--rw enable?                           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
       |  +--rw authentication! {authentication}?
       |     +--rw key-chain?    kc:key-chain-ref
       |     +--rw meticulous?   boolean
       +--ro summary
          +--ro number-of-sessions?              yang:gauge32
          +--ro number-of-sessions-up?           yang:gauge32
          +--ro number-of-sessions-down?         yang:gauge32
          +--ro number-of-sessions-admin-down?   yang:gauge32
  augment /te:te/te:tunnels/te:tunnel:
    +--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
    +--rw demand-enabled?                   boolean {demand-mode}?
    +--rw admin-down?                       boolean
    +--rw authentication! {authentication}?
    |  +--rw key-chain?    kc:key-chain-ref
    |  +--rw meticulous?   boolean
    +--rw encap?                            identityref
  augment /te:te/te:lsps-state/te:lsp:
    +--ro path-type?              identityref
    +--ro ip-encapsulation?       boolean
    +--ro local-discriminator?    discriminator
    +--ro remote-discriminator?   discriminator
    +--ro remote-multiplier?      multiplier
    +--ro demand-capability?      boolean {demand-mode}?
    +--ro source-port?            inet:port-number
    +--ro dest-port?              inet:port-number
    +--ro session-running
    |  +--ro session-index?                uint32
    |  +--ro local-state?                  state
    |  +--ro remote-state?                 state
    |  +--ro local-diagnostic?             iana-bfd-types:diagnostic
    |  +--ro remote-diagnostic?            iana-bfd-types:diagnostic
    |  +--ro remote-authenticated?         boolean
    |  +--ro remote-authentication-type?   iana-bfd-types:auth-type
    |  |       {authentication}?
    |  +--ro detection-mode?               enumeration
    |  +--ro negotiated-tx-interval?       uint32
    |  +--ro negotiated-rx-interval?       uint32
    |  +--ro detection-time?               uint32
    |  +--ro echo-tx-interval-in-use?      uint32 {echo-mode}?
    +--ro session-statistics
    |  +--ro create-time?                    yang:date-and-time
    |  +--ro last-down-time?                 yang:date-and-time
    |  +--ro last-up-time?                   yang:date-and-time
    |  +--ro down-count?                     yang:counter32
    |  +--ro admin-down-count?               yang:counter32
    |  +--ro receive-packet-count?           yang:counter64
    |  +--ro send-packet-count?              yang:counter64
    |  +--ro receive-invalid-packet-count?   yang:counter64
    |  +--ro send-failed-packet-count?       yang:counter64
    +--ro mpls-dest-address?      inet:ip-address

  notifications:
    +---n mpls-te-notification
       +--ro local-discr?                 discriminator
       +--ro remote-discr?                discriminator
       +--ro new-state?                   state
       +--ro state-change-reason?         iana-bfd-types:diagnostic
       +--ro time-of-last-state-change?   yang:date-and-time
       +--ro dest-addr?                   inet:ip-address
       +--ro source-addr?                 inet:ip-address
       +--ro session-index?               uint32
       +--ro path-type?                   identityref
       +--ro mpls-dest-address?           inet:ip-address
       +--ro tunnel-name?                 string
                     ]]></artwork>
        </figure>
      </section>

      <section title="Interaction numbered="true" toc="default">
        <name>Interaction with other Other YANG modules"> Modules</name>
        <t><xref target="I-D.ietf-lime-yang-connectionless-oam">Generic target="RFC8532"
        format="default">"Generic YANG Data Model for the Management
        of Operations, Administration, and Maintenance (OAM) Protocols That
        Use Connectionless OAM protocols </xref> Communications"</xref> describes how the
        LIME
        Layer-Independent OAM Management in the Multi-Layer Environment (LIME)
        connectionless OAM model could be extended to support BFD.</t>
        <t>Also, the operation of the BFD data model depends on configuration
        parameters that are defined in other YANG modules.</t>
        <section title="Module ietf-interfaces"> numbered="true" toc="default">
          <name>&quot;ietf-interfaces&quot; Module</name>
          <t>The following boolean configuration is defined in <xref
          target="RFC8343">A
          target="RFC8343" format="default">"A YANG Data Model for Interface
          Management </xref>: <list hangIndent="8" style="hanging">
              <t hangText="/if:interfaces/if:interface/if:enabled"><vspace/>If Management"</xref>:</t>
          <dl newline="true" spacing="normal">
            <dt>/if:interfaces/if:interface/if:enabled</dt>
            <dd>If this configuration is set to "false", no BFD packets can be
            transmitted or received on that interface.</t>
            </list></t> interface.</dd>
          </dl>
        </section>
        <section title="Module ietf-ip"> numbered="true" toc="default">
          <name>&quot;ietf-ip&quot; Module</name>
          <t>The following boolean configuration is defined in <xref
          target="RFC8344">A
          target="RFC8344" format="default">"A YANG Data Model for IP
          Management </xref>: <list hangIndent="8" style="hanging">
              <t
              hangText="/if:interfaces/if:interface/ip:ipv4/ip:enabled"><vspace/>If Management"</xref>:</t>
          <dl newline="true" spacing="normal">
            <dt>/if:interfaces/if:interface/ip:ipv4/ip:enabled</dt>
            <dd>If this configuration is set to "false", no BFD IPv4 packets
            can be transmitted or received on that interface.</t>

              <t
              hangText="/if:interfaces/if:interface/ip:ipv4/ip:forwarding"><vspace/>If interface.</dd>
            <dt>/if:interfaces/if:interface/ip:ipv4/ip:forwarding</dt>
            <dd>If this configuration is set to "false", no BFD IPv4 packets
            can be transmitted or received on that interface.</t>

              <t
              hangText="/if:interfaces/if:interface/ip:ipv6/ip:enabled"><vspace/>If interface.</dd>
            <dt>/if:interfaces/if:interface/ip:ipv6/ip:enabled</dt>
            <dd>If this configuration is set to "false", no BFD IPv6 packets
            can be transmitted or received on that interface.</t>

              <t
              hangText="/if:interfaces/if:interface/ip:ipv6/ip:forwarding"><vspace/>If interface.</dd>
            <dt>/if:interfaces/if:interface/ip:ipv6/ip:forwarding</dt>
            <dd>If this configuration is set to "false", no BFD IPv6 packets
            can be transmitted or received on that interface.</t>
            </list></t> interface.</dd>
          </dl>
        </section>
        <section title="Module ietf-mpls"> numbered="true" toc="default">
          <name>&quot;ietf-mpls&quot; Module</name>
          <t>The following boolean configuration is defined in <xref
          target="I-D.ietf-mpls-base-yang">A
          target="RFC8960" format="default">"A YANG Data Model for MPLS Base
          </xref>: <list hangIndent="8" style="hanging">
              <t
              hangText="/rt:routing/mpls:mpls/mpls:interface/mpls:config/mpls:enabled"><vspace/>If Base"</xref>:</t>
          <dl newline="true" spacing="normal">
           <dt>/rt:routing/mpls:mpls/mpls:interfaces/mpls:interface/mpls:mpls&nbhy;enabled</dt>
           <dd>If this configuration is set to "false", no BFD MPLS packets
            can be transmitted or received on that interface.</t>
            </list></t>
        </section>

        <section title="Module ietf-te">
          <t>The following configuration is defined in the "ietf-te" YANG
          module <xref target="I-D.ietf-teas-yang-te">YANG Data Model for TE
          Topology </xref>: <list hangIndent="8" style="hanging">
              <t
              hangText="/ietf-te:te/ietf-te:tunnels/ietf-te:tunnel/ietf-te:config/ietf-te:admin-status"><vspace/>If
              this configuration is not set to "state-up", no BFD MPLS packets
              can be transmitted or received on that tunnel.</t>
            </list></t> interface.</dd>
          </dl>
        </section>
      </section>

      <section title="IANA numbered="true" toc="default">
        <name>IANA BFD YANG Module">
        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[<CODE BEGINS> file "iana-bfd-types@2018-08-01.yang" Module</name>

        <t>This YANG module imports definitions from <xref target="RFC5880"/>.  It
      references <xref target="RFC5880"/> and <xref target="RFC6428"/>.</t>

        <sourcecode name="iana-bfd-types@2021-09-03.yang" type="yang" markers="true"><![CDATA[
module iana-bfd-types {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:iana-bfd-types";
  prefix "iana-bfd-types"; iana-bfd-types;

  organization
    "IANA";
  contact
    "        Internet
    "Internet Assigned Numbers Authority

     Postal: ICANN
             12025 Waterfront Drive, Suite 300
             Los Angeles, CA 90094-2536
             United States of America
     Tel:    +1 310 823 9358 301 5800
     <mailto:iana@iana.org>";
  description
    "This module defines YANG data types for IANA-registered
     BFD parameters.

     This YANG module is maintained by IANA and reflects the
     'BFD Diagnostic Codes' and 'BFD Authentication Types'
     registries.

     Copyright (c) 2018 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).
     (https://trustee.ietf.org/license-info).

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

  // RFC Ed.: replace XXXX with actual RFC number and remove
  // this note
  reference
    "RFC XXXX"; 9127: YANG Data Model for Bidirectional Forwarding
     Detection (BFD)";

  revision 2018-08-01 2021-09-03 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: IANA BFD 9127: YANG Data Types."; Model for Bidirectional Forwarding
       Detection (BFD)";
  }

  /*
   * Type Definitions definitions
   */

  typedef diagnostic {
    type enumeration {
      enum none {
        value 0;
        description "None";
          "No Diagnostic.";
      }
      enum control-expiry {
        value 1;
        description
          "Control timer expiry"; Detection Time Expired.";
      }
      enum echo-failed {
        value 2;
        description
          "Echo failure"; Function Failed.";
      }
      enum neighbor-down {
        value 3;
        description
          "Neighbor down"; Signaled Session Down.";
      }
      enum forwarding-reset {
        value 4;
        description
          "Forwarding reset"; Plane Reset.";
      }
      enum path-down {
        value 5;
        description
          "Path down"; Down.";
      }
      enum concatenated-path-down {
        value 6;
        description
          "Concatenated path down"; Path Down.";
      }
      enum admin-down {
        value 7;
        description "Admin down";
          "Administratively Down.";
      }
      enum reverse-concatenated-path-down {
        value 8;
        description
          "Reverse concatenated path down"; Concatenated Path Down.";
      }
      enum mis-connectivity-defect {
        value 9;
        description
          "Mis-connectivity defect as specified in RFC6428"; defect.";
        reference
          "RFC 5880: Bidirectional Forwarding Detection (BFD)
           RFC 6428: Proactive Connectivity Verification, Continuity
           Check, and Remote Defect Indication for the MPLS Transport
           Profile";
      }
    }
    description
      "BFD diagnostic codes as defined in RFC 5880, values 5880.  Values are
       maintained in the 'BFD Diagnostic Codes' IANA registry.
       Range is 0 to 31.";
    reference
      "RFC 5880: Bidirectional Forwarding Detection (BFD)";
  }

  typedef auth-type {
    type enumeration {
      enum reserved {
        value 0;
        description "Reserved";
          "Reserved.";
      }
      enum simple-password {
        value 1;
        description
          "Simple password"; Password.";
      }
      enum keyed-md5 {
        value 2;
        description
          "Keyed MD5"; MD5.";
      }
      enum meticulous-keyed-md5 {
        value 3;
        description
          "Meticulous keyed MD5"; Keyed MD5.";
      }
      enum keyed-sha1 {
        value 4;
        description
          "Keyed SHA1"; SHA1.";
      }
      enum meticulous-keyed-sha1 {
        value 5;
        description
          "Meticulous keyed SHA1"; Keyed SHA1.";
      }
    }
    description
      "BFD authentication type as defined in RFC 5880, values 5880.  Values are
       maintained in the 'BFD Authentication Types' IANA registry.
       Range is 0 to 255.";
    reference
      "RFC 5880: Bidirectional Forwarding Detection (BFD)";
  }
}

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

      </section>
      <section anchor="BFD-TYPES" title="BFD types numbered="true" toc="default">
        <name>BFD Types YANG Module"> Module</name>
        <t>This YANG module imports typedefs from <xref target="RFC6991"/>, target="RFC6991"
        format="default"/> and <xref target="RFC8177" format="default"/>.
        It also imports definitions from
        <xref target="RFC5880"/>, <xref target="RFC5881"/>,
        <xref target="RFC5883"/>, <xref target="RFC8177"/> target="RFC5884"/>, and
        <xref target="RFC7130"/>, as well as the
        "control-plane-protocol" identity from
        <xref
        target="RFC8349"/>.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
<CODE BEGINS> file "ietf-bfd-types@2019-11-19.yang" target="RFC8349"/>.

</t>
        <sourcecode name="ietf-bfd-types@2021-09-03.yang" type="yang" markers="true"><![CDATA[
module ietf-bfd-types {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-types";
  prefix "bfd-types";

  // RFC Ed.: replace occurences of XXXX with actual RFC number and
  // remove this note bfd-types;

  import iana-bfd-types {
    prefix "iana-bfd-types"; iana-bfd-types;
    reference
      "RFC XXXX: 9127: YANG Data Model for BFD"; Bidirectional Forwarding
       Detection (BFD)";
  }
  import ietf-inet-types {
    prefix "inet"; inet;
    reference
      "RFC 6991: Common YANG Data Types";
  }
  import ietf-yang-types {
    prefix "yang"; yang;
    reference
      "RFC 6991: Common YANG Data Types";
  }
  import ietf-routing {
    prefix "rt"; rt;
    reference
      "RFC 8349: A YANG Data Model for Routing Management
       (NMDA version)"; Version)";
  }
  import ietf-key-chain {
    prefix "kc"; key-chain;
    reference
      "RFC 8177: YANG Data Model for Key Chains";
  }

  organization
    "IETF BFD Working Group";
  contact
    "WG Web:   <http://tools.ietf.org/wg/bfd>   <https://datatracker.ietf.org/wg/bfd/>
     WG List:  <rtg-bfd@ietf.org>

     Editors:  <mailto:rtg-bfd@ietf.org>

     Editor:   Reshad Rahman (rrahman@cisco.com),
               <mailto:reshad@yahoo.com>

     Editor:   Lianshu Zheng (vero.zheng@huawei.com),
               <mailto:veronique_cheng@hotmail.com>

     Editor:   Mahesh Jethanandani (mjethanandani@gmail.com)";
               <mailto:mjethanandani@gmail.com>";
  description
    "This module contains a collection of BFD specific BFD-specific YANG data type
     definitions, as per RFC 5880, and also groupings which that are common
     to other BFD YANG modules.

     Copyright (c) 2018 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).
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; 9127; see the
     RFC itself for full legal notices.";
  reference
    "RFC XXXX"; 5880: Bidirectional Forwarding Detection (BFD)
     RFC 9127: YANG Data Model for Bidirectional Forwarding
     Detection (BFD)";

  revision 2019-11-19 2021-09-03 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: 9127: YANG Data Model for BFD"; Bidirectional Forwarding
       Detection (BFD)";
  }

  /*
   * Feature definitions
   */

  feature single-minimum-interval {
    description
      "This feature indicates that the server supports configuration
       of one minimum interval value which that is used for both transmit
       and receive minimum intervals.";
  }

  feature authentication {
    description
      "This feature indicates that the server supports BFD
       authentication.";
    reference
      "RFC 5880: Bidirectional Forwarding Detection (BFD),
       section 6.7.";
       Section 6.7";
  }

  feature demand-mode {
    description
      "This feature indicates that the server supports BFD demand Demand
       mode.";
    reference
      "RFC 5880: Bidirectional Forwarding Detection (BFD),
       section 6.6.";
       Section 6.6";
  }

  feature echo-mode {
    description
      "This feature indicates that the server supports BFD echo Echo
       mode.";
    reference
      "RFC 5880: Bidirectional Forwarding Detection (BFD),
       section 6.4.";
       Section 6.4";
  }

  /*
   * Identity definitions
   */

  identity bfdv1 {
    base "rt:control-plane-protocol"; rt:control-plane-protocol;
    description
      "BFD protocol version 1.";
    reference
      "RFC 5880: Bidirectional Forwarding Detection (BFD)."; (BFD)";
  }

  identity path-type {
    description
      "Base identity for the BFD path type.  The path type indicates
       the type of path on which BFD is running.";
  }

  identity path-ip-sh {
    base path-type;
    description
      "BFD on IP single hop."; single-hop.";
    reference
      "RFC 5881: Bidirectional Forwarding Detection (BFD)
       for IPv4 and IPv6 (Single Hop)."; Hop)";
  }

  identity path-ip-mh {
    base path-type;
    description
      "BFD on IP multihop paths.";
    reference
      "RFC 5883: Bidirectional Forwarding Detection (BFD) for
       Multihop Paths."; Paths";
  }

  identity path-mpls-te {
    base path-type;
    description
      "BFD on MPLS Traffic Engineering.";
    reference
      "RFC 5884: Bidirectional Forwarding Detection (BFD)
       for MPLS Label Switched Paths (LSPs)."; (LSPs)";
  }

  identity path-mpls-lsp {
    base path-type;
    description
      "BFD on an MPLS Label Switched Path.";
    reference
      "RFC 5884: Bidirectional Forwarding Detection (BFD)
       for MPLS Label Switched Paths (LSPs)."; (LSPs)";
  }

  identity path-lag {
    base path-type;
    description
      "Micro-BFD on LAG member links.";
    reference
      "RFC 7130: Bidirectional Forwarding Detection (BFD) on
       Link Aggregation Group (LAG) Interfaces."; Interfaces";
  }

  identity encap-type {
    description
      "Base identity for BFD encapsulation type.";
  }

  identity encap-ip {
    base encap-type;
    description
      "BFD with IP encapsulation.";
  }

  /*
   * Type Definitions definitions
   */

  typedef discriminator {
    type uint32;
    description
      "BFD discriminator Discriminator as described in RFC 5880.";
    reference
      "RFC 5880: Bidirectional Forwarding Detection (BFD)";
  }

  typedef state {
    type enumeration {
      enum adminDown {
        value 0;
        description "admindown";
          "'adminDown' state.";
      }
      enum down {
        value 1;
        description "down";
          "'Down' state.";
      }
      enum init {
        value 2;
        description "init";
          "'Init' state.";
      }
      enum up {
        value 3;
        description "up";
          "'Up' state.";
      }
    }
    description
      "BFD state states as defined in RFC 5880.";
  }

  typedef multiplier {
    type uint8 {
      range 1..255; "1..255";
    }
    description
      "BFD multiplier as described in RFC 5880.";
  }

  typedef hops {
    type uint8 {
      range 1..255; "1..255";
    }
    description
      "This corresponds to Time To Live for IPv4 and corresponds to
       the hop limit for IPv6.";
  }

  /*
   * Groupings
   */

  grouping auth-parms {
    description
      "Grouping for BFD authentication parameters
       (see section Section 6.7 of RFC 5880).";
    container authentication {
      if-feature authentication; "authentication";
      presence "Enables BFD authentication (see section Section 6.7
                of RFC 5880).";
      description
        "Parameters for BFD authentication.";
      reference
        "RFC 5880: Bidirectional Forwarding Detection (BFD),
         Section 6.7";
      leaf key-chain {
        type kc:key-chain-ref; key-chain:key-chain-ref;
        description
          "Name of the key-chain 'key-chain' as per RFC 8177.";
      }
      leaf meticulous {
        type boolean;
        description
          "Enables a meticulous mode as described in section per Section 6.7 " +
          "of of
           RFC 5880.";
      }
    }
  }

  grouping base-cfg-parms {
    description
      "BFD grouping for base config configuration parameters.";
    leaf local-multiplier {
      type multiplier;
      default 3; "3";
      description
        "Multiplier transmitted by the local system.";
    }
    choice interval-config-type {
      default tx-rx-intervals; "tx-rx-intervals";
      description
        "Two interval values or one value used for both transmit and
         receive.";
      case tx-rx-intervals {
        leaf desired-min-tx-interval {
          type uint32;
          units microseconds; "microseconds";
          default 1000000; "1000000";
          description
            "Desired minimum transmit interval of control packets.";
        }
        leaf required-min-rx-interval {
          type uint32;
          units microseconds; "microseconds";
          default 1000000; "1000000";
          description
            "Required minimum receive interval of control packets.";
        }
      }
      case single-interval {
        if-feature single-minimum-interval; "single-minimum-interval";
        leaf min-interval {
          type uint32;
          units microseconds; "microseconds";
          default 1000000; "1000000";
          description
            "Desired minimum transmit interval and required " +
            "minimum
             minimum receive interval of control packets.";
        }
      }
    }
  }

  grouping client-cfg-parms {
    description
      "BFD grouping for configuration parameters
       used by clients of BFD, e.g. BFD clients, e.g., IGP or MPLS.";
    leaf enable enabled {
      type boolean;
      default false; "false";
      description
        "Indicates whether the BFD is enabled.";
    }
    uses base-cfg-parms;
  }

  grouping common-cfg-parms {
    description
      "BFD grouping for common configuration parameters.";
    uses base-cfg-parms;
    leaf demand-enabled {
      if-feature demand-mode; "demand-mode";
      type boolean;
      default false; "false";
      description
        "To enable demand Demand mode.";
    }
    leaf admin-down {
      type boolean;
      default false; "false";
      description
        "Is
        "Indicates whether the BFD session is administratively
         down.";
    }
    uses auth-parms;
  }

  grouping all-session {
    description
      "BFD session operational information"; information.";
    leaf path-type {
      type identityref {
        base path-type;
      }
      config "false"; false;
      description
        "BFD path type, this type.  This indicates the path type that BFD is
         running on.";
    }
    leaf ip-encapsulation {
      type boolean;
      config "false"; false;
      description "Whether
        "Indicates whether BFD encapsulation uses IP.";
    }
    leaf local-discriminator {
      type discriminator;
      config "false"; false;
      description
        "Local discriminator.";
    }
    leaf remote-discriminator {
      type discriminator;
      config "false"; false;
      description
        "Remote discriminator.";
    }
    leaf remote-multiplier {
      type multiplier;
      config "false"; false;
      description
        "Remote multiplier.";
    }
    leaf demand-capability {
      if-feature demand-mode; "demand-mode";
      type boolean;
      config "false"; false;
      description
        "Local demand Demand mode capability.";
    }
    leaf source-port {
      when "../ip-encapsulation = 'true'" {
        description
          "Source port valid only when IP encapsulation is used.";
      }
      type inet:port-number;
      config "false"; false;
      description
        "Source UDP port"; port.";
    }
    leaf dest-port {
      when "../ip-encapsulation = 'true'" {
        description
          "Destination port valid only when IP encapsulation
           is used.";
      }
      type inet:port-number;
      config "false"; false;
      description
        "Destination UDP port.";
    }
    container session-running {
      config "false"; false;
      description
        "BFD session running 'session-running' information.";
      leaf session-index {
        type uint32;
        description
          "An index used to uniquely identify BFD sessions.";
      }
      leaf local-state {
        type state;
        description
          "Local state.";
      }
      leaf remote-state {
        type state;
        description
          "Remote state.";
      }
      leaf local-diagnostic {
        type iana-bfd-types:diagnostic;
        description
          "Local diagnostic.";
      }
      leaf remote-diagnostic {
        type iana-bfd-types:diagnostic;
        description
          "Remote diagnostic.";
      }
      leaf remote-authenticated {
        type boolean;
        description
          "Indicates whether incoming BFD control packets are
           authenticated.";
      }
      leaf remote-authentication-type {
        when "../remote-authenticated = 'true'" {
          description
            "Only valid when incoming BFD control packets are
             authenticated.";
        }
        if-feature authentication; "authentication";
        type iana-bfd-types:auth-type;
        description
          "Authentication type of incoming BFD control packets.";
      }
      leaf detection-mode {
        type enumeration {
          enum async-with-echo {
            value "1"; 1;
            description
              "Async with echo.";
          }
          enum async-without-echo {
            value "2"; 2;
            description
              "Async without echo.";
          }
          enum demand-with-echo {
            value "3"; 3;
            description
              "Demand with echo.";
          }
          enum demand-without-echo {
            value "4"; 4;
            description
              "Demand without echo.";
          }
        }
        description
          "Detection mode.";
      }
      leaf negotiated-tx-interval {
        type uint32;
        units microseconds; "microseconds";
        description
          "Negotiated transmit interval.";
      }
      leaf negotiated-rx-interval {
        type uint32;
        units microseconds; "microseconds";
        description
          "Negotiated receive interval.";
      }
      leaf detection-time {
        type uint32;
        units microseconds; "microseconds";
        description
          "Detection time.";
      }
      leaf echo-tx-interval-in-use {
        when "../../path-type = 'bfd-types:path-ip-sh'" {
          description
            "Echo is supported for IP single-hop only.";
        }
        if-feature echo-mode; "echo-mode";
        type uint32;
        units microseconds; "microseconds";
        description
          "Echo transmit interval in use.";
      }
    }
    container session-statistics {
      config "false"; false;
      description
        "BFD per-session statistics.";
      leaf create-time {
        type yang:date-and-time;
        description
          "Time and date when this session was created.";
      }
      leaf last-down-time {
        type yang:date-and-time;
        description
          "Time and date of the last time this session went down.";
      }
      leaf last-up-time {
        type yang:date-and-time;
        description
          "Time and date of the last time this session went up.";
      }
      leaf down-count {
        type yang:counter32;
        description
          "The number of times this session has transitioned in to the
           down
           'down' state.";
      }
      leaf admin-down-count {
        type yang:counter32;
        description
          "The number of times this session has transitioned in to the
           admin-down
           'admin-down' state.";
      }
      leaf receive-packet-count {
        type yang:counter64;
        description
          "Count of received packets in this session.  This includes
           valid and invalid received packets.";
      }
      leaf send-packet-count {
        type yang:counter64;
        description
          "Count of sent packets in this session.";
      }
      leaf receive-invalid-packet-count {
        type yang:counter64;
        description
          "Count of invalid received packets in this session.";
      }
      leaf send-failed-packet-count {
        type yang:counter64;
        description
          "Count of packets which that failed to be sent in this session.";
      }
    }
  }

  grouping session-statistics-summary {
    description
      "Grouping for session statistics summary.";
    container summary {
      config false;
      description
        "BFD session statistics summary.";
      leaf number-of-sessions {
        type yang:gauge32;
        description
          "Number of BFD sessions.";
      }
      leaf number-of-sessions-up {
        type yang:gauge32;
        description
          "Number of BFD sessions currently in up the 'Up' state
           (as defined in RFC 5880).";
      }
      leaf number-of-sessions-down {
        type yang:gauge32;
        description
          "Number of BFD sessions currently in down the 'Down' or init 'Init'
           state but not admin-down 'adminDown' (as defined in RFC 5880).";
      }
      leaf number-of-sessions-admin-down {
        type yang:gauge32;
        description
          "Number of BFD sessions currently in admin-down the 'adminDown' state
           (as defined in RFC 5880).";
      }
    }
  }

  grouping notification-parms {
    description
      "This group describes common parameters that will be sent " +
      "as
       as part of BFD notification."; notifications.";
    leaf local-discr {
      type discriminator;
      description
        "BFD local discriminator.";
    }
    leaf remote-discr {
      type discriminator;
      description
        "BFD remote discriminator.";
    }
    leaf new-state {
      type state;
      description
        "Current BFD state.";
    }
    leaf state-change-reason {
      type iana-bfd-types:diagnostic;
      description "BFD
        "Reason for the BFD state change reason."; change.";
    }
    leaf time-of-last-state-change {
      type yang:date-and-time;
      description
        "Calendar time of the most recent previous state change.";
    }
    leaf dest-addr {
      type inet:ip-address;
      description
        "BFD peer address.";
    }
    leaf source-addr {
      type inet:ip-address;
      description
        "BFD local address.";
    }
    leaf session-index {
      type uint32;
      description
        "An index used to uniquely identify BFD sessions.";
    }
    leaf path-type {
      type identityref {
        base path-type;
      }
      description
        "BFD path type.";
    }
  }
}

<CODE ENDS>
        ]]></artwork>
        </figure>
]]></sourcecode>
      </section>
      <section title="BFD top-level numbered="true" toc="default">
        <name>BFD Top-Level YANG Module"> Module</name>
        <t>This YANG module imports and augments
        "/routing/control-plane-protocols/control-plane-protocol" from <xref
        target="RFC8349"/>.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
<CODE BEGINS> file "ietf-bfd@2018-08-01.yang"
        target="RFC8349" format="default"/>. It also references
        <xref target="RFC5880"/>.</t>
        <sourcecode name="ietf-bfd@2021-09-03.yang" type="yang" markers="true"><![CDATA[
module ietf-bfd {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bfd";
  prefix "bfd";

  // RFC Ed.: replace occurences of XXXX with actual RFC number and
  // remove this note bfd;

  import ietf-bfd-types {
    prefix "bfd-types"; bfd-types;
    reference
      "RFC XXXX: 9127: YANG Data Model for BFD"; Bidirectional Forwarding
       Detection (BFD)";
  }
  import ietf-routing {
    prefix "rt"; rt;
    reference
      "RFC 8349: A YANG Data Model for Routing Management
       (NMDA version)"; Version)";
  }

  organization
    "IETF BFD Working Group";
  contact
    "WG Web:   <http://tools.ietf.org/wg/bfd>   <https://datatracker.ietf.org/wg/bfd/>
     WG List:  <rtg-bfd@ietf.org>

     Editors:  <mailto:rtg-bfd@ietf.org>

     Editor:   Reshad Rahman (rrahman@cisco.com),
               <mailto:reshad@yahoo.com>

     Editor:   Lianshu Zheng (vero.zheng@huawei.com),
               <mailto:veronique_cheng@hotmail.com>

     Editor:   Mahesh Jethanandani (mjethanandani@gmail.com)";
               <mailto:mjethanandani@gmail.com>";
  description
    "This module contains the YANG definition for BFD parameters as
     per RFC 5880.

     Copyright (c) 2018 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).
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; 9127; see the
     RFC itself for full legal notices.";
  reference
    "RFC XXXX"; 5880: Bidirectional Forwarding Detection (BFD)
     RFC 9127: YANG Data Model for Bidirectional Forwarding
     Detection (BFD)";

  revision 2018-08-01 2021-09-03 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: 9127: YANG Data Model for BFD"; Bidirectional Forwarding
       Detection (BFD)";
  }

  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol" {
    when "derived-from-or-self(rt:type, 'bfd-types:bfdv1')" {
      description
        "This augmentation is only valid for a control-plane protocol
         instance of BFD (type 'bfdv1').";
    }
    description
      "BFD augmentation.";
    container bfd {
      description
        "BFD top level top-level container.";
      uses bfd-types:session-statistics-summary;
    }
  }
}

<CODE ENDS>
        ]]></artwork>
        </figure>
]]></sourcecode>
      </section>
      <section title="BFD anchor="bfd-ip-single-hop-module" numbered="true" toc="default">
        <name>BFD IP single-hop Single-Hop YANG Module"> Module</name>
        <t>This YANG module imports "interface-ref" from <xref
        target="RFC8343"/>,
        target="RFC8343" format="default"/> and typedefs from <xref
        target="RFC6991"/>
        target="RFC6991" format="default"/>.  It also imports and augments
        "/routing/control-plane-protocols/control-plane-protocol" from <xref
        target="RFC8349"/>.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
<CODE BEGINS> file "ietf-bfd-ip-sh@2018-08-01.yang"
        target="RFC8349" format="default"/>, and it references
        <xref target="RFC5881"/>.</t>
        <sourcecode name="ietf-bfd-ip-sh@2021-09-03.yang" type="yang" markers="true"><![CDATA[
module ietf-bfd-ip-sh {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh";
  prefix "bfd-ip-sh";

  // RFC Ed.: replace occurences of XXXX with actual RFC number and
  // remove this note bfd-ip-sh;

  import ietf-bfd-types {
    prefix "bfd-types"; bfd-types;
    reference
      "RFC XXXX: 9127: YANG Data Model for BFD"; Bidirectional Forwarding
       Detection (BFD)";
  }
  import ietf-bfd {
    prefix "bfd"; bfd;
    reference
      "RFC XXXX: 9127: YANG Data Model for BFD"; Bidirectional Forwarding
       Detection (BFD)";
  }
  import ietf-interfaces {
    prefix "if"; if;
    reference
      "RFC 8343: A YANG Data Model for Interface Management";
  }
  import ietf-inet-types {
    prefix "inet"; inet;
    reference
      "RFC 6991: Common YANG Data Types";
  }
  import ietf-routing {
    prefix "rt"; rt;
    reference
      "RFC 8349: A YANG Data Model for Routing Management
       (NMDA version)"; Version)";
  }

  organization
    "IETF BFD Working Group";
  contact
    "WG Web:   <http://tools.ietf.org/wg/bfd>   <https://datatracker.ietf.org/wg/bfd/>
     WG List:  <rtg-bfd@ietf.org>

     Editors:  <mailto:rtg-bfd@ietf.org>

     Editor:   Reshad Rahman (rrahman@cisco.com),
               <mailto:reshad@yahoo.com>

     Editor:   Lianshu Zheng (vero.zheng@huawei.com),
               <mailto:veronique_cheng@hotmail.com>

     Editor:   Mahesh Jethanandani (mjethanandani@gmail.com)";
               <mailto:mjethanandani@gmail.com>";
  description
    "This module contains the YANG definition for BFD IP single-hop
     as per RFC 5881.

     Copyright (c) 2018 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).
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; 9127; see the
     RFC itself for full legal notices.";
  reference
    "RFC XXXX"; 5881: Bidirectional Forwarding Detection (BFD)
     for IPv4 and IPv6 (Single Hop)
     RFC 9127: YANG Data Model for Bidirectional Forwarding
     Detection (BFD)";

  revision 2018-08-01 2021-09-03 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: A 9127: YANG data model Data Model for BFD IP single-hop"; Bidirectional Forwarding
       Detection (BFD)";
  }

  /*
   * Augments
   */

  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol/bfd:bfd" {
    description
      "BFD augmentation for IP single-hop"; single-hop.";
    container ip-sh {
      description
        "BFD IP single-hop top level container"; top-level container.";
      uses bfd-types:session-statistics-summary;
      container sessions {
        description
          "BFD IP single-hop sessions.";
        list session {
          key "interface dest-addr";
          description
            "List of IP single-hop sessions.";
          leaf interface {
            type if:interface-ref;
            description
              "Interface on which the BFD session is running.";
          }
          leaf dest-addr {
            type inet:ip-address;
            description
              "IP address of the peer.";
          }
          leaf source-addr {
            type inet:ip-address;
            description
              "Local IP address.";
          }
          uses bfd-types:common-cfg-parms;
          uses bfd-types:all-session;
        }
      }
      list interfaces {
        key "interface";
        description
          "List of interfaces.";
        leaf interface {
          type if:interface-ref;
          description
            "BFD information for this interface.";
        }
        uses bfd-types:auth-parms;
      }
    }
  }

  /*
   * Notifications
   */

  notification singlehop-notification {
    description
      "Notification for BFD single-hop session state change.  An " +
      "implementation
       implementation may rate-limit notifications, e.g. e.g., when a " +
      "session
       session is continuously changing state.";
    uses bfd-types:notification-parms;
    leaf interface {
      type if:interface-ref;
      description
        "Interface to which this BFD session belongs to."; belongs.";
    }
    leaf echo-enabled {
      type boolean;
      description "Was echo
        "Indicates whether Echo was enabled for BFD.";
    }
  }
}

<CODE ENDS>
        ]]></artwork>
        </figure>
]]></sourcecode>
      </section>
      <section title="BFD anchor="bfd-ip-multihop-module" numbered="true" toc="default">
        <name>BFD IP multihop Multihop YANG Module"> Module</name>
        <t>This YANG module imports typedefs from
        <xref
        target="RFC6991"/> target="RFC6991" format="default"/>. It also imports and augments
        "/routing/control-plane-protocols/control-plane-protocol" from <xref
        target="RFC8349"/>.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
<CODE BEGINS> file "ietf-bfd-ip-mh@2018-08-01.yang"
        target="RFC8349" format="default"/>, and it references
        <xref target="RFC5883"/>.</t>
        <sourcecode name="ietf-bfd-ip-mh@2021-09-03.yang" type="yang" markers="true"><![CDATA[
module ietf-bfd-ip-mh {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-ip-mh";
  prefix "bfd-ip-mh";

  // RFC Ed.: replace occurences of XXXX with actual RFC number and
  // remove this note bfd-ip-mh;

  import ietf-bfd-types {
    prefix "bfd-types"; bfd-types;
    reference
      "RFC XXXX: 9127: YANG Data Model for BFD"; Bidirectional Forwarding
       Detection (BFD)";
  }
  import ietf-bfd {
    prefix "bfd"; bfd;
    reference
      "RFC XXXX: 9127: YANG Data Model for BFD"; Bidirectional Forwarding
       Detection (BFD)";
  }
  import ietf-inet-types {
    prefix "inet"; inet;
    reference
      "RFC 6991: Common YANG Data Types";
  }
  import ietf-routing {
    prefix "rt"; rt;
    reference
      "RFC 8349: A YANG Data Model for Routing Management
       (NMDA version)"; Version)";
  }

  organization
    "IETF BFD Working Group";
  contact
    "WG Web:   <http://tools.ietf.org/wg/bfd>   <https://datatracker.ietf.org/wg/bfd/>
     WG List:  <rtg-bfd@ietf.org>

     Editors:  <mailto:rtg-bfd@ietf.org>

     Editor:   Reshad Rahman (rrahman@cisco.com),
               <mailto:reshad@yahoo.com>

     Editor:   Lianshu Zheng (vero.zheng@huawei.com),
               <mailto:veronique_cheng@hotmail.com>

     Editor:   Mahesh Jethanandani (mjethanandani@gmail.com)";
               <mailto:mjethanandani@gmail.com>";
  description
    "This module contains the YANG definition for BFD IP multi-hop multihop
     as per RFC 5883.

     Copyright (c) 2018 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).
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; 9127; see the
     RFC itself for full legal notices.";
  reference
    "RFC XXXX"; 5883: Bidirectional Forwarding Detection (BFD) for
     Multihop Paths
     RFC 9127: YANG Data Model for Bidirectional Forwarding
     Detection (BFD)";

  revision 2018-08-01 2021-09-03 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: A 9127: YANG data model Data Model for BFD IP multihop."; Bidirectional Forwarding
       Detection (BFD)";
  }

  /*
   * Augments
   */

  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol/bfd:bfd" {
    description
      "BFD augmentation for IP multihop.";
    container ip-mh {
      description
        "BFD IP multihop top level top-level container.";
      uses bfd-types:session-statistics-summary;
      container session-groups {
        description
          "BFD IP multi-hop multihop session groups.";
        list session-group {
          key "source-addr dest-addr";
          description
            "Group of BFD IP multi-hop multihop sessions (for ECMP).  A " +
            "group
             group of sessions is between 1 one source and 1  " +
            "destination, each one
             destination.  Each session has a different field " +
            "in
             in the UDP/IP hdr header for ECMP.";
          leaf source-addr {
            type inet:ip-address;
            description
              "Local IP address.";
          }
          leaf dest-addr {
            type inet:ip-address;
            description
              "IP address of the peer.";
          }
          uses bfd-types:common-cfg-parms;
          leaf tx-ttl {
            type bfd-types:hops;
            default 255; "255";
            description
              "Hop count of outgoing BFD control packets.";
          }
          leaf rx-ttl {
            type bfd-types:hops;
            mandatory true;
            description
              "Minimum allowed hop count value for incoming BFD
               control packets.  Control packets whose hop count is
               lower than this value are dropped.";
          }
          list sessions {
            config false;
            description
              "The multiple BFD sessions between a source and a " +
              "destination.";
               destination.";
            uses bfd-types:all-session;
          }
        }
      }
    }
  }

  /*
   * Notifications
   */

  notification multihop-notification {
    description
      "Notification for BFD multi-hop multihop session state change.  An " +
      "implementation
       implementation may rate-limit notifications, e.g. e.g., when a " +
      "session
       session is continuously changing state.";
    uses bfd-types:notification-parms;
  }
}

<CODE ENDS>
        ]]></artwork>
        </figure>
]]></sourcecode>
      </section>
      <section title="BFD over LAG anchor="bfd-over-lag-module" numbered="true" toc="default">
        <name>BFD-over-LAG YANG Module"> Module</name>
        <t>This YANG module imports "interface-ref" from <xref
        target="RFC8343"/>,
        target="RFC8343" format="default"/> and typedefs from <xref
        target="RFC6991"/>
        target="RFC6991" format="default"/>.  It also imports and augments
        "/routing/control-plane-protocols/control-plane-protocol" from <xref
        target="RFC8349"/>.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
<CODE BEGINS> file "ietf-bfd-lag@2018-08-01.yang"
        target="RFC8349" format="default"/>. Additionally, it references
        <xref target="RFC7130"/>.</t>
        <sourcecode name="ietf-bfd-lag@2021-09-03.yang" type="yang" markers="true"><![CDATA[
module ietf-bfd-lag {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-lag";
  prefix "bfd-lag";

  // RFC Ed.: replace occurences of XXXX with actual RFC number and
  // remove this note bfd-lag;

  import ietf-bfd-types {
    prefix "bfd-types"; bfd-types;
    reference
      "RFC XXXX: 9127: YANG Data Model for BFD"; Bidirectional Forwarding
       Detection (BFD)";
  }
  import ietf-bfd {
    prefix "bfd"; bfd;
    reference
      "RFC XXXX: 9127: YANG Data Model for BFD"; Bidirectional Forwarding
       Detection (BFD)";
  }
  import ietf-interfaces {
    prefix "if"; if;
    reference
      "RFC 8343: A YANG Data Model for Interface Management";
  }
  import ietf-inet-types {
    prefix "inet"; inet;
    reference
      "RFC 6991: Common YANG Data Types";
  }
  import ietf-routing {
    prefix "rt"; rt;
    reference
      "RFC 8349: A YANG Data Model for Routing Management
       (NMDA version)"; Version)";
  }

  organization
    "IETF BFD Working Group";
  contact
    "WG Web:   <http://tools.ietf.org/wg/bfd>   <https://datatracker.ietf.org/wg/bfd/>
     WG List:  <rtg-bfd@ietf.org>

     Editors:  <mailto:rtg-bfd@ietf.org>

     Editor:   Reshad Rahman (rrahman@cisco.com),
               <mailto:reshad@yahoo.com>

     Editor:   Lianshu Zheng vero.zheng@huawei.com),
               <mailto:veronique_cheng@hotmail.com>

     Editor:   Mahesh Jethanandani (mjethanandani@gmail.com)";
               <mailto:mjethanandani@gmail.com>";
  description
    "This module contains the YANG definition for BFD over LAG BFD-over-LAG
     interfaces as per RFC7130. RFC 7130.

     Copyright (c) 2018 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).
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; 9127; see the
     RFC itself for full legal notices.";
  reference
    "RFC XXXX"; 7130: Bidirectional Forwarding Detection (BFD) on
     Link Aggregation Group (LAG) Interfaces
     RFC 9127: YANG Data Model for Bidirectional Forwarding
     Detection (BFD)";

  revision 2018-08-01 2021-09-03 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: A 9127: YANG data model Data Model for BFD over LAG"; Bidirectional Forwarding
       Detection (BFD)";
  }

  /*
   * Augments
   */

  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol/bfd:bfd" {
    description
      "BFD augmentation for LAG"; a LAG.";
    container lag {
      description "BFD over LAG top level container";
        "BFD-over-LAG top-level container.";
      container micro-bfd-ipv4-session-statistics {
        description
          "Micro-BFD IPv4 session counters.";
        uses bfd-types:session-statistics-summary;
      }
      container micro-bfd-ipv6-session-statistics {
        description
          "Micro-BFD IPv6 session counters.";
        uses bfd-types:session-statistics-summary;
      }
      container sessions {
        description
          "BFD over LAG sessions";
          "BFD-over-LAG sessions.";
        list session {
          key "lag-name";
          description
            "List of BFD over LAG BFD-over-LAG sessions.";
          leaf lag-name {
            type if:interface-ref ; if:interface-ref;
            description
              "Name of the LAG"; LAG.";
          }
          leaf ipv4-dest-addr {
            type inet:ipv4-address;
            description
              "IPv4 address of the peer, for IPv4 micro-BFD.";
          }
          leaf ipv6-dest-addr {
            type inet:ipv6-address;
            description
              "IPv6 address of the peer, for IPv6 micro-BFD.";
          }
          uses bfd-types:common-cfg-parms;
          leaf use-ipv4 {
            type boolean;
            description
              "Using IPv4 micro-BFD.";
          }
          leaf use-ipv6 {
            type boolean;
            description
              "Using IPv6 micro-BFD.";
          }
          list member-links {
            key "member-link";
            config false;
            description
              "Micro-BFD over a LAG.  This represents one
               member link.";
            leaf member-link {
              type if:interface-ref;
              description
                "Member link on which micro-BFD is running.";
            }
            container micro-bfd-ipv4 {
              when "../../use-ipv4 = 'true'" {
                description
                  "Needed only if IPv4 is used.";
              }
              description
                "Micro-BFD IPv4 session state on a member link.";
              uses bfd-types:all-session;
            }
            container micro-bfd-ipv6 {
              when "../../use-ipv6 = 'true'" {
                description
                  "Needed only if IPv6 is used.";
              }
              description
                "Micro-BFD IPv6 session state on a member link.";
              uses bfd-types:all-session;
            }
          }
        }
      }
    }
  }

  /*
   * Notifications
   */

  notification lag-notification {
    description
      "Notification for BFD over LAG BFD-over-LAG session state change. " +
      "An
       An implementation may rate-limit notifications, e.g. e.g., when a " +
      "session
       session is continuously changing state.";
    uses bfd-types:notification-parms;
    leaf lag-name {
      type if:interface-ref;
      description
        "LAG interface name.";
    }
    leaf member-link {
      type if:interface-ref;
      description
        "Member link on which BFD is running.";
    }
  }
}

<CODE ENDS>
        ]]></artwork>
        </figure>
]]></sourcecode>
      </section>
      <section title="BFD over MPLS anchor="bfd-over-mpls-module" numbered="true" toc="default">
        <name>BFD-over-MPLS YANG Module"> Module</name>
        <t>This YANG module imports typedefs from <xref
        target="RFC6991"/> target="RFC6991"
        format="default"/>. It also imports and augments
        "/routing/control-plane-protocols/control-plane-protocol" from <xref
        target="RFC8349"/>.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
<CODE BEGINS> file "ietf-bfd-mpls@2018-08-01.yang"
        target="RFC8349" format="default"/>.
        Additionally, it references <xref target="RFC5586"/> and
        <xref target="RFC5884"/>.</t>
        <sourcecode name="ietf-bfd-mpls@2021-09-03.yang" type="yang" markers="true"><![CDATA[
module ietf-bfd-mpls {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bfd-mpls";
  prefix "bfd-mpls";

  // RFC Ed.: replace occurences of XXXX with actual RFC number and
  // remove this note bfd-mpls;

  import ietf-bfd-types {
    prefix "bfd-types"; bfd-types;
    reference
      "RFC XXXX: 9127: YANG Data Model for BFD"; Bidirectional Forwarding
       Detection (BFD)";
  }
  import ietf-bfd {
    prefix "bfd"; bfd;
    reference
      "RFC XXXX: 9127: YANG Data Model for BFD"; Bidirectional Forwarding
       Detection (BFD)";
  }
  import ietf-inet-types {
    prefix "inet"; inet;
    reference
      "RFC 6991: Common YANG Data Types";
  }
  import ietf-routing {
    prefix "rt"; rt;
    reference
      "RFC 8349: A YANG Data Model for Routing Management
       (NMDA version)"; Version)";
  }

  organization
    "IETF BFD Working Group";
  contact
    "WG Web:   <http://tools.ietf.org/wg/bfd>   <https://datatracker.ietf.org/wg/bfd/>
     WG List:  <rtg-bfd@ietf.org>

     Editors:  <mailto:rtg-bfd@ietf.org>

     Editor:   Reshad Rahman (rrahman@cisco.com),
               <mailto:reshad@yahoo.com>

     Editor:   Lianshu Zheng (vero.zheng@huawei.com),
               <mailto:veronique_cheng@hotmail.com>

     Editor:   Mahesh Jethanandani (mjethanandani@gmail.com)";
               <mailto:mjethanandani@gmail.com>";
  description
    "This module contains the YANG definition for BFD parameters for
     MPLS LSPs as per RFC 5884.

     Copyright (c) 2018 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).
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; 9127; see the
     RFC itself for full legal notices.";
  reference
    "RFC XXXX"; 5884: Bidirectional Forwarding Detection (BFD)
     for MPLS Label Switched Paths (LSPs)
     RFC 9127: YANG Data Model for Bidirectional Forwarding
     Detection (BFD)";

  revision 2018-08-01 2021-09-03 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: A 9127: YANG data model Data Model for BFD over MPLS LSPs"; Bidirectional Forwarding
       Detection (BFD)";
  }

  /*
   * Identity definitions
   */

  identity encap-gach {
    base bfd-types:encap-type;
    description
      "BFD with G-ACh encapsulation as per RFC 5586.";
    reference
      "RFC 5586: MPLS Generic Associated Channel";
  }

  identity encap-ip-gach {
    base bfd-types:encap-type;
    description
      "BFD with IP and G-ACh encapsulation as per RFC 5586.";
  }

  /*
   * Groupings
   */

  grouping encap-cfg {
    description
      "Configuration for BFD encapsulation"; encapsulation.";
    leaf encap {
      type identityref {
        base bfd-types:encap-type;
      }
      default bfd-types:encap-ip; "bfd-types:encap-ip";
      description
        "BFD encapsulation"; encapsulation.";
    }
  }

  grouping mpls-dest-address {
    description
      "Destination address as per RFC 5884.";
    reference
      "RFC 5884: Bidirectional Forwarding Detection (BFD)
       for MPLS Label Switched Paths (LSPs)";
    leaf mpls-dest-address {
      type inet:ip-address;
      config "false"; false;
      description
        "Destination address as per RFC 5884.
         Needed if IP encapsulation is used.";
    }
  }

  /*
   * Augments
   */

  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol/bfd:bfd" {
    description
      "BFD augmentation for MPLS.";
    container mpls {
      description
        "BFD MPLS top level top-level container.";
      uses bfd-types:session-statistics-summary;
      container egress {
        description
          "Egress configuration.";
        uses bfd-types:client-cfg-parms;
        uses bfd-types:auth-parms;
      }
      container session-groups {
        description
          "BFD over MPLS
          "BFD-over-MPLS session groups.";
        list session-group {
          key "mpls-fec";
          description
            "Group of BFD MPLS sessions (for ECMP).  A group of " +
            "sessions
             sessions is for 1 FEC, each one FEC.  Each session has a different " +
            "field
             field in the UDP/IP hdr header for ECMP.";
          leaf mpls-fec {
            type inet:ip-prefix;
            description
              "MPLS FEC.";
          }
          uses bfd-types:common-cfg-parms;
          list sessions {
            config false;
            description
              "The BFD sessions for an MPLS FEC. Local " +
              "discriminator  The local
               discriminator is unique for each session in the " +
              "group.";
               group.";
            uses bfd-types:all-session;
            uses bfd-mpls:mpls-dest-address;
          }
        }
      }
    }
  }

  /*
   * Notifications
   */

  notification mpls-notification {
    description
      "Notification for BFD over MPLS BFD-over-MPLS FEC session state change. " +
      "An
       An implementation may rate-limit notifications, e.g. e.g., when a " +
      "session
       session is continuously changing state.";
    uses bfd-types:notification-parms;
    leaf mpls-dest-address {
      type inet:ip-address;
      description
        "Destination address as per RFC 5884.
         Needed if IP encapsulation is used.";
    }
  }
}

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

      <section title="BFD over MPLS-TE YANG Module">
        <t>This YANG module imports and augments "/te/tunnels/tunnel" from
        <xref target="I-D.ietf-teas-yang-te"/>.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[
<CODE BEGINS> file "ietf-bfd-mpls-te@2018-08-01.yang"

module ietf-bfd-mpls-te {

  yang-version 1.1;

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

  prefix "bfd-mpls-te";

  // RFC Ed.: replace occurences of XXXX with actual RFC number and
  // remove this note

  import ietf-bfd-types {
    prefix "bfd-types";
    reference "RFC XXXX: YANG Data Model for BFD";
  }

  import ietf-bfd {
    prefix "bfd";
    reference "RFC XXXX: YANG Data Model for BFD";
  }

  import ietf-bfd-mpls {
    prefix "bfd-mpls";
    reference "RFC XXXX: YANG Data Model for BFD";
  }

  import ietf-te {
    prefix "te";
    // RFC Ed.: replace YYYY with actual RFC number of
    // draft-ietf-teas-yang-te and remove this note.
    reference
      "RFC YYYY: A YANG Data Model for Traffic Engineering Tunnels and
       Interfaces";
  }

  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:   <http://tools.ietf.org/wg/bfd>
     WG List:  <rtg-bfd@ietf.org>

     Editors:  Reshad Rahman (rrahman@cisco.com),
               Lianshu Zheng (vero.zheng@huawei.com),
               Mahesh Jethanandani (mjethanandani@gmail.com)";

  description
    "This module contains the YANG definition for BFD parameters for
     MPLS Traffic Engineering as per RFC 5884.

     Copyright (c) 2018 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 XXXX; see
     the RFC itself for full legal notices.";

  reference "RFC XXXX";

  revision 2018-08-01 {
    description "Initial revision.";
    reference "RFC XXXX: A YANG data model for BFD over MPLS-TE";
  }

  /*
   * Augments
   */
  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol/bfd:bfd" {
    description "BFD augmentation for MPLS-TE.";
    container mpls-te {
      description "BFD MPLS-TE top level container.";

      container egress {
        description "Egress configuration.";

        uses bfd-types:client-cfg-parms;

        uses bfd-types:auth-parms;
      }

      uses bfd-types:session-statistics-summary;
    }
  }

  augment "/te:te/te:tunnels/te:tunnel" {
    description "BFD configuration on MPLS-TE tunnel.";

    uses bfd-types:common-cfg-parms;

    uses bfd-mpls:encap-cfg;
  }

  augment "/te:te/te:lsps-state/te:lsp" {
    when "/te:te/te:lsps-state/te:lsp/te:origin-type != 'transit'" {
      description "BFD information not needed at transit points.";
    }
    description "BFD state information on MPLS-TE LSP.";

    uses bfd-types:all-session;

    uses bfd-mpls:mpls-dest-address;
  }

  /*
   * Notifications
   */
  notification mpls-te-notification {
    description
      "Notification for BFD over MPLS-TE session state change. " +
      "An implementation may rate-limit notifications, e.g. when a " +
      "session is continuously changing state.";

    uses bfd-types:notification-parms;

    uses bfd-mpls:mpls-dest-address;

    leaf tunnel-name {
      type string;
      description "MPLS-TE tunnel on which BFD was running.";
    }
  }
}

<CODE ENDS>
        ]]></artwork>
        </figure>
]]></sourcecode>
      </section>
    </section>
    <section title="Data numbered="true" toc="default">
      <name>Data Model examples"> Examples</name>
      <t>This section presents some simple and illustrative examples on of how to
      configure BFD.</t>
      <t>The examples are represented in XML <xref target="W3C.REC-xml-20081126"/>.</t>
      <section title="IP single-hop"> numbered="true" toc="default">
        <name>IP Single-Hop</name>
        <t>The following is an example configuration for a BFD IP single-hop
        session. The desired transmit interval and the required receive
        interval are both set to 10ms.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[ 10 ms.</t>
<sourcecode type="xml"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
      <name>eth0</name>
      <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">
        ianaift:ethernetCsmacd
      </type>
    </interface>
  </interfaces>
  <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <control-plane-protocols>
      <control-plane-protocol>
        <type xmlns:bfd-types=
            "urn:ietf:params:xml:ns:yang:ietf-bfd-types">
          bfd-types:bfdv1
        </type>
        <name>name:BFD</name>
        <bfd xmlns="urn:ietf:params:xml:ns:yang:ietf-bfd">
          <ip-sh xmlns="urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh">
            <sessions>
              <session>
                <interface>eth0</interface>
                <dest-addr>2001:db8:0:113::101</dest-addr>
                <desired-min-tx-interval>10000</desired-min-tx-interval>
                <desired-min-tx-interval>
                  10000
                </desired-min-tx-interval>
                <required-min-rx-interval>
                  10000
                </required-min-rx-interval>
              </session>
            </sessions>
          </ip-sh>
        </bfd>
      </control-plane-protocol>
    </control-plane-protocols>
  </routing>
</config>

]]></artwork>
        </figure>
]]></sourcecode>
      </section>
      <section title="IP multihop"> numbered="true" toc="default">
        <name>IP Multihop</name>
        <t>The following is an example configuration for a BFD IP multihop
        session group. The desired transmit interval and the required receive
        interval are both set to 150ms.</t>

        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[ 150 ms.</t>
<sourcecode type="xml"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <control-plane-protocols>
      <control-plane-protocol>
        <type xmlns:bfd-types=
            "urn:ietf:params:xml:ns:yang:ietf-bfd-types">
          bfd-types:bfdv1
        </type>
        <name>name:BFD</name>
        <bfd xmlns="urn:ietf:params:xml:ns:yang:ietf-bfd">
          <ip-mh xmlns="urn:ietf:params:xml:ns:yang:ietf-bfd-ip-mh">
            <session-groups>
              <session-group>
                <source-addr>2001:db8:0:113::103</source-addr>
                <dest-addr>2001:db8:0:114::100</dest-addr>
                <desired-min-tx-interval>
                  150000
                </desired-min-tx-interval>
                <required-min-rx-interval>
                  150000
                </required-min-rx-interval>
                <rx-ttl>240</rx-ttl>
              </session-group>
            </session-groups>
          </ip-mh>
        </bfd>
      </control-plane-protocol>
    </control-plane-protocols>
  </routing>
</config>
 ]]></artwork>
        </figure>
]]></sourcecode>
      </section>
      <section title="LAG"> numbered="true" toc="default">
        <name>LAG</name>
        <t>The following is an example of BFD configuration for a LAG session.
        In this case, an interface named "Bundle-Ether1" of interface type
        "ieee802eadLag"
        "ieee8023adLag" has a desired transmit interval and required receive interval
        set to 10ms. </t>

        <t><figure>
            <artwork align="left"><![CDATA[ 10 ms.</t>
<sourcecode type="xml"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
      <name>Bundle-Ether1</name>
      <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">
        ianaift:ieee8023adLag
      </type>
    </interface>
  </interfaces>
  <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <control-plane-protocols>
      <control-plane-protocol>
        <type xmlns:bfd-types=
            "urn:ietf:params:xml:ns:yang:ietf-bfd-types">
          bfd-types:bfdv1
        </type>
        <name>name:BFD</name>
        <bfd xmlns="urn:ietf:params:xml:ns:yang:ietf-bfd">
          <lag xmlns="urn:ietf:params:xml:ns:yang:ietf-bfd-lag">
            <sessions>
              <session>
                <lag-name>Bundle-Ether1</lag-name>
                <ipv6-dest-addr>2001:db8:112::16</ipv6-dest-addr>
                <desired-min-tx-interval>
                  100000
                </desired-min-tx-interval>
                <required-min-rx-interval>
                  100000
                </required-min-rx-interval>
                <use-ipv6>true</use-ipv6>
              </session>
            </sessions>
          </lag>
        </bfd>
      </control-plane-protocol>
    </control-plane-protocols>
  </routing>
</config>

]]></artwork>
          </figure></t>
]]></sourcecode>
      </section>
      <section title="MPLS"> numbered="true" toc="default">
        <name>MPLS</name>
        <t>The following is an example of BFD configured for an MPLS LSP. In
        this case, the desired transmit interval and required receive interval
        are both set to
        250ms.</t>

        <t><figure>
            <artwork align="left"><![CDATA[ 250 ms.</t>
<sourcecode type="xml"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <control-plane-protocols>
      <control-plane-protocol>
        <type xmlns:bfd-types=
            "urn:ietf:params:xml:ns:yang:ietf-bfd-types">
          bfd-types:bfdv1
        </type>
        <name>name:BFD</name>
        <bfd xmlns="urn:ietf:params:xml:ns:yang:ietf-bfd">
          <mpls xmlns="urn:ietf:params:xml:ns:yang:ietf-bfd-mpls">
            <session-groups>
              <session-group>
                <mpls-fec>2001:db8:114::/116</mpls-fec>
                <desired-min-tx-interval>
                  250000
                </desired-min-tx-interval>
                <required-min-rx-interval>
                  250000
                </required-min-rx-interval>
              </session-group>
            </session-groups>
          </mpls>
        </bfd>
      </control-plane-protocol>
    </control-plane-protocols>
  </routing>
</config>

]]></artwork>
          </figure></t>
]]></sourcecode>
      </section>
    </section>
    <section title="Security Considerations"> numbered="true" toc="default">
      <name>Security Considerations</name>
<!-- Begin YANG security DNE paragraphs 1 and 2 (fixed per boilerplate) -->
     <t>The YANG module modules specified in this document defines define 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="RFC5246"/>.</t> target="RFC8446"/>.</t>
     <t>The NETCONF access control model Network Configuration Access Control Model (NACM) <xref target="RFC6536"/> 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>
<!-- End YANG security DNE text (paragraphs 1 and 2) -->
<!-- Begin YANG security DNE paragraph 3 (OK) -->
     <t>There are a number of data nodes defined in this these YANG module modules 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/sessions:
      the sensitivity/vulnerability from a write access perspective:</t>
<!-- End YANG security DNE paragraph 3 -->
      <dl newline="true" spacing="normal">
      <dt>/routing/control-plane-protocols/control-plane-protocol/bfd/ip-sh/sessions:</dt>
      <dd><t>This list specifies the IP single-hop BFD sessions.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/ip-sh/sessions:
      data
      <t>Data nodes local-multiplier, desired-min-tx-interval,
      required-min-rx-interval "local-multiplier", "desired-min-tx-interval",
      "required-min-rx-interval", and min-interval "min-interval" all impact the
      BFD IP single-hop session. The source-addr "source-addr" and dest-addr "dest-addr" data nodes can be used to
      send BFD packets to unwitting recipients, recipients. <xref target="RFC5880"/> target="RFC5880"
      format="default"/> describes how BFD mitigates against such
      threats. Authentication data nodes key-chain "key-chain" and meticulous "meticulous" impact the
      security of the BFD IP single-hop session.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/ip-mh/session-group:
      the session.</t></dd>
      <dt>/routing/control-plane-protocols/control-plane-protocol/bfd/ip-mh/session-group:</dt>
      <dd><t>This list specifies the IP multi-hop multihop BFD session groups.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/ip-mh/session-group:
      data
      <t>Data nodes local-multiplier, desired-min-tx-interval,
      required-min-rx-interval "local-multiplier", "desired-min-tx-interval",
      "required-min-rx-interval", and min-interval "min-interval" all impact the
      BFD IP multi-hop multihop session. The source-addr "source-addr" and dest-addr "dest-addr" data nodes can be used to
      send BFD packets to unwitting recipients, recipients. <xref target="RFC5880"/> target="RFC5880"
      format="default"/> describes how BFD mitigates against such
      threats. Authentication data nodes key-chain "key-chain" and meticulous "meticulous" impact the
      security of the BFD IP multi-hop session.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/lag/sessions:
      the multihop session.</t></dd>
      <dt>/routing/control-plane-protocols/control-plane-protocol/bfd/lag/sessions:</dt>
      <dd><t>This list specifies the BFD sessions over a LAG.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/lag/sessions:
      data
      <t>Data nodes local-multiplier, desired-min-tx-interval,
      required-min-rx-interval "local-multiplier", "desired-min-tx-interval",
      "required-min-rx-interval", and min-interval "min-interval" all impact the
      BFD over LAG BFD-over-LAG
      session. The ipv4-dest-addr "ipv4-dest-addr" and ipv6-dest-addr "ipv6-dest-addr" data nodes can be used to
      send BFD packets to unwitting recipients, recipients. <xref target="RFC5880"/> target="RFC5880"
      format="default"/> describes how BFD mitigates against such
      threats. Authentication data nodes key-chain "key-chain" and meticulous "meticulous" impact the
      security of the BFD over LAG session.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/mpls/session-group:
      the BFD-over-LAG session.</t></dd>
      <dt>/routing/control-plane-protocols/control-plane-protocol/bfd/mpls/session-group:</dt>
      <dd><t>This list specifies the session groups for BFD over MPLS.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/mpls/session-group:
      data
      <t>Data nodes local-multiplier, desired-min-tx-interval,
      required-min-rx-interval, "local-multiplier", "desired-min-tx-interval",
      "required-min-rx-interval", and min-interval "min-interval" all impact the
      BFD over MPLS LSPs
      BFD-over-MPLS-LSPs session. Authentication data nodes key-chain "key-chain" and meticulous "meticulous" impact
      the security of the BFD over MPLS LSPs session.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/mpls/egress:
      data BFD-over-MPLS-LSPs session.</t></dd>
      <dt>/routing/control-plane-protocols/control-plane-protocol/bfd/mpls/egress:</dt>
      <dd>Data nodes local-multiplier, desired-min-tx-interval,
      required-min-rx-interval "local-multiplier", "desired-min-tx-interval",
      "required-min-rx-interval", and min-interval "min-interval" all impact the
      BFD over MPLS LSPs
      BFD-over-MPLS-LSPs sessions for which this device is an MPLS LSP egress
      node. Authentication data nodes key-chain "key-chain" and meticulous "meticulous" impact the
      security of the BFD over MPLS LSPs BFD-over-MPLS-LSPs sessions for which this device is an
      MPLS LSP egress node</t>

      <t>/te/tunnels/tunnel: data nodes local-multiplier,
      desired-min-tx-interval, required-min-rx-interval and min-interval
      all impact the BFD session over the MPLS-TE tunnel. Authentication
      data nodes key-chain and meticulous impact the security of the BFD session over
      the MPLS-TE tunnel.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/mpls-te/egress:
      data nodes local-multiplier, desired-min-tx-interval,
      required-min-rx-interval and min-interval all impact the
      BFD over MPLS-TE sessions for which this device is an MPLS-TE egress
      node. Authentication data nodes key-chain and meticulous impact the security of the
      BFD over MPLS-TE sessions for which this device is an MPLS-TE egress
      node.</t>

      <t/> node.</dd>
    </dl>
      <t>The YANG module has writeable modules have writable data nodes which that can be used for the
      creation of BFD sessions and the modification of BFD session parameters. The
      system should "police" the creation of BFD sessions to prevent new sessions
      from causing existing BFD sessions to fail. For In the case of BFD session
      modification, the BFD protocol has mechanisms in place which that allow for
      in service
      in-service modification.</t>
      <t>When BFD clients are used to modify BFD configuration (as described
      in <xref target="CFG-MODEL"/>), target="CFG-MODEL" format="default"/>), the BFD clients need to
      be included in an analysis of the security properties of the BFD-using system that
      uses BFD (e.g., when considering the authentication and authorization of
      control actions). In many cases, BFD is not the most vulnerable portion
      of such a composite system, since BFD is limited to generating
      well-defined traffic at a fixed rate on a given path; in the case of an
      IGP acting as a BFD client, attacking the IGP could cause more broad-scale
      disruption than would (de)configuring a BFD
      session could cause.</t> session.</t>
<!-- Begin YANG security DNE paragraph 4 (OK) -->
      <t>Some of the readable data nodes in this these YANG module modules 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/summary: sensitivity/vulnerability from a read access perspective:</t>
<!-- End YANG security DNE paragraph 4 -->
      <dl newline="true" spacing="normal">
      <dt>/routing/control-plane-protocols/control-plane-protocol/bfd/ip-sh/summary:</dt>
      <dd>Access to this information discloses the number of BFD IP single-hop
      sessions which that are up, down and admin-down. in the "up", "down", or "admin-down" state. The counters include BFD
      sessions for which the user does not have read-access.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/ip-sh/sessions/session/:
      access read access.</dd>
      <dt>/routing/control-plane-protocols/control-plane-protocol/bfd/ip-sh/sessions/session/:</dt>
      <dd>Access to data nodes local-discriminator "local-discriminator" and remote-discriminator "remote-discriminator"
      (combined with the data nodes in the authentication container) provides the
      ability to spoof BFD IP single-hop packets.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/ip-mh/summary:
      access packets.</dd>
      <dt>/routing/control-plane-protocols/control-plane-protocol/bfd/ip-mh/summary:</dt>
      <dd>Access to this information discloses the number of BFD IP multi-hop multihop
      sessions which that are up, down and admin-down. in the "up", "down", or "admin-down" state. The counters include BFD
      sessions for which the user does not have read-access.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/ip-mh/session-groups/session-group/sessions:
      access read access.</dd>
      <dt>/routing/control-plane-protocols/control-plane-protocol/bfd/ip-mh/session-groups/session-group/sessions:</dt>
      <dd>Access to data nodes local-discriminator "local-discriminator" and remote-discriminator "remote-discriminator"
      (combined with the data nodes in the session-group's session group's authentication container) provides the
      ability to spoof BFD IP multi-hop packets.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/lag/micro-bfd-ipv4-session-statistics/summary:
      access multihop packets.</dd>
      <dt>/routing/control-plane-protocols/control-plane-protocol/bfd/lag/micro-bfd-ipv4-session-statistics/summary:</dt>
      <dd>Access to this information discloses the number of micro BFD micro-BFD IPv4 LAG
      sessions which that are up, down and admin-down. in the "up", "down", or "admin-down" state. The counters include BFD
      sessions for which the user does not have read-access.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/lag/sessions/session/member-links/member-link/micro-bfd-ipv4:
      access read access.</dd>
      <dt>/routing/control-plane-protocols/control-plane-protocol/bfd/lag/sessions/session/member-links/member-link/micro-bfd-ipv4:</dt>
      <dd>Access to data nodes local-discriminator "local-discriminator" and remote-discriminator "remote-discriminator"
      (combined with the data nodes in the session's authentication container) provides the
      ability to spoof BFD IPv4 LAG packets.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/lag/micro-bfd-ipv6-session-statistics/summary:
      access packets.</dd>
      <dt>/routing/control-plane-protocols/control-plane-protocol/bfd/lag/micro-bfd-ipv6-session-statistics/summary:</dt>
      <dd>Access to this information discloses the number of micro BFD micro-BFD IPv6 LAG
      sessions which that are up, down and admin-down. in the "up", "down", or "admin-down" state. The counters include BFD
      sessions for which the user does not have read-access.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/lag/sessions/session/member-links/member-link/micro-bfd-ipv6:
      access read access.</dd>
      <dt>/routing/control-plane-protocols/control-plane-protocol/bfd/lag/sessions/session/member-links/member-link/micro-bfd-ipv6:</dt>
      <dd>Access to data nodes local-discriminator "local-discriminator" and remote-discriminator "remote-discriminator"
      (combined with the data nodes in the session's authentication container) provides the
      ability to spoof BFD IPv6 LAG packets.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/mpls/summary:
      access packets.</dd>
      <dt>/routing/control-plane-protocols/control-plane-protocol/bfd/mpls/summary:</dt>
      <dd>Access to this information discloses the number of BFD sessions over
      MPLS LSPs which that are up, down and admin-down. The counters include BFD
      sessions for which the user does not have read-access.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/mpls/session-groups/session-group/sessions:
      access to data nodes local-discriminator and remote-discriminator
      (combined with the data nodes in the session-group's authentication container) provides the
      ability to spoof BFD over MPLS LSPs packets.</t>

      <t>/routing/control-plane-protocols/control-plane-protocol/bfd/mpls-te/summary:
      access to this information discloses the number of BFD sessions over
      MPLS-TE which are up, down and admin-down. "up", "down", or "admin-down" state. The counters include BFD
      sessions for which the user does not have read-access.</t>

      <t>/te/lsps-state/lsp: access read access.</dd>
      <dt>/routing/control-plane-protocols/control-plane-protocol/bfd/mpls/session-groups/session-group/sessions:</dt>
      <dd>Access to data nodes local-discriminator "local-discriminator" and remote-discriminator "remote-discriminator"
      (combined with the data nodes in the tunnel's session group's authentication container) provides the
      ability to spoof BFD over MPLS-TE packets.</t>

    </section>

    <section title="IANA Considerations"> BFD-over-MPLS-LSPs packets.</dd>
      </dl>
<t>This document registers does not define any RPC operations.</t>
    </section>
    <section numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>IANA has registered the following namespace URIs in the IETF "IETF XML
      registry
      Registry" <xref target="RFC3688"/>:</t>

      <t/>

      <t>--------------------------------------------------------------------</t>

      <t>URI: urn:ietf:params:xml:ns:yang:iana-bfd-types</t>

      <t>Registrant Contact: The IESG.</t>

      <t>XML: N/A, target="RFC3688" format="default"/>:</t>

      <dl newline="false" spacing="compact">
      <dt>URI:</dt>
      <dd>urn:ietf:params:xml:ns:yang:iana-bfd-types</dd>
      <dt>Registrant Contact:</dt>
      <dd>The IESG.</dd>
      <dt>XML:</dt>
      <dd>N/A; the requested URI is an XML namespace.</t>

      <t>--------------------------------------------------------------------</t>

      <t>--------------------------------------------------------------------</t>

      <t>URI: urn:ietf:params:xml:ns:yang:ietf-bfd-types</t>

      <t>Registrant Contact: The IESG.</t>

      <t>XML: N/A, namespace.</dd>
      </dl>

      <dl newline="false" spacing="compact">
      <dt>URI:</dt>
      <dd>urn:ietf:params:xml:ns:yang:ietf-bfd-types</dd>
      <dt>Registrant Contact:</dt>
      <dd>The IESG.</dd>
      <dt>XML:</dt>
      <dd>N/A; the requested URI is an XML namespace.</t>

      <t>--------------------------------------------------------------------</t>

      <t/>
      <t>--------------------------------------------------------------------</t>

      <t>URI: urn:ietf:params:xml:ns:yang:ietf-bfd</t>

      <t>Registrant Contact: The IESG.</t>

      <t>XML: N/A, namespace.</dd>
      </dl>

      <dl newline="false" spacing="compact">
      <dt>URI:</dt>
      <dd>urn:ietf:params:xml:ns:yang:ietf-bfd</dd>
      <dt>Registrant Contact:</dt>
      <dd>The IESG.</dd>
      <dt>XML:</dt>
      <dd>N/A; the requested URI is an XML namespace.</t>

      <t>--------------------------------------------------------------------</t>

      <t/>

      <t>--------------------------------------------------------------------</t>

      <t>URI: urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh</t>

      <t>Registrant Contact: The IESG.</t>

      <t>XML: N/A, namespace.</dd>
    </dl>

      <dl newline="false" spacing="compact">
      <dt>URI:</dt>
      <dd>urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh</dd>
      <dt>Registrant Contact:</dt>
      <dd>The IESG.</dd>
      <dt>XML:</dt>
      <dd>N/A; the requested URI is an XML namespace.</t>

      <t>--------------------------------------------------------------------</t>

      <t/>

      <t>--------------------------------------------------------------------</t>

      <t>URI: urn:ietf:params:xml:ns:yang:ietf-bfd-mh</t>

      <t>Registrant Contact: The IESG.</t>

      <t>XML: N/A, namespace.</dd>
      </dl>

      <dl newline="false" spacing="compact">
      <dt>URI:</dt>
      <dd>urn:ietf:params:xml:ns:yang:ietf-bfd-ip-mh</dd>
      <dt>Registrant Contact:</dt>
      <dd>The IESG.</dd>
      <dt>XML:</dt>
      <dd>N/A; the requested URI is an XML namespace.</t>

      <t>--------------------------------------------------------------------</t>

      <t/>

      <t>--------------------------------------------------------------------</t>

      <t>URI: urn:ietf:params:xml:ns:yang:ietf-bfd-lag</t>

      <t>Registrant Contact: The IESG.</t>

      <t>XML: N/A, namespace.</dd>
      </dl>

      <dl newline="false" spacing="compact">
      <dt>URI:</dt>
      <dd>urn:ietf:params:xml:ns:yang:ietf-bfd-lag</dd>
      <dt>Registrant Contact:</dt>
      <dd>The IESG.</dd>
      <dt>XML:</dt>
      <dd>N/A; the requested URI is an XML namespace.</t>

      <t>--------------------------------------------------------------------</t>

      <t/>

      <t>--------------------------------------------------------------------</t>

      <t>URI: urn:ietf:params:xml:ns:yang:ietf-bfd-mpls</t>

      <t>Registrant Contact: The IESG.</t>

      <t>XML: N/A, namespace.</dd>
      </dl>

      <dl newline="false" spacing="compact">
      <dt>URI:</dt>
      <dd>urn:ietf:params:xml:ns:yang:ietf-bfd-mpls</dd>
      <dt>Registrant Contact:</dt>
      <dd>The IESG.</dd>
      <dt>XML:</dt>
      <dd>N/A; the requested URI is an XML namespace.</t>

      <t>--------------------------------------------------------------------</t>

      <t/>

      <t>--------------------------------------------------------------------</t>

      <t>URI: urn:ietf:params:xml:ns:yang:ietf-bfd-mpls-te</t>

      <t>Registrant Contact: The IESG.</t>

      <t>XML: N/A, the requested URI is an XML namespace.</t>

      <t>--------------------------------------------------------------------</t>

      <t>This document registers namespace.</dd>
      </dl>

      <t>IANA has registered the following YANG modules in the YANG "YANG Module Names Names"
      registry <xref target="RFC6020"/>:</t>
      <t>RFC Editor: Replace RFC XXXX with actual RFC number and remove this note.</t>

      <t>--------------------------------------------------------------------</t>
      <t>Name: iana-bfd-types</t>
      <t>Namespace: urn:ietf:params:xml:ns:yang:iana-bfd-types</t>
      <t>Prefix: iana-bfd-types</t>
      <t>Reference: RFC XXXX</t>
      <t>--------------------------------------------------------------------</t>

      <t>--------------------------------------------------------------------</t>
      <t>Name: ietf-bfd-types</t>
      <t>Namespace: urn:ietf:params:xml:ns:yang:ietf-bfd-types</t>
      <t>Prefix: bfd-types</t>
      <t>Reference: RFC XXXX</t>
      <t>--------------------------------------------------------------------</t>

      <t>--------------------------------------------------------------------</t>
      <t>Name: ietf-bfd</t>
      <t>Namespace: urn:ietf:params:xml:ns:yang:ietf-bfd</t>
      <t>Prefix: bfd</t>
      <t>Reference: RFC XXXX</t>
      <t>--------------------------------------------------------------------</t>

      <t>--------------------------------------------------------------------</t>
      <t>Name: ietf-bfd-ip-sh</t>
      <t>Namespace: urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh</t>
      <t>Prefix: bfd-ip-sh</t>
      <t>Reference: RFC XXXX</t>
      <t>--------------------------------------------------------------------</t>

      <t>--------------------------------------------------------------------</t>
      <t>Name: ietf-bfd-ip-mh</t>
      <t>Namespace: urn:ietf:params:xml:ns:yang:ietf-bfd-ip-mh</t>
      <t>Prefix: bfd-ip-mh</t>
      <t>Reference: RFC XXXX</t>
      <t>--------------------------------------------------------------------</t>

      <t>--------------------------------------------------------------------</t>
      <t>Name: ietf-bfd-lag</t>
      <t>Namespace: urn:ietf:params:xml:ns:yang:ietf-bfd-lag</t>
      <t>Prefix: bfd-lag</t>
      <t>Reference: RFC XXXX</t>
      <t>--------------------------------------------------------------------</t>

      <t>--------------------------------------------------------------------</t>
      <t>Name: ietf-bfd-mpls</t>
      <t>Namespace: urn:ietf:params:xml:ns:yang:ietf-bfd-mpls</t>
      <t>Prefix: bfd-mpls</t>
      <t>Reference: RFC XXXX</t>
      <t>--------------------------------------------------------------------</t>

      <t>--------------------------------------------------------------------</t>
      <t>Name: ietf-bfd-mpls-te</t>
      <t>Namespace: urn:ietf:params:xml:ns:yang:ietf-bfd-mpls-te</t>
      <t>Prefix: bfd-mpls-te</t>
      <t>Reference: RFC XXXX</t>
      <t>--------------------------------------------------------------------</t>
      <section title="IANA-Maintained iana-bfd-types module"> target="RFC6020" format="default"/>:</t>
      <dl newline="false" spacing="compact">
      <dt>Name:</dt>
      <dd>iana-bfd-types</dd>
      <dt>Namespace:</dt>
      <dd>urn:ietf:params:xml:ns:yang:iana-bfd-types</dd>
      <dt>Prefix:</dt>
      <dd>iana-bfd-types</dd>
      <dt>Reference:</dt>
      <dd>RFC 9127</dd>
      </dl>

      <dl newline="false" spacing="compact">
      <dt>Name:</dt>
      <dd>ietf-bfd-types</dd>
      <dt>Namespace:</dt>
      <dd>urn:ietf:params:xml:ns:yang:ietf-bfd-types</dd>
      <dt>Prefix:</dt>
      <dd>bfd-types</dd>
      <dt>Reference:</dt>
      <dd>RFC 9127</dd>
      </dl>

      <dl newline="false" spacing="compact">
      <dt>Name:</dt>
      <dd>ietf-bfd</dd>
      <dt>Namespace:</dt>
      <dd>urn:ietf:params:xml:ns:yang:ietf-bfd</dd>
      <dt>Prefix:</dt>
      <dd>bfd</dd>
      <dt>Reference:</dt>
      <dd>RFC 9127</dd>
      </dl>

      <dl newline="false" spacing="compact">
      <dt>Name:</dt>
      <dd>ietf-bfd-ip-sh</dd>
      <dt>Namespace:</dt>
      <dd>urn:ietf:params:xml:ns:yang:ietf-bfd-ip-sh</dd>
      <dt>Prefix:</dt>
      <dd>bfd-ip-sh</dd>
      <dt>Reference:</dt>
      <dd>RFC 9127</dd>
      </dl>

      <dl newline="false" spacing="compact">
      <dt>Name:</dt>
      <dd>ietf-bfd-ip-mh</dd>
      <dt>Namespace:</dt>
      <dd>urn:ietf:params:xml:ns:yang:ietf-bfd-ip-mh</dd>
      <dt>Prefix:</dt>
      <dd>bfd-ip-mh</dd>
      <dt>Reference:</dt>
      <dd>RFC 9127</dd>
      </dl>

      <dl newline="false" spacing="compact">
      <dt>Name:</dt>
      <dd>ietf-bfd-lag</dd>
      <dt>Namespace:</dt>
      <dd>urn:ietf:params:xml:ns:yang:ietf-bfd-lag</dd>
      <dt>Prefix:</dt>
      <dd>bfd-lag</dd>
      <dt>Reference:</dt>
      <dd>RFC 9127</dd>
      </dl>

      <dl newline="false" spacing="compact">
      <dt>Name:</dt>
      <dd>ietf-bfd-mpls</dd>
      <dt>Namespace:</dt>
      <dd>urn:ietf:params:xml:ns:yang:ietf-bfd-mpls</dd>
      <dt>Prefix:</dt>
      <dd>bfd-mpls</dd>
      <dt>Reference:</dt>
      <dd>RFC 9127</dd>
      </dl>

      <section numbered="true" toc="default">
        <name>IANA-Maintained &quot;iana-bfd-types&quot; Module</name>
        <t>This document defines the initial version of the IANA-maintained
        iana-bfd-types
        "iana-bfd-types" YANG module.</t>
        <t>The iana-bfd-types "iana-bfd-types" YANG module mirrors the "BFD Diagnostic Codes" registry
        and "BFD Authentication Types" registry registries at
        https://www.iana.org/assignments/bfd-parameters/bfd-parameters.xhtml.
        <eref target="https://www.iana.org/assignments/bfd-parameters/" brackets="angle"/>. Whenever that registry changes,
        these registries change, IANA must update the iana-bfd-types "iana-bfd-types" YANG
        module.</t>
      </section>
    </section>

    <section title="Acknowledgements">
      <t>We would also like to thank Nobo Akiya and Jeff Haas for their
      encouragement on this work. We would also like to thank Rakesh Gandhi
      and Tarek Saad for their help on the MPLS-TE model. We would also like
      to thank Acee Lindem for his guidance.</t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

      <?rfc include="reference.RFC.3688"?>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      <?rfc include="reference.RFC.8174"?>

      <?rfc include="reference.RFC.8177"?>

      <?rfc include="reference.RFC.8340"?>

      <?rfc include="reference.RFC.8343"?>

      <?rfc include="reference.RFC.8344"?>

      <?rfc include="reference.RFC.8349"?>

      <?rfc include="reference.I-D.ietf-mpls-base-yang"?>

      <?rfc include="reference.I-D.ietf-teas-yang-te"?>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3688.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.5881.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5882.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.5885.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5586.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6241.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6242.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6991.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7130.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8040.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8177.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8341.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8343.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8344.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8349.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml"/>

<!-- draft-ietf-mpls-base-yang (RFC 8960) -->
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8960.xml"/>
      </references>
      <references>
        <name>Informative References</name>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3031.xml"/>

<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6428.xml"/>

<!-- draft-ietf-rtgwg-ni-model (RFC 8529) -->
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8529.xml"/>

<!-- draft-ietf-rtgwg-lne-model (RFC 8530) -->
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8530.xml"/>

<!-- draft-ietf-lime-yang-connectionless-oam (RFC 8532) -->
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8532.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8342.xml"/>

     <reference anchor='W3C.REC-xml-20081126'
         target='https://www.w3.org/TR/2008/REC-xml-20081126'>
     <front>
     <title>Extensible Markup Language (XML) 1.0 (Fifth Edition)</title>
     <author initials='T.' surname='Bray' fullname='Tim Bray'>
         <organization />
     </author>
     <author initials='J.' surname='Paoli' fullname='Jean Paoli'>
         <organization />
     </author>
     <author initials='M.' surname='Sperberg-McQueen' fullname='Michael Sperberg-McQueen'>
         <organization />
     </author>
     <author initials='E.' surname='Maler' fullname='Eve Maler'>
         <organization />
     </author>
     <author initials='F.' surname='Yergeau' fullname='Francois Yergeau'>
         <organization />
     </author>
     <date month='November' year='2008' />
     </front>
     <refcontent>World Wide Web Consortium Recommendation REC-xml-20081126</refcontent>
     </reference>
      </references>

    <references title="Informative References">
      <?rfc include="reference.I-D.ietf-rtgwg-ni-model"?>

      <?rfc include="reference.I-D.ietf-rtgwg-lne-model"?>

      <?rfc include="reference.I-D.ietf-lime-yang-connectionless-oam"?>

      <?rfc include="reference.RFC.8342"?>
    </references>
    <section anchor="ECHO-CONFIG" title="Echo function configuration example"> numbered="true" toc="default">
      <name>Echo Function Configuration Example</name>
      <t>As mentioned in <xref target="IP-SH-CFG"/>, target="IP-SH-CFG" format="default"/>, the mechanism to start
      and stop the echo Echo function, as defined in <xref target="RFC5880"/> target="RFC5880"
      format="default"/> and discussed in
      <xref target="RFC5881"/>, target="RFC5881" format="default"/>, is implementation specific. In this section appendix, we
      provide an example of how the echo Echo function can be implemented via
      configuration.</t>

      <figure align="left">
        <preamble/>

        <artwork align="left"><![CDATA[
      <sourcecode type="yangtree"><![CDATA[
module: example-bfd-echo
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh
            /bfd-ip-sh:sessions:
    +--rw echo {bfd-types:echo-mode}?
       +--rw desired-min-echo-tx-interval?    uint32
       +--rw required-min-echo-rx-interval?   uint32
                     ]]></artwork>
      </figure>
]]></sourcecode>
      <section title="Example numbered="true" toc="default">
        <name>Example YANG Module for BFD Echo Function Configuration</name>
        <t>This appendix provides an example YANG module for
        configuration of the BFD echo function configuration">
        <figure align="left">
          <preamble/>

          <artwork align="left"><![CDATA[ Echo function.  It imports and augments
        "/routing/control-plane-protocols/control-plane-protocol" from
        <xref target="RFC8349"/>, and it references <xref target="RFC5880"/>.
        </t>
<sourcecode type="yang"><![CDATA[
module example-bfd-echo {
  namespace "tag:example.com,2018:example-bfd-echo"; "tag:example.com,2021:example-bfd-echo";
  prefix "example-bfd-echo"; example-bfd-echo;

  import ietf-bfd-types {
    prefix "bfd-types"; bfd-types;
  }
  import ietf-bfd {
    prefix "bfd"; bfd;
  }
  import ietf-bfd-ip-sh {
    prefix "bfd-ip-sh"; bfd-ip-sh;
  }
  import ietf-routing {
    prefix "rt"; rt;
  }

  organization
    "IETF BFD Working Group";
  contact
    "WG Web:   <http://tools.ietf.org/wg/bfd>   <https://datatracker.ietf.org/wg/bfd/>
     WG List:  <rtg-bfd@ietf.org>

     Editors:  <mailto:rtg-bfd@ietf.org>

     Editor:   Reshad Rahman (rrahman@cisco.com),
               <mailto:reshad@yahoo.com>

     Editor:   Lianshu Zheng (vero.zheng@huawei.com),
               <mailto:veronique_cheng@hotmail.com>

     Editor:   Mahesh Jethanandani (mjethanandani@gmail.com)";
               <mailto:mjethanandani@gmail.com>";
  description
    "This module contains an example YANG augmentation for
     configuration of the BFD echo Echo function.

     Copyright (c) 2018 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).
     (https://trustee.ietf.org/license-info).

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

  revision 2018-08-01 2021-09-03 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: A 9127: YANG data model example augmentation Data Model for BFD echo
       function"; Bidirectional Forwarding
       Detection (BFD)";
  }

  // RFC Ed.: replace XXXX with actual RFC number and remove this
  // note

  /*
   * Groupings
   */

  grouping echo-cfg-parms {
    description
      "BFD grouping for echo config parameters"; Echo configuration parameters.";
    leaf desired-min-echo-tx-interval {
      type uint32;
      units microseconds; "microseconds";
      default 0; "0";
      description
        "This is the minimum interval that the local system would
         like to use when transmitting BFD echo Echo packets.  If 0,
         the echo Echo function as defined in BFD [RFC5880] (RFC 5880) is
         disabled.";
    }
    leaf required-min-echo-rx-interval {
      type uint32;
      units microseconds; "microseconds";
      default 0; "0";
      description
        "This is the Required Min Echo RX Interval as defined in BFD
        [RFC5880].";
         (RFC 5880).";
    }
  }

  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol/bfd:bfd/bfd-ip-sh:ip-sh/"
        + "bfd-ip-sh:sessions" {
    description
      "Augmentation for the BFD echo Echo function.";
    container echo {
      if-feature bfd-types:echo-mode; "bfd-types:echo-mode";
      description
        "BFD echo Echo function container"; container.";
      uses echo-cfg-parms;
    }
  }
}
        ]]></artwork>
        </figure>
]]></sourcecode>
      </section>
    </section>
    <section title="Change log">
      <t>RFC Editor: Remove this section upon publication as an RFC.</t>

      <section title="Changes between versions -16 and -17">
        <t><list style="symbols">
            <t>Addressed IESG comments.</t>
          </list></t>
      </section>

      <section title="Changes between versions -15 and -16">
        <t><list style="symbols">
            <t>Added list of modules for YANG module registry.</t>
          </list></t>
      </section>

      <section title="Changes between versions -14 and -15">
        <t><list style="symbols">
            <t>Added missing ietf-bfd-types in XML registry.</t>
          </list></t>
      </section>

      <section title="Changes between versions -13 and -14">
        <t><list style="symbols">
            <t>Addressed missing/incorrect references in import statements.</t>
          </list></t>
      </section>

      <section title="Changes between versions -12 and -13">
        <t><list style="symbols">
            <t>Updated references for drafts which became RFCs recently.</t>
          </list></t>
      </section>

      <section title="Changes between versions -11 and -12">
        <t><list style="symbols">
            <t>Addressed comments from YANG Doctor review of rev11.</t>
          </list></t>
      </section>

      <section title="Changes between versions -10 and -11">
        <t><list style="symbols">
            <t>Added 2 examples.</t>

            <t>Added a container around some lists.</t>

            <t>Fixed some indentation nits.</t>
          </list></t>
      </section>

      <section title="Changes between versions -09 and -10">
        <t><list style="symbols">
            <t>Addressed comments from YANG Doctor review.</t>

            <t>Addressed comments from WGLC.</t>
          </list></t>
      </section>

      <section title="Changes between versions -08 and -09">
        <t><list style="symbols">
            <t>Mostly cosmetic changes numbered="false" toc="default">
      <name>Acknowledgments</name>
      <t>We would like to abide by
            draft-ietf-netmod-rfc6087bis.</t>

            <t>Specified yang-version 1.1.</t>

            <t>Added data model examples.</t>

            <t>Some minor changes.</t>
          </list></t>
      </section>

      <section title="Changes between versions -07 and -08">
        <t><list style="symbols">
            <t>Timer intervals in client-cfg-parms are not mandatory
            anymore.</t>

            <t>Added list of interfaces under "ip-sh" node thank <contact fullname="Nobo Akiya"/> and
      <contact fullname="Jeff Haas"/> for authentication
            parameters.</t>

            <t>Renamed replay-protection their encouragement on this work.
      We would also like to meticulous.</t>
          </list></t>
      </section>

      <section title="Changes between versions -06 and -07">
        <t><list style="symbols">
            <t>New ietf-bfd-types module.</t>

            <t>Grouping thank <contact fullname="Tom Petch"/> for BFD clients to have BFD multiplier and interval
            values.</t>

            <t>Change in ietf-bfd-mpls-te since MPLS-TE model changed.</t>

            <t>Removed bfd- prefix from many names.</t>
          </list></t>
      </section>

      <section title="Changes between versions -05 and -06">
        <t><list style="symbols">
            <t>Adhere to NMDA-guidelines.</t>

            <t>Echo function config moved to appendix as example.</t>

            <t>Added IANA YANG modules.</t>

            <t>Addressed various comments.</t>
          </list></t>
      </section>

      <section title="Changes between versions -04 and -05">
        <t><list style="symbols">
            <t>"bfd" node in augment of control-plane-protocol.</t>

            <t>Removed augment of network-instance. Replaced by
            schema-mount.</t>

            <t>Added information his
      comments on interaction with other YANG modules.</t>
          </list></t>
      </section>

      <section title="Changes between versions -03 and -04">
        <t><list style="symbols">
            <t>Updated author information.</t>

            <t>Fixed YANG compile error in ietf-bfd-lag.yang which was due the document. We would also like to
            incorrect when statement.</t>
          </list></t>
      </section>

      <section title="Changes between versions -02 and -03">
        <t><list style="symbols">
            <t>Fixed YANG compilation warning due thank
      <contact fullname="Acee Lindem"/> for his guidance. Thanks also to incorrect revision date
            in ietf-bfd-ip-sh module.</t>
          </list></t>
      </section>

      <section title="Changes between versions -01 and -02">
        <t><list style="symbols">
            <t>Replace routing-instance with network-instance from <xref
            target="I-D.ietf-rtgwg-ni-model">YANG Network Instances</xref></t>
          </list></t>
      </section>

      <section title="Changes between versions -00 and -01">
        <t><list style="symbols">
            <t>Remove BFD configuration parameters from BFD clients, all BFD
            configuration parameters in BFD</t>

            <t>YANG module split
      <contact fullname="Jürgen Schönwälder"/>, who was instrumental in multiple improving the YANG modules (one per type of
            forwarding path)</t>

            <t>For BFD over MPLS-TE we augment MPLS-TE model</t>

            <t>For BFD authentication we now use <xref target="RFC8177">YANG
            Data Model for Key Chains</xref></t>
          </list></t>
      </section>
      modules.</t>
    </section>
  </back>
</rfc>