<?xml version="1.0" encoding="US-ASCII"?> version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
    <!ENTITY RFC905 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.0905.xml'>
    <!ENTITY RFC1765 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.1765.xml'>
    <!ENTITY RFC1793 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.1793.xml'>
    <!ENTITY RFC2119 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
    <!ENTITY RFC2328 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2328.xml'>
    <!ENTITY RFC3623 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3623.xml'>
    <!ENTITY RFC3630 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3630.xml'>
    <!ENTITY RFC3688 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3688.xml'>
    <!ENTITY RFC4552 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4552.xml'>
    <!ENTITY RFC4915 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4915.xml'>
    <!ENTITY RFC5185 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5185.xml'>
    <!ENTITY RFC5187 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5187.xml'>
    <!ENTITY RFC5309 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5309.xml'>
    <!ENTITY RFC3101 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3101.xml'>
    <!ENTITY RFC4576 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4576.xml'>
    <!ENTITY RFC4577 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4577.xml'>
    <!ENTITY RFC4750 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4750.xml'>
    <!ENTITY RFC4973 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4973.xml'>
    <!ENTITY RFC5082 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5082.xml'>
    <!ENTITY RFC5250 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5250.xml'>
    <!ENTITY RFC5286 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5286.xml'>
    <!ENTITY RFC5329 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5329.xml'>
    <!ENTITY RFC5340 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5340.xml'>
    <!ENTITY RFC5443 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5443.xml'>
     <!ENTITY RFC5613 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5613.xml'>
     <!ENTITY RFC5642 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5642.xml'>
     <!ENTITY RFC5643 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5643.xml'>
     <!ENTITY RFC5649 PUBLIC ''
       'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5649.xml'>
    <!ENTITY RFC5709 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5709.xml'>
    <!ENTITY RFC5714 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5714.xml'>
    <!ENTITY RFC5838 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5838.xml'>
    <!ENTITY RFC5880 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5880.xml'>
    <!ENTITY RFC5881 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5881.xml'>
    <!ENTITY RFC6020 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6020.xml'>
    <!ENTITY RFC6241 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6241.xml'>
    <!ENTITY RFC6242 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6242.xml'>
    <!ENTITY RFC6565 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6565.xml'>
    <!ENTITY RFC6860 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6860.xml'>
    <!ENTITY RFC6845 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6845.xml'>
    <!ENTITY RFC6987 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6987.xml'>
    <!ENTITY RFC6991 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6991.xml'>
    <!ENTITY RFC7166 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7166.xml'>
    <!ENTITY RFC7474 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7474.xml'>
    <!ENTITY RFC7490 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7490.xml'>
    <!ENTITY RFC7684 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7684.xml'>
    <!ENTITY RFC7770 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7770.xml'>
    <!ENTITY RFC7777 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7777.xml'>
    <!ENTITY RFC7884 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7884.xml'>
    <!ENTITY RFC7950 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7950.xml'>
    <!ENTITY RFC8040 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8040.xml'>
    <!ENTITY RFC8174 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml'>
    <!ENTITY RFC8177 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8177.xml'>
    <!ENTITY RFC8294 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8294.xml'>
    <!ENTITY RFC8340 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8340.xml'>
    <!ENTITY RFC8341 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8341.xml'>
    <!ENTITY RFC8342 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8342.xml'>
    <!ENTITY RFC8343 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8343.xml'>
    <!ENTITY RFC8349 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8349.xml'>
    <!ENTITY RFC8405 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8405.xml'>
    <!ENTITY RFC8446 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8446.xml'>
    <!ENTITY RFC8476 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8476.xml'>
    <!ENTITY I-D.ietf-bfd-yang PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml-ids/reference.I-D.draft-ietf-bfd-yang-17.xml'>
    ]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="no" ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>

<?rfc rfcedstyle="yes" ?>
<?rfc subcompact="no" ?> "rfc2629-xhtml.ent">

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std"
     docName="draft-ietf-ospf-yang-29" ipr="trust200902"> number="9129" ipr="trust200902"
     obsoletes="" updates="" submissionType="IETF" consensus="true" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" version="3">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN"
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** xml2rfc v2v3 conversion 2.47.0 -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the
         full title is longer than 39 characters -->
  <title abbrev="OSPF YANG Data Model">YANG Data Model for the OSPF Protocol
    </title>

<!-- add 'role="editor"' below [rfced] Document title:  We changed "for OSPF Protocol" to
"for the OSPF Protocol".  Please let us know any objections.

Original:
 YANG Data Model for OSPF Protocol

Currently:
 YANG Data Model for the editors if appropriate -->

    <!-- Another author who claims to be an editor OSPF Protocol -->

    <seriesInfo name="RFC" value="9129"/>
    <author fullname="Derek Yeung" initials="D" surname="Yeung">
      <organization>Arrcus</organization>
      <address>
        <phone></phone>
        <email>derek@arrcus.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>
    <author fullname="Yingzhen Qu" initials="Y" surname="Qu">
      <organization>Futurewei</organization>
      <address>
        <postal>
          <street>2330 Central Expressway</street>

          <!-- Reorder these if your country does things differently -->
          <city>Santa Clara</city>
          <region>CA</region>
          <code>95050</code>

          <country>USA</country>
          <country>United States of America</country>
        </postal>

        <phone></phone>
        <email>yingzhen.qu@futurewei.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>
    <author fullname="Jeffrey Zhang" initials="J" surname="Zhang">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street>10 Technology Park Drive</street>

          <!-- Reorder these if your country does things differently -->
          <city>Westford</city>
          <region>MA</region>
          <code>01886</code>

          <country>USA</country>
          <country>United States of America</country>
        </postal>
        <phone></phone>
        <email>zzhang@juniper.net</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>
    <author fullname="Ing-Wher Chen" initials="I." surname="Chen">
      <organization>The MITRE Corporation</organization>
      <address>
        <email>ingwherchen@mitre.org</email>
      </address>
    </author>
    <author fullname="Acee Lindem" initials="A." surname="Lindem">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>301 Midenhall Way</street>
          <city>Cary, NC 27513</city>
          <city>Cary</city>
          <region>NC</region>
          <code>27513</code>
         <country>United States of America</country>
        </postal>
        <email>acee@cisco.com</email>
      </address>
    </author>
    <date/>
    <date month="September" year="2021"/>

<!-- If the month and year are both specified and are the current ones, xml2rfc will fill
         in the current day for you. If only the current year is specified, xml2rfc will fill [rfced] Please insert any keywords (beyond those that appear in the current day and month for you. If the year is not the current one, it is
   necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the
   purpose of calculating the expiry date).  With drafts it is normally sufficient to
   specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>General</area>

    <workgroup>Internet</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine
title) for individual submissions.
   If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect use on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. https://www.rfc-editor.org/search -->

    <abstract>
      <t>This document defines a YANG data model that can be
      used to configure and manage OSPF. The model is based on
      YANG 1.1 as defined in RFC 7950 and conforms to the
      Network Management Datastore Architecture (NMDA) as described
      in RFC 8342.</t>
    </abstract>
  </front>
  <middle>
    <section title="Overview">
      <t>YANG <xref target="RFC6020"></xref><xref target="RFC7950"/> is a data
      definition language used to define numbered="true" toc="default">
      <name>Overview</name>

<!-- [rfced] Section 1:  Because Section 2.2 also has the contents title
"Overview", may we change the title of a conceptual data store
      that allows networked devices Section 1 to be managed using NETCONF
      <xref target="RFC6241"></xref>, RESTCONF <xref target="RFC8040"/>, and other
      Network Management protocols. Furthermore, "Introduction"?

Original:
 1.  Overview  . . . . . . . . . . . . . . . . . . . . . . . . . .   2
   1.1.  Requirements Language . . . . . . . . . . . . . . . . . .   3
   1.2.  Tree Diagrams . . . . . . . . . . . . . . . . . . . . . .   3
 2.  Design of Data Model  . . . . . . . . . . . . . . . . . . . .   3
   2.1.  OSPF Operational State  . . . . . . . . . . . . . . . . .   3
   2.2.  Overview  . . . . . . . . . . . . . . . . . . . . . . . .   4

Suggested:
 1.  Introduction -->

      <t>YANG <xref target="RFC6020" format="default"/> <xref target="RFC7950" format="default"/> is a data
      definition language used to define the contents of a conceptual datastore
      that allows networked devices to be managed using the Network
      Configuration Protocol (NETCONF)
      <xref target="RFC6241" format="default"/>, RESTCONF <xref target="RFC8040" format="default"/>, and other
      network management protocols. Furthermore,
      YANG data models can be used as the basis for implementation of other
      interfaces, such as CLIs and programmatic APIs.

<!-- [rfced] Section 1:  Does "CLI" stand for "Command-Line Interface"
or "Call Level Interface" in this document?

Original:
 Furthermore, YANG data models can be
 used as the basis for implementation of other interfaces, such as CLI
 and programmatic APIs.</t> APIs. -->

</t>
      <t>This document defines a YANG data model that can be used to configure
    and manage OSPF and it OSPF. It is an augmentation to the core routing data model.
    It fully conforms to the Network Management Datastore Architecture (NMDA)
    <xref target="RFC8342"/>.
    A core routing data model model,
    which is defined in <xref target="RFC8349"></xref>, target="RFC8349" format="default"/> and it
    provides the basis for the development of data models for routing
    protocols.  This document fully conforms to the Network Management Datastore Architecture (NMDA)
    <xref target="RFC8342" format="default"/>. The interface data model is defined in
    <xref target="RFC8343"></xref> target="RFC8343" format="default"/> and is used for referencing
    interfaces from the routing protocol. The key-chain data model for key chains
    <xref target="RFC8177" format="default"/> is used for
    OSPF authentication is defined in <xref target="RFC8177"></xref> and provides both a reference to configured key-chains key chains and an
    enumeration of cryptographic algorithms.</t>
      <t>Both OSPFv2 <xref target="RFC2328"></xref> target="RFC2328" format="default"/> and OSPFv3
    <xref target="RFC5340"></xref> target="RFC5340" format="default"/> are supported.  In addition to
    the core OSPF protocol, features described in other
    OSPF RFCs are also supported. These includes include demand circuit circuits
    <xref target="RFC1793"></xref>, traffic engineering target="RFC1793" format="default"/>, Traffic Engineering (TE) <xref target="RFC3630"></xref>, target="RFC3630" format="default"/>,
    multiple address family families <xref target="RFC5838"></xref>, target="RFC5838" format="default"/>, graceful restart
    <xref target="RFC3623"></xref> target="RFC3623" format="default"/> <xref target="RFC5187"></xref>,
    NSSA target="RFC5187" format="default"/>,
    the Not-So-Stubby Area (NSSA) option <xref target="RFC3101"></xref>, target="RFC3101"
    format="default"/>, and OSPFv2 or OSPFv3 as a PE-CE Protocol Provider Edge to Customer
    Edge (PE-CE) protocol
    <xref target="RFC4577"></xref>, target="RFC4577" format="default"/> <xref target="RFC6565"></xref>. target="RFC6565" format="default"/>.
    These non-core features are optional in the OSPF data model.</t>
      <section title="Requirements Language"> numbered="true" toc="default">
        <name>Requirements Language</name>
       <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
        NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
        "MAY", "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
       "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>",
       "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>",
       "<bcp14>SHOULD NOT</bcp14>",
       "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
       "<bcp14>MAY</bcp14>", and "OPTIONAL" "<bcp14>OPTIONAL</bcp14>" in this document
       are to be interpreted as described in BCP 14 BCP&nbsp;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
          defined in
        per <xref target="RFC8340"/>.</t> target="RFC8340" format="default"/>.</t>
      </section>
    </section>
    <section title="Design numbered="true" toc="default">
      <name>Design of Data Model"> Model</name>
      <t>Although the basis of OSPF configuration elements like routers,
    areas, and interfaces remains the same, the detailed configuration
    model varies among router vendors.  Differences are observed in terms
    of how the protocol instance is tied to the routing domain and how multiple
    protocol instances are to be instantiated among others.

<!-- [rfced] Section 2:  Does "instantiated among others" mean
"instantiated, among other things", "instantiated among other
protocol instances", or something else?

Original ("are be" has been fixed):
 Differences are observed in terms
 of how the protocol instance is tied to the routing domain and how
 multiple protocol instances are be instantiated among others.</t> others.

Perhaps:
  Differences are observed in various aspects, including in terms
  of how the protocol instance is tied to the routing domain and how
  multiple protocol instances are instantiated.
-->

</t>
      <t>The goal of this document is to define a data model that provides a  user interface that is common to both OSPFv2 and OSPFv3.

<!-- [rfced] Section 2:  As it appears that "common" here indicates
that OSPFv2 and OSPFv3 have the user interface in common (as opposed
"often seen"), we updated this sentence accordingly.  Please let us
know if this is incorrect.

Original:
 The goal of this document is to define a data model that provides a
 common user interface to the OSPFv2 and OSPFv3 protocols.

Currently:
 The goal of this document is to define a data model that provides a
 user interface that is common to both OSPFv2 and OSPFv3. -->

 There is very little information that is
    designated as "mandatory", providing freedom for vendors to adapt this data model to their
    respective product implementations.</t>
      <section title="OSPF numbered="true" toc="default">
        <name>OSPF Operational State"> State</name>
        <t>The OSPF operational state is included in the same tree as OSPF configuration configuration,
    consistent with the Network Management Datastore Architecture
    <xref target="RFC8342"></xref>. target="RFC8342" format="default"/>. Consequently, only the routing "routing" container
    in the ietf-routing "ietf-routing" model <xref target="RFC8349"/> target="RFC8349" format="default"/> is augmented. The routing-state augmented; the "routing-state" container
    is not augmented.</t>
      </section>
      <section title="Overview"> numbered="true" toc="default">
        <name>Overview</name>
        <t>The OSPF YANG module defined in this document has all the common building
   blocks for the OSPF protocol.</t>
        <t>The OSPF YANG module augments the /routing/control-plane-protocols/control-plane-protocol "/routing/control-plane-protocols/control-plane-protocol"
    path defined in the ietf-routing "ietf-routing" module. The ietf-ospf "ietf-ospf" model defines a single instance of
    OSPF which that may be instantiated as an OSPFv2 or OSPFv3 instance. Multiple instances are
    instantiated as multiple control-plane protocols protocol instances.</t>

    <figure align="center">
      <artwork align="left">
    <sourcecode name="" type="yangtree"><![CDATA[
module: ietf-ospf
  augment /rt:routing/rt:control-plane-protocols/
           rt:control-plane-protocol:
    +--rw ospf
          .
          .
       +--rw af?                      identityref
          .
          .
       +--rw areas
       |  +--rw area* [area-id]
       |     +--rw area-id                   area-id-type
       |        .
       |        .
       |     +--rw virtual-links
       |     |  +--rw virtual-link* [transit-area-id router-id]
       |     |     .
       |     |     .
       |     +--rw sham-links {pe-ce-protocol}?
       |     |  +--rw sham-link* [local-id remote-id]
       |     |     .
       |     |     .
       |     +--rw interfaces
       |        +--rw interface* [name]
       |           .
       |           .
       +--rw topologies {multi-topology}?
          +--rw topology* [name]
             .
             .
      </artwork>
    </figure>
             .]]></sourcecode>

        <t>The ospf "ospf" container includes one OSPF protocol instance.
    The instance includes OSPF router level router-level configuration and operational
    state. Each OSPF instance maps to a control-plane-protcol control-plane protocol instance as
    defined in <xref target="RFC8349"/>.</t> target="RFC8349" format="default"/>.</t>
        <t>The "area" and "area/interface" containers
    define the OSPF configuration and operational state for OSPF areas
    and interfaces, respectively.

<!-- [rfced] Section 2.2:  We do not see a "container area" or
"container interface", but we do see "container areas" and
"container interfaces" (which appears to be a subcontainer of
"container areas", as opposed to the "container interface" that
appears under "grouping notification-interface").  Please let us
know if this sentence should be updated.

Original:
 The area and area/interface containers define the OSPF configuration
 and operational state for OSPF areas and interfaces respectively.</t> respectively. -->

</t>
        <t>The topologies "topologies" container defines the OSPF configuration and operational
    state for OSPF topologies when the multi-topology "multi-topology" feature is supported.</t>
      </section>
      <section title="OSPFv2 numbered="true" toc="default">
        <name>OSPFv2 and OSPFv3"> OSPFv3</name>
        <t>The data model defined herein supports both OSPFv2 and OSPFv3.</t>
        <t>The "version" field 'version' is used to indicate the OSPF version and is
      mandatory.  Based on the configured version, the data model varies
      to accommodate the differences between OSPFv2 and OSPFv3.</t>
      </section>
      <section title="Optional Features"> numbered="true" toc="default">
        <name>Optional Features</name>
        <t>Optional features go beyond the basic OSPF configuration.

<!-- [rfced] Section 2.4:  We changed "are beyond" to "go beyond"
in this sentence.  If this is incorrect, please clarify the
meaning of "are beyond" here.

Original:
 Optional features are beyond the basic OSPF configuration and it is
 the responsibility of each vendor to decide whether to support a
 given feature on a particular device.</t>
      <t>This model defines device.

Currently:
 Optional features go beyond the following optional features:
     <list style="numbers">
       <t>multi-topology: Support Multi-Topology Routing (MTR)
         <xref target="RFC4915"/>.</t>
       <t>multi-area-adj: Support basic OSPF multi-area adjacency
         <xref target="RFC5185"/>.</t>
       <t>explicit-router-id: Support explicit configuration.  It is the
 responsibility of each vendor to decide whether to support a given
 feature on a particular device. -->

      It is the responsibility of each vendor to decide whether to
      support a given feature on a particular device.</t>
        <t>This model defines the following optional features:
        </t>
        <dl newline="false" spacing="normal">
          <dt>multi-topology:</dt><dd>Support for Multi-Topology (MT) routing
         <xref target="RFC4915" format="default"/>.</dd>
          <dt>multi-area-adj:</dt><dd>Support for OSPF multi-area adjacencies
         <xref target="RFC5185" format="default"/>.</dd>
          <dt>explicit-router-id:</dt><dd>Support for the specification of an explicit per-instance Router-ID
          specification.</t>
       <t>demand-circuit: Support Router ID.</dd>
          <dt>demand-circuit:</dt><dd>Support for OSPF demand circuits
          <xref target="RFC1793"/>.</t>
       <t>mtu-ignore: Support target="RFC1793" format="default"/>.</dd>
          <dt>mtu-ignore:</dt><dd>Support for the disabling of OSPF Database Description
          packet MTU mismatch checking as specified in section 10.6 of <xref target="RFC2328"/>.</t>
       <t>lls: Support target="RFC2328"
          sectionFormat="of" section="10.6"/>.</dd>
          <dt>lls:</dt><dd>Support for OSPF link-local signaling (LLS)
          <xref target="RFC5613"/>.</t>
       <t>prefix-suppression: Support target="RFC5613" format="default"/>.</dd>
          <dt>prefix-suppression:</dt><dd>Support for OSPF prefix advertisement
          suppression <xref target="RFC6860"/>.</t>
       <t>ttl-security: Support target="RFC6860" format="default"/>.</dd>
          <dt>ttl-security:</dt><dd>Support for OSPF Time to Live (TTL) security check
          support checking
          <xref target="RFC5082"/>.</t>
       <t>nsr: Support target="RFC5082" format="default"/>.</dd>
          <dt>nsr:</dt><dd>Support for OSPF Non-Stop Routing (NSR). The OSPF NSR feature allows a router with redundant control-plane capability (e.g., dual Route-Processor Route Processor (RP)
         cards) to maintain its state and adjacencies during planned and unplanned
         control-plane processing restarts. It differs from graceful-restart graceful restart or Non-Stop
         Forwarding (NSF) in that no protocol signaling or assistance from adjacent OSPF
         neighbors is required to recover control-plane state.</t>
       <t>graceful-restart: Support Graceful state.</dd>
          <dt>graceful-restart:</dt><dd>Support for graceful OSPF Restart restart
          <xref target="RFC3623"/>, target="RFC3623" format="default"/> <xref target="RFC5187"/>.</t>
       <t>auto-cost: Support target="RFC5187" format="default"/>.</dd>
          <dt>auto-cost:</dt><dd>Support for OSPF interface cost calculation calculations according to
         reference bandwidth <xref target="RFC2328"/>.</t>
       <t>max-ecmp: Support target="RFC2328" format="default"/>.</dd>
          <dt>max-ecmp:</dt><dd>Support for configuration of the maximum number of
          Equal-Cost Multi-Path (ECMP) paths.</t>
       <t>max-lsa: Support paths.</dd>
          <dt>max-lsa:</dt><dd>Support for configuration of the maximum number
          of LSAs Link State Advertisements (LSAs)
          the OSPF instance will accept <xref target="RFC1765"/>.</t>
       <t>te-rid: Support target="RFC1765" format="default"/>.</dd>
          <dt>te-rid:</dt><dd>Support for configuration of the Traffic Engineering (TE)
          Router-ID,
          Router ID, i.e., the Router Address TLV as described in Section 2.4.1
          of <xref target="RFC3630"/>
          target="RFC3630" sectionFormat="of" section="2.4.1"/> or the Router
          IPv6 Address TLV as
          described in Section 3 of <xref target="RFC5329"/>.</t>
       <t>ldp-igp-sync: Support target="RFC5329" sectionFormat="of" section="3"/>.</dd>
          <dt>ldp-igp-sync:</dt><dd>Support for LDP IGP synchronization
          <xref target="RFC5443"/>.</t>
       <t>ospfv2-authentication-trailer: Support target="RFC5443" format="default"/>.</dd>
          <dt>ospfv2-authentication-trailer:</dt><dd>Support for the OSPFv2 Authentication
          trailer
          Trailer as specified in <xref target="RFC5709"/> or target="RFC5709" format="default"/> and
          <xref target="RFC7474"/>.</t>
       <t>ospfv3-authentication-ipsec: Support target="RFC7474" format="default"/>.</dd>
          <dt>ospfv3-authentication-ipsec:</dt><dd>Support for IPsec for OSPFv3
          authentication <xref target="RFC4552"/>.</t>
       <t>ospfv3-authentication-trailer: Support target="RFC4552" format="default"/>.</dd>
          <dt>ospfv3-authentication-trailer:</dt><dd>Support for the OSPFv3 Authentication
          trailer
          Trailer as specified in <xref target="RFC7166"/>.</t>
       <t>fast-reroute: Support target="RFC7166" format="default"/>.</dd>
          <dt>fast-reroute:</dt><dd>Support for IP Fast Reroute (IP-FRR)
          <xref target="RFC5714"/>.</t>
       <t>node-flag: Support node-flag target="RFC5714" format="default"/>.</dd>
          <dt>node-flag:</dt><dd>Support for node flags for OSPF prefixes. prefixes
          <xref target="RFC7684"/>.</t>
       <t>node-tag: Support target="RFC7684" format="default"/>.</dd>
          <dt>node-tag:</dt><dd>Support for node admin tag administrative tags for OSPF instances
          <xref target="RFC7777"/>.</t>
       <t>lfa: Support target="RFC7777" format="default"/>.</dd>
          <dt>lfa:</dt><dd>Support for Loop-Free Alternates (LFAs)
          <xref target="RFC5286"/>.</t>
       <t>remote-lfa: Support target="RFC5286" format="default"/>.</dd>
          <dt>remote-lfa:</dt><dd>Support for Remote Loop-Free Alternates (R-LFA) LFAs (R-LFAs)
          <xref target="RFC7490"/>.</t>
       <t>stub-router: Support RFC 6987 target="RFC7490" format="default"/>.</dd>
          <dt>stub-router:</dt><dd>Support for OSPF Stub Router
          advertisement stub router
          advertisements as defined in <xref target="RFC6987"/>.</t>
       <t>pe-ce-protocol: Support target="RFC6987" format="default"/>.</dd>
          <dt>pe-ce-protocol:</dt><dd>Support for OSPF as a PE-CE protocol
          <xref target="RFC4577"/>, target="RFC4577" format="default"/> <xref target="RFC6565"/>.</t>
       <t>ietf-spf-delay: Support target="RFC6565" format="default"/>.</dd>
          <dt>ietf-spf-delay:</dt><dd>Support for the IETF SPF Shortest Path First (SPF) delay algorithm
          <xref target="RFC8405"/>.</t>
       <t>bfd: Support BFD detection of target="RFC8405" format="default"/>.</dd>
          <dt>bfd:</dt><dd>Support for Bidirectional Forwarding Detection
          (BFD) to detect OSPF neighbor reachability
          <xref target="RFC5880"/>, target="RFC5880" format="default"/> <xref target="RFC5881"/>, target="RFC5881"
          format="default"/> <xref target="RFC9127"/>.</dd>
          <dt>hybrid-interface:</dt><dd>Support for OSPF Hybrid Broadcast and point-to-point
          interfaces <xref target="I-D.ietf-bfd-yang"/>.</t>
       <t>hybrid-interface: target="RFC6845" format="default"/>.</dd>

<!-- [rfced] Section 2.4:  Should "Point-to-Point Interfaces" be
"point-to-multipoint interfaces" or "a collection of point-to-point
interfaces" here, per RFC 6845?

Original:
 28.  hybrid-interface: Support OSPF Hybrid Broadcast and Point-to-Point Point-to-
      Point Interfaces <xref target="RFC6845"/>.</t>
      </list></t> [RFC6845]. -->

        </dl>
        <t>It is expected that vendors will support additional
      features through vendor-specific augmentations.</t>
      </section>
      <section title="OSPF numbered="true" toc="default">
        <name>OSPF Router Configuration/Operational State"> Configuration / Operational State</name>
        <t>The ospf "ospf" container is the top-level container in this data model.
    It represents an OSPF protocol instance and contains the router level router-level
    configuration and operational state.
    The operational state includes the instance statistics, IETF SPF delay statistics,
    the AS-Scoped Link State Database, Database (LSDB), the local RIB, the SPF Log, log, and the LSA log.</t>

    <figure align="center">
      <artwork align="left"> log. ("AS" stands for "Autonomous System".)</t>
    <sourcecode name="" type="yangtree"><![CDATA[
module: ietf-ospf
  augment /rt:routing/rt:control-plane-protocols/
           rt:control-plane-protocol:
    +--rw ospf
       .
       .
       +--rw af                    iana-rt-types:address-family
       +--rw enable?               boolean
       +--rw explicit-router-id?   rt-types:router-id
       |                           {explicit-router-id}?
       +--rw preference
       |  +--rw (scope)?
       |     +--:(single-value)
       |     |  +--rw all?          uint8
       |     +--:(multi-values)
       |        +--rw (granularity)?
       |        |  +--:(detail)
       |        |  |  +--rw intra-area?   uint8
       |        |  |  +--rw inter-area?   uint8
       |        |  +--:(coarse)
       |        |     +--rw internal?     uint8
       |        +--rw external?     uint8
       +--rw nsr {nsr}?
       |  +--rw enable?   boolean
       +--rw graceful-restart {graceful-restart}?
       |  +--rw enable?                       boolean
       |  +--rw helper-enable?                boolean
       |  +--rw restart-interval?             uint16
       |  +--rw helper-strict-lsa-checking?   boolean
       +--rw auto-cost {auto-cost}?
       |  +--rw enable?                boolean
       |  +--rw reference-bandwidth?   uint32
       +--rw spf-control
       |  +--rw paths?            uint16 {max-ecmp}?
       |  +--rw ietf-spf-delay {ietf-spf-delay}?
       |     +--rw initial-delay?   uint16
       |     +--rw short-delay?     uint16
       |     +--rw long-delay?      uint16
       |     +--rw hold-down?       uint16
       |     +--rw time-to-learn?   uint16
       |     +--ro current-state?             enumeration
       |     +--ro remaining-time-to-learn?   uint16
       |     +--ro remaining-hold-down?       uint16
       |     +--ro last-event-received?       yang:timestamp
       |     +--ro next-spf-time?             yang:timestamp
       |     +--ro last-spf-time?             yang:timestamp
       +--rw database-control
       |  +--rw max-lsa?   uint32 {max-lsa}?
       +--rw stub-router {stub-router}?
       |  +--rw (trigger)?
       |     +--:(always)
       |        +--rw always!
       +--rw mpls
       |  +--rw te-rid {te-rid}?
       |  |  +--rw ipv4-router-id?   inet:ipv4-address
       |  |  +--rw ipv6-router-id?   inet:ipv6-address
       |  +--rw ldp
       |     +--rw igp-sync?   boolean {ldp-igp-sync}?
       +--rw fast-reroute {fast-reroute}?
       |  +--rw lfa {lfa}?
       +--ro protected-routes
       |  +--ro af-stats* [af prefix alternate]
       |     +--ro af                    iana-rt-types:address-family
       |     +--ro prefix                string
       |     +--ro alternate             string
       |     +--ro alternate-type?       enumeration
       |     +--ro best?                 boolean
       |     +--ro non-best-reason?      string
       |     +--ro protection-available? bits
       |     +--ro alternate-metric1?    uint32
       |     +--ro alternate-metric2?    uint32
       |     +--ro alternate-metric3?    uint32
       +--ro unprotected-routes
       |  +--ro af-stats* [af prefix]
       |     +--ro af                    iana-rt-types:address-family
       |     +--ro prefix                string
       +--ro protection-statistics* [frr-protection-method]
       |  +--ro frr-protection-method string
       |  +--ro af-stats* [af]
       |     +--ro af                    iana-rt-types:address-family
       |     +--ro total-routes?         uint32
       |     +--ro unprotected-routes?   uint32
       |     +--ro protected-routes?     uint32
       |     +--ro linkprotected-routes? uint32
       |     +--ro nodeprotected-routes? uint32
       +--rw node-tags {node-tag}?
       |  +--rw node-tag* [tag]
       |     +--rw tag      uint32
       +--ro router-id?
       +--ro local-rib
       |  +--ro route* [prefix]
       |     +--ro prefix        inet:ip-prefix
       |     +--ro next-hops
       |     |  +--ro next-hop* [next-hop]
       |     |     +--ro outgoing-interface?   if:interface-ref
       |     |     +--ro next-hop              inet:ip-address
       |     +--ro metric?       uint32
       |     +--ro route-type?   route-type
       |     +--ro route-tag?    uint32
       +--ro statistics
       |  +--ro discontinuity-time         yang:date-and-time
       |  +--ro originate-new-lsa-count?   yang:counter32
       |  +--ro rx-new-lsas-count?         yang:counter32
       |  +--ro as-scope-lsa-count?        yang:gauge32
       |  +--ro as-scope-lsa-chksum-sum?   uint32
       |  +--ro database
       |     +--ro as-scope-lsa-type*
       |        +--ro lsa-type?        uint16
       |        +--ro lsa-count?       yang:gauge32
       |        +--ro lsa-cksum-sum?   int32
       +--ro database
       |  +--ro as-scope-lsa-type* [lsa-type]
       |     +--ro as-scope-lsas
       |        +--ro as-scope-lsa* [lsa-id adv-router]
       |           +--ro lsa-id               union
       |           +--ro adv-router           inet:ipv4-address
       |           +--ro decoded-completed?   boolean
       |           +--ro raw-data?            yang:hex-string
       |           +--ro (version)?
       |              +--:(ospfv2)
       |              |  +--ro ospfv2
       .              .
       .              .
       |              +--:(ospfv3)
       |                 +--ro ospfv3
       .
       .
       +--ro spf-log
       |  +--ro event* [id]
       |     +--ro id                    uint32
       |     +--ro spf-type?             enumeration
       |     +--ro schedule-timestamp?   yang:timestamp
       |     +--ro start-timestamp?      yang:timestamp
             +--ro end-timestamp?        yang:timestamp
       |     +--ro trigger-lsa*
       |        +--ro area-id?      area-id-type
       |        +--ro link-id?      union
       |        +--ro type?         uint16
       |        +--ro lsa-id?       yang:dotted-quad
       |        +--ro adv-router?   yang:dotted-quad
       |        +--ro seq-num?      uint32
       +--ro lsa-log
       |  +--ro event* [id]
       |     +--ro id                    uint32
       |     +--ro lsa
       |     |  +--ro area-id?      area-id-type
       |     |  +--ro link-id?      union
       |     |  +--ro type?         uint16
       |     |  +--ro lsa-id?       yang:dotted-quad
       |     |  +--ro adv-router?   yang:dotted-quad
       |     |  +--ro seq-num?      uint32
       |     +--ro received-timestamp?   yang:timestamp
       |     +--ro reason?               identityref
       .
       .
      </artwork>
    </figure>
       .]]></sourcecode>

<!-- [rfced] Sections 2.5, 2.6, and 2.7:  Please confirm that the
instances of the "rw enable?" and "leaf enable {" booleans should
not be "rw enabled?" and "leaf enabled {".  We ask because we see
the "enabled" form used more often for such booleans in
published RFCs. -->

      </section>
      <section title="OSPF numbered="true" toc="default">
        <name>OSPF Area Configuration/Operational State"> Configuration / Operational State</name>
        <t>The area "area" container contains OSPF area configuration and the list
    of interface containers representing all the OSPF interfaces
    in the area.
    The area operational state includes the area statistics and the Area
    Link State Database (LSDB).</t>

    <figure align="center">
      <artwork align="left"> area
    LSDB.</t>
    <sourcecode name="" type="yangtree"><![CDATA[
module: ietf-ospf
  augment /rt:routing/rt:control-plane-protocols/
           rt:control-plane-protocol:
    +--rw ospf
       .
       .
       +--rw areas
       |  +--rw area* [area-id]
       |     +--rw area-id                   area-id-type
       |     +--rw area-type?                identityref
       |     +--rw summary?                  boolean
       |     +--rw default-cost?             uint32
       |     +--rw ranges
       |     |  +--rw range* [prefix]
       |     |     +--rw prefix       inet:ip-prefix
       |     |     +--rw advertise?   boolean
       |     |     +--rw cost?        uint24
       |     +--rw topologies {ospf:multi-topology}?
       |     |  +--rw topology* [name]
       |     |     +--rw name  -> ../../../../../../../../
       |     |                    ../../../rt:ribs/rib/name
       |     |     +--rw summary?        boolean
       |     |     +--rw default-cost?   ospf-metric
       |     |     +--rw ranges
       |     |         +--rw range* [prefix]
       |     |            +--rw prefix       inet:ip-prefix
       |     |            +--rw advertise?   boolean
       |     |            +--rw cost?        ospf-metric
       |     +--ro statistics
       |     |  +--ro discontinuity-time           yang:date-and-time
       |     |  +--ro spf-runs-count?              yang:counter32
       |     |  +--ro abr-count?                   yang:gauge32
       |     |  +--ro asbr-count?                  yang:gauge32
       |     |  +--ro ar-nssa-translator-event-count?
       |     |                                     yang:counter32
       |     |  +--ro area-scope-lsa-count?        yang:gauge32
       |     |  +--ro area-scope-lsa-cksum-sum?    int32
       |     |  +--ro database
       |     |     +--ro area-scope-lsa-type*
       |     |        +--ro lsa-type?        uint16
       |     |        +--ro lsa-count?       yang:gauge32
       |     |        +--ro lsa-cksum-sum?   int32
       |     +--ro database
       |     |  +--ro area-scope-lsa-type* [lsa-type]
       |     |     +--ro lsa-type           uint16
       |     |     +--ro area-scope-lsas
       |     |        +--ro area-scope-lsa* [lsa-id adv-router]
       |     |           +--ro lsa-id               union
       .     .           .
       .     .           .
       |     |           +--ro (version)?
       |     |              +--:(ospfv2)
       |     |              |  +--ro ospfv2
       |     |              |     +--ro header
       .     .              .     .
       .     .              .     .
       |     |              |     +--ro body
       |     |              |        +--ro router
       .     .              .        .
       .     .              .        .
       |     |              |        +--ro network
       .     .              .        .
       .     .              .        .
       |     |              |        +--ro summary
       .     .              .        .
       .     .              .        .
       |     |              |        +--ro external
       .     .              .        .
       .     .              .        .
       |     |              |        +--ro opaque
       .     .              .        .
       .     .              .        .
       |     |              +--:(ospfv3)
       |     |                 +--ro ospfv3
       |     |                    +--ro header
       .     .                    .
       .     .                    .
       |     |                    +--ro body
       |     |                       +--ro router
       .     .                       .
       .     .                       .
       |     |                       +--ro network
       .     .                       .
       .     .                       .
       |     |                       +--ro inter-area-prefix
       .     .                       .
       .     .                       .
       |     |                       +--ro inter-area-router
       .     .                       .
       .     .                       .
       |     |                       +--ro as-external
       .     .                       .
       .     .                       .
       |     |                       +--ro nssa
       .     .                       .
       .     .                       .
       |     |                       +--ro link
       .     .                       .
       .     .                       .
       |     |                       +--ro intra-area-prefix
       .     .                       .
       .     .                       .
       |     |                       +--ro router-information
       .     .                       .
       .     .                       .
       |     +--rw virtual-links
       |     |  +--rw virtual-link* [transit-area-id router-id]
       |     |     +--rw transit-area-id       -> ../../../../
       |     |                                    area/area-id
       |     |     +--rw router-id             rt-types:router-id
       |     |     +--rw hello-interval?       uint16
       |     |     +--rw dead-interval?        uint32
       |     |     +--rw retransmit-interval?  uint16
       |     |     +--rw transmit-delay?       uint16
       |     |     +--rw lls?                  boolean {lls}?
       |     |     +--rw ttl-security {ttl-security}?
       |     |     |  +--rw enable?   boolean
       |     |     |  +--rw hops?     uint8
       |     |     +--rw enable?               boolean
       |     |     +--rw authentication
       |     |     |  +--rw (auth-type-selection)?
       |     |     |     +--:(ospfv2-auth)
       |     |     |     |  +--rw ospfv2-auth-trailer-rfc?
       |     |     |     |  |       ospfv2-auth-trailer-rfc-version
       |     |     |     |  |        {ospfv2-authentication-trailer}?
       |     |     |     |  +--rw (ospfv2-auth-specification)?
       |     |     |     |     +--:(auth-key-chain) {key-chain}?
       |     |     |     |     |  +--rw ospfv2-key-chain?
       |     |     |     |     |         key-chain:key-chain-ref
       |     |     |     |     +--:(auth-key-explicit)
       |     |     |     |        +--rw ospfv2-key-id?     uint32
       |     |     |     |        +--rw ospfv2-key?        string
       |     |     |     |        +--rw ospfv2-crypto-algorithm?
       |     |     |     |                identityref
       |     |     |     +--:(ospfv3-auth-ipsec)
       |     |     |     |      {ospfv3-authentication-ipsec}?
       |     |     |     |  +--rw sa?                       string
       |     |     |     +--:(ospfv3-auth-trailer)
       |     |     |        |  {ospfv3-authentication-trailer}?
       |     |     |        +--rw (ospfv3-auth-specification)?
       |     |     |           +--:(auth-key-chain) {key-chain}?
       |     |     |           |  +--rw ospfv3-key-chain?
       |     |     |           |          key-chain:key-chain-ref
       |     |     |           +--:(auth-key-explicit)
       |     |     |              +--rw ospfv3-sa-id?        uint16
       |     |     |              +--rw ospfv3-key?          string
       |     |     |              +--rw ospfv3-crypto-algorithm?
       |     |     |                      identityref
       |     |     +--ro cost?              uint16
       |     |     +--ro state?             if-state-type
       |     |     +--ro hello-timer?       rt-types:
       |     |     |                         rtimer-value-seconds16
       |     |     +--ro wait-timer?        rt-types:
       |     |     |                         rtimer-value-seconds16
       |     |     +--ro dr-router-id?      rt-types:router-id
       |     |     +--ro dr-ip-addr?        inet:ip-address
       |     |     +--ro bdr-router-id?     rt-types:router-id
       |     |     +--ro bdr-ip-addr?       inet:ip-address
       |     |     +--ro statistics
       |     |     |  +--ro discontinuity-time     yang:date-and-time
       |     |     |  +--ro if-event-count?        yang:counter32
       |     |     |  +--ro link-scope-lsa-count?  yang:gauge32
       |     |     |  +--ro link-scope-lsa-cksum-sum?
       |     |     |                               uint32
       |     |     |  +--ro database
       |     |     |     +--ro link-scope-lsa-type*
       |     |     |        +--ro lsa-type?        uint16
       |     |     |        +--ro lsa-count?       yang:gauge32
       |     |     |        +--ro lsa-cksum-sum?   int32
       |     |     +--ro neighbors
       |     |     |  +--ro neighbor* [neighbor-router-id]
       |     |     |     +--ro neighbor-router-id
       |     |     |                           rt-types:router-id
       |     |     |     +--ro address?        inet:ip-address
       |     |     |     +--ro dr-router-id?   rt-types:router-id
       |     |     |     +--ro dr-ip-addr?     inet:ip-address
       |     |     |     +--ro bdr-router-id?  rt-types:router-id
       |     |     |     +--ro bdr-ip-addr?    inet:ip-address
       |     |     |     +--ro state?          nbr-state-type
       |     |     |     +--ro dead-timer? rt-types:
       |     |     |     |                  rtimer-value-seconds16
       |     |     |     +--ro statistics
       |     |     |        +--ro discontinuity-time
       |     |     |                           yang:date-and-time
       |     |     |        +--ro nbr-event-count?
       |     |     |                           yang:counter32
       |     |     |        +--ro nbr-retrans-qlen?
       |     |     |                           yang:gauge32
       |     |     +--ro database
       |     |        +--ro link-scope-lsa-type* [lsa-type]
       |     |           +--ro lsa-type           uint16
       |     |           +--ro link-scope-lsas
       .     .
       .     .
       |     +--rw sham-links {pe-ce-protocol}?
       |     |  +--rw sham-link* [local-id remote-id]
       |     |     +--rw local-id               inet:ip-address
       |     |     +--rw remote-id              inet:ip-address
       |     |     +--rw hello-interval?        uint16
       |     |     +--rw dead-interval?         uint32
       |     |     +--rw retransmit-interval?   uint16
       |     |     +--rw transmit-delay?        uint16
       |     |     +--rw lls?                   boolean {lls}?
       |     |     +--rw ttl-security {ttl-security}?
       |     |     |  +--rw enable?   boolean
       |     |     |  +--rw hops?     uint8
       |     |     +--rw enable?             boolean
       |     |     +--rw authentication
       |     |     |  +--rw (auth-type-selection)?
       |     |     |     +--:(ospfv2-auth)
       |     |     |     |  +--rw ospfv2-auth-trailer-rfc?
       |     |     |     |  |       ospfv2-auth-trailer-rfc-version
       |     |     |     |  |        {ospfv2-authentication-trailer}?
       |     |     |     |  +--rw (ospfv2-auth-specification)?
       |     |     |     |     +--:(auth-key-chain) {key-chain}?
       |     |     |     |     |  +--rw ospfv2-key-chain?
       |     |     |     |     |         key-chain:key-chain-ref
       |     |     |     |     +--:(auth-key-explicit)
       |     |     |     |        +--rw ospfv2-key-id?     uint32
       |     |     |     |        +--rw ospfv2-key?        string
       |     |     |     |        +--rw ospfv2-crypto-algorithm?
       |     |     |     |                identityref
       |     |     |     +--:(ospfv3-auth-ipsec)
       |     |     |     |      {ospfv3-authentication-ipsec}?
       |     |     |     |  +--rw sa?                       string
       |     |     |     +--:(ospfv3-auth-trailer)
       |     |     |        |  {ospfv3-authentication-trailer}?
       |     |     |        +--rw (ospfv3-auth-specification)?
       |     |     |           +--:(auth-key-chain) {key-chain}?
       |     |     |           |  +--rw ospfv3-key-chain?
       |     |     |           |          key-chain:key-chain-ref
       |     |     |           +--:(auth-key-explicit)
       |     |     |              +--rw ospfv3-sa-id?        uint16
       |     |     |              +--rw ospfv3-key?          string
       |     |     |              +--rw ospfv3-crypto-algorithm?
       |     |     |                      identityref
       |     |     +--rw cost?               uint16
       |     |     +--rw mtu-ignore?         boolean
       |     |                               {mtu-ignore}?
       |     |     +--rw prefix-suppression? boolean
       |     |                               {prefix-suppression}?
       |     |     +--ro state?              if-state-type
       |     |     +--ro hello-timer?       rt-types:
       |     |     |                         rtimer-value-seconds16
       |     |     +--ro wait-timer?        rt-types:
       |     |     |                         rtimer-value-seconds16
       |     |     +--ro dr-router-id?       rt-types:router-id
       |     |     +--ro dr-ip-addr?         inet:ip-address
       |     |     +--ro bdr-router-id?      rt-types:router-id
       |     |     +--ro bdr-ip-addr?        inet:ip-address
       |     |     +--ro statistics
       |     |     |  +--ro discontinuity-time     yang:date-and-time
       |     |     |  +--ro if-event-count?        yang:counter32
       |     |     |  +--ro link-scope-lsa-count?  yang:gauge32
       |     |     |  +--ro link-scope-lsa-cksum-sum?
       |     |     |                               uint32
       |     |     |  +--ro database
       |     |     |     +--ro link-scope-lsa-type*
       |     |     |        +--ro lsa-type?        uint16
       |     |     |        +--ro lsa-count?       yang:gauge32
       |     |     |        +--ro lsa-cksum-sum?   int32
       |     |     +--ro neighbors
       |     |     |  +--ro neighbor* [neighbor-router-id]
       |     |     |     +--ro neighbor-router-id
       |     |     |                           rt-types:router-id
       |     |     |     +--ro address?        inet:ip-address
       |     |     |     +--ro dr-router-id?   rt-types:router-id
       |     |     |     +--ro dr-ip-addr?     inet:ip-address
       |     |     |     +--ro bdr-router-id?  rt-types:router-id
       |     |     |     +--ro bdr-ip-addr?    inet:ip-address
       |     |     |     +--ro state?          nbr-state-type
       |     |     |     +--ro cost?           uint32
       |     |     |     +--ro dead-timer? rt-types:
       |     |     |     |                  rtimer-value-seconds16
       |     |     |     +--ro statistics
       |     |     |        +--ro nbr-event-count?
       |     |     |                           yang:counter32
       |     |     |        +--ro nbr-retrans-qlen?
       |     |     |                           yang:gauge32
       |     |     +--ro database
       |     |        +--ro link-scope-lsa-type* [lsa-type]
       |     |           +--ro lsa-type           uint16
       |     |           +--ro link-scope-lsas
       .     .
       .     .
      </artwork>
    </figure>     .]]></sourcecode>

      </section>
      <section title="OSPF numbered="true" toc="default">
        <name>OSPF Interface Configuration/Operational State"> Configuration / Operational State</name>
        <t>The interface "interface" container contains OSPF interface configuration
       and operational state.
       The interface operational state includes the statistics, the list of
       neighbors, and Link-Local Link State Database (LSDB).</t>
    <figure align="left">
      <artwork align="left">
module: ietf-ospf
  augment the link-local LSDB.

<!-- [rfced] Section 2.7:  What type or types of statistics are
discussed here (e.g., interface statistics, operational statistics,
or something else?).

Original:
 The interface operational state includes the
 statistics, list of neighbors, and Link-Local Link State Database
 (LSDB). -->

</t>
      <sourcecode name="" type="yangtree"><![CDATA[
module: ietf-ospf
  augment /rt:routing/rt:control-plane-protocols/
           rt:control-plane-protocol:
    +--rw ospf
       .
       .
       +--rw areas
       |  +--rw area* [area-id]
       |     .
       |     .
       |     +--rw interfaces
       |        +--rw interface* [name]
       |           +--rw name                   if:interface-ref
       |           +--rw interface-type?        enumeration
       |           +--rw passive?               boolean
       |           +--rw demand-circuit?        boolean
       |                                        {demand-circuit}?
       |           +--rw priority?              uint8
       |           +--rw multi-areas {multi-area-adj}?
       |           |  +--rw multi-area* [multi-area-id]
       |           |     +--rw multi-area-id      area-id-type
       |           |     +--rw cost?              uint16
       |           +--rw static-neighbors
       |           |  +--rw neighbor* [identifier]
       |           |     +--rw identifier       inet:ip-address
       |           |     +--rw cost?            uint16
       |           |     +--rw poll-interval?   uint16
       |           |     +--rw priority?        uint8
       |           +--rw node-flag?             boolean
       |                                        {node-flag}?
       |           +--rw bfd {bfd}?
       |           |  +--rw enable?   boolean
       |           +--rw fast-reroute {fast-reroute}?
       |           |  +--rw lfa {lfa}?
       |           |     +--rw candidate-enable?   boolean
       |           |     +--rw enable?             boolean
       |           |     +--rw remote-lfa {remote-lfa}?
       |           |        +--rw enable?   boolean
       |           +--rw hello-interval?        uint16
       |           +--rw dead-interval?         uint32
       |           +--rw retransmit-interval?   uint16
       |           +--rw transmit-delay?        uint16
       |           +--rw lls?                   boolean {lls}?
       |           +--rw ttl-security {ttl-security}?
       |           |  +--rw enable?   boolean
       |           |  +--rw hops?     uint8
       |           +--rw enable?                boolean
       |           +--rw authentication
       |           |  +--rw (auth-type-selection)?
       |           |     +--:(ospfv2-auth)
       |           |     |  +--rw ospfv2-auth-trailer-rfc?
       |           |     |  |       ospfv2-auth-trailer-rfc-version
       |           |     |  |        {ospfv2-authentication-trailer}?
       |           |     |  +--rw (ospfv2-auth-specification)?
       |           |     |     +--:(auth-key-chain) {key-chain}?
       |           |     |     |  +--rw ospfv2-key-chain?
       |           |     |     |         key-chain:key-chain-ref
       |           |     |     +--:(auth-key-explicit)
       |           |     |        +--rw ospfv2-key-id?     uint32
       |           |     |        +--rw ospfv2-key?        string
       |           |     |        +--rw ospfv2-crypto-algorithm?
       |           |     |                identityref
       |           |     +--:(ospfv3-auth-ipsec)
       |           |     |      {ospfv3-authentication-ipsec}?
       |           |     |  +--rw sa?                       string
       |           |     +--:(ospfv3-auth-trailer)
       |           |        |  {ospfv3-authentication-trailer}?
       |           |        +--rw (ospfv3-auth-specification)?
       |           |           +--:(auth-key-chain) {key-chain}?
       |           |           |  +--rw ospfv3-key-chain?
       |           |           |          key-chain:key-chain-ref
       |           |           +--:(auth-key-explicit)
       |           |              +--rw ospfv3-sa-id?        uint16
       |           |              +--rw ospfv3-key?          string
       |           |              +--rw ospfv3-crypto-algorithm?
       |           |                      identityref
       |           +--rw cost?               uint16
       |           +--rw mtu-ignore?         boolean
       |           |                         {mtu-ignore}?
       |           +--rw prefix-suppression? boolean
       |           |                         {prefix-suppression}?
       |           +--ro state?                 if-state-type
       |           +--ro hello-timer?       rt-types:
       |           |                         rtimer-value-seconds16
       |           +--ro wait-timer?        rt-types:
       |           |                         rtimer-value-seconds16
       |           +--ro dr-router-id?       rt-types:router-id
       |           +--ro dr-ip-addr?         inet:ip-address
       |           +--ro bdr-router-id?      rt-types:router-id
       |           +--ro bdr-ip-addr?        inet:ip-address
       |           +--ro statistics
       |           |  +--ro if-event-count?        yang:counter32
       |           |  +--ro link-scope-lsa-count?  yang:gauge32
       |           |  +--ro link-scope-lsa-cksum-sum?
       |           |                               uint32
       |           |  +--ro database
       |           |     +--ro link-scope-lsa-type*
       |           |        +--ro lsa-type?        uint16
       |           |        +--ro lsa-count?       yang:gauge32
       |           |        +--ro lsa-cksum-sum?   int32
       |           +--ro neighbors
       |           |  +--ro neighbor* [neighbor-router-id]
       |           |     +--ro neighbor-router-id
       |           |                           rt-types:router-id
       |           |     +--ro address?        inet:ip-address
       |           |     +--ro dr-router-id?   rt-types:router-id
       |           |     +--ro dr-ip-addr?     inet:ip-address
       |           |     +--ro bdr-router-id?  rt-types:router-id
       |           |     +--ro bdr-ip-addr?    inet:ip-address
       |           |     +--ro state?          nbr-state-type
       |           |     +--ro dead-timer? rt-types:
       |           |     |                  rtimer-value-seconds16
       |           |     +--ro statistics
       |           |        +--ro nbr-event-count?
       |           |                           yang:counter32
       |           |        +--ro nbr-retrans-qlen?
       |           |                           yang:gauge32
       |           +--ro database
       |           .  +--ro link-scope-lsa-type* [lsa-type]
       |           .     +--ro lsa-type           uint16
       |           .     +--ro link-scope-lsas
       .           .
       .           .
       |           +--rw topologies {ospf:multi-topology}?
       |           |  +--rw topology* [name]
       |           |     +--rw name  -> ../../../../../../../../
       |           |                    ../../../rt:ribs/rib/name
       |           |     +--rw cost? uint32
       |           +--rw instance-id?           uint8
       .
       .
      </artwork>
    </figure>
       .]]></sourcecode>

      </section>
      <section title="OSPF Notifications"> numbered="true" toc="default">
        <name>OSPF Notifications</name>
        <t>This YANG data model defines a list of notifications that inform YANG
    clients of important events detected during protocol operation.

<!-- [rfced] Sections 2.8 and 3:  We have received guidance from
Benoit Claise and the YANG Doctors that "YANG module" and "YANG
data model" are preferred.  We have updated this document accordingly.
Please let us know any concerns.

Original (note that "8242" has been corrected):
 This YANG model defines a list of notifications that inform YANG
 clients of important events detected during protocol operation.
...
 This YANG model conforms to the Network Management
 Datastore Architecture (NMDA) as described in RFC 8242.

Currently:
 This YANG data model defines a list of notifications that inform YANG
 clients of important events detected during protocol operation.
...
 This YANG data model conforms to the Network Management
 Datastore Architecture (NMDA) as described in RFC 8342. -->

  The
    defined notifications cover the common set of traps from the OSPFv2 MIB
    <xref target="RFC4750"></xref> target="RFC4750" format="default"/> and OSPFv3 MIB <xref target="RFC5643"></xref>.</t>
    <figure align="left">
      <artwork align="left"> target="RFC5643" format="default"/>.</t>
   <sourcecode name="" type="yangtree"><![CDATA[
  notifications:
    +---n if-state-change
    |  +--ro routing-protocol-name?
    |  +     -> /rt:routing/control-plane-protocols/
    |  +         control-plane-protocol/name
    |  +--ro af?
    |  +     -> /rt:routing/control-plane-protocols/
    |  +         control-plane-protocol
    |  +         [rt:name=current()/../routing-protocol-name]/
    |  +         ospf:ospf/af
    |  +--ro (if-link-type-selection)?
    |  |  +--:(interface)
    |  |  |  +--ro interface
    |  |  |     +--ro interface?   if:interface-ref
    |  |  +--:(virtual-link)
    |  |  |  +--ro virtual-link
    |  |  |     +--ro transit-area-id?      area-id-type
    |  |  |     +--ro neighbor-router-id?   rt-types:router-id
    |  |  +--:(sham-link)
    |  |     +--ro sham-link
    |  |        +--ro area-id?          area-id-type
    |  |        +--ro local-ip-addr?    inet:ip-address
    |  |        +--ro remote-ip-addr?   inet:ip-address
    |  +--ro state?                   if-state-type
    +---n if-config-error
    |  +--ro routing-protocol-name?
    |  +     -> /rt:routing/control-plane-protocols/
    |  +         control-plane-protocol/name
    |  +--ro af?
    |  +     -> /rt:routing/control-plane-protocols/
    |  +         control-plane-protocol
    |  +         [rt:name=current()/../routing-protocol-name]/
    |  +         ospf:ospf/af
    |  +--ro (if-link-type-selection)?
    |  |  +--:(interface)
    |  |  |  +--ro interface
    |  |  |     +--ro interface?   if:interface-ref
    |  |  +--:(virtual-link)
    |  |  |  +--ro virtual-link
    |  |  |     +--ro transit-area-id?      area-id-type
    |  |  |     +--ro neighbor-router-id?   rt-types:router-id
    |  |  +--:(sham-link)
    |  |     +--ro sham-link
    |  |        +--ro area-id?          area-id-type
    |  |        +--ro local-ip-addr?    inet:ip-address
    |  |        +--ro remote-ip-addr?   inet:ip-address
    |  +--ro packet-source?           yang:dotted-quad
    |  +--ro packet-type?             packet-type
    |  +--ro error?                   enumeration
    +---n nbr-state-change
    |  +--ro routing-protocol-name?
    |  +     -> /rt:routing/control-plane-protocols/
    |  +         control-plane-protocol/name
    |  +--ro af?
    |  +     -> /rt:routing/control-plane-protocols/
    |  +         control-plane-protocol
    |  +         [rt:name=current()/../routing-protocol-name]/
    |  +         ospf:ospf/af
    |  +--ro (if-link-type-selection)?
    |  |  +--:(interface)
    |  |  |  +--ro interface
    |  |  |     +--ro interface?   if:interface-ref
    |  |  +--:(virtual-link)
    |  |  |  +--ro virtual-link
    |  |  |     +--ro transit-area-id?      area-id-type
    |  |  |     +--ro neighbor-router-id?   rt-types:router-id
    |  |  +--:(sham-link)
    |  |     +--ro sham-link
    |  |        +--ro area-id?          area-id-type
    |  |        +--ro local-ip-addr?    inet:ip-address
    |  |        +--ro remote-ip-addr?   inet:ip-address
    |  +--ro neighbor-router-id?      rt-types:router-id
    |  +--ro neighbor-ip-addr?        yang:dotted-quad
    |  +--ro state?                   nbr-state-type
    +---n nbr-restart-helper-status-change
    |  +--ro routing-protocol-name?
    |  +     -> /rt:routing/control-plane-protocols/
    |  +         control-plane-protocol/name
    |  +--ro af?
    |  +     -> /rt:routing/control-plane-protocols/
    |  +         control-plane-protocol
    |  +         [rt:name=current()/../routing-protocol-name]/
    |  +         ospf:ospf/af
    |  +--ro (if-link-type-selection)?
    |  |  +--:(interface)
    |  |  |  +--ro interface
    |  |  |     +--ro interface?   if:interface-ref
    |  |  +--:(virtual-link)
    |  |  |  +--ro virtual-link
    |  |  |     +--ro transit-area-id?      area-id-type
    |  |  |     +--ro neighbor-router-id?   rt-types:router-id
    |  |  +--:(sham-link)
    |  |     +--ro sham-link
    |  |        +--ro area-id?          area-id-type
    |  |        +--ro local-ip-addr?    inet:ip-address
    |  |        +--ro remote-ip-addr?   inet:ip-address
    |  +--ro neighbor-router-id?      rt-types:router-id
    |  +--ro neighbor-ip-addr?        yang:dotted-quad
    |  +--ro status?                  restart-helper-status-type
    |  +--ro age?                     uint32
    |  +--ro exit-reason?             restart-exit-reason-type
    +---n if-rx-bad-packet
    |  +--ro routing-protocol-name?
    |  +     -> /rt:routing/control-plane-protocols/
    |  +         control-plane-protocol/name
    |  +--ro af?
    |  +     -> /rt:routing/control-plane-protocols/
    |  +         control-plane-protocol
    |  +         [rt:name=current()/../routing-protocol-name]/
    |  +         ospf:ospf/af
    |  +--ro (if-link-type-selection)?
    |  |  +--:(interface)
    |  |  |  +--ro interface
    |  |  |     +--ro interface?   if:interface-ref
    |  |  +--:(virtual-link)
    |  |  |  +--ro virtual-link
    |  |  |     +--ro transit-area-id?      area-id-type
    |  |  |     +--ro neighbor-router-id?   rt-types:router-id
    |  |  +--:(sham-link)
    |  |     +--ro sham-link
    |  |        +--ro area-id?          area-id-type
    |  |        +--ro local-ip-addr?    inet:ip-address
    |  |        +--ro remote-ip-addr?   inet:ip-address
    |  +--ro packet-source?           yang:dotted-quad
    |  +--ro packet-type?             packet-type
    +---n lsdb-approaching-overflow
    |  +--ro routing-protocol-name?
    |  +     -> /rt:routing/control-plane-protocols/
    |  +         control-plane-protocol/name
    |  +--ro af?
    |  +     -> /rt:routing/control-plane-protocols/
    |  +         control-plane-protocol
    |  +         [rt:name=current()/../routing-protocol-name]/
    |  +         ospf:ospf/af
    |  +--ro ext-lsdb-limit?          uint32
    +---n lsdb-overflow
    |  +--ro routing-protocol-name?
    |  +     -> /rt:routing/control-plane-protocols/
    |  +         control-plane-protocol/name
    |  +--ro af?
    |  +     -> /rt:routing/control-plane-protocols/
    |  +         control-plane-protocol
    |  +         [rt:name=current()/../routing-protocol-name]/
    |  +         ospf:ospf/af
    |  +--ro ext-lsdb-limit?          uint32
    +---n nssa-translator-status-change
    |  +--ro routing-protocol-name?
    |  +     -> /rt:routing/control-plane-protocols/
    |  +         control-plane-protocol/name
    |  +--ro af?
    |  +     -> /rt:routing/control-plane-protocols/
    |  +         control-plane-protocol
    |  +         [rt:name=current()/../routing-protocol-name]/
    |  +         ospf:ospf/af
    |  +--ro area-id?                 area-id-type
    |  +--ro status?                  nssa-translator-state-type
    +---n restart-status-change
       +--ro routing-protocol-name?
       +     -> /rt:routing/control-plane-protocols/
       +         control-plane-protocol/name
       +--ro af?
       +     -> /rt:routing/control-plane-protocols/
       +         control-plane-protocol
       +         [rt:name=current()/../routing-protocol-name]/
       +         ospf:ospf/af
       +--ro status?                  restart-status-type
       +--ro restart-interval?        uint16
       +--ro exit-reason?             restart-exit-reason-type
      </artwork>
    </figure>             restart-exit-reason-type]]></sourcecode>

      </section>
      <section title="OSPF numbered="true" toc="default">
        <name>OSPF RPC Operations"> Operations</name>
        <t>The "ietf-ospf" module defines two RPC operations:
    <list style="symbols">
      <t>clear-database: reset
        </t>
        <dl newline="false" spacing="normal">
          <dt>clear-database:</dt><dd>Resets the content contents of a particular OSPF
         Link State Database.</t>
      <t>clear-neighbor: Reset
         LSDB.</dd>
          <dt>clear-neighbor:</dt><dd>Resets a particular OSPF neighbor or group of neighbors associated
         with an OSPF interface.</t>
      </list></t>
    <figure align="left">
      <artwork align="left"> interface.</dd>
        </dl>
       <sourcecode name="" type="yangtree"><![CDATA[
  rpcs:
    +---x clear-neighbor
    |  +---w input
    |     +---w routing-protocol-name
    |     +     -> /rt:routing/control-plane-protocols/
    |     +         control-plane-protocol/name
    |     +---w interface?               if:interface-ref
    +---x clear-database
       +---w input
          +---w routing-protocol-name
                -> /rt:routing/control-plane-protocols/
                    control-plane-protocol/name
      </artwork>
    </figure>
                    control-plane-protocol/name]]></sourcecode>

      </section>
    </section>
    <section title="OSPF numbered="true" toc="default">
      <name>OSPF YANG Module"> Module</name>
      <t>The following RFCs and drafts are not referenced in the document text but are referenced in the ietf-ospf.yang "ietf-ospf" YANG module:
      <xref target="RFC0905"/>, target="RFC0905" format="default"/>,
      <xref target="RFC1765"/>, <xref target="RFC1793"/>,
      <xref target="RFC2328"/>, <xref target="RFC3101"/>,
      <xref target="RFC3623"/>, <xref target="RFC3630"/>,
      <xref target="RFC4552"/>, <xref target="RFC4576"/>, target="RFC4576" format="default"/>,
      <xref target="RFC4973"/>, target="RFC4577"/>, <xref target="RFC4915"/>,
      <xref target="RFC4973" format="default"/>,
      <xref target="RFC5082"/>, <xref target="RFC5185"/>,
      <xref target="RFC5187"/>, <xref target="RFC5250" format="default"/>,
      <xref target="RFC5286"/>,
      <xref target="RFC5309" format="default"/>, <xref target="RFC5329"/>,
      <xref target="RFC5340"/>,
      <xref target="RFC5443"/>, <xref target="RFC5613"/>,
      <xref target="RFC5642" format="default"/>,
      <xref target="RFC5709"/>, <xref target="RFC5714"/>,
      <xref target="RFC5250"/>, target="RFC5838"/>,
      <xref target="RFC5309"/>, target="RFC5880"/>, <xref target="RFC5881" format="default"/>,
      <xref target="RFC6565"/>, <xref target="RFC6845"/>,
      <xref target="RFC6860"/>,
      <xref target="RFC6987"/>, <xref target="RFC6991" format="default"/>,
      <xref target="RFC7166"/>, <xref target="RFC5642"/>, target="RFC7474"/>,
      <xref target="RFC5881"/>, target="RFC7490"/>, <xref target="RFC6991"/>, target="RFC7684"/>,
      <xref target="RFC7770"/>, target="RFC7770" format="default"/>,
      <xref target="RFC7884"/>, target="RFC7777"/>, <xref target="RFC8294"/>, target="RFC7884" format="default"/>,
      <xref target="RFC8177"/>, <xref target="RFC8294" format="default"/>,
      <xref target="RFC8343"/>, <xref target="RFC8349"/>,
      <xref target="RFC8405"/>, <xref target="RFC8476" format="default"/>,
      and <xref target="RFC8476"/>.
  </t>
  <t>
    <figure>
      <artwork><![CDATA[
<CODE BEGINS> file "ietf-ospf@2019-10-17.yang"
module ietf-ospf {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-ospf";

  prefix ospf;

  import ietf-inet-types {
    prefix "inet";
    reference "RFC 6991: Common YANG Data Types";
  }

  import ietf-yang-types {
    prefix "yang";
    reference "RFC 6991: Common target="RFC9127"/>.

<!-- [rfced] Section 3:  For ease of the reader, we updated this
paragraph to include all references cited in the YANG Data Types";
  }

  import ietf-interfaces {
    prefix "if";
    reference "RFC 8343: A module.

Additionally, to make the YANG Data Model for Interface
               Management (NMDA Version)"; module self-contained (i.e., when the
module is stripped from the RFC, the module can stand alone without
relying on other parts of the RFC), we added reference entries in
certain instances.

Please review, and let us know any concerns.

Original:
 The following RFCs and drafts are not referenced in the document text
 but are referenced in the ietf-ospf.yang module: [RFC0905],
 [RFC4576], [RFC4973], [RFC5250], [RFC5309], [RFC5642], [RFC5881],
 [RFC6991], [RFC7770], [RFC7884], [RFC8294], and [RFC8476].

Currently:
 The following RFCs are referenced in the "ietf-ospf" YANG module:
 [RFC0905], [RFC1765], [RFC1793], [RFC2328], [RFC3101], [RFC3623],
 [RFC3630], [RFC4552], [RFC4576], [RFC4577], [RFC4915], [RFC4973],
 [RFC5082], [RFC5185], [RFC5187], [RFC5250], [RFC5286], [RFC5309],
 [RFC5329], [RFC5340], [RFC5443], [RFC5613], [RFC5642], [RFC5709],
 [RFC5714], [RFC5838], [RFC5880], [RFC5881], [RFC6565], [RFC6845],
 [RFC6860], [RFC6987], [RFC6991], [RFC7166], [RFC7474], [RFC7490],
 [RFC7684], [RFC7770], [RFC7777], [RFC7884], [RFC8177], [RFC8294],
 [RFC8343], [RFC8349], [RFC8405], [RFC8476], and [RFC9127]. -->

      </t>

<!-- Lynne:  If authors don't agree to the new doc. title,
     fix the "RFC 9129:" entry. -->

<!--[rfced] Section 3: May we update the YANG module as shown in
this diff file?
 https://www.rfc-editor.org/authors/ietf-ospf-rfcdiff.html

The diff compares the current module to the output of the formatting
tool. Per guidance from Martin Bjorklund, this is using pyang to format the
module (as described on https://trac.ietf.org/trac/ops/wiki/yang-review-tools).
To be clear, with or without the formatting updates, the YANG module parses.
-->

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

  prefix ospf;

  import ietf-inet-types {
    prefix "inet";
    reference
      "RFC 6991: Common YANG Data Types";
  }

  import ietf-yang-types {
    prefix "yang";
    reference
      "RFC 6991: Common YANG Data Types";
  }

  import ietf-interfaces {
    prefix "if";
    reference
      "RFC 8343: A YANG Data Model for Interface Management";
  }

  import ietf-routing-types {
    prefix "rt-types";
    reference
      "RFC 8294: Common YANG Data Types for the Routing Area";
  }

  import iana-routing-types {
    prefix "iana-rt-types";
    reference
      "RFC 8294: Common YANG Data Types for the Routing Area";
  }

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

  import ietf-key-chain {
    prefix "key-chain";
    reference
      "RFC 8177: YANG Data Model for Key Chains";
  }

  import ietf-bfd-types {
    prefix "bfd-types";
    reference
      "RFC YYYY: 9127: YANG Data Model for Bidirectional Forwarding
       Detection (BFD). Please replace YYYY with
      published RFC number for draft-ietf-bfd-yang."; (BFD)";
  }

  organization
      "IETF LSR - Link State Routing (lsr) Working Group";

  contact
    "WG Web:   <https://datatracker.ietf.org/group/lsr/>   <https://datatracker.ietf.org/wg/lsr/>
     WG List:  <mailto:lsr@ietf.org>

     Editor:   Derek Yeung
               <mailto:derek@arrcus.com>
     Author:   Acee Lindem
               <mailto:acee@cisco.com>
     Author:   Yingzhen Qu
               <mailto:yingzhen.qu@futurewei.com>
     Author:   Salih K A
               <mailto:salih@juniper.net>
     Author:   Ing-Wher Chen
               <mailto:ingwherchen@mitre.org>";

  description
    "This YANG module defines the generic configuration and
     operational state for the OSPF protocol common to all
     vendor implementations.  It is intended that the module
     will be extended by vendors to define vendor-specific
     OSPF configuration parameters and policies, policies --
     for example, route maps or route policies.

     This YANG data model conforms to the Network Management
     Datastore Architecture (NMDA) as described in RFC 8242. 8342.

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
     'MAY', and 'OPTIONAL' in this document are to be interpreted as
     described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
     they appear in all capitals, as shown here.

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

     This version of this YANG module is part of RFC XXXX
     (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
     for full legal notices.

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
     'MAY', and 'OPTIONAL' in this document are to be interpreted as
     described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
     they appear in all capitals, as shown here.

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

  revision 2019-10-17 2021-09-03 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: A 9129: YANG Data Model for OSPF."; the OSPF Protocol";
  }

  feature multi-topology {
    description
      "Support Multiple-Topology Routing (MTR)."; for Multi-Topology (MT) routing.";
    reference
      "RFC 4915: Multi-Topology Routing"; (MT) Routing in OSPF";
  }

  feature multi-area-adj {
    description
      "OSPF
      "Support for OSPF multi-area adjacency support adjacencies as described in
       RFC 5185.";
    reference
      "RFC 5185: OSPF Multi-Area Adjacency";
  }
  feature explicit-router-id {
    description
      "Set Router-ID
      "Sets the Router ID per instance explicitly.";
  }

  feature demand-circuit {
    description
      "OSPF
      "Support for OSPF demand circuit support circuits as defined in RFC 1793.";
    reference
      "RFC 1793: Extending OSPF to Support Demand Circuits";
  }

  feature mtu-ignore {
    description
      "Disable OSPF Database Description packet MTU
       mismatch checking as specified in the OSPF OSPFv2
       protocol specification."; specification (RFC 2328).";
    reference
      "RFC 2328: OSPF Version 2, section Section 10.6";
  }

  feature lls {
    description
      "OSPF link-local signaling (LLS) as defined in RFC 5613.";
    reference
      "RFC 5613: OSPF Link-Local Signaling";
  }

  feature prefix-suppression {
    description
      "OSPF prefix suppression support as described in RFC 6860.";
    reference
      "RFC 6860: Hide Hiding Transit-Only Networks in OSPF";
  }

  feature ttl-security {
    description
      "OSPF
      "Support for OSPF Time to Live (TTL) security check support."; checking.";
    reference
      "RFC 5082: The Generalized TTL Security Mechanism (GTSM)";
  }

  feature nsr {
    description
      "Non-Stop-Routing (NSR) support.  The OSPF NSR feature
       allows  a router with redundant control-plane capability
       (e.g., dual Route-Processor Route Processor (RP) cards) to maintain its
       state and adjacencies during planned and unplanned
       OSPF instance restarts.  It differs from graceful-restart graceful restart
       or Non-Stop Forwarding (NSF) in that no protocol signaling
       or assistance from adjacent OSPF neighbors is required to
       recover control-plane state.";
  }

  feature graceful-restart {
    description
      "Graceful OSPF Restart restart as defined in RFC RFCs 3623 and
       RFC 5187.";
    reference
      "RFC 3623: Graceful OSPF Restart
       RFC 5187: OSPFv3 Graceful Restart";
  }

  feature auto-cost {
    description
      "Calculate
      "Calculates the OSPF interface cost according to
       reference bandwidth.";
     reference
       "RFC 2328: OSPF Version 2";
  }

  feature max-ecmp {
    description
      "Setting
      "Sets the maximum number of ECMP paths.";
  }

  feature max-lsa {
    description
      "Setting
      "Sets the maximum number of LSAs Link State Advertisements (LSAs)
       the OSPF instance will accept.";
    reference
      "RFC 1765: OSPF Database Overload"; Overflow";
  }

  feature te-rid {
    description
      "Support for configuration of the Traffic Engineering (TE)
       Router-ID,
       Router ID, i.e., the Router Address TLV as described in
       Section 2.4.1 of RFC3630 RFC 3630 or the Router IPv6 Address TLV
       as described in Section 3 of RFC5329."; RFC 5329.";
    reference
      "RFC 3630: Traffic Engineering (TE) Extensions to
       OSPF Version 2 2, Section 2.4.1
       RFC 5329: Traffic Engineering (TE) Extensions to OSPF Version 3,
       Section 3";
  }

  feature ldp-igp-sync {
    description
      "LDP IGP synchronization.";
    reference
      "RFC 5443: LDP IGP Synchronization";
  }

  feature ospfv2-authentication-trailer {
    description
      "Support for the OSPFv2 authentication trailer Authentication Trailer for OSPFv2
       authentication.";
    reference
      "RFC 5709: Supporting Authentication
               Trailer for OSPFv2 HMAC-SHA Cryptographic Authentication
       RFC 7474: Security Extension for OSPFv2 When
       Using Manual Key Management";
  }

  feature ospfv3-authentication-ipsec {
    description
      "Support for IPsec for OSPFv3 authentication.";
    reference
      "RFC 4552: Authentication/Confidentiality for OSPFv3";
  }

  feature ospfv3-authentication-trailer {
    description
      "Support for the OSPFv3 authentication trailer Authentication Trailer for OSPFv3
       authentication.";
    reference
      "RFC 7166: Supporting Authentication Trailer for OSPFv3";
  }

  feature fast-reroute {
   description
     "Support for IP Fast Reroute (IP-FRR).";
   reference
     "RFC 5714: IP Fast Reroute Framework";
  }

  feature key-chain {
    description
      "Support of keychain key chains for authentication.";
    reference "RFC8177:
      "RFC 8177: YANG Data Model for Key Chains";
  }

  feature node-flag {
   description
     "Support for node-flag node flags for OSPF prefixes.";
   reference
     "RFC 7684: OSPFv2 Prefix/Link Attribute Advertisement";
  }

  feature node-tag {
    description
      "Support for node admin tag administrative tags for OSPF routing
       instances.";
    reference
      "RFC 7777: Advertising Node Administrative Tags in OSPF";
  }

  feature lfa {
   description
     "Support for Loop-Free Alternates (LFAs).";
   reference
     "RFC 5286: Basic Specification for IP Fast Reroute:
      Loop-Free Alternates";
  }

  feature remote-lfa {
   description
     "Support for Remote Loop-Free Alternates (R-LFA)."; LFAs (R-LFAs).";
   reference
     "RFC 7490: Remote Loop-Free Alternate (LFA) Fast Reroute (FRR)";
  }

  feature stub-router {
    description
      "Support for RFC 6987 OSPF Stub Router Advertisement."; stub router advertisements as defined in
       RFC 6987.";
    reference
      "RFC 6987: OSPF Stub Router Advertisement";
  }

  feature pe-ce-protocol {
    description
      "Support for OSPF as a PE-CE protocol"; Provider Edge to Customer Edge (PE-CE)
       protocol.";
    reference
      "RFC 4577: OSPF as the Provider/Customer Edge Protocol
       for BGP/MPLS IP Virtual Private Networks (VPNs)
       RFC 6565: OSPFv3 as a Provider Edge to Customer Edge (PE-CE)
       Routing Protocol";
  }

  feature ietf-spf-delay {
    description
      "Support for the IETF SPF Shortest Path First (SPF) delay
       algorithm.";
    reference
      "RFC 8405: SPF Back-off algorithm Shortest Path First (SPF) Back-Off Delay Algorithm
       for link
               state Link-State IGPs";
  }

  feature bfd {
    description
      "Support for BFD detection of to detect OSPF neighbor reachability.";
    reference
      "RFC 5880: Bidirectional Forwarding Detection (BFD)
       RFC 5881: Bidirectional Forwarding Detection
       (BFD) for IPv4 and IPv6 (Single Hop)";
  }

  feature hybrid-interface {
    description
      "Support for the OSPF Hybrid interface type.";
    reference
      "RFC 6845: OSPF Hybrid Broadcast and
       Point-to-Multipoint Interface Type";
  }

  identity ospf {
    base "rt:routing-protocol";
    description
      "Any OSPF protocol version"; version.";
  }

  identity ospfv2 {
    base "ospf";
    description
      "OSPFv2 protocol"; protocol.";
  }

  identity ospfv3 {
    base "ospf";
    description
      "OSPFv3 protocol"; protocol.";
  }

  identity area-type {
    description
      "Base identity for an OSPF area type.";
  }

  identity normal-area {
    base area-type;
    description
      "OSPF normal area.";
  }

  identity stub-nssa-area {
    base area-type;
    description
      "OSPF stub area or NSSA area."; Not-So-Stubby Area (NSSA).";
  }

  identity stub-area {
    base stub-nssa-area;
    description
      "OSPF stub area.";
  }

  identity nssa-area {
    base stub-nssa-area;
    description
      "OSPF Not-So-Stubby Area (NSSA)."; NSSA.";
    reference
      "RFC 3101: The OSPF Not-So-Stubby Area (NSSA) Option";
  }

  identity ospf-lsa-type {
    description
      "Base identity for OSPFv2 and OSPFv3
       Link State Advertisement (LSA) types"; types.";
  }

  identity ospfv2-lsa-type {
    base ospf-lsa-type;
    description
      "OSPFv2 LSA types"; types.";
  }

  identity ospfv2-router-lsa {
    base ospfv2-lsa-type;
    description
      "OSPFv2 Router LSA - Type 1"; 1.";
  }

  identity ospfv2-network-lsa {
    base ospfv2-lsa-type;
    description
      "OSPFv2 Network LSA - Type 2"; 2.";
  }

  identity ospfv2-summary-lsa-type {
    base ospfv2-lsa-type;
    description
      "OSPFv2 Summary LSA types"; types.";
  }

  identity ospfv2-network-summary-lsa {
    base ospfv2-summary-lsa-type;
    description
      "OSPFv2 Network Summary LSA - Type 3"; 3.";
  }

  identity ospfv2-asbr-summary-lsa {
    base ospfv2-summary-lsa-type;
    description
      "OSPFv2 AS Autonomous System Boundary Router (ASBR) Summary LSA -
       Type 4"; 4.";
  }

  identity ospfv2-external-lsa-type {
    base ospfv2-lsa-type;
    description
      "OSPFv2 External LSA types"; types.";
  }

  identity ospfv2-as-external-lsa {
    base ospfv2-external-lsa-type;
    description
      "OSPFv2 AS External LSA - Type 5"; 5.";
  }

  identity ospfv2-nssa-lsa {
    base ospfv2-external-lsa-type;
    description
      "OSPFv2 Not-So-Stubby-Area (NSSA) NSSA LSA - Type 7"; 7.";
  }

  identity ospfv2-opaque-lsa-type {
    base ospfv2-lsa-type;
    description
      "OSPFv2 Opaque LSA types"; types.";
    reference
      "RFC 5250: The OSPF Opaque LSA Option";
  }

  identity ospfv2-link-scope-opaque-lsa {
    base ospfv2-opaque-lsa-type;
    description
      "OSPFv2 Link-Scoped Opaque LSA - Type 9"; 9.";
  }

  identity ospfv2-area-scope-opaque-lsa {
    base ospfv2-opaque-lsa-type;
    description
      "OSPFv2 Area-Scoped Opaque LSA - Type 10"; 10.";
  }

  identity ospfv2-as-scope-opaque-lsa {
    base ospfv2-opaque-lsa-type;
    description
      "OSPFv2 AS-Scoped Opaque LSA - Type 11"; 11.";
  }

  identity ospfv2-unknown-lsa-type {
    base ospfv2-lsa-type;
    description
      "OSPFv2 Unknown unknown LSA type"; type.";
  }

  identity ospfv3-lsa-type {
    base ospf-lsa-type;
    description
      "OSPFv3 LSA types.";
    reference
      "RFC 5340: OSPF for IPv6";
  }

  identity ospfv3-router-lsa {
    base ospfv3-lsa-type;
    description
      "OSPFv3 Router LSA - Type 0x2001"; 0x2001.";
  }

  identity ospfv3-network-lsa {
    base ospfv3-lsa-type;
    description
      "OSPFv3 Network LSA - Type 0x2002"; 0x2002.";
  }

  identity ospfv3-summary-lsa-type {
    base ospfv3-lsa-type;
    description
      "OSPFv3 Summary LSA types"; types.";
  }

  identity ospfv3-inter-area-prefix-lsa {
    base ospfv3-summary-lsa-type;
    description
      "OSPFv3 Inter-area Prefix LSA - Type 0x2003"; 0x2003.";
  }

  identity ospfv3-inter-area-router-lsa {
    base ospfv3-summary-lsa-type;
    description
      "OSPFv3 Inter-area Router LSA - Type 0x2004"; 0x2004.";
  }

  identity ospfv3-external-lsa-type {
    base ospfv3-lsa-type;
    description
      "OSPFv3 External LSA types"; types.";
  }

  identity ospfv3-as-external-lsa {
    base ospfv3-external-lsa-type;
    description
      "OSPFv3 AS-External LSA - Type 0x4005"; 0x4005.";
  }

  identity ospfv3-nssa-lsa {
    base ospfv3-external-lsa-type;
    description
      "OSPFv3 Not-So-Stubby-Area (NSSA) NSSA LSA - Type 0x2007"; 0x2007.";
  }

  identity ospfv3-link-lsa {
    base ospfv3-lsa-type;
    description
      "OSPFv3 Link link LSA - Type 0x0008"; 0x0008.";
  }

  identity ospfv3-intra-area-prefix-lsa {
    base ospfv3-lsa-type;
    description
      "OSPFv3 Intra-area Prefix LSA - Type 0x2009"; 0x2009.";
  }

  identity ospfv3-router-information-lsa {
    base ospfv3-lsa-type;
    description
      "OSPFv3 Router Information LSA - Types 0x800C,
       0xA00C, and 0xC00C"; 0xC00C.";
  }

  identity ospfv3-unknown-lsa-type {
    base ospfv3-lsa-type;
    description
      "OSPFv3 Unknown unknown LSA type"; type.";
  }

  identity lsa-log-reason {
    description
      "Base identity for an LSA log reason.";
  }

  identity lsa-refresh {
    base lsa-log-reason;
    description
      "Identity used when the LSA is logged
       as a result of receiving a refresh LSA.";
  }

  identity lsa-content-change {
    base lsa-log-reason;
    description
      "Identity used when the LSA is logged
       as a result of a change in the content contents
       of the LSA.";
  }

  identity lsa-purge {
    base lsa-log-reason;
    description
      "Identity used when the LSA is logged
       as a result of being purged.";
  }

  identity informational-capability {
    description
      "Base identity for router informational capabilities.";
  }

  identity graceful-restart {
    base informational-capability;
    description
      "When set, the router is capable of restarting
       gracefully.";
    reference
      "RFC 3623: Graceful OSPF Restart
       RFC 5187: OSPFv3 Graceful Restart";
  }

  identity graceful-restart-helper {
    base informational-capability;
    description
      "When set, the router is capable of acting as
       a graceful restart helper.";
    reference
      "RFC 3623: Graceful OSPF Restart
       RFC 5187: OSPFv3 Graceful Restart";
  }

  identity stub-router {
    base informational-capability;
    description
      "When set, the router is capable of acting as
       an OSPF Stub Router."; stub router.";
    reference
      "RFC 6987: OSPF Stub Router Advertisement";
  }

  identity traffic-engineering {
    base informational-capability;
    description
      "When set, the router is capable of OSPF traffic
       engineering."; TE.";
    reference
      "RFC 3630: Traffic Engineering (TE) Extensions to
       OSPF Version 2
       RFC 5329: Traffic Engineering (TE) Extensions to OSPF Version 3";
  }

  identity p2p-over-lan {
    base informational-capability;
    description
      "When set, the router is capable of OSPF Point-to-Point point-to-point
       over a LAN.";
    reference
      "RFC 5309: Point-to-Point Operation over LAN in Link State
       Routing Protocols";
  }

  identity experimental-te {
    base informational-capability;
    description
      "When set, the router is capable of OSPF experimental
       traffic engineering."; TE.";
    reference
      "RFC 4973: OSPF-xTE OSPF OSPF-xTE: Experimental Extension to OSPF for
       Traffic Engineering";
  }

  identity router-lsa-bit {
    description
      "Base identity for Router-LSA bits.";
  }

  identity vlink-end-bit {
    base router-lsa-bit;
    description
      "V bit, when
      "V-bit.  When set, the router is an endpoint of one or
       more virtual links.";
  }

  identity asbr-bit {
    base router-lsa-bit;
    description
      "E bit, when
      "E-bit.  When set, the router is an AS Autonomous System
       Boundary Router (ASBR).";
  }

  identity abr-bit {
    base router-lsa-bit;
    description
      "B bit, when
      "B-bit.  When set, the router is an Area Border
       Router (ABR).";
  }

  identity nssa-bit {
    base router-lsa-bit;
    description
      "Nt bit, when
      "Nt-bit.  When set, the router is an NSSA border router
       that is unconditionally translating NSSA LSAs into
       AS-external LSAs.";
  }

  identity ospfv3-lsa-option {
    description
      "Base identity for OSPF LSA options flags.";
  }

  identity af-bit {
    base ospfv3-lsa-option;
    description
      "AF bit, when
      "AF-bit.  When set, the router supports OSPFv3 Address
       Families (AFs) as described in RFC5838."; RFC 5838.";
    reference
      "RFC 5838: Support of Address Families in OSPFv3";
  }

  identity dc-bit {
    base ospfv3-lsa-option;
    description
      "DC bit, when
      "DC-bit.  When set, the router supports demand circuits.";
  }

  identity r-bit {
    base ospfv3-lsa-option;
    description
      "R bit, when
      "R-bit.  When set, the originator is an active router.";
  }

  identity n-bit {
    base ospfv3-lsa-option;
    description
      "N bit, when
      "N-bit.  When set, the router is attached to an NSSA"; NSSA.";
  }

  identity e-bit {
    base ospfv3-lsa-option;
    description
      "E bit, this
      "E-bit.  This bit describes the way AS-external LSAs
       are flooded"; flooded.";
  }

  identity v6-bit {
    base ospfv3-lsa-option;
    description
      "V6 bit, if
      "V6-bit.  If clear, the router/link should be excluded
       from IPv6 routing calculation"; calculations.";
  }

  identity ospfv3-prefix-option {
    description
      "Base identity for OSPFv3 Prefix Options."; prefix options.";
  }

  identity nu-bit {
    base ospfv3-prefix-option;
    description
      "NU Bit, when
      "NU-bit.  When set, the prefix should be excluded
       from IPv6 unicast calculations.";
  }

  identity la-bit {
    base ospfv3-prefix-option;
    description
      "LA bit, when
      "LA-bit.  When set, the prefix is actually an IPv6
       interface address of the Advertising Router."; advertising router.";
  }

  identity p-bit {
    base ospfv3-prefix-option;
    description
      "P bit, when
      "P-bit.  When set, the NSSA area prefix should be
       translated to an AS External LSA and advertised
       by the translating NSSA Border Router."; border router.";
  }

  identity dn-bit {
    base ospfv3-prefix-option;
    description
      "DN bit, when
      "DN-bit.  When set, the inter-area-prefix LSA or
       AS-external LSA prefix has been advertised as an
       L3VPN prefix.";
  }

  identity ospfv2-lsa-option {
    description
      "Base identity for OSPFv2 LSA option flags.";
  }

  identity mt-bit {
    base ospfv2-lsa-option;
    description
      "MT bit,
      "MT-bit.  When set, the router supports multi-topology as
       described in RFC 4915.";
    reference
      "RFC 4915: Multi-Topology (MT) Routing in OSPF";
  }

  identity v2-dc-bit {
    base ospfv2-lsa-option;
    description
      "DC bit,
      "DC-bit.  When set, the router supports demand circuits.";
  }

  identity v2-p-bit {
    base ospfv2-lsa-option;
    description
      "P bit, wnly
      "P-bit, when used in a type-7 LSA.  When set, an NSSA
       border router should translate the type-7 LSA
       to a type-5 LSA.";
  }

  identity mc-flag {
    base ospfv2-lsa-option;
    description
      "MC Bit, when
      "MC-bit.  When set, the router supports MOSPF.";
       Multicast Extensions to OSPF (MOSPF).";
  }

  identity v2-e-flag {
    base ospfv2-lsa-option;
    description
      "E Bit, this
      "E-bit.  This bit describes the way AS-external LSAs
       are flooded.";
  }

  identity o-bit {
    base ospfv2-lsa-option;
    description
      "O bit, when
      "O-bit.  When set, the router is opaque-capable opaque capable as described
       in RFC 5250.";
    reference
      "RFC 5250: The OSPF Opaque LSA Option";
  }

  identity v2-dn-bit {
    base ospfv2-lsa-option;
    description
      "DN bit, when bit.  When a type 3, 5 type 5, or type 7 LSA is sent from a
       PE to a CE, the DN bit must be set.  See RFC 4576.";
    reference
      "RFC 4576: Using a Link State Advertisement (LSA) Options Bit
       to Prevent Looping in BGP/MPLS IP Virtual Private Networks
       (VPNs)";
  }

  identity ospfv2-extended-prefix-flag {
    description
      "Base identity for extended prefix the Extended Prefix TLV flag.";
  }

  identity a-flag {
    base ospfv2-extended-prefix-flag;
    description
      "Attach flag, when set flag.  When set, it indicates that the prefix
       corresponds and a route what is directly connected to
       the advertising router.."; router.";
  }

  identity node-flag {
    base ospfv2-extended-prefix-flag;
    description
      "Node flag, when flag.  When set, it indicates that the prefix is
       used to represent the advertising node, e.g., a loopback
       address.";
  }

  typedef ospf-metric {
    type uint32 {
      range "0 .. 16777215";
    }
    description
      "OSPF Metric - metric.  24-bit unsigned integer.";
  }

  typedef ospf-link-metric {
    type uint16 {
      range "0 .. 65535";
    }
    description
      "OSPF Link Metric - link metric.  16-bit unsigned integer.";
  }

  typedef opaque-id {
    type uint32 {
      range "0 .. 16777215";
    }
    description
      "Opaque ID - ID.  24-bit unsigned integer.";
  }

  typedef area-id-type {
    type yang:dotted-quad;
    description
      "Area ID type.";
  }

  typedef route-type {
    type enumeration {
      enum intra-area {
        description
          "OSPF intra-area route.";
      }
      enum inter-area {
        description
          "OSPF inter-area route.";
      }
      enum external-1 {
        description
          "OSPF type 1 external route.";
      }
      enum external-2 {
        description
          "OSPF type 2 external route.";
      }
      enum nssa-1 {
        description
          "OSPF type 1 NSSA route.";
      }
      enum nssa-2 {
        description
          "OSPF type 2 NSSA route.";
      }
    }
    description
      "OSPF route type.";
  }

  typedef if-state-type {
    type enumeration {
      enum down {
        value "1";
        description
          "Interface down is in the 'Down' state.";
      }
      enum loopback {
        value "2";
        description
          "Interface loopback is in the 'Loopback' state.";
      }
      enum waiting {
        value "3";
        description
          "Interface waiting is in the 'Waiting' state.";
      }
      enum point-to-point {
        value "4";
        description
          "Interface point-to-point is in the 'Point-to-point' state.";
      }
      enum dr {
        value "5";
        description
          "Interface Designated Router (DR) is in the 'DR' (Designated Router) state.";
      }
      enum bdr {
        value "6";
        description
          "Interface Backup is in the 'Backup' (Backup Designated Router (BDR)
           (BDR)) state.";
      }
      enum dr-other {
        value "7";
        description
          "Interface Other Designated Router is in the 'DR Other' state.";
      }
    }
    description
      "OSPF interface state type.";
    reference
      "RFC 2328: OSPF Version 2";
  }

  typedef router-link-type {
    type enumeration {
      enum point-to-point-link {
        value "1";
        description
          "Point-to-Point
          "Point-to-point link to Router"; the router.";
      }
      enum transit-network-link {
        value "2";
        description
          "Link to the transit network network, identified by
           Designated-Router (DR)"; the DR.";
      }
      enum stub-network-link {
        value "3";
        description
          "Link to the stub network network, identified by subnet"; the subnet.";
      }
      enum virtual-link {
        value "4";
        description
          "Virtual link across a transit area"; area.";
      }
    }
    description
      "OSPF Router Link Type."; router link type.";
  }

  typedef nbr-state-type {
    type enumeration {
      enum down {
        value "1";
        description
          "Neighbor down is in the 'Down' state.";
      }
      enum attempt {
        value "2";
        description
          "Neighbor attempt is in the 'Attempt' state.";
      }
      enum init {
        value "3";
        description
          "Neighbor init is in the 'Init' state.";
      }
      enum 2-way {
        value "4";
        description
          "Neighbor 2-Way is in the '2-Way' state.";
      }
      enum exstart {
        value "5";
        description
          "Neighbor exchange start is in the 'ExStart' (exchange start) state.";
      }
      enum exchange {
        value "6";
        description
          "Neighbor exchange is in the 'Exchange' state.";
      }
      enum loading {
        value "7";
        description
          "Neighbor loading is in the 'Loading' state.";
      }
      enum full {
        value "8";
        description
          "Neighbor full is in the 'Full' state.";
      }
    }
    description
      "OSPF neighbor state type.";
    reference
      "RFC 2328: OSPF Version 2";
  }

  typedef restart-helper-status-type {
    type enumeration {
      enum not-helping {
        value "1";
        description
          "Restart helper status not helping."; of 'not-helping'.";
      }
      enum helping {
        value "2";
        description
          "Restart helper status helping."; of 'helping'.";
      }
    }
    description
      "Restart helper status type.";
  }

  typedef restart-exit-reason-type {
    type enumeration {
      enum none {
        value "1";
        description
          "Restart not attempted.";
      }
      enum in-progress {
        value "2";
        description
          "Restart in progress.";
      }
      enum completed {
        value "3";
        description
          "Restart successfully completed.";
      }
      enum timed-out {
        value "4";
        description
          "Restart timed out.";
      }
      enum topology-changed {
        value "5";
        description
          "Restart aborted due to a topology change.";
      }
    }
    description
      "Describes the outcome of the last attempt at a
       graceful restart, either by itself or acting
       as a helper.";
  }

  typedef packet-type {
    type enumeration {
      enum hello {
        value "1";
        description
          "OSPF Hello packet.";
      }
      enum database-description {
        value "2";
        description
          "OSPF Database Description packet.";
      }
      enum link-state-request {
        value "3";
        description
          "OSPF Link State Request packet.";
      }
      enum link-state-update {
        value "4";
        description
          "OSPF Link State Update packet.";
      }
      enum link-state-ack {
        value "5";
        description
          "OSPF Link State Acknowledgement Acknowledgment packet.";
      }
    }
    description
      "OSPF packet type.";
  }

  typedef nssa-translator-state-type {
    type enumeration {
      enum enabled {
        value "1";
        description
          "NSSA translator enabled state.";
      }
      enum elected {
        value "2";
        description
          "NSSA translator elected state.";
      }
      enum disabled {
        value "3";
        description
          "NSSA translator disabled state.";
      }
    }
    description
      "OSPF NSSA translator state type.";
  }

  typedef restart-status-type {
    type enumeration {
      enum not-restarting {
        value "1";
        description
          "Router
          "The router is not restarting.";
      }
      enum planned-restart {
        value "2";
        description
          "Router
          "The router is going through a planned restart.";
      }
      enum unplanned-restart {
        value "3";
        description
          "Router
          "The router is going through an unplanned restart.";
      }
    }
    description
      "OSPF graceful restart status type.";
  }

  typedef fletcher-checksum16-type {
    type string {
       pattern '(0x)?[0-9a-fA-F]{4}';
    }
     description
       "Fletcher 16-bit checksum in hex-string format 0xXXXX.";
     reference
       "RFC 905: ISO Transport Protocol specification Specification ISO DP 8073";
  }

  typedef ospfv2-auth-trailer-rfc-version {
    type enumeration {
      enum rfc5709 {
        description
          "Support for the OSPF Authentication Trailer as
           described in RFC 5709"; 5709.";
        reference
          "RFC 5709: OSPFv2 HMAC-SHA Cryptographic Authentication";
      }
      enum rfc7474 {
        description
          "Support for the OSPF Authentication Trailer as
           described in RFC 7474"; 7474.";
        reference
          "RFC 7474: Security Extension for OSPFv2
           When Using Manual Key Management Authentication"; Management";
      }
    }
    description
      "OSPFv2 Authentication Trailer Support"; support.";
  }

  grouping tlv {
    description
      "Type-Length-Value (TLV)"; (TLV).";
    leaf type {
      type uint16;
      description
        "TLV type.";
    }
    leaf length {
      type uint16;
      description
        "TLV length (octets).";
    }
    leaf value {
      type yang:hex-string;
      description
        "TLV value.";
    }
  }

  grouping unknown-tlvs {
    description
      "Unknown TLVs grouping - Used
      "Grouping used for unknown TLVs or unknown sub-TLVs.";
    container unknown-tlvs {
      description
        "All unknown TLVs.";
      list unknown-tlv {
        description
          "Unknown TLV.";
        uses tlv;
      }
    }
  }

  grouping node-tag-tlv {
    description
      "OSPF Node Admin Tag TLV grouping.";
    list node-tag {
      leaf tag {
        type uint32;
        description
          "Node admin tag value.";
          "Value of the node administrative tag.";
      }
      description
        "List of tags.";
    }
  }

  grouping router-capabilities-tlv {
    description "OSPF Router Capabilities
      "Grouping for OSPF router capabilities TLV grouping."; types.";
    reference
      "RFC 7770: Extensions to OSPF for Advertising Optional
       Router Capabilities";
    container router-informational-capabilities {
      leaf-list informational-capabilities {
        type identityref {
          base informational-capability;
        }
        description
          "Informational capability list.
          "List of informational capabilities.  This list will
           contains
           contain the identities for the informational
           capabilities supported by the router.";
      }
      description
         "OSPF Router Informational Flag Definitions."; definitions.";
    }
    list informational-capabilities-flags {
      leaf informational-flag {
        type uint32;
        description
          "Individual informational capability flag.";
      }
      description
        "List of informational capability flags.  This will
         return all the 32-bit informational flags flags, irrespective
         of whether or not they are known to the device.";
    }
    list functional-capabilities {
      leaf functional-flag {
        type uint32;
        description
          "Individual functional capability flag.";
      }
      description
        "List of functional capability flags.  This will
         return all the 32-bit functional flags flags, irrespective
         of whether or not they are known to the device.";
    }
  }

  grouping dynamic-hostname-tlv {
    description
      "Dynamic Hostname TLV"; TLV.";
    reference
      "RFC 5642: Dynamic Hostnames Hostname Exchange Mechanism for OSPF";
    leaf hostname {
      type string {
        length "1..255";
      }
      description
        "Dynamic Hostname"; hostname.";
    }
  }

  grouping sbfd-discriminator-tlv {
    description "Seamless BFD
      "S-BFD Discriminator TLV"; TLV.";
    reference
      "RFC 7884: S-BFD Discriminators in OSPF"; OSPF Extensions to Advertise Seamless Bidirectional
       Forwarding Detection (S-BFD) Target Discriminators";
    list sbfd-discriminators {
      leaf sbfd-discriminator {
        type uint32;
        description
          "Individual S-BFD Discriminator.";
      }
      description
        "List of S-BFD Discriminators"; Discriminators.";
    }
  }

  grouping maximum-sid-depth-tlv {
    description "Maximum
      "Node MSD TLV (TLV for Maximum SID Depth (MSD) TLV"; Depth).";
    reference
      "RFC 8476: Signaling Maximum Segment SID Depth (MSD)
       using Using OSPF";
    list msd-type {
      leaf msd-type {
        type uint8;
        description
          "Maximum Segment SID Depth (MSD) type"; type.";
      }
      leaf msd-value {
        type uint8;
        description
          "Maximum Segment Depth (MSD)
          "MSD value for the type"; type.";
      }
      description
        "List of Maximum Segment Depth (MSD) tuples"; MSD tuples.";
    }
  }

  grouping ospf-router-lsa-bits {
    container router-bits {
      leaf-list rtr-lsa-bits {
        type identityref {
          base router-lsa-bit;
        }
        description
          "Router
          "List of Router LSA bits list. bits.  This list will contain
           identities for the bits which bits; these identities are set
           in the Router-LSA bits.";
      }
      description
        "Router LSA Bits."; bits.";
    }
    description
      "Router LSA Bits - bits.  Currently common for to both OSPFv2 and
       OSPFv3 but it may diverge with future augmentations.";
  }

  grouping ospfv2-router-link {
    description
      "OSPFv2 router link.";
    leaf link-id {
      type union {
        type inet:ipv4-address;
        type yang:dotted-quad;
      }
      description
        "Router-LSA Link ID"; ID.";
    }
    leaf link-data {
      type union {
        type inet:ipv4-address;
        type uint32;
      }
      description
        "Router-LSA Link link data.";
    }
    leaf type {
      type router-link-type;
      description
        "Router-LSA Link link type.";
    }
  }

  grouping ospfv2-lsa-body {
    description
      "OSPFv2 LSA body.";
    container router {
      when "derived-from-or-self(../../header/type, "
          + "'ospfv2-router-lsa')" {
        description
          "Only applies to Router-LSAs.";
      }
      description
        "Router LSA.";
      uses ospf-router-lsa-bits;
      leaf num-of-links {
        type uint16;
        description
          "Number of links in the Router LSA.";
      }
      container links {
        description
          "All router Links."; links.";
        list link {
          description
            "Router LSA link.";
          uses ospfv2-router-link;
          container topologies {
            description
              "All topologies for the link.";
            list topology {
              description
                "Topology specific
                "Topology-specific information.";
              leaf mt-id {
                type uint8;
                description
                  "The MT-ID for the topology enabled on the link.";
              }
              leaf metric {
                type uint16;
                description
                  "Metric for the topology.";
              }
            }
          }
        }
      }
    }
    container network {
      when "derived-from-or-self(../../header/type, "
          + "'ospfv2-network-lsa')" {
        description
          "Only applies to Network LSAs.";
      }
      description
        "Network LSA.";
      leaf network-mask {
        type yang:dotted-quad;
        description
          "The IP address mask for the network.";
      }
      container attached-routers {
        description
          "All attached routers.";
        leaf-list attached-router {
          type inet:ipv4-address;
          description
            "List of the routers attached to the network.";
        }
      }
    }
    container summary {
      when "derived-from(../../header/type, "
         + "'ospfv2-summary-lsa-type')" {
        description
          "Only applies to Summary LSAs.";
      }
      description
        "Summary LSA.";
      leaf network-mask {
        type inet:ipv4-address;
        description
          "The IP address mask for the network"; network.";
      }
      container topologies {
        description
          "All topologies for the summary LSA.";
        list topology {
          description
            "Topology specific
            "Topology-specific information.";
          leaf mt-id {
            type uint8;
            description
              "The MT-ID for the topology enabled for the summary.";
          }
          leaf metric {
            type ospf-metric;
            description
              "Metric for the topology.";
          }
        }
      }
    }
    container external {
      when "derived-from(../../header/type, "
         + "'ospfv2-external-lsa-type')" {
        description
          "Only applies to AS-external LSAs and NSSA LSAs.";
      }
      description
        "External LSA.";
      leaf network-mask {
        type inet:ipv4-address;
        description
          "The IP address mask for the network"; network.";
      }
      container topologies {
        description
          "All topologies for the external.";
        list topology {
          description
            "Topology specific
            "Topology-specific information.";
          leaf mt-id {
            type uint8;
            description
              "The MT-ID for the topology enabled for the
               external or NSSA prefix.";
          }
          leaf flags {
            type bits {
              bit E {
                description
                  "When set, the metric specified is a Type 2
                   external metric.";
              }
            }
            description
              "Flags.";
          }
          leaf metric {
            type ospf-metric;
            description
              "Metric for the topology.";
          }
          leaf forwarding-address {
            type inet:ipv4-address;
            description
              "Forwarding address.";
          }
          leaf external-route-tag {
            type uint32;
            description
              "Route tag for the topology.";
          }
        }
      }
    }
    container opaque {
      when "derived-from(../../header/type, "
         + "'ospfv2-opaque-lsa-type')" {
        description
          "Only applies to Opaque LSAs.";
      }
      description
        "Opaque LSA.";

      container ri-opaque {
        description
          "OSPF Router Information (RI) opaque Opaque LSA.";
        reference
          "RFC 7770: Extensions to OSPF for Advertising Optional
           Router Capabilities";

        container router-capabilities-tlv {
          description
            "Informational and functional router capabilities"; capabilities.";
          uses router-capabilities-tlv;
        }

        container node-tag-tlvs {
          description
            "All node tag TLVs.";
          list node-tag-tlv {
            description
              "Node tag TLV.";
            uses node-tag-tlv;
          }
        }

        container dynamic-hostname-tlv {
          description
            "OSPF Dynamic Hostname"; dynamic hostname.";
          uses dynamic-hostname-tlv;
        }

        container sbfd-discriminator-tlv {
          description
            "OSPF S-BFD Discriminators"; Discriminators.";
          uses sbfd-discriminator-tlv;
        }

        container maximum-sid-depth-tlv {
          description
            "OSPF Maximum SID Depth (MSD) values"; MSD values.";
          uses maximum-sid-depth-tlv;
        }
        uses unknown-tlvs;
      }

      container te-opaque {
        description
          "OSPFv2 Traffic Engineering (TE) opaque TE Opaque LSA.";
        reference
          "RFC 3630: Traffic Engineering (TE) Extensions to OSPFv2";
           OSPF Version 2";

        container router-address-tlv {
          description
            "Router address TLV.";
          leaf router-address {
            type inet:ipv4-address;
            description
              "Router address.";
          }
        }

        container link-tlv {
          description
            "Describes a single link, and it link.  It is constructed
          of
             from a set of Sub-TLVs."; sub-TLVs.";
          leaf link-type {
            type router-link-type;
            mandatory true;
            description
              "Link type.";
          }
          leaf link-id {
            type union {
              type inet:ipv4-address;
              type yang:dotted-quad;
            }
            mandatory true;
            description
              "Link ID.";
          }
          container local-if-ipv4-addrs {
            description
              "All local interface IPv4 addresses.";
            leaf-list local-if-ipv4-addr {
              type inet:ipv4-address;
              description
                "List of local interface IPv4 addresses.";
            }
          }
          container remote-if-ipv4-addrs {
            description
              "All remote interface IPv4 addresses.";
            leaf-list remote-if-ipv4-addr {
              type inet:ipv4-address;
              description
                "List of remote interface IPv4 addresses.";
            }
          }
          leaf te-metric {
            type uint32;
            description
              "TE metric.";
          }
          leaf max-bandwidth {
            type rt-types:bandwidth-ieee-float32;
            description
              "Maximum bandwidth.";
          }
          leaf max-reservable-bandwidth {
            type rt-types:bandwidth-ieee-float32;
            description
              "Maximum reservable bandwidth.";
          }
          container unreserved-bandwidths {
            description
              "All unreserved bandwidths.";
            list unreserved-bandwidth {
              leaf priority {
                type uint8 {
                  range "0 .. 7";
                }
                description
                  "Priority from 0 to 7.";
              }
              leaf unreserved-bandwidth {
                type rt-types:bandwidth-ieee-float32;
                description
                  "Unreserved bandwidth.";
              }
              description
                "List of unreserved bandwidths for different
                 priorities.";
            }
          }
          leaf admin-group {
            type uint32;
            description
              "Administrative group/Resource Group / Resource Class/Color.";
          }
          uses unknown-tlvs;
        }
      }

      container extended-prefix-opaque {
        description
          "All extended prefix Extended Prefix TLVs in the LSA.";
        list extended-prefix-tlv {
          description
            "Extended prefix Prefix TLV.";
          leaf route-type {
            type enumeration {
              enum unspecified {
                value "0";
                description
                  "Unspecified.";
              }
              enum intra-area {
                value "1";
                description
                  "OSPF intra-area route.";
              }
              enum inter-area {
                value "3";
                description
                  "OSPF inter-area route.";
              }
              enum external {
                value "5";
                description
                  "OSPF External external route.";
              }
              enum nssa {
                value "7";
                description
                  "OSPF NSSA external route.";
              }
            }
            description
              "Route type.";
          }
          container flags {
            leaf-list extended-prefix-flags {
              type identityref {
                base ospfv2-extended-prefix-flag;
              }
              description
                "Extended prefix
                "List of Extended Prefix TLV flags list. flags.  This list will
                 contain identities for the prefix flags that flags; these
                 identities are set in the extended prefix flags.";
            }
            description
              "Prefix Flags."; flags.";
          }
          leaf prefix {
            type inet:ip-prefix;
            description
              "Address prefix.";
          }
          uses unknown-tlvs;
        }
      }

      container extended-link-opaque {
        description
          "All extended link Extended Link TLVs in the LSA.";
        reference
          "RFC 7684: OSPFv2 Prefix/Link Attribute Advertisement";
        container extended-link-tlv {
          description
            "Extended link Link TLV.";
          uses ospfv2-router-link;
          container maximum-sid-depth-tlv {
            description
              "OSPF Maximum SID Depth (MSD) values"; MSD values.";
            uses maximum-sid-depth-tlv;
          }
          uses unknown-tlvs;
        }
      }
    }
  }

  grouping ospfv3-lsa-options {
    description
      "OSPFv3 LSA options"; options.";
    container lsa-options {
      leaf-list lsa-options {
        type identityref {
          base ospfv3-lsa-option;
        }
        description
          "OSPFv3
          "List of OSPFv3 LSA Option flags list. flags.  This list will contain
           the identities for the OSPFv3 LSA options that are
           set for the LSA.";
      }
      description
        "OSPFv3 LSA options.";
    }
  }

  grouping ospfv3-lsa-prefix {
    description
      "OSPFv3 LSA prefix.";

    leaf prefix {
      type inet:ip-prefix;
      description
        "LSA Prefix."; prefix.";
    }
    container prefix-options {
      leaf-list prefix-options {
        type identityref {
          base ospfv3-prefix-option;
        }
        description
          "OSPFv3
          "List of OSPFv3 prefix option flag list. flags.  This list will
           contain the identities for the OSPFv3 options
           that are set for the OSPFv3 prefix.";
      }
      description
        "Prefix options.";
    }
  }

  grouping ospfv3-lsa-external {
    description
      "AS-External and NSSA LSA.";
    leaf metric {
      type ospf-metric;
      description "Metric";
        "Metric.";
    }
    leaf flags {
      type bits {
        bit E {
          description
            "When set, the metric specified is a Type 2
             external metric.";
        }
        bit F {
          description
            "When set, a Forwarding Address forwarding address is included
             in the LSA.";
        }
        bit T {
          description
            "When set, an External Route Tag external route tag is included
             in the LSA.";
        }
      }
      description
        "Flags.";
    }

    leaf referenced-ls-type {
      type identityref {
        base ospfv3-lsa-type;
      }
      description
        "Referenced Link State type.";
    }
    leaf unknown-referenced-ls-type {
      type uint16;
      description
        "Value for an unknown Referenced Link State type.";
    }

    uses ospfv3-lsa-prefix;

    leaf forwarding-address {
      type inet:ipv6-address;
      description
        "Forwarding address.";
    }

    leaf external-route-tag {
      type uint32;
      description
        "Route tag.";
    }
    leaf referenced-link-state-id {
      type uint32;
      description
        "Referenced Link State ID.";
      reference
        "RFC 5340: OSPF for IPv6";
    }
  }

  grouping ospfv3-lsa-body {
    description
      "OSPFv3 LSA body.";
    container router {
      when "derived-from-or-self(../../header/type, "
         + "'ospfv3-router-lsa')" {
        description
          "Only applies to Router LSAs.";
      }
      description
        "Router LSA.";
      uses ospf-router-lsa-bits;
      uses ospfv3-lsa-options;

      container links {
        description
          "All router link."; links.";
        list link {
          description
            "Router LSA link.";
          leaf interface-id {
            type uint32;
            description
              "Interface ID for the link.";
          }
          leaf neighbor-interface-id {
            type uint32;
            description
              "Neighbor's Interface ID for the link.";
          }
          leaf neighbor-router-id {
            type rt-types:router-id;
            description
              "Neighbor's Router ID for the link.";
          }
          leaf type {
            type router-link-type;
            description
              "Link type: 1 - Point-to-Point Link
                          2 - Transit Network Link
                          3 - Stub Network Link
                          4 - Virtual Link"; Link.";
          }
          leaf metric {
            type uint16;
              description
                "Link Metric."; metric.";
          }
        }
      }
    }
    container network {
      when "derived-from-or-self(../../header/type, "
         + "'ospfv3-network-lsa')" {
        description
          "Only applies to Network LSAs.";
      }
      description
        "Network LSA.";

      uses ospfv3-lsa-options;

      container attached-routers {
        description
          "All attached routers.";
        leaf-list attached-router {
          type rt-types:router-id;
          description
            "List of the routers attached to the network.";
        }
      }
    }
    container inter-area-prefix {
      when "derived-from-or-self(../../header/type, "
         + "'ospfv3-inter-area-prefix-lsa')" {
        description
          "Only applies to Inter-Area-Prefix LSAs.";
      }
      leaf metric {
        type ospf-metric;
        description
          "Inter-Area Prefix Metric"; metric.";
      }
      uses ospfv3-lsa-prefix;
      description
        "Prefix LSA.";
    }
    container inter-area-router {
      when "derived-from-or-self(../../header/type, "
         + "'ospfv3-inter-area-router-lsa')" {
        description
          "Only applies to Inter-Area-Router LSAs.";
      }
      uses ospfv3-lsa-options;
      leaf metric {
        type ospf-metric;
        description "AS
          "Autonomous System Boundary Router (ASBR) Metric."; metric.";
      }
      leaf destination-router-id {
        type rt-types:router-id;
        description
          "The Router ID of the ASBR described by the LSA.";
      }
      description
        "Inter-Area-Router LSA.";
    }
    container as-external {
      when "derived-from-or-self(../../header/type, "
         + "'ospfv3-as-external-lsa')" {
        description
          "Only applies to AS-external LSAs.";
      }

      uses ospfv3-lsa-external;

      description
        "AS-External LSA.";
    }
    container nssa {
      when "derived-from-or-self(../../header/type, "
         + "'ospfv3-nssa-lsa')" {
        description
          "Only applies to NSSA LSAs.";
      }
      uses ospfv3-lsa-external;

      description
        "NSSA LSA.";
    }
    container link {
      when "derived-from-or-self(../../header/type, "
         + "'ospfv3-link-lsa')" {
        description
          "Only applies to Link link LSAs.";
      }
      leaf rtr-priority {
        type uint8;
        description
          "Router priority for DR election.  A router with a
           higher priority will be preferred in the election
           and a election.
           A value of 0 indicates that the router is not eligible
           to become Designated Router the DR or Backup
           Designated Router (BDR)."; BDR.";
      }
      uses ospfv3-lsa-options;

      leaf link-local-interface-address {
        type inet:ipv6-address;
        description
          "The originating router's link-local
           interface address for the link.";
      }

      leaf num-of-prefixes {
        type uint32;
        description
          "Number of prefixes.";
      }

      container prefixes {
        description
          "All prefixes for the link.";
        list prefix {
          description
            "List of prefixes associated with the link.";
          uses ospfv3-lsa-prefix;
        }
      }
      description
        "Link LSA.";
    }
    container intra-area-prefix {
      when "derived-from-or-self(../../header/type, "
         + "'ospfv3-intra-area-prefix-lsa')" {
        description
          "Only applies to Intra-Area-Prefix LSAs.";
      }
      description
        "Intra-Area-Prefix LSA.";

      leaf referenced-ls-type {
        type identityref {
          base ospfv3-lsa-type;
        }
        description
          "Referenced Link State type.";
      }
      leaf unknown-referenced-ls-type {
        type uint16;
        description
          "Value for an unknown Referenced Link State type.";
      }
      leaf referenced-link-state-id {
        type uint32;
        description
          "Referenced Link State ID.";
      }
      leaf referenced-adv-router {
        type rt-types:router-id;
        description
          "Referenced Advertising Router.";
        reference
          "RFC 5340: OSPF for IPv6";
      }

      leaf num-of-prefixes {
        type uint16;
        description
          "Number of prefixes.";
      }
      container prefixes {
        description
          "All prefixes in this LSA.";
        list prefix {
          description
            "List of prefixes in this LSA.";
          uses ospfv3-lsa-prefix;
          leaf metric {
            type ospf-metric;
            description
              "Prefix Metric."; metric.";
          }
        }
      }
    }
    container router-information {
      when "derived-from-or-self(../../header/type, "
         + "'ospfv3-router-information-lsa')" {
        description
          "Only applies to Router Information LSAs (RFC7770)."; (RFC 7770).";
        reference
          "RFC 7770: Extensions to OSPF for Advertising Optional
           Router Capabilities";
      }
      container router-capabilities-tlv {
        description
          "Informational and functional router capabilities"; capabilities.";
        uses router-capabilities-tlv;
      }
      container node-tag-tlvs {
        description
          "All node tag tlvs."; TLVs.";
        list node-tag-tlv {
          description
            "Node tag tlv."; TLV.";
          uses node-tag-tlv;
        }
      }
      container dynamic-hostname-tlv {
        description
          "OSPF Dynamic Hostname"; dynamic hostname.";
        uses dynamic-hostname-tlv;
      }
      container sbfd-discriminator-tlv {
        description
          "OSPF S-BFD Discriminators"; Discriminators.";
        uses sbfd-discriminator-tlv;
      }
      description
        "Router Information LSA.";
      reference
        "RFC 7770: Extensions to OSPF for Advertising Optional
         Router Capabilities";
    }
  }

  grouping lsa-header {
    description
      "Common LSA for OSPFv2 and OSPFv3"; OSPFv3.";
    leaf age {
      type uint16;
      mandatory true;
      description
        "LSA age.";
    }
    leaf type {
      type identityref {
        base ospf-lsa-type;
      }
      mandatory true;
      description
        "LSA type"; type.";
    }
    leaf adv-router {
      type rt-types:router-id;
      mandatory true;
      description
        "LSA advertising router.";
    }
    leaf seq-num {
      type uint32;
      mandatory true;
      description
        "LSA sequence number.";
    }
    leaf checksum {
      type fletcher-checksum16-type;
      mandatory true;
      description
        "LSA checksum.";
    }
    leaf length {
      type uint16;
      mandatory true;
      description
        "LSA length length, including the header.";
    }
  }

  grouping ospfv2-lsa {
    description
      "OSPFv2 LSA - LSA.  LSAs are uniquely identified by
       the <LSA Type, Link-State Link State ID, Advertising Router>
         tuple
       tuple, with the sequence number differentiating the
       LSA instances.";
    container header {
      must "(derived-from(type, "
         + "'ospfv2-opaque-lsa-type') and "
         + "opaque-id and opaque-type) or "
         + "(not(derived-from(type, "
         + "'ospfv2-opaque-lsa-type')) "
         + "and not(opaque-id) and not(opaque-type))" {
        description
          "Opaque
          "The Opaque type and the Opaque ID only apply to
           Opaque LSAs.";
      }
      description
        "Decoded OSPFv2 LSA header data.";

      container lsa-options {
        leaf-list lsa-options {
          type identityref {
            base ospfv2-lsa-option;
          }
          description
            "LSA
            "List of LSA option flags list. flags.  This list will contain the
             identities for the identities for the OSPFv2 LSA options that are set.";
        }
        description
          "LSA options.";
      }

      leaf lsa-id {
        type yang:dotted-quad;
        mandatory true;
        description "Link-State
          "Link State ID.";
      }

      leaf opaque-type {
        type uint8;
        description
          "Opaque type.";
      }

      leaf opaque-id {
        type opaque-id;
        description
          "Opaque ID.";
      }

      uses lsa-header;
    }
    container body {
      description
        "Decoded OSPFv2 LSA body data.";
      uses ospfv2-lsa-body;
    }
  }

  grouping ospfv3-lsa {
    description
      "Decoded OSPFv3 LSA.";
    container header {
      description
        "Decoded OSPFv3 LSA header data.";
      leaf lsa-id {
        type uint32;
        mandatory true;
        description
          "OSPFv3 LSA ID.";
      }
      uses lsa-header;
    }
    container body {
      description
        "Decoded OSPF LSA body data.";
      uses ospfv3-lsa-body;
    }
  }
  grouping lsa-common {
    description
      "Common fields for OSPF LSA representation.";
    leaf decode-completed {
      type boolean;
      description
        "The OSPF LSA body was successfully decoded other than
         unknown TLVs.  Unknown LSAs LSA types and OSPFv2 unknown
         opaque
         Opaque LSA types are not decoded.  Additionally,
         malformed LSAs are generally not accepted and will
         not be in the Link State Database."; Database (LSDB).";
    }
    leaf raw-data {
      type yang:hex-string;
      description
        "The complete LSA in network byte
         order hexadecimal representation of the complete LSA as
         received or originated."; originated, in network byte order.";
    }
  }

  grouping lsa {
    description
      "OSPF LSA.";
    uses lsa-common;
    choice version {
      description
        "OSPFv2 or OSPFv3 LSA body.";
      container ospfv2 {
        description
          "OSPFv2 LSA"; LSA.";
        uses ospfv2-lsa;
      }
      container ospfv3 {
        description
          "OSPFv3 LSA"; LSA.";
        uses ospfv3-lsa;
      }
    }
  }

  grouping lsa-key {
    description
      "OSPF LSA key - the key.  The database key for each LSA of a given
       type in the Link State DataBase (LSDB)."; LSDB.";
    leaf lsa-id {
      type union {
        type yang:dotted-quad;
        type uint32;
      }
      description
        "Link-State
        "Link State ID.";
    }
    leaf adv-router {
      type rt-types:router-id;
      description
        "Advertising router.";
    }
  }

  grouping instance-stat {
    description
      "Per-instance statistics"; statistics.";
    leaf discontinuity-time {
      type yang:date-and-time;
      description
        "The time on of the most recent occasion at which any one or
         more of this OSPF instance's counters suffered a
         discontinuity.  If no such discontinuities have occurred
         since the OSPF instance was last re-initialized, reinitialized, then
         this node contains the time the OSPF instance was
         re-initialized
         reinitialized, which normally occurs when it was
         created.";
    }
    leaf originate-new-lsa-count {
      type yang:counter32;
      description
        "The number of new LSAs originated.  Discontinuities in the
         value of this counter can occur when the OSPF instance is
         re-initialized.";
         reinitialized.";
    }
    leaf rx-new-lsas-count {
      type yang:counter32;
      description
        "The number of new LSAs received.  Discontinuities in the
         value of this counter can occur when the OSPF instance is
         re-initialized.";
         reinitialized.";
    }
    leaf as-scope-lsa-count {
      type yang:gauge32;
      description
        "The number of AS-scope LSAs.";
    }
    leaf as-scope-lsa-chksum-sum {
      type uint32;
      description
        "The module 2**32 sum of the LSA checksums
         for AS-scope LSAs.  The value should be treated as
         unsigned when comparing two sums of checksums.  While
         differing checksums indicate a different combination
         of LSAs, equivalent checksums don't guarantee that the
         LSAs are the same same, given that multiple combinations of
         LSAs can result in the same checksum.";
    }
    container database {
      description
        "Container for per AS-scope per-AS-scope LSA statistics.";
      list as-scope-lsa-type {
        description
          "List of AS-scope LSA statistics"; statistics.";
        leaf lsa-type {
          type uint16;
          description
            "AS-Scope LSA type.";
        }
        leaf lsa-count {
          type yang:gauge32;
          description
            "The number of LSAs of the this LSA type.";
        }
        leaf lsa-cksum-sum {
          type uint32;
          description
            "The module 2**32 sum of the LSA checksums
             for the LSAs of this type.  The value should be
             treated as unsigned when comparing two sums of
             checksums.  While differing checksums indicate a
             different combination of LSAs, equivalent checksums
             don't guarantee that the LSAs are the same same, given that
             multiple combinations of LSAs can result in the same
             checksum.";
        }
      }
    }
    uses instance-fast-reroute-state;
  }

  grouping area-stat {
    description
      "Per-area statistics.";
    leaf discontinuity-time {
      type yang:date-and-time;
      description
        "The time on of the most recent occasion at which any one or
         more of this OSPF area's counters suffered a
         discontinuity.  If no such discontinuities have occurred
         since the OSPF area was last re-initialized, reinitialized, then
         this node contains the time the OSPF area was
          re-initialized
         reinitialized, which normally occurs when it was
         created.";
    }
    leaf spf-runs-count {
      type yang:counter32;
      description
        "The number of times the intra-area SPF has run.
         Discontinuities in the value of this counter can occur
         when the OSPF area is re-initialized."; reinitialized.";
    }
    leaf abr-count {
      type yang:gauge32;
      description
        "The total number of Area Border Routers (ABRs)
         reachable within this area.";
    }
    leaf asbr-count {
      type yang:gauge32;
      description
        "The total number of AS Boundary Routers (ASBRs)."; ASBRs.";
    }
    leaf ar-nssa-translator-event-count {
      type yang:counter32;
      description
        "The number of NSSA translator-state changes.
         Discontinuities in the value of this counter can occur
         when the OSPF area is re-initialized."; reinitialized.";
    }
    leaf area-scope-lsa-count {
      type yang:gauge32;
      description
        "The number of area-scope LSAs in the area.";
    }
    leaf area-scope-lsa-cksum-sum {
      type uint32;
      description
        "The module 2**32 sum of the LSA checksums
         for area-scope LSAs.  The value should be treated as
         unsigned when comparing two sums of checksums.  While
         differing checksums indicate a different combination
         of LSAs, equivalent checksums don't guarantee that the
         LSAs are the same same, given that multiple combinations of
         LSAs can result in the same checksum.";
    }
    container database {
      description
        "Container for area-scope LSA type statistics.";
      list area-scope-lsa-type {
        description
          "List of area-scope LSA statistics"; statistics.";
        leaf lsa-type {
          type uint16;
          description
            "Area-scope LSA type.";
        }
        leaf lsa-count {
          type yang:gauge32;
          description
            "The number of LSAs of the this LSA type.";
        }
        leaf lsa-cksum-sum {
          type uint32;
          description
            "The module 2**32 sum of the LSA checksums
             for the LSAs of this type.  The value should be
             treated as unsigned when comparing two sums of
             checksums.  While differing checksums indicate a
             different combination of LSAs, equivalent checksums
             don't guarantee that the LSAs are the same same, given that
             multiple combinations of LSAs can result in the same
             checksum.";
        }
      }
    }
  }

  grouping interface-stat {
    description
      "Per-interface statistics"; statistics.";
    leaf discontinuity-time {
      type yang:date-and-time;
      description
        "The time on of the most recent occasion at which any one or
         more of this OSPF interface's counters suffered a
         discontinuity.  If no such discontinuities have occurred
         since the OSPF interface was last re-initialized, reinitialized, then
         this node contains the time the OSPF interface was
         re-initialized
         reinitialized, which normally occurs when it was
         created.";
    }
    leaf if-event-count {
      type yang:counter32;
      description
        "The number of times this interface has changed its
         state or an error has occurred.  Discontinuities in the
         value of this counter can occur when the OSPF interface
         is re-initialized."; reinitialized.";
    }
    leaf link-scope-lsa-count {
      type yang:gauge32;
      description
        "The number of link-scope LSAs.";
    }
    leaf link-scope-lsa-cksum-sum {
      type uint32;
      description
        "The module 2**32 sum of the LSA checksums
         for link-scope LSAs.  The value should be treated as
         unsigned when comparing two sums of checksums.  While
         differing checksums indicate a different combination
         of LSAs, equivalent checksums don't guarantee that the
         LSAs are the same same, given that multiple combinations of
         LSAs can result in the same checksum.";
    }
    container database {
      description
        "Container for link-scope LSA type statistics.";
      list link-scope-lsa-type {
        description
          "List of link-scope LSA statistics"; statistics.";
        leaf lsa-type {
          type uint16;
          description "Link scope
            "Link-scope LSA type.";
        }
        leaf lsa-count {
          type yang:gauge32;
          description
            "The number of LSAs of the this LSA type.";
        }
        leaf lsa-cksum-sum {
          type uint32;
          description
            "The module 2**32 sum of the LSA checksums
             for the LSAs of this type.  The value should be
             treated as unsigned when comparing two sums of
             checksums.  While differing checksums indicate a
             different combination of LSAs, equivalent checksums
             don't guarantee that the LSAs are the same same, given that
             multiple combinations of LSAs can result in the same
             checksum.";
        }
      }
    }
  }

  grouping neighbor-stat {
    description
      "Per-neighbor statistics.";
    leaf discontinuity-time {
      type yang:date-and-time;
      description
        "The time on of the most recent occasion at which any one or
         more of this OSPF neighbor's counters suffered a
         discontinuity.  If no such discontinuities have occurred
         since the OSPF neighbor was last re-initialized, reinitialized, then
         this node contains the time the OSPF neighbor was
         re-initialized
         reinitialized, which normally occurs when the neighbor
         is dynamically discovered andcreated."; and created.";
    }
    leaf nbr-event-count {
      type yang:counter32;
      description
        "The number of times this neighbor has changed
         state or an error has occurred.  Discontinuities in the
         value of this counter can occur when the OSPF neighbor
         is re-initialized."; reinitialized.";
    }
    leaf nbr-retrans-qlen {
      type yang:gauge32;
      description
        "The current length of the retransmission queue.";
    }
  }

  grouping instance-fast-reroute-config {
    description
      "This group defines the global configuration of
       IP Fast ReRoute (FRR)."; Reroute (IP-FRR).";
    container fast-reroute {
      if-feature fast-reroute;
      description
        "This container may be augmented with global
         parameters for IP-FRR.";
      container lfa {
        if-feature lfa;
        description
          "This container may be augmented with
           global parameters for Loop-Free Alternatives (LFA). Alternates (LFAs).
           Container creation has no effect on LFA activation.";
      }
    }
  }

  grouping instance-fast-reroute-state {
    description
      "IP-FRR state data grouping"; grouping.";

    container protected-routes {
      if-feature fast-reroute;
      config false;
      description
        "Instance protection statistics"; statistics.";

      list address-family-stats {
        key "address-family prefix alternate";
        description
          "Per Address Family
          "Per-Address-Family (AF) protected prefix information"; information.";

        leaf address-family {
          type iana-rt-types:address-family;
          description
            "Address-family";
            "Address family.";
        }
        leaf prefix {
          type inet:ip-prefix;
          description
            "Protected prefix.";
        }
        leaf alternate {
          type inet:ip-address;
          description
            "Alternate next hop for the prefix.";
        }
        leaf alternate-type {
          type enumeration {
            enum equal-cost {
              description
                "ECMP
                "ECMP-based alternate.";
            }
            enum lfa {
              description
                "LFA
                "LFA-based alternate.";
            }
            enum remote-lfa {
              description
                "Remote LFA
                "Remote-LFA-based alternate.";
            }
            enum tunnel {
              description
                "Tunnel based
                "Tunnel-based alternate (like RSVP-TE or GRE).";
            }
            enum ti-lfa {
              description
                "TI-LFA
                "TI-LFA-based alternate.";
            }
            enum mrt {
              description
                "MRT
                "MRT-based alternate.";
            }
            enum other {
              description
                "Unknown alternate type.";
            }
          }
          description
            "Type of alternate.";
        }
        leaf best {
          type boolean;
          description
            "Indicates that this alternate is preferred.";
        }
        leaf non-best-reason {
          type string {
            length "1..255";
          }
          description
            "Information field used to describe why the alternate
             is not best."; the best choice.";
        }
        leaf protection-available {
          type bits {
            bit node-protect {
              position 0;
              description
                "Node protection available.";
            }
            bit link-protect {
              position 1;
              description
                "Link protection available.";
            }
            bit srlg-protect {
              position 2;
              description
                "SRLG
                "Shared Risk Link Group (SRLG) protection
                 available.";
            }
            bit downstream-protect {
              position 3;
              description
                "Downstream protection available.";
            }
            bit other {
              position 4;
              description
                "Other protection available.";
            }
          }
          description
            "Protection provided by the alternate.";
        }
        leaf alternate-metric1 {
          type uint32;
          description
            "Metric from the Point of Local Repair (PLR) to
             the destination through the alternate path.";
        }
        leaf alternate-metric2 {
          type uint32;
          description
            "Metric from the PLR to the alternate node"; node.";
        }
        leaf alternate-metric3 {
          type uint32;
          description
            "Metric from the alternate node to the destination"; destination.";
        }
      }
    }

    container unprotected-routes {
      if-feature fast-reroute;
      config false;
      description
        "List of prefixes that are not protected"; protected.";

      list address-family-stats {
        key "address-family prefix";
        description
          "Per Address Family (AF)
          "Per-AF unprotected prefix statistics.";

        leaf address-family {
          type iana-rt-types:address-family;
          description "Address-family";
            "Address family.";
        }
        leaf prefix {
          type inet:ip-prefix;
          description
            "Unprotected prefix.";
        }
      }
    }

    list protection-statistics {
      key frr-protection-method;
      config false;
      description
        "List of protection method statistics"; statistics.";

      leaf frr-protection-method {
        type string;
        description
          "Protection method used.";
      }
      list address-family-stats {
        key address-family;
        description "Per Address Family
          "Per-AF protection statistics.";

        leaf address-family {
          type iana-rt-types:address-family;
          description "Address-family";
            "Address family.";
        }
        leaf total-routes {
          type uint32;
          description
            "Total prefixes.";
        }
        leaf unprotected-routes {
          type uint32;
          description
            "Total prefixes that are not protected.";
        }
        leaf protected-routes {
          type uint32;
          description
            "Total prefixes that are protected.";
        }
        leaf linkprotected-routes {
          type uint32;
          description
            "Total prefixes that are link protected.";
        }
        leaf nodeprotected-routes {
          type uint32;
          description
            "Total prefixes that are node protected.";
        }
      }
    }
  }

  grouping interface-fast-reroute-config {
    description
      "This group defines interface configuration of IP-FRR.";
    container fast-reroute {
      if-feature fast-reroute;
      container lfa {
        if-feature lfa;
        leaf candidate-enable {
          type boolean;
          default true;
          description
            "Enable
            "Enables the interface to be used as a backup.";
        }
        leaf enable {
          type boolean;
          default false;
          description
            "Activates LFA - an LFA.  Per-prefix LFA computation
             is assumed.";
        }
        container remote-lfa {
          if-feature remote-lfa;
          leaf enable {
            type boolean;
            default false;
            description
              "Activates a Remote LFA (R-LFA).";
          }
          description
            "Remote LFA
            "R-LFA configuration.";
        }
        description
          "LFA configuration.";
      }
      description
        "Interface IP Fast-reroute IP-FRR configuration.";
    }
  }

  grouping interface-physical-link-config {
    description
      "Interface cost configuration that only applies to
       physical interfaces (non-virtual) and sham links.";
    leaf cost {
      type ospf-link-metric;
      description
        "Interface
        "Interface's cost.";
    }
    leaf mtu-ignore {
      if-feature mtu-ignore;
      type boolean;
      description
        "Enable/Disable
        "Enables/disables bypassing the MTU mismatch check in
         Database Description packets as specified in Section 10.6
         of RFC 2328,
         section 10.6."; 2328.";
      reference
        "RFC 2328: OSPF Version 2, Section 10.6";
    }
    leaf prefix-suppression {
      if-feature prefix-suppression;
      type boolean;
      description
        "Suppress
        "Suppresses advertisement of the prefixes associated
         with the interface.";
    }
  }

  grouping interface-common-config {
    description
      "Common configuration for all types of interfaces,
       including virtual links and sham links.";

    leaf hello-interval {
      type uint16;
      units seconds;
      description
        "Interval between hello Hello packets (seconds).  It must
         be the same for all routers on the same network.
         Different networks, implementations, and deployments
         will use different hello-intervals. Hello intervals.  A sample value
         for a LAN network would be 10 seconds.";
      reference
        "RFC 2328: OSPF Version 2, Appendix C.3";
    }

    leaf dead-interval {
      type uint16;
      units seconds;
      must "../dead-interval > ../hello-interval" {
        error-message "The dead interval must be "
                    + "larger than the hello Hello interval";
        description
          "The value must be greater than the 'hello-interval'.";
      }
      description
        "Interval after which a neighbor is declared down
         (seconds) if hello Hello packets are not received.  It is
         typically 3 or 4 times the hello-interval. 'hello-interval' period.
         A typical value for LAN networks is 40 seconds.";
       reference
         "RFC 2328: OSPF Version 2, Appendix C.3";
    }

    leaf retransmit-interval {
      type uint16 {
         range "1..3600";
      }
      units seconds;
      description
        "Interval between retransmitting unacknowledged Link
         State Advertisements (LSAs) (seconds).  This should
         be well over the round-trip transmit delay for
         any two routers on the network.  A sample value
         would be 5 seconds.";
       reference
         "RFC 2328: OSPF Version 2, Appendix C.3";
    }

    leaf transmit-delay {
      type uint16;
      units seconds;
      description
        "Estimated time needed to transmit Link State Update
         (LSU) packets on the interface (seconds).  LSAs have
         their age incremented by this amount when advertised
         on the interface.  A sample value would be 1 second.";
       reference
         "RFC 2328: OSPF Version 2, Appendix C.3";
    }

    leaf lls {
      if-feature lls;
      type boolean;
      description
        "Enable/Disable
        "Enables/disables link-local signaling (LLS) support.";
    }

    container ttl-security {
      if-feature ttl-security;
      description
        "Time to Live (TTL) security check."; checking.";
      leaf enable {
        type boolean;
        description
          "Enable/Disable
          "Enables/disables TTL security check."; checking.";
      }
      leaf hops {
        type uint8 {
          range "1..254";
        }
        default 1;
        description
          "Maximum number of hops that an OSPF packet may
           have traversed before reception.";
      }
    }
    leaf enable {
      type boolean;
      default true;
      description
        "Enable/disable
        "Enables/disables the OSPF protocol on the interface.";
    }

    container authentication {
      description
        "Authentication configuration.";
      choice auth-type-selection {
        description
          "Options for OSPFv2/OSPFv3 authentication
           configuration.";
        case ospfv2-auth {
          when "derived-from-or-self(../../../../../../rt:type, "
            +  "'ospfv2')" {
            description
              "Applied to OSPFv2 only.";
          }
          leaf ospfv2-auth-trailer-rfc {
            if-feature ospfv2-authentication-trailer;
            type ospfv2-auth-trailer-rfc-version;
            description
              "Version of OSFPv2 authentication trailer support -
               RFC OSPFv2 Authentication Trailer support.
               See RFCs 5709 or and 7474.";
            reference
              "RFC 5709: OSPFv2 HMAC-SHA Cryptographic Authentication
               RFC 7474"; 7474: Security Extension for OSPFv2 When Using
               Manual Key Management";
          }
          choice ospfv2-auth-specification {
            description
              "Key chain or explicit key parameter specification"; specification.";
            case auth-key-chain {
              if-feature key-chain;
              leaf ospfv2-key-chain {
                type key-chain:key-chain-ref;
                description
                  "key-chain name.";
                  "Name of the key chain.";
              }
            }
            case auth-key-explicit {
              leaf ospfv2-key-id {
                type uint32;
                description
                  "Key Identifier"; identifier.";
              }
              leaf ospfv2-key {
                type string;
                description
                  "OSPFv2 authentication key.  The
                   length of the key may be dependent on the
                   cryptographic algorithm.";
              }
              leaf ospfv2-crypto-algorithm {
                type identityref {
                  base key-chain:crypto-algorithm;
                }
                description
                  "Cryptographic algorithm associated with the key.";
              }
            }
          }
        }
        case ospfv3-auth-ipsec {
          when "derived-from-or-self(../../../../../../rt:type, "
            +  "'ospfv3')" {
            description
              "Applied to OSPFv3 only.";
          }
          if-feature ospfv3-authentication-ipsec;
          leaf sa {
              type string;
              description
                "Security
                "Name of the Security Association (SA) name."; (SA).";
          }
        }
        case ospfv3-auth-trailer {
          when "derived-from-or-self(../../../../../../rt:type, "
            +  "'ospfv3')" {
            description
              "Applied to OSPFv3 only.";
          }
          if-feature ospfv3-authentication-trailer;
          choice ospfv3-auth-specification {
            description
              "Key chain or explicit key parameter specification"; specification.";
            case auth-key-chain {
              if-feature key-chain;
              leaf ospfv3-key-chain {
                type key-chain:key-chain-ref;
                description
                  "key-chain name.";
                  "Name of the key chain.";
              }
            }
            case auth-key-explicit {
              leaf ospfv3-sa-id {
                type uint16;
                description
                  "Security Association (SA) Identifier";
                  "SA identifier.";
              }
              leaf ospfv3-key {
                type string;
                description
                  "OSPFv3 authentication key.  The
                   length of the key may be dependent on the
                   cryptographic algorithm.";
              }
              leaf ospfv3-crypto-algorithm {
                type identityref {
                  base key-chain:crypto-algorithm;
                }
                description
                  "Cryptographic algorithm associated with the key.";
              }
            }
          }
        }
      }
    }
  }

  grouping interface-config {
    description
      "Configuration for real interfaces.";

    leaf interface-type {
      type enumeration {
        enum "broadcast" {
          description
            "Specify
            "Specifies an OSPF broadcast multi-access network.";
        }
        enum "non-broadcast" {
          description
            "Specify
            "Specifies an OSPF Non-Broadcast Multi-Access
             (NBMA) network.";
        }
        enum "point-to-multipoint" {
          description
            "Specify
            "Specifies an OSPF point-to-multipoint network.";
        }
        enum "point-to-point" {
          description
            "Specify
            "Specifies an OSPF point-to-point network.";
        }
        enum "hybrid" {
          if-feature hybrid-interface;
          description
            "Specify
            "Specifies an OSPF hybrid broadcast/P2MP Hybrid Broadcast /
             point-to-multipoint network.";
        }
      }
      description
        "Interface type.";
    }

    leaf passive {
      type boolean;
      description
        "Enable/Disable passive interface -
        "Enables/disables a passive interface.  A passive
         interface's prefix will be advertised advertised, but no neighbor
         adjacencies will be formed on the interface.";
    }

    leaf demand-circuit {
      if-feature demand-circuit;
      type boolean;
      description
        "Enable/Disable
        "Enables/disables a demand circuit.";
    }

    leaf priority {
      type uint8;
      description
        "Configure
        "Configures OSPF router priority. On  In a multi-access network
         network, this value is for Designated Router (DR) election.
         The priority is ignored on other interface types.  A router
         with a higher priority will be preferred in the election
         and a election.
         A value of 0 indicates that the router is not eligible to
         become Designated Router the DR or Backup Designated Router DR (BDR).";
    }

    container multi-areas {
      if-feature multi-area-adj;
      description
        "Container for multi-area config."; configuration.";
      list multi-area {
        key multi-area-id;
        description
          "Configure
          "Configures an OSPF multi-area adjacency.";
        leaf multi-area-id {
          type area-id-type;
          description
            "Multi-area adjacency area ID.";
        }
        leaf cost {
          type ospf-link-metric;
          description
            "Interface cost for a multi-area adjacency.";
        }
      }
    }

    container static-neighbors {
      description
        "Statically configured neighbors.";

      list neighbor {
        key "identifier";
        description
          "Specify
          "Specifies a static OSPF neighbor.";

        leaf identifier {
          type inet:ip-address;
          description
            "Neighbor
            "Neighbor's Router ID, IPv4 address, or IPv6 address.";
        }

        leaf cost {
          type ospf-link-metric;
          description
            "Neighbor
            "Neighbor's cost.  Different implementations have
             different default costs costs, with some defaulting to a
             cost inversely proportional to the interface speed.
             Others will default to 1 1, equating the cost to a
             hop count." ; count.";
        }
        leaf poll-interval {
          type uint16;
          units seconds;
          description
            "Neighbor
            "Neighbor's poll interval (seconds) for sending OSPF
             hello
             Hello packets to discover the neighbor on NBMA
             networks.  This interval dictates the granularity for
             discovery of new neighbors.  A sample would be
             120 seconds (2 minutes) for a legacy Packet Data
             Network (PDN) X.25 network.";
          reference
            "RFC 2328: OSPF Version 2, Appendix C.5";
        }
        leaf priority {
          type uint8;
          description
             "Neighbor
            "Neighbor's priority for DR election.  A router with a
             higher priority will be preferred in the election
              and a election.
             A value of 0 indicates that the router is not
             eligible to become Designated Router the DR or Backup
              Designated Router (BDR)."; BDR.";
        }
      }
    }

    leaf node-flag {
      if-feature node-flag;
      type boolean;
      default false;
      description
        "Set
        "Sets the prefix as identifying the advertising router.";
      reference
        "RFC 7684: OSPFv2 Prefix/Link Attribute Advertisement";
    }

    container bfd {
      if-feature bfd;
      description
        "BFD Client Configuration."; client configuration.";
      uses bfd-types:client-cfg-parms;
      reference
        "RFC YYYY: 9127: YANG Data Model for Bidirectional Forwarding
         Detection (BFD). Please replace YYYY with
        published RFC number for draft-ietf-bfd-yang."; (BFD)";
    }

    uses interface-fast-reroute-config;
    uses interface-common-config;
    uses interface-physical-link-config;
  }

  grouping neighbor-state {
    description
      "OSPF neighbor operational state.";

    leaf address {
      type inet:ip-address;
      config false;
      description
        "Neighbor
        "Neighbor's address.";
    }
    leaf dr-router-id {
      type rt-types:router-id;
      config false;
      description
        "Neighbor's Designated Router (DR) DR Router ID.";
    }

    leaf dr-ip-addr {
      type inet:ip-address;
      config false;
      description
        "Neighbor's Designated Router (DR) DR IP address.";
    }

    leaf bdr-router-id {
      type rt-types:router-id;
      config false;
      description
        "Neighbor's Backup Designated Router (BDR) BDR Router ID.";
    }

    leaf bdr-ip-addr {
      type inet:ip-address;
      config false;
      description
        "Neighbor's Backup Designated Router (BDR) BDR IP Address."; address.";
    }
    leaf state {
      type nbr-state-type;
      config false;
      description
        "OSPF neighbor state.";
    }
    leaf cost {
      type ospf-link-metric;
      config false;
      description
        "Cost to reach the neighbor for Point-to-Multipoint point-to-multipoint
         and Hybrid networks"; networks.";
    }
    leaf dead-timer {
      type rt-types:timer-value-seconds16;
      config false;
      description
        "This timer tracks the remaining time before
         the neighbor is declared dead.";
    }
    container statistics {
      config false;
      description
        "Per-neighbor statistics"; statistics.";
      uses neighbor-stat;
    }
  }

  grouping interface-common-state {
    description
      "OSPF interface common operational state.";
    reference "RFC2328 Section 9:
      "RFC 2328: OSPF Version2 -
               The Interface Data Structure"; Version 2, Section 9";

    leaf state {
      type if-state-type;
      config false;
      description
        "Interface state.";
    }

    leaf hello-timer {
      type rt-types:timer-value-seconds16;
      config false;
      description
        "This timer tracks the remaining time before the
         next hello Hello packet is sent on the interface.";
    }

    leaf wait-timer {
      type rt-types:timer-value-seconds16;
      config false;
      description
        "This timer tracks the remaining time before
         the interface exits the Waiting 'Waiting' state.";
    }

    leaf dr-router-id {
      type rt-types:router-id;
      config false;
      description "Designated Router (DR)
        "DR Router ID.";
    }

    leaf dr-ip-addr {
      type inet:ip-address;
      config false;
      description "Designated Router (DR)
        "DR IP address.";
    }

    leaf bdr-router-id {
      type rt-types:router-id;
      config false;
      description "Backup Designated Router (BDR)
        "BDR Router ID.";
    }

    leaf bdr-ip-addr {
      type inet:ip-address;
      config false;
      description "Backup Designated Router (BDR)
        "BDR IP Address."; address.";
    }

    container statistics {
      config false;
      description
        "Per-interface statistics"; statistics.";
      uses interface-stat;
    }

    container neighbors {
      config false;
      description
        "All neighbors for the interface.";
      list neighbor {
        key "neighbor-router-id";
        description
          "List of interface OSPF neighbors.";
        leaf neighbor-router-id {
          type rt-types:router-id;
          description
            "Neighbor
            "Neighbor's Router ID.";
        }
        uses neighbor-state;
      }
    }
    container database {
      config false;
      description
        "Link-scope Link State Database."; LSDB.";
      list link-scope-lsa-type {
        key "lsa-type";
        description
          "List of OSPF link-scope LSAs.";
        leaf lsa-type {
          type uint16;
          description
            "OSPF link-scope LSA type.";
        }
        container link-scope-lsas {
          description
            "All link-scope LSAs of this LSA type.";
          list link-scope-lsa {
            key "lsa-id adv-router";
            description
              "List of OSPF link-scope LSAs"; LSAs.";
            uses lsa-key;
            uses lsa {
              refine "version/ospfv2/ospfv2" {
                must "derived-from-or-self( "
                   + "../../../../../../../../../../"
                   + "rt:type, 'ospfv2')" {
                  description
                    "OSPFv2 LSA.";
                }
              }
              refine "version/ospfv3/ospfv3" {
                must "derived-from-or-self( "
                   + "../../../../../../../../../../"
                   + "rt:type, 'ospfv3')" {
                  description
                    "OSPFv3 LSA.";
                }
              }
            }
          }
        }
      }
    }
  }

  grouping interface-state {
    description
      "OSPF interface operational state.";
    reference "RFC2328 Section 9:
      "RFC 2328: OSPF Version2 -
               The Interface Data Structure"; Version 2, Section 9";

    uses interface-common-state;
  }

  grouping virtual-link-config {
    description
      "OSPF virtual link configuration state.";

    uses interface-common-config;
  }

  grouping virtual-link-state {
    description
      "OSPF virtual link operational state.";

    leaf cost {
      type ospf-link-metric;
      config false;
      description
        "Virtual link interface interface's cost.";
    }
    uses interface-common-state;
  }

  grouping sham-link-config {
    description
      "OSPF sham link configuration state.";

    uses interface-common-config;
    uses interface-physical-link-config;
  }

  grouping sham-link-state {
    description
      "OSPF sham link operational state.";
    uses interface-common-state;
  }

  grouping address-family-area-config {
    description
      "OSPF address-family specific address-family-specific area config configuration state.";

    container ranges {
      description
        "Container for summary ranges"; ranges.";

      list range {
        key "prefix";
        description
          "Summarize
          "Summarizes routes matching address/mask - the address/mask.
           Applicable to Area Border Routers (ABRs) only.";
        leaf prefix {
          type inet:ip-prefix;
          description
            "IPv4 or IPv6 prefix"; prefix.";
        }
        leaf advertise {
          type boolean;
          description
            "Advertise or hide.";
        }
        leaf cost {
          type ospf-metric;
          description
           "Advertised cost of a summary route.";
        }
      }
    }
  }

  grouping area-common-config {
    description
      "OSPF area common configuration state.";

    leaf summary {
      when "derived-from(../area-type,'stub-nssa-area')" {
        description
          "Summary advertisement into the stub/NSSA area."; stub area / NSSA.";
      }
      type boolean;
      description
        "Enable/Disable
        "Enables/disables a summary advertisement into the stub
         area or
         NSSA area."; NSSA.";
    }
    leaf default-cost {
      when "derived-from(../area-type,'stub-nssa-area')" {
          description
            "Cost for the LSA default route advertised into the
             stub area or NSSA area."; NSSA.";
      }
      type ospf-metric;
      description
        "Set
        "Sets the summary default route cost for a stub area
         or NSSA area."; NSSA.";
    }
  }

  grouping area-config {
    description
      "OSPF area configuration state.";

    leaf area-type {
      type identityref {
        base area-type;
      }
      default normal-area;
      description
        "Area type.";
    }

    uses area-common-config;
    uses address-family-area-config;
  }

  grouping area-state {
    description
      "OSPF area operational state.";

    container statistics {
      config false;
      description
        "Per-area statistics"; statistics.";
      uses area-stat;
    }

    container database {
      config false;
      description
        "Area-scope Link State Database."; LSDB.";
      list area-scope-lsa-type {
        key "lsa-type";
        description
          "List of OSPF area-scope LSAs.";
        leaf lsa-type {
          type uint16;
          description
            "OSPF area-scope LSA type.";
        }
        container area-scope-lsas {
          description
            "All area-scope LSAs of an area-scope
             LSA type.";
          list area-scope-lsa {
            key "lsa-id adv-router";
            description
              "List of OSPF area-scope LSAs"; LSAs.";
            uses lsa-key;
            uses lsa {
              refine "version/ospfv2/ospfv2" {
                must "derived-from-or-self( "
                   + "../../../../../../../../"
                   + "rt:type, 'ospfv2')" {
                  description
                    "OSPFv2 LSA.";
                }
              }
              refine "version/ospfv3/ospfv3" {
                must "derived-from-or-self( "
                   + "../../../../../../../../"
                   + "rt:type, 'ospfv3')" {
                  description
                    "OSPFv3 LSA.";
                }
              }
            }
          }
        }
      }
    }
  }

  grouping local-rib {
    description "Local-rib -
      "Local RIB.  RIB for Routes routes computed by the local
       OSPF routing instance.";
    container local-rib {
      config false;
      description "Local-rib.";
        "Local RIB.";
      list route {
        key "prefix";
        description "Routes";
          "Routes.";
        leaf prefix {
          type inet:ip-prefix;
          description
            "Destination prefix.";
        }
        container next-hops {
          description
            "Next hops for the route.";
          list next-hop {
            key "next-hop";
            description
              "List of next hops for the route"; route.";
            leaf outgoing-interface {
              type if:interface-ref;
              description
                "Name of the outgoing interface.";
            }
            leaf next-hop {
             type inet:ip-address;
             description "Next hop address.";
               "Address of the next hop.";
            }
          }
        }
        leaf metric {
          type uint32;
          description
            "Metric for this route.";
        }
        leaf route-type {
          type route-type;
          description
            "Route type for this route.";
        }
        leaf route-tag {
          type uint32;
          description
            "Route tag for this route.";
        }
      }
    }
  }

  grouping ietf-spf-delay {
    leaf initial-delay {
      type uint32;
      units milliseconds;
      description
        "Delay used while in QUIET the 'QUIET' state (milliseconds).";
    }
    leaf short-delay {
      type uint32;
      units milliseconds;
      description
        "Delay used while in SHORT_WAIT the 'SHORT_WAIT' state (milliseconds).";
    }
    leaf long-delay {
      type uint32;
      units milliseconds;
      description
        "Delay used while in LONG_WAIT the 'LONG_WAIT' state (milliseconds).";
    }
    leaf hold-down {
      type uint32;
      units milliseconds;
      description
        "Timer used to consider an IGP stability
        "This timer value defines the period without any changes
         for the IGP to be considered stable (milliseconds).";
    }
    leaf time-to-learn {
      type uint32;
      units milliseconds;
      description
        "Duration used to learn all the IGP events
         related to a single component failure (milliseconds).";
    }
    leaf current-state {
      type enumeration {
        enum "quiet" {
          description "QUIET state";
            "'QUIET' state.";
        }
        enum "short-wait" {
          description "SHORT_WAIT state";
            "'SHORT_WAIT' state.";
        }
        enum "long-wait" {
          description "LONG_WAIT state";
            "'LONG_WAIT' state.";
        }
      }
      config false;
      description
        "Current SPF back-off algorithm state.";
    }
    leaf remaining-time-to-learn {
      type rt-types:timer-value-milliseconds;
      config false;
      description
        "Remaining time until the time-to-learn timer fires.";
    }
    leaf remaining-hold-down {
      type rt-types:timer-value-milliseconds;
      config false;
      description
        "Remaining time until the hold-down timer fires.";
    }
    leaf last-event-received {
      type yang:timestamp;
      config false;
      description
        "Time of the last SPF triggering event.";
    }
    leaf next-spf-time {
      type yang:timestamp;
      config false;
      description
        "Time when the next SPF has been scheduled.";
    }
    leaf last-spf-time {
      type yang:timestamp;
      config false;
      description
        "Time of the last SPF computation.";
      }
    description
      "Grouping for IETF SPF delay configuration and state"; state.";
  }

  grouping node-tag-config {
    description
      "OSPF node tag config configuration state.";
    container node-tags {
      if-feature node-tag;
      list node-tag {
        key tag;
        leaf tag {
          type uint32;
            description
              "Node tag value.";
        }
        description
          "List of tags.";
      }
      description
        "Container for node admin administrative tags.";
    }
  }

  grouping instance-config {
    description
      "OSPF instance config configuration state.";

    leaf enable {
      type boolean;
      default true;
      description
        "Enable/Disable
        "Enables/disables the protocol.";
    }

    leaf explicit-router-id {
      if-feature explicit-router-id;
      type rt-types:router-id;
      description
        "Defined in RFC 2328.  A 32-bit number
         that uniquely identifies the router.";
      reference
        "RFC 2328: OSPF Version 2";
    }

    container preference {
      description
        "Route preference configuration.  In many
         implementations, preference is referred to as
         administrative distance.";
      reference
        "RFC 8349: A YANG Data Model for Routing Management
         (NMDA Version)";
      choice scope {
        description
          "Options for expressing preference
           as single or multiple values.";
        case single-value {
          leaf all {
            type uint8;
            description
              "Preference for intra-area, inter-area, and
               external routes.";
          }
        }
        case multi-values {
          choice granularity {
            description
              "Options for expressing preference
               for intra-area and inter-area routes.";
            case detail {
              leaf intra-area {
                type uint8;
                description
                  "Preference for intra-area routes.";
              }
              leaf inter-area {
                type uint8;
                description
                  "Preference for inter-area routes.";
              }
            }
            case coarse {
              leaf internal {
                type uint8;
                description
                  "Preference for both intra-area and
                   inter-area routes.";
              }
            }
          }
          leaf external {
            type uint8;
            description
              "Preference for AS external routes.";
          }
        }
      }
    }

    container nsr {
      if-feature nsr;
      description
        "Non-Stop Routing (NSR) config configuration state.";
      leaf enable {
        type boolean;
        description
          "Enable/Disable
          "Enables/disables NSR.";
      }
    }

    container graceful-restart {
      if-feature graceful-restart;
      description
        "Graceful restart config configuration state.";
      reference
        "RFC 3623: OSPF Graceful OSPF Restart
         RFC 5187: OSPFv3 Graceful Restart";
      leaf enable {
        type boolean;
        description
          "Enable/Disable
          "Enables/disables graceful restart as defined in RFC 3623
           for OSPFv2 and RFC 5187 for OSPFv3.";
      }
      leaf helper-enable {
        type boolean;
        description
          "Enable
          "Enables graceful restart helper support for restarting
           routers (RFC 3623 (Section 3 of RFC 3623).";
        reference
          "RFC 3623: Graceful OSPF Restart, Section 3)."; 3";
      }
      leaf restart-interval {
        type uint16 {
           range "1..1800";
        }
        units seconds;
        default "120";
        description
          "Interval during which to attempt graceful restart prior
           to failing (RFC 3623 Section B.1) (seconds)"; (seconds) (Appendix B.1 of RFC 3623).";
        reference
          "RFC 3623: Graceful OSPF Restart, Appendix B.1";
      }
      leaf helper-strict-lsa-checking {
        type boolean;
        description
          "Terminate
          "Terminates graceful restart when an LSA topology change
           is detected (RFC 3623 Section B.2)."; (Appendix B.2 of RFC 3623).";
        reference
          "RFC 3623: Graceful OSPF Restart, Appendix B.2";
      }
    }

    container auto-cost {
      if-feature auto-cost;
      description
        "Interface Auto-cost auto-cost configuration state.";
      leaf enable {
        type boolean;
        description
          "Enable/Disable
          "Enables/disables interface auto-cost.";
      }
      leaf reference-bandwidth {
        when "../enable = 'true'" {
          description
            "Only when auto cost auto-cost is enabled"; enabled.";
        }
        type uint32 {
          range "1..4294967";
        }
        units Mbits;
        description
          "Configure
          "Configures reference bandwidth used to automatically
           determine interface cost (Mbits).  The cost is the
           reference bandwidth divided by the interface speed speed,
           with 1 being the minimum cost.";
      }
    }

    container spf-control {
      leaf paths {
        if-feature max-ecmp;
        type uint16 {
          range "1..65535";
        }
        description
          "Maximum number of Equal-Cost Multi-Path (ECMP) paths.";
      }
      container ietf-spf-delay {
        if-feature ietf-spf-delay;
        uses ietf-spf-delay;
        description
          "IETF SPF delay algorithm configuration.";
      }
      description
        "SPF calculation control.";
    }

    container database-control {
      leaf max-lsa {
        if-feature max-lsa;
        type uint32 {
          range "1..4294967294";
        }
        description
          "Maximum number of LSAs OSPF LSAs the router will accept.";
      }
      description
        "Database maintenance control.";
    }

    container stub-router {
      if-feature stub-router;
      description "Set
        "Sets the maximum metric configuration"; configuration.";

      choice trigger {
        description
          "Specific triggers which that will enable stub router state.";
        container always {
          presence
            "Enables unconditional stub router support";
          description
            "Unconditional stub router state (advertise (advertises
             transit links with MaxLinkMetric"; 'MaxLinkMetric').";
          reference
            "RFC 6987: OSPF Stub Router Advertisement";
        }
      }
    }

    container mpls {
      description
        "OSPF MPLS config configuration state.";
      container te-rid {
        if-feature te-rid;
        description
          "Stable OSPF Router IP Address address used for Traffic
           Engineering (TE)"; TE.";
        leaf ipv4-router-id {
          type inet:ipv4-address;
          description
            "Explicitly configure configures the TE IPv4 Router ID.";
        }
        leaf ipv6-router-id {
          type inet:ipv6-address;
          description
            "Explicitly configure configures the TE IPv6 Router ID.";
        }
      }
      container ldp {
        description
          "OSPF MPLS LDP config configuration state.";
        leaf igp-sync {
          if-feature ldp-igp-sync;
          type boolean;
          description
            "Enable
            "Enables LDP IGP synchronization.";
        }
      }
    }
    uses instance-fast-reroute-config;
    uses node-tag-config;
  }

  grouping instance-state {
    description
      "OSPF instance operational state.";

    leaf router-id {
      type rt-types:router-id;
      config false;
      description
        "Defined in RFC 2328.  A 32-bit number
         that uniquely identifies the router.";
      reference
        "RFC 2328: OSPF Version 2";
    }

    uses local-rib;

    container statistics {
      config false;
      description
        "Per-instance statistics"; statistics.";
      uses instance-stat;
    }

    container database {
      config false;
      description
        "AS-scope Link State Database."; LSDB.";
      list as-scope-lsa-type {
        key "lsa-type";
        description
          "List of OSPF AS-scope LSAs.";
        leaf lsa-type {
          type uint16;
          description
            "OSPF AS scope AS-scope LSA type.";
        }
        container as-scope-lsas {
          description
            "All AS-scope of LSA LSAs of this LSA type.";
          list as-scope-lsa {
            key "lsa-id adv-router";
            description
              "List of OSPF AS-scope LSAs"; LSAs.";
            uses lsa-key;
            uses lsa {
              refine "version/ospfv2/ospfv2" {
                must "derived-from-or-self( "
                   + "../../../../../../"
                   + "rt:type, 'ospfv2')" {
                  description
                    "OSPFv2 LSA.";
                }
              }
              refine "version/ospfv3/ospfv3" {
                must "derived-from-or-self( "
                   + "../../../../../../"
                   + "rt:type, 'ospfv3')" {
                  description
                    "OSPFv3 LSA.";
                }
              }
            }
          }
        }
      }
    }
    uses spf-log;
    uses lsa-log;
  }

  grouping multi-topology-area-common-config {
    description
      "OSPF multi-topology area common configuration state.";
    leaf summary {
      when "derived-from(../../../area-type, 'stub-nssa-area')" {
        description
          "Summary advertisement into the stub/NSSA area."; stub area / NSSA.";
      }
      type boolean;
      description
        "Enable/Disable
        "Enables/disables a summary advertisement into the
         topology in the stub area or NSSA area."; NSSA.";
    }
    leaf default-cost {
      when "derived-from(../../../area-type, 'stub-nssa-area')" {
        description
          "Cost for the LSA default route advertised into the
           topology into in the stub area or NSSA area."; NSSA.";
      }
      type ospf-metric;
      description
        "Set
        "Sets the summary default route cost for a
         stub area or NSSA area."; NSSA.";
    }
  }

  grouping multi-topology-area-config {
    description
      "OSPF multi-topology area configuration state.";

    uses multi-topology-area-common-config;
    uses address-family-area-config;
  }

  grouping multi-topology-state {
    description
      "OSPF multi-topology operational state.";

    uses local-rib;
  }

  grouping multi-topology-interface-config {
    description
      "OSPF multi-topology configuration state.";

    leaf cost {
     type ospf-link-metric;
     description
       "Interface cost for this topology.";
    }
  }

  grouping ospfv3-interface-config {
    description
      "OSPFv3 interface specific interface-specific configuration state.";

    leaf instance-id {
      type uint8 {
        range "0 .. 31";
      }
      description
        "OSPFv3 instance ID.";
    }
  }

  grouping ospfv3-interface-state {
    description
      "OSPFv3 interface specific interface-specific operational state.";

    leaf interface-id {
      type uint16;
      config false;
      description
        "OSPFv3 interface ID.";
    }
  }

  grouping lsa-identifiers {
    description
      "The parameters that uniquely identify an LSA.";
    leaf area-id {
      type area-id-type;
      description
        "Area ID"; ID.";
    }
    leaf type {
      type uint16;
      description
        "LSA type.";
    }
    leaf lsa-id {
      type union {
        type inet:ipv4-address;
        type yang:dotted-quad;
      }
      description "Link-State
        "Link State ID.";
    }
    leaf adv-router {
      type rt-types:router-id;
      description
        "LSA advertising router.";
    }
    leaf seq-num {
      type uint32;
      description
        "LSA sequence number.";
    }
  }

  grouping spf-log {
    description
      "Grouping for the SPF log.";
    container spf-log {
      config false;
      description
        "This container lists the SPF log."; log entries.";
      list event {
        key id;
        description
          "List of SPF log entries represented
           as a wrapping buffer in chronological
           order
           order, with the oldest entry returned
           first.";
        leaf id {
          type uint32;
          description
            "Event identifier - Purely identifier.  A purely internal value.";
        }
        leaf spf-type {
          type enumeration {
            enum full {
              description
                "SPF
                "The SPF computation was for a Full full SPF.";
            }
            enum intra {
              description
                "SPF
                "The SPF computation was only for intra-area
                 routes.";
            }
            enum inter {
              description
                "SPF
                "The SPF computation was only for inter-area
                 summary routes.";
            }
            enum external {
              description
                "SPF
                "The SPF computation was only for AS external
                 routes.";
            }
          }
          description
            "The SPF computation type for the SPF log entry.";
        }
        leaf schedule-timestamp {
          type yang:timestamp;
          description
            "This is the timestamp when the computation was
             scheduled.";
        }
        leaf start-timestamp {
          type yang:timestamp;
          description
            "This is the timestamp when the computation was
             started.";
        }
        leaf end-timestamp {
          type yang:timestamp;
          description
            "This is the timestamp when the computation was
             completed.";
        }
        list trigger-lsa {
          description
            "The list of LSAs that triggered the computation.";
          uses lsa-identifiers;
        }
      }
    }
  }

  grouping lsa-log {
    description
      "Grouping for the LSA log.";
    container lsa-log {
      config false;
      description
        "This container lists the LSA log. log entries.
         Local LSA modifications are also included
         in the list.";
      list event {
        key id;
        description
          "List of LSA log entries represented
           as a wrapping buffer in chronological order order,
           with the oldest entries entry returned first.";
        leaf id {
          type uint32;
          description
            "Event identifier - identifier.  A purely internal value.";
        }
        container lsa {
          description
            "This container describes the logged LSA."; LSA that was logged.";
          uses lsa-identifiers;
        }
        leaf received-timestamp {
          type yang:timestamp;
          description
            "This is the timestamp when the LSA was received.
             In the case of a local LSA update, the timestamp
             refers to the LSA origination time.";
        }
        leaf reason {
          type identityref {
            base lsa-log-reason;
          }
          description
            "This reason
            "Reason for the LSA log entry.";
        }
      }
    }
  }

  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol" {
     when "derived-from(rt:type, 'ospf')" {
      description
        "This augmentation is only valid for a routing protocol
         instance of OSPF (type 'ospfv2' or 'ospfv3').";
    }
    description
      "OSPF protocol ietf-routing 'ietf-routing' module
                 control-plane-protocol 'control-plane-protocol'
       augmentation.";

    container ospf {
      description
        "OSPF protocol Instance"; instance.";

      leaf address-family {
        type iana-rt-types:address-family;
        description
          "Address-family
          "Address family of the instance.";
      }

      uses instance-config;
      uses instance-state;

      container areas {
        description
          "All areas.";
        list area {
          key "area-id";
          description
            "List of OSPF areas"; areas.";
          leaf area-id {
            type area-id-type;
            description
              "Area ID"; ID.";
          }

          uses area-config;
          uses area-state;

          container virtual-links {
            when "derived-from-or-self(../area-type, 'normal-area') "
               + "and ../area-id = '0.0.0.0'" {
              description
                "Virtual links must be in a backbone area.";
              }
            description
              "All virtual links.";
            list virtual-link {
              key "transit-area-id router-id";
              description
                "OSPF virtual link"; link.";
              leaf transit-area-id {
                type leafref {
                  path "../../../../area/area-id";
                }
                must "derived-from-or-self("
                  + "../../../../area[area-id=current()]/area-type, "
                  + "'normal-area') and "
                  + "../../../../area[area-id=current()]/area-id != "
                  + "'0.0.0.0'" {
                  error-message "Virtual "The virtual link transit area must "
                              + "be non-zero.";
                  description
                    "Virtual-link
                    "The virtual link transit area must be a
                     non-zero area.";
                }
                description
                  "Virtual link transit area ID.";
              }
              leaf router-id {
                type rt-types:router-id;
                description
                  "Virtual Link link remote endpoint Router ID.";
              }

              uses virtual-link-config;
              uses virtual-link-state;
            }
          }
          container sham-links {
            if-feature pe-ce-protocol;
            description
              "All sham links.";
            list sham-link {
              key "local-id remote-id";
              description
                "OSPF sham link"; link.";
              leaf local-id {
                type inet:ip-address;
                description
                  "Address of the local sham Link link endpoint.";
              }
              leaf remote-id {
                type inet:ip-address;
                description
                  "Address of the remote sham Link link endpoint.";
              }
              uses sham-link-config;
              uses sham-link-state;
            }
          }
          container interfaces {
            description
              "All interfaces.";
            list interface {
              key "name";
              description
                "List of OSPF interfaces.";
              leaf name {
                type if:interface-ref;
                description
                  "Interface name reference.";
              }
              uses interface-config;
              uses interface-state;
            }
          }
        }
      }
    }
  }

  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol/ospf" {
    when "derived-from(../rt:type, 'ospf')" {
      description
        "This augmentation is only valid for OSPF
         (type 'ospfv2' or 'ospfv3').";
    }
    if-feature multi-topology;
    description
      "OSPF multi-topology instance configuration
       state augmentation.";
    container topologies {
      description
        "All topologies.";
      list topology {
        key "name";
        description
          "OSPF topology - topology.  The OSPF topology address-family address family
           must coincide with the routing-instance
           address-family."; routing instance's
           address family.";
        leaf name {
          type leafref {
            path "../../../../../../rt:ribs/rt:rib/rt:name";
          }
          description
            "RIB name corresponding to the OSPF topology.";
        }

        uses multi-topology-state;
      }
    }
  }

  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol/ospf/"
        + "areas/area" {
    when "derived-from-or-self(../../../rt:type, "
       + "'ospfv2')" {
      description
        "This augmentation is only valid for OSPFv2.";
    }
    if-feature multi-topology;
    description
      "OSPF multi-topology area configuration state
       augmentation.";
    container topologies {
      description
        "All topologies for the area.";
      list topology {
        key "name";
        description
          "OSPF area topology.";
        leaf name {
          type leafref {
            path "../../../../../../../../"
               + "rt:ribs/rt:rib/rt:name";
          }
          description
            "Single topology enabled for this area.";
        }

        uses multi-topology-area-config;
      }
    }
  }

  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol/ospf/"
        + "areas/area/interfaces/interface" {
    when "derived-from-or-self(../../../../../rt:type, "
       + "'ospfv2')" {
      description
        "This augmentation is only valid for OSPFv2.";
    }
    if-feature multi-topology;
    description
      "OSPF multi-topology interface configuration state
       augmentation.";
    container topologies {
      description
        "All topologies for the interface.";
      list topology {
        key "name";
        description
          "OSPF interface topology.";
        leaf name {
          type leafref {
            path "../../../../../../../../../../"
               + "rt:ribs/rt:rib/rt:name";
          }
          description
            "Single topology enabled on this interface.";
        }

        uses multi-topology-interface-config;
      }
    }
  }

  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol/ospf/"
        + "areas/area/interfaces/interface" {
    when "derived-from-or-self(../../../../../rt:type, "
       + "'ospfv3')" {
      description
        "This augmentation is only valid for OSPFv3.";
    }
    description
      "OSPFv3 interface specific interface-specific configuration state
       augmentation.";
    uses ospfv3-interface-config;
    uses ospfv3-interface-state;
  }

  grouping route-content {
    description
      "This grouping defines OSPF-specific route attributes.";
    leaf metric {
      type uint32;
      description
        "OSPF route metric.";
    }
    leaf tag {
      type uint32;
      default "0";
      description
        "OSPF route tag.";
    }
    leaf route-type {
      type route-type;
      description
        "OSPF route type"; type.";
    }
  }

  augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" {
    when "derived-from(rt:source-protocol, 'ospf')" {
      description
        "This augmentation is only valid for routes whose
         source protocol is OSPF.";
    }
    description
      "OSPF-specific route attributes.";
    uses route-content;
  }

  /*
   * RPCs
   */

  rpc clear-neighbor {
    description
      "This RPC request clears a particular set of OSPF neighbors.
       If the operation fails for OSPF internal an OSPF-internal reason, then
       error-tag
       'error-tag' and error-app-tag 'error-app-tag' should be set to a meaningful
       value.";
       values.";
    input {
      leaf routing-protocol-name {
        type leafref {
          path "/rt:routing/rt:control-plane-protocols/"
             + "rt:control-plane-protocol/rt:name";
        }
        mandatory "true";
        description
          "OSPF protocol instance for which information for neighbors
           are
           is to be cleared.

           If the referenced OSPF instance doesn't exist, then
           this operation SHALL fail with error-tag an 'error-tag' setting of
           'data-missing' and error-app-tag an 'error-app-tag' setting of
           'routing-protocol-instance-not-found'.";
      }

      leaf interface {
        type if:interface-ref;
          description
            "Name of the OSPF interface for which neighbors are to
             be cleared.

             If the referenced OSPF interface doesn't exist, then
             this operation SHALL fail with error-tag an 'error-tag' setting
             of 'data-missing' and error-app-tag an 'error-app-tag' setting of
             'ospf-interface-not-found'.";
      }
    }
  }

  rpc clear-database {
    description
      "This RPC request clears a particular OSPF Link State
       Database. LSDB.
       If the operation fails for OSPF internal an OSPF-internal reason,
       then error-tag 'error-tag' and error-app-tag 'error-app-tag' should be set to a
       meaningful value."; values.";
    input {
      leaf routing-protocol-name {
        type leafref {
          path "/rt:routing/rt:control-plane-protocols/"
             + "rt:control-plane-protocol/rt:name";
        }
        mandatory "true";
        description
          "OSPF protocol instance whose Link State Database LSDB is to be cleared.

           If the referenced OSPF instance doesn't exist, then
           this operation SHALL fail with error-tag an 'error-tag' setting of
           'data-missing' and error-app-tag an 'error-app-tag' setting of
           'routing-protocol-instance-not-found'.";
      }
    }
  }

  /*
   * Notifications
   */

  grouping notification-instance-hdr {
    description
      "This grouping describes common instance specific instance-specific
       data for OSPF notifications.";

    leaf routing-protocol-name {
      type leafref {
        path "/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/rt:name";
      }
      must "derived-from( "
        + "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol[rt:name=current()]/"
        + "rt:type, 'ospf')";
      description
       "OSPF
        "Name of the OSPF routing protocol instance name."; instance.";
    }

    leaf address-family {
      type leafref {
        path "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol"
           + "[rt:name=current()/../routing-protocol-name]/"
           + "ospf/address-family";
      }
      description
        "Address family of the OSPF instance.";
    }
  }

  grouping notification-interface {
    description
      "This grouping provides interface information
       for the OSPF interface specific notification."; interface-specific notifications.";

    choice if-link-type-selection {
      description
        "Options for link type."; types.";
      container interface {
        description
          "Normal interface.";
        leaf interface {
          type if:interface-ref;
          description
            "Interface.";
        }
      }
      container virtual-link {
        description "virtual-link.";
          "Virtual link.";
        leaf transit-area-id {
          type area-id-type;
          description
            "Area ID.";
        }
        leaf neighbor-router-id {
          type rt-types:router-id;
          description "Neighbor
            "Neighbor's Router ID.";
        }
      }
      container sham-link {
        description "sham
          "Sham link.";
        leaf area-id {
          type area-id-type;
          description
            "Area ID.";
        }
        leaf local-ip-addr {
          type inet:ip-address;
          description
            "Sham link link's local address.";
        }
        leaf remote-ip-addr {
          type inet:ip-address;
          description
            "Sham link link's remote address.";
        }
      }
    }
  }

  grouping notification-neighbor {
    description
      "This grouping provides the neighbor information
       for neighbor specific neighbor-specific notifications.";

    leaf neighbor-router-id {
      type rt-types:router-id;
      description "Neighbor
        "Neighbor's Router ID.";
    }

    leaf neighbor-ip-addr {
      type inet:ip-address;
      description "Neighbor
        "Neighbor's address.";
    }
  }

  notification if-state-change {
    uses notification-instance-hdr;
    uses notification-interface;

    leaf state {
      type if-state-type;
      description
        "Interface state.";
    }
    description
      "This notification is sent when an interface
       state change is detected.";
  }

  notification if-config-error {
    uses notification-instance-hdr;
    uses notification-interface;

    leaf packet-source {
      type inet:ip-address;
      description
        "Source address.";
    }

    leaf packet-type {
      type packet-type;
      description
        "OSPF packet type.";
    }

    leaf error {
      type enumeration {
        enum "bad-version" {
          description
            "Bad version.";
        }
        enum "area-mismatch" {
          description
            "Area mismatch.";
        }
        enum "unknown-nbma-nbr" {
          description
            "Unknown NBMA neighbor.";
        }
        enum "unknown-virtual-nbr" {
          description
            "Unknown virtual link neighbor.";
        }
        enum "auth-type-mismatch" {
          description "Auth
            "Authentication type mismatch.";
        }
        enum "auth-failure" {
          description "Auth
            "Authentication failure.";
        }
        enum "net-mask-mismatch" {
          description
            "Network mask mismatch.";
        }
        enum "hello-interval-mismatch" {
          description
            "Hello interval mismatch.";
        }
        enum "dead-interval-mismatch" {
          description
            "Dead interval mismatch.";
        }
        enum "option-mismatch" {
          description
            "Option mismatch.";
        }
        enum "mtu-mismatch" {
          description
            "MTU mismatch.";
        }
        enum "duplicate-router-id" {
          description
            "Duplicate Router ID.";
        }
        enum "no-error" {
          description
            "No error.";
        }
      }
      description
        "Error code."; codes.";
    }
    description
      "This notification is sent when an interface
       config
       configuration error is detected.";
  }

  notification nbr-state-change {
    uses notification-instance-hdr;
    uses notification-interface;
    uses notification-neighbor;

    leaf state {
      type nbr-state-type;
      description
        "Neighbor state.";
    }

    description
      "This notification is sent when a neighbor
       state change is detected.";
  }

  notification nbr-restart-helper-status-change {
    uses notification-instance-hdr;
    uses notification-interface;
    uses notification-neighbor;

    leaf status {
      type restart-helper-status-type;
      description
        "Restart helper status.";
    }

    leaf age {
      type rt-types:timer-value-seconds16;
      description
        "Remaining time in the current OSPF graceful restart
         interval when the router is acting as a restart
         helper for the neighbor.";
    }

    leaf exit-reason {
      type restart-exit-reason-type;
      description
        "Restart helper exit reason.";
    }
    description
      "This notification is sent when a neighbor restart
       helper status change is detected.";
  }

  notification if-rx-bad-packet {
    uses notification-instance-hdr;
    uses notification-interface;

    leaf packet-source {
      type inet:ip-address;
      description
        "Source address.";
    }

    leaf packet-type {
      type packet-type;
      description
        "OSPF packet type.";
    }

    description
      "This notification is sent when an OSPF packet that
       cannot be parsed is received on an OSPF interface.";
  }

  notification lsdb-approaching-overflow {
    uses notification-instance-hdr;

    leaf ext-lsdb-limit {
      type uint32;
      description
        "The maximum number of non-default AS-external LSAs LSA
         entries that can be stored in the Link State Database."; LSDB.";
    }

    description
      "This notification is sent when the number of LSAs
       in the router's Link State Database LSDB has exceeded ninety percent of the
       AS-external limit (ext-lsdb-limit)."; ('ext-lsdb-limit').";
  }

  notification lsdb-overflow {
    uses notification-instance-hdr;

    leaf ext-lsdb-limit {
      type uint32;
      description
        "The maximum number of non-default AS-external LSAs LSA
         entries that can be stored in the Link State Database."; LSDB.";
    }

    description
      "This notification is sent when the number of LSAs
       in the router's Link State Database LSDB has exceeded the AS-external limit (ext-lsdb-limit).";
       ('ext-lsdb-limit').";
  }

  notification nssa-translator-status-change {
    uses notification-instance-hdr;

    leaf area-id {
      type area-id-type;
      description
        "Area ID.";
    }

    leaf status {
      type nssa-translator-state-type;
      description
        "NSSA translator status.";
    }

    description
      "This notification is sent when there is a change
       in the router's role in translating OSPF NSSA LSAs
       to OSPF AS-External LSAs.";
  }

  notification restart-status-change {
    uses notification-instance-hdr;

    leaf status {
      type restart-status-type;
      description
        "Restart status.";
    }

    leaf restart-interval {
      type uint16 {
        range 1..1800;
      }
      units seconds;
      default "120";
      description
        "Restart interval.";
    }

    leaf exit-reason {
      type restart-exit-reason-type;
      description
        "Restart exit reason.";
    }

    description
      "This notification is sent when the graceful restart
       state for the router has changed.";
  }
}
<CODE ENDS>
      ]]></artwork>
    </figure>
  </t>
  </section>
]]></sourcecode>

<!-- Possibly a 'Contributors' section ... -->

   <section anchor="Security" title="Security Considerations">

    <t>The YANG modules specified in [rfced] Section 3:  Please review the following, and let us
know how/if we should update the text.

a) This text was difficult to follow.  We updated as noted below.
Please let us know if this document define a schema for
       data that is designed to be accessed via incorrect.

Original:
 leaf raw-data {
   type yang:hex-string;
     description
       "The complete LSA in network
       management protocols such byte
        order hexadecimal as NETCONF <xref target="RFC6241"/> received or
       RESTCONF <xref target="RFC8040"/>. The lowest NETCONF layer is originated.";

Currently:
 leaf raw-data {
   type yang:hex-string;
     description
       "The hexadecimal representation of the secure transport
       layer, and complete LSA as
        received or originated, in network byte order.";

b) This list of authors does not match the mandatory-to-implement secure transport is Secure Shell (SSH)
       <xref target="RFC6242"/>. The lowest RESTCONF layer current list of
authors for this document; Jeffrey Zhang is HTTPS, not included, and the
       mandatory-to-implement secure transport
Salih K A is not otherwise listed as an author of this document.
Please confirm that this list is as intended.

Original:
 Editor:   Derek Yeung
           <mailto:derek@arrcus.com>
 Author:   Acee Lindem
           <mailto:acee@cisco.com>
 Author:   Yingzhen Qu
           <mailto:yingzhen.qu@futurewei.com>
 Author:   Salih K A
           <mailto:salih@juniper.net>
 Author:   Ing-Wher Chen
           <mailto:ingwherchen@mitre.org>";

c) Because "NSSA" stands for "Not-So-Stubby Area", we changed the
instances of "NSSA area" to "NSSA".  Please review the updates
carefully, and let us know if any of the instances of "stub area"
should be "stub".

d) This description clause does not parse.  Please clarify the
text.

Original:
 identity a-flag {
   base ospfv2-extended-prefix-flag;
     description
       "Attach flag, when set it indicates that the prefix
        corresponds and a route what is directly connected to
        the advertising router..";

e) Some words are missing here after "the external."  Please clarify.

Original:
 container topologies {
   description "All topologies for the external.";

f) There was a title-mismatch issue here.  We updated to use the
title of RFC 5709, as the topic is OSPFv2 and there is no document
with the title "Supporting Authentication Trailer for OSPFv2".
Please let us know any concerns.

Original:
 feature ospfv2-authentication-trailer {
   description
     "Support OSPFv2 authentication trailer for OSPFv2
      authentication.";
   reference "RFC 5709: Supporting Authentication
              Trailer for OSPFv2

Currently:
 feature ospfv2-authentication-trailer {
   description
     "Support for the OSPFv2 Authentication Trailer for OSPFv2
      authentication.";
   reference
     "RFC 5709: OSPFv2 HMAC-SHA Cryptographic Authentication  -->

<!-- [rfced] Section 3:  Please review the following, and let us
know how/if we should update the text.

a) To avoid possible confusion with OSPFv3, we clarified this
description clause as noted below.  Please let us know if this is
incorrect (i.e., should text be added to indicate that this
information applies to OSPFv3 as well?).

Original:
 feature mtu-ignore {
   description
     "Disable OSPF Database Description packet MTU
      mismatch checking specified in the OSPF
      protocol specification.";
   reference "RFC 2328: OSPF Version 2, section 10.6";

Currently:
 feature mtu-ignore {
   description
     "Disable OSPF Database Description packet MTU
      mismatch checking as specified in the OSPFv2
      protocol specification (RFC 2328).";
   reference
     "RFC 2328: OSPF Version 2, Section 10.6";

b) Will the values in this description clause be clear to readers,
or is more information needed?

We searched for information on (OSPFv3) "Router Information LSA" in

and S2 bits in the LSA type determine the flooding scope."

The only RFC that lists "800C" is RFC 4171, which does not appear to
be related to this document.  We could not find any RFCs that list
"800c", or the uppercase or lowercase forms of "A00C" or "C00C" (with
or without the "0x"), as discrete values.

<https://www.wireshark.org/lists/wireshark-bugs/201611/msg00214.html>
mentions the values in question (in lowercase) but seems to indicate
limited support.

Please advise.

Original:
 identity ospfv3-router-information-lsa {
   base ospfv3-lsa-type;
   description
     "OSPFv3 Router Information LSA - Types 0x800C,
      0xA00C, and 0xC00C";

c) This sentence does not parse.  Please clarify the text.

Original (we changed "wnly" to "when" for now; should it be "only"?):
 identity v2-p-bit {
   base ospfv2-lsa-option;
   description
     "P bit, wnly used in type-7 LSA. When set, an NSSA
      border router should translate the type-7 LSA
      to a type-5 LSA.";

d) Should the instances of "Referenced Link State type" be
"Referenced LS Type" per RFC 5340?  We could not find
"Referenced Link State type" or "Referenced Link State Type" in
any published RFC.

e) Please clarify the meaning of "successfully decoded other than".
Does it mean "successfully decoded, except for"?

Original:
 description
   "The OSPF LSA body was successfully decoded other than
    unknown TLVs. Unknown LSAs types and OSPFv2 unknown
    opaque LSA types are not decoded. Additionally,
    malformed LSAs are generally not accepted and will
    not be in the Link State Database.";

f) As it appears that "common for" means "common to" (as in "having
both in common"), we updated this description clause accordingly.
Please let us know if this is incorrect.

Original:
 description
   "Router LSA Bits - Currently common for OSPFv2 and
    OSPFv3 but it may diverge with future augmentations.";

Currently:
 description
   "Router LSA bits.  Currently common to both OSPFv2 and
    OSPFv3 but may diverge with future augmentations."; -->

<!-- [rfced] Section 3:  Please review the following, and let us
know how/if we should update the text.

a) Should the instances of "module 2**32 sum" be "modulo 2**32 sum"?
We ask because we see instances of (for example) "modulo 2^32"
in RFCs but could not find any instances of "module" followed by an
exponential value.

Original:
 description
   "The module 2**32 sum of the LSA checksums
    for AS-scope LSAs. ...

b) Along the lines of an author reply for RFC-to-be 9130
(draft-ietf-isis-yang-isis-cfg-42) regarding this description clause,
we updated as follows, to clarify the meaning of "to consider an IGP
stability period".  Please let us know any objections.

Original:
 leaf hold-down {
   type uint32;
     units milliseconds;
     description
       "Timer used to consider an IGP stability period
        (milliseconds).";

Currently:
 leaf hold-down {
   type uint32;
   units milliseconds;
   description
     "This timer value defines the period without any changes
      for the IGP to be considered stable (milliseconds)."

c) We updated the state names in the description clauses under
"typedef if-state-type" and "typedef nbr-state-type" per RFC 2328.
Please review, and let us know if anything is incorrect.

d) Please confirm that "1..4294967" and "1..4294967294" are correct.
We ask because we only see "4294967" in RFC 6295, and we only see
"4294967294" used in a few RFCs.

Original:
 leaf reference-bandwidth {
   when "../enable = 'true'" {
     description "Only when auto cost is enabled";
       }
       type uint32 {
         range "1..4294967";
...
 leaf max-lsa {
   if-feature max-lsa;
   type uint32 {
     range "1..4294967294";

e) Per (mostly) usage in the RFCs cited in the YANG module, we
hyphenated most of the bit names.  Please let us know any objections.

Examples:
 MT-bit, DC-bit, P-bit (per RFC 4915)
 O-bit (per RFC 5250)
 AF-bit, V6-bit (per RFC 5838)
 Nt-bit (per RFC 5340)*

 * Please let us know if we should remove the hyphen per RFC 3101.

 DN-bit (per RFC 5340) but DN bit (per RFC 4576)

f) For ease of the reader, may we update these description clauses as
follows?

Original:
 typedef nssa-translator-state-type {
   type enumeration {
     enum enabled {
       value "1";
       description
         "NSSA translator enabled state.";
     }
     enum elected {
       value "2";
       description
         "NSSA translator elected state.";
     }
     enum disabled {
       value "3";
       description
         "NSSA translator disabled state.";
     }
   }
   description
     "OSPF NSSA translator state type.";
 }

Suggested:
 typedef nssa-translator-state-type {
   type enumeration {
     enum enabled {
       value "1";
       description
         "NSSATranslatorState is 'enabled'.";
     }
     enum elected {
       value "2";
       description
         "NSSATranslatorState is 'elected'.";
     }
     enum disabled {
       value "3";
       description
         "NSSATranslatorState is 'disabled'.";
     }
   }
   description
     "OSPF NSSA translator state type.";
   reference
     "RFC 3101: The OSPF Not-So-Stubby Area (NSSA) Option";
 } -->

<!-- [rfced] *[AD]:  Section 3:  draft-ietf-ospf-yang-28 was the
version approved by the IESG in August 2019.  A version -29 was
uploaded in October 2019.  Please see
<https://www.ietf.org/rfcdiff?url1=draft-ietf-ospf-yang-28&url2=draft-ietf-ospf-yang-29>,
and let us know if you approve the change from range "1..32"; to
range "1..65535"; for container spf-control and the four changes
from 'ospf-protocol' to 'ospf'. -->

<!--[rfced] Section 3:  In the descriptions for enum ti-lfa and enum mrt,
"TI-LFA" and "MRT" are not written out. Would you like to expand
them somewhere for the reader, or leave them as they are?

Current:
                "TI-LFA-based alternate.";
[...]
                "MRT-based alternate.";

Perhaps:
                "An alternate based on Topology-Independent Loop-Free
                 Alternate (TI-LFA).";
[...]
                "An alternate based on Maximally Redundant Trees (MRTs).";
-->

<!--[rfced] Section 3: Should these descriptions be updated to match
the TLV names an registered by IANA (on
https://www.iana.org/assignments/ospf-parameters/ospf-parameters.xhtml#ri-tlv)?
In other words, changing to "Node Admin Tag TLV" and "Node MSD TLV".  For
the last three, should they be singular or plural?

Original:
        container node-tag-tlvs {
          description
            "All node tag TLVs.";
          list node-tag-tlv {
            description
              "Node tag TLV.";
            uses node-tag-tlv;
	         }
        }

        container dynamic-hostname-tlv {
          description "OSPF Dynamic Hostname";
          uses dynamic-hostname-tlv;
        }

        container sbfd-discriminator-tlv {
          description "OSPF S-BFD Discriminators";
          uses sbfd-discriminator-tlv;
        }

        container maximum-sid-depth-tlv {
	     description "OSPF Maximum SID Depth (MSD) values";
          uses maximum-sid-depth-tlv;
        }

Perhaps (assuming plural for the last three):

        container node-tag-tlvs {
          description
            "All Node Admin Tag TLVs.";
          list node-tag-tlv {
            description
              "Node Admin Tag TLV.";
            uses node-tag-tlv;
          }
        }

        container dynamic-hostname-tlv {
          description "OSPF Dynamic Hostname TLVs";
          uses dynamic-hostname-tlv;
        }

        container sbfd-discriminator-tlv {
          description "OSPF S-BFD Discriminator TLVs";
          uses sbfd-discriminator-tlv;
        }

        container maximum-sid-depth-tlv {
	     description "OSPF Node MSD TLVs";
          uses maximum-sid-depth-tlv;
        }
-->

    </section>

   <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
<!-- Begin YANG security DNE text Para. 1 (fixed per boilerplate) -->
<t>The YANG module specified in this document defines a schema for data
that is designed to be accessed via network management protocols such
as NETCONF <xref target="RFC6241"/> or RESTCONF <xref target="RFC8040"/>.
The lowest NETCONF layer is the secure transport layer, and the
mandatory-to-implement secure transport is Secure Shell (SSH)
<xref target="RFC6242"/>. The lowest RESTCONF layer is HTTPS, and the
mandatory-to-implement secure transport is TLS <xref target="RFC8446"/>.</t>
<!-- End YANG security DNE text Para. 1 -->

<!-- Begin YANG security DNE text Para. 2 (fixed per boilerplate) -->
<t>The NETCONF Network Configuration Access Control Model (NACM) <xref target="RFC8341"/>
provides the means to restrict access for particular NETCONF or RESTCONF users
to a
      pre-configured preconfigured subset of all available NETCONF or RESTCONF protocol
operations and content.</t>
<!-- End YANG security DNE text Para. 2 -->

<!-- Begin YANG security DNE text Para. 3 (fixed per boilerplate) -->
<t>There are a number of data nodes defined in ietf-ospf.yang this YANG module that are
writable/creatable/deletable (i.e., config true, which is the default). These
data nodes may be considered sensitive or vulnerable in some network
environments. Write operations (e.g., edit-config) to these data nodes without
proper protection can have a negative effect on network operations.
      Writable These are
the subtrees and data node nodes and their sensitivity/vulnerability:</t>
<!-- End YANG security DNE text Para. 3 -->

      <ul empty="true" spacing="normal">
        <li>/ospf</li>
        <li>/ospf/areas/</li>
        <li>/ospf/areas/area[area-id]</li>
        <li>/ospf/virtual-links/</li>
        <li>/ospf/virtual-links/virtual-link[transit-area-id router-id]</li>
        <li>/ospf/areas/area[area-id]/interfaces</li>
        <li>/ospf/areas/area[area-id]/interfaces/interface[name]</li>
        <li>/ospf/area/area[area-id]/sham-links</li>
        <li>/ospf/area/area[area-id]/sham-links/sham-link[local-id remote-id]</li>
      </ul>

      <t>Writable data nodes represent the configuration of each instance, area, virtual link,
      sham-link, sham link, and interface. These interface, and they correspond to the following schema nodes:
      <list style="empty">
       <t>/ospf</t>
       <t>/ospf/areas/</t>
       <t>/ospf/areas/area[area-id]</t>
       <t>/ospf/virtual-links/</t>
       <t>/ospf/virtual-links/virtual-link[transit-area-id router-id]</t>
       <t>/ospf/areas/area[area-id]/interfaces</t>
       <t>/ospf/areas/area[area-id]/interfaces/interface[name]</t>
       <t>/ospf/area/area[area-id]/sham-links</t>
       <t>/ospf/area/area[area-id]/sham-links/sham-link[local-id remote-id]</t>
      </list></t> nodes listed above.</t>

      <t>For OSPF, the ability to modify OSPF configuration will allow the entire OSPF domain
      to be compromised compromised, including peering with unauthorized routers to
      misroute traffic or mount a massive Denial-of-Service (DoS) attack. For example,
      adding OSPF on any unprotected interface could allow an OSPF adjacency to be
      formed with an unauthorized and malicious neighbor. Once an adjacency is formed,
      traffic could be hijacked. As a simpler example, a Denial-of-Service DoS attack could
      be mounted by changing the cost of an OSPF interface to be asymmetric such that a
      hard routing loop ensues. In general, unauthorized modification of most OSPF features
      will pose  there their own set of security risks and the "Security Considerations" risks.  The Security Considerations  sections in the
      respective reference RFCs should be consulted.</t>

<!-- Begin YANG security DNE text Para. 4 (fixed per boilerplate) -->
<t>Some of the readable data nodes in the ietf-ospf.yang this YANG module may be considered
sensitive or vulnerable in some network environments. It is thus important to
control read access (e.g., via get, get-config, or notification) to these data
nodes. The exposure These are the subtrees and data nodes and their
sensitivity/vulnerability:</t>
<!-- End YANG security DNE text Para. 4 -->

      <ul empty="true" spacing="normal">
        <li>/ospf/database</li>
        <li>/ospf/areas/area[area-id]/database</li>
        <li>/ospf/virtual-links/virtual-link[transit-area-id router-id]/database</li>
        <li>/ospf/areas/area[area-id]/interfaces/interface[name]/database</li>
        <li>/ospf/area/area[area-id]/sham-links/sham-link[local-id remote-id]/database</li>
      </ul>
<t>Exposure of the Link State Database (LSDB) will in turn
      expose the detailed topology of the network. There is a separate Link State
      Database LSDB for each instance, area, virtual link, sham-link, sham link, and interface. These
      correspond to the following schema nodes:
      <list style="empty">
       <t>/ospf/database</t>
       <t>/ospf/areas/area[area-id]/database</t>
       <t>/ospf/virtual-links/virtual-link[transit-area-id router-id]/database</t>
       <t>/ospf/areas/area[area-id]/interfaces/interface[name]/database</t>
       <t>/ospf/area/area[area-id]/sham-links/sham-link[local-id remote-id]/database</t>
      </list></t> nodes listed above.</t>
      <t>Exposure of the Link State Database LSDB includes information beyond the scope of the
      OSPF router and this router. This may be undesirable undesirable, since exposure may facilitate other attacks.
      Additionally, in the case of an area LSDB, the complete IP network topology and,
      if deployed, the traffic engineering TE topology of the OSPF area can be
      reconstucted.
      reconstructed. Network operators may consider their topologies to be sensitive
      confidential data.</t>
      <t>For OSPF authentication, configuration is supported via the specification
       of key-chains key chains <xref target="RFC8177" format="default"/> or the direct specification of a
       key and an authentication algorithm. Hence, authentication configuration
       using the "key-chain" case in the "authentication-type" container
       <xref target="RFC9130"/> inherits the security considerations of <xref target="RFC8177"/> target="RFC8177" format="default"/>.

<!-- [rfced] Section 4:  RFC 8177 does not mention
"auth-table-trailer" or anything similar, nor does any other
published RFC, as far as we can determine.  This question also
came up for RFC-to-be 9130 (draft-ietf-isis-yang-isis-cfg).  Per
an author's reply regarding that document, we updated this document
accordingly.

Also, because the only documents that mention a YANG item called
"authentication-type" are RFC 7317, RFC 8916, and
draft-ietf-isis-yang-isis-cfg, we have cited
draft-ietf-isis-yang-isis-cfg here and added it to the list of
Informative References.  Please review carefully, and let us know if
any corrections are needed.

Original:
 Hence, authentication
 configuration using the "auth-table-trailer" case in the
 "authentication" container inherits the direct specification security considerations of
       key and authentication algorithm.
 [RFC8177].

Currently (we have asked the authors if we can change "for IS-IS
  Protocol" to "for the IS-IS Protocol"):
 Hence, authentication
 configuration using the "auth-table-trailer" "key-chain" case in the "authentication" "authentication-type"
 container [RFC9130] inherits the security considerations of <xref target="RFC8177"/>.
 [RFC8177].
...
 [RFC9130]  Litkowski, S., Yeung, D., Lindem, A., Zhang, J., and L.
            Lhotka, "YANG Data Model for IS-IS Protocol", RFC 9130,
            DOI 10.17487/RFC9130, September 2021,
            <https://www.rfc-editor.org/info/rfc9130>. -->

 This
       includes the considerations with respect to the local storage and
       handling of authentication keys.</t>
      <t>Additionally, local specification of OSPF authentication keys and
       the associated authentication algorithm is supported for legacy
       implementations that do not support key-chains key chains <xref target="RFC8177" format="default"/>.
       It is <bcp14>RECOMMENDED</bcp14> that implementations migrate to key
       chains because of (1)&nbsp;seamless support of key and algorithm rollover, (2)&nbsp;specification of a hexadecimal key, which affords more key entropy, and (3)&nbsp;encryption of keys using the Advanced Encryption Standard (AES) Key Wrap
       with Padding algorithm <xref target="RFC8177"/> target="RFC5649" format="default"/>.

<!-- [rfced] Section 4:  This sentence was difficult to follow.
We updated it as shown below.  Please let us know if this is
incorrect.

Original:
 It is
 RECOMMENDED that implementations migrate to key-chains due the
 seamless support of key and algorithm rollover, as well as, the
 hexadecimal key specification affording more key entropy, and
 encryption of keys using the Advanced Encryption Standard (AES) Key
 Wrap Padding Algorithm <xref target="RFC5649"/>.</t> [RFC5649].

Currently:
 It is
 RECOMMENDED that implementations migrate to key chains because of
 (1) seamless support of key and algorithm rollover, (2) specification
 of a hexadecimal key, which affords more key entropy, and
 (3) encryption of keys using the Advanced Encryption Standard (AES)
 Key Wrap with Padding algorithm [RFC5649]. -->

</t>

<!-- Begin YANG security DNE text Para. 5 (fixed per boilerplate) -->
<t>Some of the RPC operations in this YANG module may be considered sensitive or vulnerable in some network environments. It is thus important to control
access to these operations. The These are the operations and their
sensitivity/vulnerability:</t>
<!-- End YANG security DNE text Para. 5 -->

<ul spacing="normal">
<li>The OSPF YANG module supports the "clear-neighbor"
      and "clear-database" RPCs. If access to either of these RPCs is compromised, they
      can result in temporary network outages can be employed to mount DoS attacks.</t> attacks as a result.</li>
</ul>

<!-- [rfced] *[AD]:  Security Considerations:  We have updated
several paragraphs in this section per
<https://trac.ietf.org/trac/ops/wiki/yang-security-guidelines>.
Additionally, we moved two lists in order to accommodate the
boilerplate text while still preserving text that is specific to
this document.

Please review our updates carefully, and let us know if further
updates are needed (e.g., regarding the placement of text). -->

      <t>The actual authentication key data (whether locally specified or part of a
      key-chain)
      key chain) is sensitive and needs to be kept secret from unauthorized
      parties; compromise of the key data would allow an attacker to forge OSPF
      traffic that would be accepted as authentic, potentially compromising the
      entirety
      entire OSPF domain.</t>
    </section>
    <section title="IANA Considerations"> numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document registers a URI in the IETF "IETF XML registry Registry"
     <xref target="RFC3688"/>. target="RFC3688" format="default"/>.  Following the format in <xref target="RFC3688"/>, target="RFC3688" format="default"/>,
     the following registration is requested to be has been made:
     <figure>
     <artwork>
     URI: urn:ietf:params:xml:ns:yang:ietf-ospf
     Registrant Contact: The IESG.
     XML: N/A,
      </t>
     <dl newline="false" spacing="compact">
     <dt>URI:</dt><dd>urn:ietf:params:xml:ns:yang:ietf-ospf</dd>
     <dt>Registrant Contact:</dt><dd>The IESG.</dd>
     <dt>XML:</dt><dd>N/A; the requested URI is an XML namespace.
     </artwork>
     </figure></t> namespace.</dd>
     </dl>
      <t>This document registers a YANG module in the YANG "YANG Module Names Names"
     registry <xref target="RFC6020"/>.
     <figure>
     <artwork>
     name: ietf-ospf
     namespace: urn:ietf:params:xml:ns:yang:ietf-ospf
     prefix: ospf
     reference: RFC XXXX
     </artwork>
     </figure></t> target="RFC6020" format="default"/>.
      </t>
     <dl newline="false" spacing="compact">
     <dt>Name:</dt><dd>ietf-ospf</dd>
     <dt>Namespace:</dt><dd>urn:ietf:params:xml:ns:yang:ietf-ospf</dd>
     <dt>Prefix:</dt><dd>ospf</dd>
     <dt>Reference:</dt><dd>RFC 9129</dd>
     </dl>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
      <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.1765.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.1793.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2328.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3101.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3630.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3623.xml"/>
        <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.4552.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4576.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4577.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4915.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4973.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5082.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5185.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5187.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5250.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5286.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5309.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5329.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5340.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5613.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5642.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5709.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5714.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5838.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.6565.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6845.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6860.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6987.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.7166.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7474.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7490.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7684.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7770.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7777.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7884.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7950.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.8174.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.8294.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.8342.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.8349.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8405.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8476.xml"/>

<!-- draft-ietf-bfd-yang (RFC 9127) -->
<reference anchor='RFC9127' target="https://www.rfc-editor.org/info/rfc9127">
<front>
<title>YANG Data Model for Bidirectional Forwarding Detection (BFD)</title>
<author initials='R' surname='Rahman' fullname='Reshad Rahman' role="editor">
    <organization />
</author>
<author initials='L' surname='Zheng' fullname='Lianshu Zheng' role="editor">
    <organization />
</author>
<author initials='M' surname='Jethanandani' fullname='Mahesh Jethanandani' role="editor">
    <organization />
</author>
<author initials='S' surname='Pallagatti' fullname='Santosh Pallagatti'>
    <organization />
</author>
<author initials='G' surname='Mirsky' fullname='Greg Mirsky'>
    <organization />
</author>
<date month='September' year='2021' />
</front>
<seriesInfo name="RFC" value="9127"/>
<seriesInfo name="DOI" value="10.17487/RFC9127"/>
</reference>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.0905.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4750.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5443.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5643.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5649.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"/>

<!-- draft-ietf-isis-yang-isis-cfg (RFC 9130) -->
<!-- Note (please save this for Lynne):  If authors approve the title
change, change "for IS-IS Protocol" to "for the IS-IS Protocol" -->
<reference anchor='RFC9130' target="https://www.rfc-editor.org/info/rfc9130">
<front>
<title>YANG Data Model for IS-IS Protocol</title>
<author initials='S' surname='Litkowski' fullname='Stephane Litkowski'>
    <organization />
</author>
<author initials='D' surname='Yeung' fullname='Derek Yeung'>
    <organization />
</author>
<author initials='A' surname='Lindem' fullname='Acee Lindem'>
    <organization />
</author>
<author initials='J' surname='Zhang' fullname='Jeffrey Zhang'>
    <organization />
</author>
<author initials='L' surname='Lhotka' fullname='Ladislav Lhotka'>
    <organization />
</author>
<date month='September' year='2021' />
</front>
<seriesInfo name="RFC" value="9130"/>
<seriesInfo name="DOI" value="10.17487/RFC9130"/>
</reference>

      </references>
    </references>
    <section anchor="Acknowledgements" title="Acknowledgements"> anchor="Acknowledgments" numbered="false" toc="default">
      <name>Acknowledgments</name>
      <t>The authors wish to thank Yi Yang, Alexander Clemm,
      Gaurav Gupta, Ladislav Lhotka, Stephane Litkowski,
      Greg Hankins, Manish Gupta, Michael Darwish, and Alan Davey <contact fullname="Yi Yang"/>, <contact fullname="Alexander Clemm"/>,
      <contact fullname="Gaurav Gupta"/>, <contact fullname="Ladislav Lhotka"/>, <contact fullname="Stephane Litkowski"/>,
      <contact fullname="Greg Hankins"/>, <contact fullname="Manish Gupta"/>, <contact fullname="Michael Darwish"/>, and <contact fullname="Alan Davey"/> for their thorough reviews
      and helpful comments.</t>
      <t>Thanks to Tom Petch <contact fullname="Tom Petch"/> for last call Last Call review and improvement
      improvements to the organization of the
         document organization.</t> document.</t>
      <t>Thanks to Alvaro Retana <contact fullname="Alvaro Retana"/> for AD comments.</t>
      <t>Thanks to Benjamin Kaduk, Suresh Krishnan, and Roman Dannyliw <contact fullname="Benjamin Kaduk"/>, <contact fullname="Suresh Krishnan"/>, and <contact fullname="Roman Danyliw"/> for
         IESG review comments.</t>
      <t>This document was produced using Marshall Rose's xml2rfc tool.</t>
      <t>Author affiliation with The MITRE Corporation is provided for
      identification purposes only, only and is not intended to convey or imply
      MITRE's concurrence with, or support for, the positions, opinions opinions, or
      viewpoints expressed.  MITRE has approved this document for Public
      Release, Distribution Unlimited, with Public Release Case Number
      18-3194.</t>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <section numbered="false" toc="default">
      <name>Contributors</name>
      <contact fullname="Dean Bogdanovic">
        <organization>Volta Networks, Inc.</organization>
        <address>
          <postal>
            <street></street>
            <city></city>
            <region></region><code></code>
            <country></country>
          </postal>
          <email>dean@voltanet.io</email>
        </address>
      </contact>
      <contact fullname="Kiran Koushik Agrahara Sreenivasa">
        <organization>Verizon</organization>
        <address>
          <postal>
            <street>500 W Dove Rd</street>
            <city>Southlake</city>
            <region>TX</region>
            <code>76092</code>
            <country>United States of America</country>
          </postal>
          <email>kk@employees.org</email>
        </address>
      </contact>
    </section>

<!-- References split into informative and normative [rfced] Please review the "Inclusive Language" portion of the
online Style Guide
<https://www.rfc-editor.org/styleguide/part2/#inclusive_language>
and let us know if any changes are needed. -->

  </back>

<!-- There [rfced] Please let us know if any changes are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at needed for the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually
following:

a) The following terms were used inconsistently in this document.
We chose to use the same manner: by using xref elements.
     If you latter forms.  Please let us know any objections.

 Authentication trailer / authentication trailer /
   Authentication Trailer (per RFCs 5709, 7474, and 7166)

 opaque LSA / Opaque LSA  (RFCs 3630 and 7770 use "Opaque")

 Maximum Segment Depth (MSD) / Maximum SID Depth (MSD)
   (RFC 8476 uses the PI option, xml2rfc will, by default, try latter.)

b) The following terms appear to find included files be used inconsistently in this
document.  Please let us know which form is preferred.

 AS-Scoped / AS-Scope / AS-scope

 AS-External LSA / AS-external LSA / AS External LSA*

 Router-LSA / Router LSA*

 LSA options flag / LSA option flag / LSA Option flag

 inter-area-prefix LSA / Inter-area Prefix LSA /
   Inter-Area-Prefix LSA*

 Inter-area Router LSA / Inter-Area-Router LSA*

 Intra-area Prefix LSA / Intra-Area-Prefix LSA*

* We see that usage in RFC 5340 is mixed, but it lists the same
     directory as the including file. You can
hyphenated and uppercase forms in Appendix A.4.2.1 when listing their values.
We also define the XML_LIBRARY environment variable
     with a value containing a set see "0x2007    NSSA-LSA" and "0x0008    Link-LSA" in RFC 5340.

Please let us know which form you prefer to use for this document.

 summary LSA / Summary LSA
   (usage in RFCs is mixed)

c) Quoting of directories module names, field names, etc.:  Please note that
(1) to search.  These can be either make usage consistent in this document and (2) per the local
     filing system rest of
Cluster 336, we used double quotes instead of single quotes or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">
      <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
      &RFC1765;
      &RFC1793;
      &RFC2119;
      &RFC2328;
      &RFC3101;
      &RFC3630;
      &RFC3623;
      &RFC3688;
      &RFC4552;
      &RFC4576;
      &RFC4577;
      &RFC4915;
      &RFC4973;
      &RFC5082;
      &RFC5185;
      &RFC5187;
      &RFC5250;
      &RFC5286;
      &RFC5309;
      &RFC5329;
      &RFC5340;
      &RFC5613;
      &RFC5642;
      &RFC5709;
      &RFC5714;
      &RFC5838;
      &RFC6020;
      &RFC6241;
      &RFC6242;
      &RFC6565;
      &RFC6845;
      &RFC6860;
      &RFC6987;
      &RFC6991;
      &RFC7166;
      &RFC7474;
      &RFC7490;
      &RFC7684;
      &RFC7770;
      &RFC7777;
      &RFC7884;
      &RFC7950;
      &RFC8040;
      &RFC8174;
      &RFC8177;
      &RFC8294;
      &RFC8340;
      &RFC8341;
      &RFC8342;
      &RFC8343;
      &RFC8349;
      &RFC8405;
      &RFC8446;
      &RFC8476;
      &I-D.ietf-bfd-yang;
    </references>
    <references title="Informative References">
      &RFC905;
      &RFC4750;
      &RFC5443;
      &RFC5643;
      &RFC5649;
      &RFC5880;
      &RFC5881;
    </references>
   <section title="Contributors' Addresses">
   <figure>
   <artwork>

Dean Bogdanovic
Volta Networks, Inc.

EMail: dean@voltanet.io

Kiran Koushik Agrahara Sreenivasa
Verizon
500 W Dove Rd
Southlake, TX 76092
USA

EMail: kk@employees.org

   </artwork>
   </figure>
  </section>
  </back> no
quotes.  Please let us know any concerns.

Examples from original:
 the ietf-routing module

 The ietf-ospf model

 The field 'version'

Currently:
 the "ietf-routing" module

 The "ietf-ospf" model

 The "version" field
-->

</rfc>

mirror server hosted at Truenetwork, Russian Federation.