ietf-ospf

This YANG module defines the generic configuration data for OSPF, which is common across all of the vendor implementations of th...

  • Version: 2015-03-09

    ietf-ospf@2015-03-09


    
      module ietf-ospf {
    
        yang-version 1;
    
        namespace
          "urn:ietf:params:xml:ns:yang:ietf-ospf";
    
        prefix ospf;
    
        import ietf-inet-types {
          prefix inet;
        }
        import ietf-yang-types {
          prefix yang;
        }
        import ietf-interfaces {
          prefix if;
        }
        import ietf-routing {
          prefix rt;
        }
        import ietf-key-chain {
          prefix key-chain;
        }
    
        organization
          "Cisco Systems
         170 West Tasman Drive
         San Jose, CA 95134-1706
         USA";
    
        contact
          "WG Web:   <http://tools.ietf.org/wg/ospf/>
          WG List:  <mailto:ospf@ietf.org>
    
          WG Chair: Acee Lindem
                    <mailto:acee@cisco.com>
    
          WG Chair: Abhay Roy
                    <mailto:akr@cisco.com>
    
          Editor:   Derek Yeung
                    <myeung@cisco.com>
          Author:   Derek Yeung
                    <myeung@cisco.com>
          Author:   Yingzhen Qu
                    <yiqu@cisco.com>
          Author:   Dean Bogdanovic
                    <deanb@juniper.net>
          Author:   Jeffrey Zhang
                    <zzhang@juniper.net>
          Author:   Kiran Agrahara Sreenivasa
                    <kkoushik@Brocade.com>";
    
        description
          "This YANG module defines the generic configuration
         data for OSPF, which is common across all of the vendor
         implementations of the protocol. It is intended that the module
         will be extended by vendors to define vendor-specific
         OSPF configuration parameters and policies,
         for example route maps or route policies.
    
         Terms and Acronyms
    
         OSPF (ospf): Open Shortest Path First
    
         IP (ip): Internet Protocol
    
         IPv4 (ipv4):Internet Protocol Version 4
    
         IPv6 (ipv6): Internet Protocol Version 6
    
         MTU (mtu) Maximum Transmission Unit
        ";
    
        revision "2015-03-09" {
          description
            "Initial revision.
           Remove protocol-centric
           Replace admin-control
           Add IPFRR
           Max-path etc reorg
           SR
           Align config/operation field";
          reference
            "RFC XXXX: A YANG Data Model for OSPF";
    
        }
    
    
        identity ospf {
          base rt:routing-protocol;
          description "OSPF Protocol";
        }
    
        identity ospfv2 {
          base rt:routing-protocol;
          description "OSPFv2";
        }
    
        identity ospfv3 {
          base rt:routing-protocol;
          description "OSPFv3";
        }
    
        identity operation-mode {
          description "OSPF operation mode.";
        }
    
        identity ships-in-the-night {
          base operation-mode;
          description
            "Ships-in-the-night operation mode in which
          each OSPF instance carries only one address family";
        }
    
        identity area-type {
          description
            "Base identity for OSPF area type.";
        }
    
        identity normal {
          base area-type;
          description "OSPF normal area.";
        }
    
        identity stub {
          base area-type;
          description "OSPF stub area.";
        }
    
        identity nssa {
          base area-type;
          description "OSPF NSSA area.";
        }
    
        typedef rib-ref {
          type leafref {
            path "/rt:routing/rt:routing-instance/rt:ribs/rt:rib/rt:name";
          }
          description
            "This type is used for leafs that reference a RIB
           configuration.";
        }
    
        typedef uint24 {
          type uint32 {
            range "0 .. 16777215";
          }
          description "24-bit unsigned integer.";
        }
    
        typedef area-id-type {
          type union {
            type uint32;
            type yang:dotted-quad;
          }
          description "Area ID type.";
        }
    
        typedef if-state-type {
          type enumeration {
            enum "Down" {
              value 1;
              description "Interface down state";
            }
            enum "Loopback" {
              value 2;
              description
                "Interface loopback state";
            }
            enum "Waiting" {
              value 3;
              description
                "Interface waiting state";
            }
            enum "Point-to-Point" {
              value 4;
              description
                "Interface point-to-point state";
            }
            enum "DR" {
              value 5;
              description
                "Interface Designated Router (DR) state";
            }
            enum "BDR" {
              value 6;
              description
                "Interface Backup Designated Router (BDR) state";
            }
            enum "DR-Other" {
              value 7;
              description
                "Interface Other Designated Router state";
            }
          }
          description
            "OSPF interface state type.";
        }
    
        typedef nbr-state-type {
          type enumeration {
            enum "Down" {
              value 1;
              description "Neighbor down state";
            }
            enum "Attempt" {
              value 2;
              description
                "Neighbor attempt state";
            }
            enum "Init" {
              value 3;
              description "Neighbor init state";
            }
            enum "2-Way" {
              value 4;
              description "Neighbor 2-Way state";
            }
            enum "ExStart" {
              value 5;
              description
                "Neighbor exchange start state";
            }
            enum "Exchange" {
              value 6;
              description
                "Neighbor exchange state";
            }
            enum "Loading" {
              value 7;
              description
                "Neighbor loading state";
            }
            enum "Full" {
              value 8;
              description "Neighbor full state";
            }
          }
          description
            "OSPF neighbor state type.";
        }
    
        typedef restart-helper-status-type {
          type enumeration {
            enum "Not-Helping" {
              value 1;
              description
                "Restart helper status not helping.";
            }
            enum "Helping" {
              value 2;
              description
                "Restart helper status helping.";
            }
          }
          description
            "Restart helper status type.";
        }
    
        typedef restart-exit-reason-type {
          type enumeration {
            enum "None" {
              value 1;
              description "Not attempted.";
            }
            enum "InProgress" {
              value 2;
              description "Restart in progress.";
            }
            enum "Completed" {
              value 3;
              description
                "Successfully completed.";
            }
            enum "TimedOut" {
              value 4;
              description "Timed out.";
            }
            enum "TopologyChanged" {
              value 5;
              description
                "Aborted due to 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-Descripton" {
              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 acknowlegement 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 is not restarting.";
            }
            enum "Planned-Restart" {
              value 2;
              description
                "Router is going through planned restart.";
            }
            enum "Unplanned-Restart" {
              value 3;
              description
                "Router is going through unplanned restart.";
            }
          }
          description
            "OSPF graceful restart status type.";
        }
    
        feature multi-topology {
          description "Support MTR.";
        }
    
        feature multi-area-adj {
          description
            "OSPF multi-area adjacency support as in RFC 5185.";
        }
    
        feature router-id {
          description
            "Set router ID per instance.";
        }
    
        feature demand-circuit {
          description
            "OSPF demand circuit support as in RFC 1793.";
        }
    
        feature mtu-ignore {
          description
            "Disable OSPF MTU mismatch detection on receiving
           DBD packets.";
        }
    
        feature lls {
          description
            "OSPF link-local signaling (LLS) as in RFC 5613.";
        }
    
        feature prefix-suppression {
          description
            "OSPF prefix suppression support as in RFC 6860.";
        }
    
        feature bfd {
          description "OSPF BFD support.";
        }
    
        feature ttl-security {
          description "OSPF ttl security check.";
        }
    
        feature nsr {
          description "Non-Stop-Routing (NSR).";
        }
    
        feature graceful-restart {
          description
            "Graceful OSPF Restart as defined in RFC3623 and RFC5187.";
        }
    
        feature admin-control {
          description
            "Administrative control of the protocol state.";
        }
    
        feature auto-cost {
          description
            "Calculate OSPF interface cost according to
           reference bandwidth.";
        }
    
        feature max-ecmp {
          description
            "Setting maximum number of ECMP paths.";
        }
    
        feature max-lsa {
          description
            "Setting maximum number of LSAs OSPF will receive.";
        }
    
        feature te-rid {
          description "TE router-id.";
        }
    
        feature ldp-igp-sync {
          description "LDP IGP synchronization.";
        }
    
        feature ldp-igp-autoconfig {
          description "LDP IGP auto-config.";
        }
    
        feature ospfv3-authentication-ipsec {
          description
            "Use IPsec for OSPFv3 authentication.";
        }
    
        feature fast-reroute {
          description "Support of IPFRR.";
        }
    
        feature node-flag {
          description "Support of node flag.";
        }
    
        feature lfa {
          description
            "Support of Loop Free Alternates.";
        }
    
        feature remote-lfa {
          description
            "Support of remote Loop Free Alternates.";
        }
    
        feature instance-inheritance {
          description
            "Support instance inheritance";
        }
    
        feature area-inheritance {
          description "Support area inheritance";
        }
    
        feature interface-inheritance {
          description
            "Support interface inheritance";
        }
    
        grouping instance-fast-reroute-config {
          description
            "This group defines global configuration of IPFRR.";
          container fast-reroute {
            if-feature fast-reroute;
            description
              "This container may be augmented with global
             parameters for IPFRR.";
            container lfa {
              if-feature lfa;
              description
                "This container may be augmented with
               global parameters for LFA.
               Creating the container has no effect on
               LFA activation.";
            }  // container lfa
          }  // container fast-reroute
        }  // grouping instance-fast-reroute-config
    
        grouping interface-fast-reroute-config {
          description
            "This group defines interface configuration of IPFRR.";
          container fast-reroute {
            if-feature fast-reroute;
            description
              "Fast-reroute configuration.";
            container lfa {
              if-feature lfa;
              description "LFA configuration.";
              leaf candidate-disabled {
                type boolean;
                description
                  "Prevent the interface to be used as backup.";
              }
    
              leaf enabled {
                type boolean;
                description
                  "Activates LFA.
                This model assumes activation of per-prefix LFA.";
              }
    
              container remote-lfa {
                if-feature remote-lfa;
                description
                  "Remote LFA configuration.";
                leaf enabled {
                  type boolean;
                  description
                    "Activates remote LFA.";
                }
              }  // container remote-lfa
            }  // container lfa
          }  // container fast-reroute
        }  // grouping interface-fast-reroute-config
    
        grouping interface-common-config {
          description
            "Common configuration for all types of interfaces,
                     including virtual link and sham link";
          leaf cost {
            type uint16 {
              range "1..65535";
            }
            description "Interface cost.";
          }
    
          leaf hello-interval {
            type uint16 {
              range "1..65535";
            }
            units "seconds";
            description
              "Time between hello packets.";
          }
    
          leaf dead-interval {
            type uint16 {
              range "1..65535";
            }
            units "seconds";
            must
              "../dead-interval > ../hello-interval" {
              error-message
                "The dead interval must be "
                  + "larger than the hello interval";
              description
                "The value MUST be greater than 'hello-internval'.";
            }
            description
              "Interval after which a neighbor is declared dead.";
          }
    
          leaf retransmit-interval {
            type uint16 {
              range "1..65535";
            }
            units "seconds";
            description
              "Time between retransmitting unacknowledged Link State
             Advertisements (LSAs).";
          }
    
          leaf transmit-delay {
            type uint16 {
              range "1..65535";
            }
            units "seconds";
            description
              "Estimated time needed to send link-state update.";
          }
    
          leaf mtu-ignore {
            if-feature mtu-ignore;
            type boolean;
            description
              "Enable/Disable ignoring of MTU in DBD packets.";
          }
    
          leaf lls {
            if-feature lls;
            type boolean;
            description
              "Enable/Disable link-local signaling (LLS) support.";
          }
    
          leaf prefix-suppression {
            if-feature prefix-suppression;
            type boolean;
            description
              "Suppress advertisement of the prefixes.";
          }
    
          leaf bfd {
            if-feature bfd;
            type boolean;
            description "Enable/disable bfd.";
          }
    
          container ttl-security {
            if-feature ttl-security;
            description "TTL security check.";
            leaf enable {
              type boolean;
              description
                "Enable/Disable TTL security check.";
            }
    
            leaf hops {
              type uint8 {
                range "1..254";
              }
              description
                "Maximum number of hops that a OSPF packet may
               have traveled.";
            }
          }  // container ttl-security
    
          leaf enable {
            if-feature admin-control;
            type boolean;
            default 'true';
            description
              "Enable/disable protocol on the interface.";
          }
    
          container authentication {
            description
              "Authentication configuration.";
            choice auth-type-selection {
              description
                "Options for expressing authentication setting";
              case auth-ipsec {
                when
                  "../../../../../rt:type = 'ospfv3'" {
                  description
                    "Applied to OSPFv3 only";
                }
                if-feature ospfv3-authentication-ipsec;
                leaf sa {
                  type string;
                  description "SA name";
                }
              }  // case auth-ipsec
              leaf key-chain {
                type key-chain:key-chain-ref;
                description "key-chain name";
              }
    
              case auth-trailer-key {
                leaf key {
                  type string;
                  description
                    "Key string in ASCII format.";
                }
    
                container crypto-algorithm {
                  description
                    "Cryptographic algorithm associated with key.";
                  uses key-chain:crypto-algorithm-types;
                }  // container crypto-algorithm
              }  // case auth-trailer-key
            }  // choice auth-type-selection
          }  // container authentication
        }  // grouping interface-common-config
    
        grouping interface-config {
          description
            "Configuration for real interfaces.";
          leaf network-type {
            type enumeration {
              enum "broadcast" {
                value 0;
                description
                  "Specify OSPF broadcast multi-access network.";
              }
              enum "non-broadcast" {
                value 1;
                description
                  "Specify OSPF Non-Broadcast Multi-Access
                (NBMA) network.";
              }
              enum "point-to-multipoint" {
                value 2;
                description
                  "Specify OSPF point-to-multipoint network.";
              }
              enum "point-to-point" {
                value 3;
                description
                  "Specify OSPF point-to-point network.";
              }
            }
            description "Network type.";
          }
    
          leaf passive {
            type boolean;
            description
              "Enable/Disable passive.";
          }
    
          leaf demand-circuit {
            if-feature demand-circuit;
            type boolean;
            description
              "Enable/Disable demand circuit.";
          }
    
          container multi-area {
            if-feature multi-area-adj;
            description
              "Configure ospf multi-area.";
            leaf multi-area-id {
              type area-id-type;
              description "Multi-area ID";
            }
    
            leaf cost {
              type uint16;
              description
                "Interface cost for multi-area.";
            }
          }  // container multi-area
    
          container static-neighbors {
            description
              "Static configured neighbors.";
            list neighbor {
              key "address";
              description
                "Specify a neighbor router.";
              leaf address {
                type inet:ip-address;
                description
                  "Neighbor IP address.";
              }
    
              leaf cost {
                type uint16 {
                  range "1..65535";
                }
                description "Neighbor cost.";
              }
    
              leaf poll-interval {
                type uint16 {
                  range "1..65535";
                }
                units "seconds";
                description
                  "Neighbor poll interval.";
              }
    
              leaf priority {
                type uint8 {
                  range "1..255";
                }
                description
                  "Neighbor priority for DR election.";
              }
            }  // list neighbor
          }  // container static-neighbors
    
          leaf node-flag {
            if-feature node-flag;
            type boolean;
            default 'false';
            description
              "Set prefix as a node representative prefix.";
          }
    
          uses interface-fast-reroute-config;
    
          uses interface-common-config;
        }  // grouping interface-config
    
        grouping tlv {
          description "TLV";
          leaf type {
            type uint16;
            description "TLV type.";
          }
    
          leaf length {
            type uint16;
            description "TLV length.";
          }
    
          leaf value {
            type yang:hex-string;
            description "TLV value.";
          }
        }  // grouping tlv
    
        grouping ospfv2-lsa-body {
          description "OSPFv2 LSA body.";
          container router {
            when "../../header/type = 1" {
              description
                "Only apply to Router-LSA.";
            }
            description "Router LSA.";
            leaf flags {
              type bits {
                bit V {
                  position 0;
                  description
                    "When set, the router is an endpoint of one or
                  more virtual links.";
                }
                bit E {
                  position 1;
                  description
                    "When set, the router is an AS Boundary Router
                  (ASBR).";
                }
                bit B {
                  position 2;
                  description
                    "When set, the router is an Area Border
                  Router (ABR).";
                }
              }
              description "Flags";
            }
    
            leaf num-of-links {
              type uint16;
              description "Number of links.";
            }
    
            list link {
              key "link-id link-data";
              description "Router LSA link.";
              leaf link-id {
                type union {
                  type inet:ipv4-address;
                  type yang:dotted-quad;
                }
                description "Link ID";
              }
    
              leaf link-data {
                type union {
                  type inet:ipv4-address;
                  type uint32;
                }
                description "Link data.";
              }
    
              leaf type {
                type uint8;
                description "Link type.";
              }
    
              list topology {
                key "mt-id";
                description
                  "Topology specific information.";
                leaf mt-id {
                  type uint8;
                  description
                    "The MT-ID for topology enabled on the link.";
                }
    
                leaf metric {
                  type uint16;
                  description
                    "Metric for the topology.";
                }
              }  // list topology
            }  // list link
          }  // container router
    
          container network {
            when "../../header/type = 2" {
              description
                "Only apply to network LSA.";
            }
            description "Network LSA.";
            leaf network-mask {
              type inet:ipv4-address;
              description
                "The IP address mask for the network";
            }
    
            leaf-list attached-router {
              type yang:dotted-quad;
              description
                "List of the routers attached to the network.";
            }
          }  // container network
    
          container summary {
            when
              "../../header/type = 3 or "
                + "../../header/type = 4" {
              description
                "Only apply to Summary-LSA.";
            }
            description "Summary LSA.";
            leaf network-mask {
              type inet:ipv4-address;
              description
                "The IP address mask for the network";
            }
    
            list topology {
              key "mt-id";
              description
                "Topology specific information.";
              leaf mt-id {
                type uint8;
                description
                  "The MT-ID for topology enabled on the link.";
              }
    
              leaf metric {
                type uint24;
                description
                  "Metric for the topology.";
              }
            }  // list topology
          }  // container summary
    
          container external {
            when
              "../../header/type = 5 or "
                + "../../header/type = 7" {
              description
                "Only apply to AS-external-LSA and NSSA-LSA.";
            }
            description "External LSA.";
            leaf network-mask {
              type inet:ipv4-address;
              description
                "The IP address mask for the network";
            }
    
            list topology {
              key "mt-id";
              description
                "Topology specific information.";
              leaf mt-id {
                type uint8;
                description
                  "The MT-ID for topology enabled on the link.";
              }
    
              leaf flags {
                type bits {
                  bit E {
                    position 0;
                    description
                      "When set, the metric specified is a Type 2
                    external metric.";
                  }
                }
                description "Flags.";
              }
    
              leaf metric {
                type uint24;
                description
                  "Metric for the topology.";
              }
    
              leaf forwarding-address {
                type inet:ipv4-address;
                description
                  "Forwarding address.";
              }
    
              leaf external-route-tag {
                type uint32;
                description "Route tag.";
              }
            }  // list topology
          }  // container external
    
          container opaque {
            when
              "../../header/type = 9 or "
                + "../../header/type = 10 or "
                + "../../header/type = 11" {
              description
                "Only apply to opaque LSA.";
            }
            description "Opaque LSA.";
            list unknown-tlv {
              key "type";
              description "Unknown TLV.";
              uses tlv;
            }  // list unknown-tlv
    
            container router-address-tlv {
              description "Router address TLV.";
              leaf router-address {
                type inet:ipv4-address;
                description "Router address.";
              }
            }  // container router-address-tlv
    
            container link-tlv {
              description "Link TLV.";
              leaf link-type {
                type uint8;
                mandatory true;
                description "Link type.";
              }
    
              leaf link-id {
                type union {
                  type inet:ipv4-address;
                  type yang:dotted-quad;
                }
                mandatory true;
                description "Link ID.";
              }
    
              leaf-list local-if-ipv4-addr {
                type inet:ipv4-address;
                description
                  "List of local interface IPv4 addresses.";
              }
    
              leaf-list local-remote-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 decimal64 {
                  fraction-digits 2;
                }
                description "Maximum bandwidth.";
              }
    
              leaf max-reservable-bandwidth {
                type decimal64 {
                  fraction-digits 2;
                }
                description
                  "Maximum reservable bandwidth.";
              }
    
              leaf unreserved-bandwidth {
                type decimal64 {
                  fraction-digits 2;
                }
                description
                  "Unreserved bandwidth.";
              }
    
              leaf admin-group {
                type uint32;
                description
                  "Administrative group/Resource class/Color.";
              }
    
              list unknown-subtlv {
                key "type";
                description "Unknown sub-TLV.";
                uses tlv;
              }  // list unknown-subtlv
            }  // container link-tlv
          }  // container opaque
        }  // grouping ospfv2-lsa-body
    
        grouping ospfv3-lsa-options {
          description "OSPFv3 LSA options";
          leaf options {
            type bits {
              bit DC {
                position 0;
                description
                  "When set, the router support demand circuits.";
              }
              bit R {
                position 1;
                description
                  "When set, the originator is an active router.";
              }
              bit N {
                position 2;
                description
                  "If set, the router is attached to an NSSA";
              }
              bit E {
                position 3;
                description
                  "This bit describes the way AS-external-LSAs
                are flooded";
              }
              bit V6 {
                position 4;
                description
                  "If clear, the router/link should be excluded
                 from IPv6 routing calculaton";
              }
              bit AF {
                position 5;
              }
            }
            mandatory true;
            description "OSPFv3 LSA options.";
          }
        }  // grouping ospfv3-lsa-options
    
        grouping ospfv3-lsa-prefix {
          description "OSPFv3 LSA prefix.";
          leaf prefix {
            type string;
            description "Prefix";
          }
    
          leaf prefix-options {
            type string;
            mandatory true;
            description "Prefix options.";
          }
        }  // grouping ospfv3-lsa-prefix
    
        grouping ospfv3-lsa-external {
          description
            "AS-External and NSSA LSA.";
          leaf metric {
            type uint24;
            description "Metric";
          }
    
          leaf flags {
            type bits {
              bit E {
                position 0;
                description
                  "When set, the metric specified is a Type 2
                external metric.";
              }
            }
            description "Flags.";
          }
    
          leaf referenced-ls-type {
            type uint16;
            description
              "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.";
          }
        }  // grouping ospfv3-lsa-external
    
        grouping ospfv3-lsa-body {
          description "OSPFv3 LSA body.";
          container router {
            when "../../header/type = 8193" {
              description
                "Only apply to Router-LSA.";
            }
            description "Router LSA.";
            leaf flags {
              type bits {
                bit V {
                  position 0;
                  description
                    "When set, the router is an endpoint of one or
                  more virtual links.";
                }
                bit E {
                  position 1;
                  description
                    "When set, the router is an AS Boundary Router
                  (ASBR).";
                }
                bit B {
                  position 2;
                  description
                    "When set, the router is an Area Border
                  Router (ABR).";
                }
                bit Nt {
                  position 3;
                  description
                    "When set, the router is an NSSA border router
                  that is unconditionally translating NSSA-LSAs
                  into AS-external-LSAs.";
                }
              }
              mandatory true;
              description "LSA option.";
            }
    
            uses ospfv3-lsa-options;
    
            list link {
              key "interface-id neighbor-interface-id neighbor-router-id";
              description "Router LSA link.";
              leaf interface-id {
                type uint32;
                description "Interface ID.";
              }
    
              leaf neighbor-interface-id {
                type uint32;
                description
                  "Neighbor Interface ID.";
              }
    
              leaf neighbor-router-id {
                type yang:dotted-quad;
                description "Neighbor Router ID";
              }
    
              leaf type {
                type uint8;
                description "Link type.";
              }
    
              leaf metric {
                type uint16;
                description "Metric.";
              }
            }  // list link
          }  // container router
    
          container network {
            when "../../header/type = 8194" {
              description
                "Only apply to network LSA.";
            }
            description "Network LSA.";
            uses ospfv3-lsa-options;
    
            leaf-list attached-router {
              type yang:dotted-quad;
              description
                "List of the routers attached to the network.";
            }
          }  // container network
    
          container inter-area-prefix {
            when "../../header/type = 8195" {
              description
                "Only apply to inter-area-prefix LSA.";
            }
            description "Inter-Area-Prefix LSA.";
            leaf metric {
              type uint24;
              description "Metric";
            }
    
            uses ospfv3-lsa-prefix;
          }  // container inter-area-prefix
    
          container inter-area-router {
            when "../../header/type = 8196" {
              description
                "Only apply to inter-area-router LSA.";
            }
            description "Inter-Area-Router LSA.";
            uses ospfv3-lsa-options;
    
            leaf metric {
              type uint24;
              description "Metric";
            }
    
            leaf destination-router-id {
              type yang:dotted-quad;
              description
                "The Router ID of the router being described by the LSA.";
            }
          }  // container inter-area-router
    
          container as-external {
            when "../../header/type = 16389" {
              description
                "Only apply to as-external LSA.";
            }
            description "AS-External LSA.";
            uses ospfv3-lsa-external;
          }  // container as-external
    
          container nssa {
            when "../../header/type = 8199" {
              description
                "Only apply to nssa LSA.";
            }
            description "NSSA LSA.";
            uses ospfv3-lsa-external;
          }  // container nssa
    
          container link {
            when "../../header/type = 8" {
              description
                "Only apply to link LSA.";
            }
            description "Link LSA.";
            leaf rtr-priority {
              type uint8;
              description
                "Router Priority of the interface.";
            }
    
            uses ospfv3-lsa-options;
    
            leaf link-local-interface-address {
              type inet:ip-address;
              description
                "The originating router's link-local
              interface address on the link.";
            }
    
            leaf num-of-prefixes {
              type uint32;
              description "Number of prefixes.";
            }
    
            list prefix-list {
              key "prefix";
              description
                "List of prefixes associated with the link.";
              uses ospfv3-lsa-prefix;
            }  // list prefix-list
          }  // container link
    
          container intra-area-prefix {
            when "../../header/type = 8201" {
              description
                "Only apply to intra-area-prefix LSA.";
            }
            description "Intra-Area-Prefix LSA.";
            leaf referenced-ls-type {
              type uint16;
              description
                "Referenced Link State type.";
            }
    
            leaf referenced-link-state-id {
              type uint32;
              description
                "Referenced Link State ID.";
            }
    
            leaf referenced-adv-router {
              type inet:ipv4-address;
              description
                "Referenced Advertising Router.";
            }
    
            leaf num-of-prefixes {
              type uint16;
              description "Number of prefixes.";
            }
    
            list prefix-list {
              key "prefix";
              description
                "List of prefixes associated with the link.";
              uses ospfv3-lsa-prefix;
    
              leaf metric {
                type uint24;
                description "Metric";
              }
            }  // list prefix-list
          }  // container intra-area-prefix
        }  // grouping ospfv3-lsa-body
    
        grouping lsa-header {
          description
            "Common LSA for OSPFv2 and OSPFv3";
          leaf age {
            type uint16;
            mandatory true;
            description "LSA age.";
          }
    
          leaf type {
            type uint16;
            mandatory true;
            description "LSA type.";
          }
    
          leaf adv-router {
            type yang:dotted-quad;
            mandatory true;
            description
              "LSA advertising router.";
          }
    
          leaf seq-num {
            type string;
            mandatory true;
            description "LSA sequence number.";
          }
    
          leaf checksum {
            type string;
            mandatory true;
            description "LSA checksum.";
          }
    
          leaf length {
            type uint16;
            mandatory true;
            description "LSA length.";
          }
        }  // grouping lsa-header
    
        grouping ospfv2-lsa {
          description "OSPFv2 LSA.";
          container header {
            description
              "Decoded OSPFv2 LSA header data.";
            leaf options {
              type bits {
                bit DC {
                  position 0;
                  description
                    "When set, the router support demand circuits.";
                }
                bit P {
                  position 1;
                  description
                    "Only used in type-7 LSA. When set, the NSSA
                  border router should translate the type-7 LSA
                  to type-5 LSA.";
                }
                bit MC {
                  position 2;
                  description
                    "When set, the router support MOSPF.";
                }
                bit E {
                  position 3;
                  description
                    "This bit describes the way AS-external-LSAs
                  are flooded";
                }
                bit Upward {
                  position 4;
                }
                bit MT {
                  position 5;
                }
                bit R {
                  position 6;
                }
                bit AF {
                  position 7;
                }
              }
              mandatory true;
              description "LSA option.";
            }
    
            leaf lsa-id {
              type inet:ipv4-address;
              mandatory true;
              description "LSA ID.";
            }
    
            leaf opaque-type {
              when
                "../../header/type = 9 or "
                  + "../../header/type = 10 or "
                  + "../../header/type = 11" {
                description
                  "Only apply to opaque LSA.";
              }
              type uint8;
              mandatory true;
              description "Opaque type.";
            }
    
            leaf opaque-id {
              when
                "../../header/type = 9 or "
                  + "../../header/type = 10 or "
                  + "../../header/type = 11" {
                description
                  "Only apply to opaque LSA.";
              }
              type uint24;
              mandatory true;
              description "Opaque id.";
            }
    
            uses lsa-header;
          }  // container header
    
          container body {
            description
              "Decoded OSPFv2 LSA body data.";
            uses ospfv2-lsa-body;
          }  // container body
        }  // grouping ospfv2-lsa
    
        grouping ospfv3-lsa {
          description "Decoded OSPFv3 LSA.";
          container header {
            description
              "Decoded OSPFv3 LSA header data.";
            leaf lsa-id {
              type uint32;
              mandatory true;
              description "LSA ID.";
            }
    
            uses lsa-header;
    
            uses ospfv3-lsa-options;
          }  // container header
    
          container body {
            description
              "Decoded OSPF LSA body data.";
            uses ospfv3-lsa-body;
          }  // container body
        }  // grouping ospfv3-lsa
    
        grouping lsa-common {
          description
            "Common field for OSPF LSA represenation.";
          leaf decoded-completed {
            type boolean;
            description
              "The OSPF LSA body is fully decoded.";
          }
    
          leaf raw-data {
            type yang:hex-string;
            description
              "The complete LSA in network byte
            order as received/sent over the wire.";
          }
        }  // grouping lsa-common
    
        grouping lsa {
          description "OSPF LSA.";
          uses lsa-common;
    
          choice version {
            description
              "OSPFv2 or OSPFv3 LSA body.";
            container ospfv2 {
              description "OSPFv2 LSA";
              uses ospfv2-lsa;
            }  // container ospfv2
            container ospfv3 {
              description "OSPFv3 LSA";
              uses ospfv3-lsa;
            }  // container ospfv3
          }  // choice version
        }  // grouping lsa
    
        grouping lsa-key {
          description "OSPF LSA key.";
          leaf lsa-id {
            type union {
              type inet:ipv4-address;
              type uint32;
            }
            description "LSA ID.";
          }
    
          leaf adv-router {
            type inet:ipv4-address;
            description "Advertising router.";
          }
        }  // grouping lsa-key
    
        grouping af-area-config {
          description
            "OSPF address-family specific area config state.";
          list range {
            key "prefix";
            description
              "Summarize routes matching address/mask (border
             routers only)";
            leaf prefix {
              type string;
              description "IPv4 or IPv6 prefix";
            }
    
            leaf advertise {
              type boolean;
              description "Advertise or hide.";
            }
    
            leaf cost {
              type uint24 {
                range "0..16777214";
              }
              description
                "Cost of summary route.";
            }
          }  // list range
        }  // grouping af-area-config
    
        grouping area-config {
          description "OSPF area config state.";
          leaf area-type {
            type identityref {
              base area-type;
            }
            default 'normal';
            description "Area type.";
          }
    
          leaf summary {
            type boolean;
            description
              "Enable/Disable summary generation to the stub or
            NSSA area.";
          }
    
          leaf default-cost {
            type uint32 {
              range "1..16777215";
            }
            description
              "Set the summary default-cost for a stub or NSSA area.";
          }
    
          uses af-area-config;
        }  // grouping area-config
    
        grouping instance-config {
          description
            "OSPF instance config state.";
          leaf router-id {
            if-feature router-id;
            type yang:dotted-quad;
            description
              "Defined in RFC 2328. A 32-bit number
             that uniquely identifies the router.";
          }
    
          container admin-distance {
            description
              "Admin distance config state.";
            choice granularity {
              description
                "Options for expressing admin distance
               for intra-area and inter-area route";
              case detail {
                leaf intra-area {
                  type uint8;
                  description
                    "Admin distance for intra-area route.";
                }
    
                leaf inter-area {
                  type uint8;
                  description
                    "Admin distance for inter-area route.";
                }
              }  // case detail
              leaf internal {
                type uint8;
                description
                  "Admin distance for both intra-area and
                   inter-area route.";
              }
            }  // choice granularity
    
            leaf external {
              type uint8;
              description
                "Admin distance for both external route.";
            }
          }  // container admin-distance
    
          container nsr {
            if-feature nsr;
            description "NSR config state.";
            leaf enable {
              type boolean;
              description "Enable/Disable NSR.";
            }
          }  // container nsr
    
          container graceful-restart {
            if-feature graceful-restart;
            description
              "Graceful restart config state.";
            leaf enable {
              type boolean;
              description
                "Enable/Disable graceful restart as defined in RFC 3623.";
            }
    
            leaf helper-enable {
              type boolean;
              description
                "Enable RestartHelperSupport in RFC 3623 Section B.2.";
            }
    
            leaf restart-interval {
              type uint16 {
                range "1..1800";
              }
              units "seconds";
              default "120";
              description
                "RestartInterval option in RFC 3623 Section B.1.";
            }
    
            leaf helper-strict-lsa-checking {
              type boolean;
              description
                "RestartHelperStrictLSAChecking option in RFC 3623
              Section B.2.";
            }
          }  // container graceful-restart
    
          leaf enable {
            if-feature admin-control;
            type boolean;
            default 'true';
            description
              "Enable/Disable the protocol.";
          }
    
          container auto-cost {
            if-feature auto-cost;
            description
              "Auto cost config state.";
            leaf enable {
              type boolean;
              description
                "Enable/Disable auto cost.";
            }
    
            leaf reference-bandwidth {
              type uint32 {
                range "1..4294967";
              }
              units "Mbits";
              description
                "Configure reference bandwidth in term of Mbits";
            }
          }  // container auto-cost
    
          container spf-control {
            description
              "SPF calculation control.";
            leaf paths {
              if-feature max-ecmp;
              type uint16 {
                range "1..32";
              }
              description
                "Maximum number of ECMP paths.";
            }
          }  // container spf-control
    
          container database-control {
            description
              "Database maintenance control.";
            leaf max-lsa {
              if-feature max-lsa;
              type uint32 {
                range "1..4294967294";
              }
              description
                "Maximum number of LSAs OSPF will receive.";
            }
          }  // container database-control
    
          container reload-control {
            description
              "Protocol reload control.";
          }  // container reload-control
    
          container mpls {
            description
              "OSPF MPLS config state.";
            container te-rid {
              if-feature te-rid;
              description
                "Traffic Engineering stable IP address for system.";
              choice source {
                description
                  "Different options for specifying TE router ID.";
                leaf interface {
                  type if:interface-ref;
                  description
                    "Take the interface's IPv4 address as TE
                     router ID.";
                }
                leaf router-id {
                  type inet:ipv4-address;
                  description
                    "Explicitly configure the TE router ID.";
                }
              }  // choice source
            }  // container te-rid
    
            container ldp {
              description
                "OSPF MPLS LDP config state.";
              leaf igp-sync {
                if-feature ldp-igp-sync;
                type boolean;
                description
                  "Enable LDP IGP synchronization.";
              }
    
              leaf autoconfig {
                if-feature ldp-igp-autoconfig;
                type boolean;
                description
                  "Enable LDP IGP interface auto-configuration.";
              }
            }  // container ldp
          }  // container mpls
    
          uses instance-fast-reroute-config;
        }  // grouping instance-config
    
        grouping interface-operation {
          description
            "OSPF interface operation state.";
          reference
            "RFC2328 Section 9";
    
          uses interface-config;
    
          leaf state {
            type string;
            description "Interface state.";
          }
    
          leaf hello-timer {
            type uint32;
            units "milliseconds";
            description "Hello timer.";
          }
    
          leaf wait-timer {
            type uint32;
            units "milliseconds";
            description "Wait timer.";
          }
    
          leaf dr {
            type inet:ipv4-address;
            description "DR.";
          }
    
          leaf bdr {
            type inet:ipv4-address;
            description "BDR.";
          }
        }  // grouping interface-operation
    
        grouping neighbor-operation {
          description
            "OSPF neighbor operation data.";
          leaf address {
            type inet:ip-address;
            description "Neighbor address.";
          }
    
          leaf dr {
            type inet:ipv4-address;
            description "Designated Router.";
          }
    
          leaf bdr {
            type inet:ipv4-address;
            description
              "Backup Designated Router.";
          }
    
          leaf state {
            type nbr-state-type;
            description "OSPF neighbor state.";
          }
        }  // grouping neighbor-operation
    
        grouping instance-operation {
          description
            "OSPF Address Family operation state.";
          leaf router-id {
            type yang:dotted-quad;
            description
              "Defined in RFC 2328. A 32-bit number
             that uniquely identifies the router.";
          }
        }  // grouping instance-operation
    
        augment /rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol {
          when
            "rt:type = 'ospf:ospfv2' or rt:type = 'ospf:ospfv3'" {
            description
              "This augment is only valid for a routing protocol instance
             of OSPF (type 'ospfv2' or 'ospfv3').";
          }
          description "OSPF augmentation.";
          container ospf {
            description "OSPF.";
            container all-instances-inherit {
              if-feature instance-inheritance;
              description
                "Inheritance support to all instances.";
              container area {
                description
                  "Area config to be inherited by all areas in
                all instances.";
              }  // container area
    
              container interface {
                description
                  "Interface config to be inherited by all interfaces
                in all instances.";
              }  // container interface
            }  // container all-instances-inherit
    
            leaf operation-mode {
              type identityref {
                base operation-mode;
              }
              default 'ships-in-the-night';
              description "OSPF operation mode.";
            }
    
            list instance {
              key "af";
              description
                "An OSPF routing protocol instance.";
              leaf af {
                type identityref {
                  base rt:address-family;
                }
                description
                  "Address-family of the instance.";
              }
    
              uses instance-config;
    
              container all-areas-inherit {
                if-feature area-inheritance;
                description
                  "Inheritance for all areas.";
                container area {
                  description
                    "Area config to be inherited by all areas.";
                }  // container area
    
                container interface {
                  description
                    "Interface config to be inherited by all interfaces
                  in all areas.";
                }  // container interface
              }  // container all-areas-inherit
    
              list area {
                key "area-id";
                description "List of ospf areas";
                leaf area-id {
                  type area-id-type;
                  description "Area ID.";
                }
    
                uses area-config;
    
                container all-interfaces-inherit {
                  if-feature interface-inheritance;
                  description
                    "Inheritance for all interfaces";
                  container interface {
                    description
                      "Interface config to be inherited by all
                    interfaces.";
                  }  // container interface
                }  // container all-interfaces-inherit
    
                list virtual-link {
                  key "router-id";
                  description
                    "OSPF virtual link";
                  leaf router-id {
                    type yang:dotted-quad;
                    description
                      "Virtual link router ID.";
                  }
    
                  uses interface-common-config;
                }  // list virtual-link
    
                list sham-link {
                  key "local-id remote-id";
                  description "OSPF sham link";
                  leaf local-id {
                    type inet:ip-address;
                    description
                      "Address of the local end-point.";
                  }
    
                  leaf remote-id {
                    type inet:ip-address;
                    description
                      "Address of the remote end-point.";
                  }
    
                  uses interface-common-config;
                }  // list sham-link
    
                list interface {
                  key "interface";
                  description
                    "List of OSPF interfaces.";
                  leaf interface {
                    type if:interface-ref;
                    description "Interface.";
                  }
    
                  uses interface-config;
                }  // list interface
              }  // list area
            }  // list instance
          }  // container ospf
        }
    
        augment /rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/ospf:ospf/ospf:instance {
          if-feature multi-topology;
          description
            "OSPF multi-topology routing-protocol augmentation.";
          list topology {
            key "name";
            description "OSPF topology.";
            leaf name {
              type rib-ref;
              description "RIB";
            }
    
            list area {
              key "area-id";
              description "List of ospf areas";
              leaf area-id {
                type area-id-type;
                description "Area ID.";
              }
    
              uses area-config;
            }  // list area
          }  // list topology
        }
    
        augment /rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/ospf:ospf/ospf:instance/ospf:area/ospf:interface {
          if-feature ospf:multi-topology;
          description
            "OSPF multi-topology interface augmentation.";
          list topology {
            key "name";
            description
              "OSPF interface topology.";
            leaf name {
              type rib-ref;
              description
                "One of the topology enabled on this interface";
            }
    
            leaf cost {
              type uint32;
              description
                "Interface cost for this topology";
            }
          }  // list topology
        }
    
        augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol {
          when
            "rt:type = 'ospf:ospfv2' or rt:type = 'ospf:ospfv3'" {
            description
              "This augment is only valid for a routing protocol instance
             of type 'ospfv2' or 'ospfv3'.";
          }
          description "OSPF operation state.";
          container ospf {
            description "OSPF";
            leaf operation-mode {
              type identityref {
                base operation-mode;
              }
              description "OSPF operation mode.";
            }
    
            list instance {
              key "af";
              description
                "An OSPF routing protocol instance.";
              leaf af {
                type identityref {
                  base rt:address-family;
                }
                description
                  "Address-family of the instance.";
              }
    
              uses instance-operation;
    
              list area {
                key "area-id";
                description "List of OSPF areas";
                leaf area-id {
                  type area-id-type;
                  description "Area ID.";
                }
    
                list interfaces {
                  key "interface";
                  description
                    "List of OSPF interfaces.";
                  leaf interface {
                    type string;
                    description "Interface.";
                  }
    
                  uses interface-operation;
    
                  list neighbor {
                    key "neighbor-id";
                    description
                      "List of OSPF neighbors.";
                    leaf neighbor-id {
                      type inet:ipv4-address;
                      description "Neighbor ID.";
                    }
    
                    uses neighbor-operation;
                  }  // list neighbor
    
                  list link-scope-lsas {
                    when
                      "../../../../../rt:type = 'ospfv3'" {
                      description
                        "Link scope LSA only exists in OSPFv3.";
                    }
                    key "lsa-type";
                    description
                      "List OSPF link scope LSA databases";
                    leaf lsa-type {
                      type uint8;
                      description
                        "OSPF link scope LSA type.";
                    }
    
                    list link-scope-lsa {
                      key "lsa-id adv-router";
                      description
                        "List of OSPF link scope LSAs";
                      uses lsa-key;
    
                      uses lsa {
                        refine version/v2/ospfv2 {
                          must
                            "../../../../../../../rt:type = 'ospfv2'" {
                            description
                              "OSPFv2 LSA";
                          }
                        }
    
                        refine version/v3/ospfv3 {
                          must
                            "../../../../../../../rt:type = 'ospfv3'" {
                            description
                              "OSPFv3 LSA";
                          }
                        }
                      }
                    }  // list link-scope-lsa
                  }  // list link-scope-lsas
                }  // list interfaces
    
                list area-scope-lsas {
                  key "lsa-type";
                  description
                    "List OSPF area scope LSA databases";
                  leaf lsa-type {
                    type uint8;
                    description
                      "OSPF area scope LSA type.";
                  }
    
                  list area-scope-lsa {
                    key "lsa-id adv-router";
                    description
                      "List of OSPF area scope LSAs";
                    uses lsa-key;
    
                    uses lsa {
                      refine version/v2/ospfv2 {
                        must
                          "../../../../../../rt:type = 'ospfv2'" {
                          description
                            "OSPFv2 LSA";
                        }
                      }
    
                      refine version/v3/ospfv3 {
                        must
                          "../../../../../../rt:type = 'ospfv3'" {
                          description
                            "OSPFv3 LSA";
                        }
                      }
                    }
                  }  // list area-scope-lsa
                }  // list area-scope-lsas
              }  // list area
    
              list as-scope-lsas {
                key "lsa-type";
                description
                  "List OSPF AS scope LSA databases";
                leaf lsa-type {
                  type uint8;
                  description
                    "OSPF AS scope LSA type.";
                }
    
                list as-scope-lsa {
                  key "lsa-id adv-router";
                  description
                    "List of OSPF AS scope LSAs";
                  uses lsa-key;
    
                  uses lsa {
                    refine version/v2/ospfv2 {
                      must
                        "../../../../../rt:type = 'ospfv2'" {
                        description "OSPFv2 LSA";
                      }
                    }
    
                    refine version/v3/ospfv3 {
                      must
                        "../../../../../rt:type = 'ospfv3'" {
                        description "OSPFv3 LSA";
                      }
                    }
                  }
                }  // list as-scope-lsa
              }  // list as-scope-lsas
            }  // list instance
          }  // container ospf
        }
    
        augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/ospf:ospf/ospf:instance {
          when "../../rt:type = 'ospf:ospfv2'" {
            description
              "This augment is only valid for OSPFv2.";
          }
          if-feature multi-topology;
          description
            "OSPF multi-topology routing-protocol augmentation.";
          list topology {
            key "name";
            description "OSPF topology.";
            leaf name {
              type rib-ref;
              description "RIB";
            }
    
            list area {
              key "area-id";
              description "List of ospf areas";
              leaf area-id {
                type area-id-type;
                description "Area ID.";
              }
            }  // list area
          }  // list topology
        }
    
        augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/ospf:ospf/ospf:instance/ospf:area/ospf:interfaces {
          when
            "../../../../rt:type = 'ospf:ospfv2'" {
            description
              "This augment is only valid for OSPFv2.";
          }
          if-feature ospf:multi-topology;
          description
            "OSPF multi-topology interface augmentation.";
          list topology {
            key "name";
            description
              "OSPF interface topology.";
            leaf name {
              type rib-ref;
              description
                "One of the topology enabled on this interface";
            }
          }  // list topology
        }
    
        grouping route-content {
          description
            "This grouping defines OSPF-specific route attributes.";
          leaf tag {
            type uint32;
            default "0";
            description "OSPF route tag.";
          }
    
          leaf route-type {
            type enumeration {
              enum "intra-area" {
                value 0;
                description
                  "OSPF intra-area route";
              }
              enum "inter-area" {
                value 1;
                description
                  "OSPF inter-area route";
              }
              enum "external-1" {
                value 2;
                description
                  "OSPF external route type 1";
              }
              enum "external-2" {
                value 3;
                description
                  "OSPF External route type 2";
              }
              enum "nssa-1" {
                value 4;
                description
                  "OSPF NSSA external route type 1";
              }
              enum "nssa-2" {
                value 5;
                description
                  "OSPF NSSA external route type 2";
              }
            }
            description "OSPF route type";
          }
        }  // grouping route-content
    
        augment /rt:routing-state/rt:routing-instance/rt:ribs/rt:rib/rt:routes/rt:route {
          when
            "rt:source-protocol = 'ospf:ospfv2' or "
              + "rt:source-protocol = 'ospf:ospfv3'" {
            description
              "This augment is only valid for a routes whose source
             protocol is OSPF.";
          }
          description
            "OSPF-specific route attributes.";
          uses route-content;
        }
    
        identity if-link-type {
          description
            "Base identity for OSPF interface link type.";
        }
    
        identity if-link-type-normal {
          base if-link-type;
          description
            "OSPF interface link type normal.";
        }
    
        identity if-link-type-virtual-link {
          base if-link-type;
          description
            "OSPF interface link type virtual link.";
        }
    
        identity if-link-type-sham-link {
          base if-link-type;
          description
            "OSPF interface link type sham link.";
        }
    
        grouping notification-instance-hdr {
          description
            "This group describes common instance specific
          data for notifications.";
          leaf routing-instance {
            type rt:routing-instance-ref;
            description
              "Describe the routing instance.";
          }
    
          leaf routing-protocol-name {
            type string;
            description
              "Describes the name of the OSPF routing protocol.";
          }
    
          container instance-af {
            description
              "Describes the address family of the OSPF instance.";
            leaf af {
              type identityref {
                base rt:address-family;
              }
              description
                "Address-family of the instance.";
            }
          }  // container instance-af
        }  // grouping notification-instance-hdr
    
        notification if-state-change {
          description
            "This notification is sent when interface
          state change is detected.";
          uses notification-instance-hdr;
    
          leaf link-type {
            type identityref {
              base if-link-type;
            }
            description
              "Type of OSPF interface.";
          }
    
          container interface {
            description "Normal interface.";
            leaf interface {
              type if:interface-ref;
              description "Interface.";
            }
          }  // container interface
    
          container virtual-link {
            description "virtual-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf neighbor-router-id {
              type yang:dotted-quad;
              description "Neighbor router id.";
            }
          }  // container virtual-link
    
          container sham-link {
            description "sham-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf local-ip-addr {
              type inet:ip-address;
              description
                "Sham link local address.";
            }
    
            leaf remote-ip-addr {
              type inet:ip-address;
              description
                "Sham link remote address.";
            }
          }  // container sham-link
    
          leaf state {
            type string;
            description "Interface state.";
          }
        }  // notification if-state-change
    
        notification if-config-error {
          description
            "This notification is sent when interface
          config error is detected.";
          uses notification-instance-hdr;
    
          leaf link-type {
            type identityref {
              base if-link-type;
            }
            description
              "Type of OSPF interface.";
          }
    
          container interface {
            description "Normal interface.";
            leaf interface {
              type if:interface-ref;
              description "Interface.";
            }
    
            leaf packet-source {
              type yang:dotted-quad;
              description "Source address.";
            }
          }  // container interface
    
          container virtual-link {
            description "virtual-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf neighbor-router-id {
              type yang:dotted-quad;
              description "Neighbor router id.";
            }
          }  // container virtual-link
    
          container sham-link {
            description "sham-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf local-ip-addr {
              type inet:ip-address;
              description
                "Sham link local address.";
            }
    
            leaf remote-ip-addr {
              type inet:ip-address;
              description
                "Sham link remote address.";
            }
          }  // container sham-link
    
          leaf packet-type {
            type packet-type;
            description "OSPF packet type.";
          }
    
          leaf error {
            type enumeration {
              enum "badVersion" {
                value 0;
                description "Bad version";
              }
              enum "areaMismatch" {
                value 1;
                description "Area mistmatch";
              }
              enum "unknownNbmaNbr" {
                value 2;
                description
                  "Unknown NBMA neighbor";
              }
              enum "unknownVirtualNbr" {
                value 3;
                description
                  "Unknown virtual link neighbor";
              }
              enum "authTypeMismatch" {
                value 4;
                description "Auth type mismatch";
              }
              enum "authFailure" {
                value 5;
                description "Auth failure";
              }
              enum "netMaskMismatch" {
                value 6;
                description
                  "Network mask mismatch";
              }
              enum "helloIntervalMismatch" {
                value 7;
                description
                  "Hello interval mismatch";
              }
              enum "deadIntervalMismatch" {
                value 8;
                description
                  "Dead interval mismatch";
              }
              enum "optionMismatch" {
                value 9;
                description "Option mismatch";
              }
              enum "mtuMismatch" {
                value 10;
                description "MTU mismatch";
              }
              enum "duplicateRouterId" {
                value 11;
                description
                  "Duplicate router ID";
              }
              enum "noError" {
                value 12;
                description "No error";
              }
            }
            description "Error code.";
          }
        }  // notification if-config-error
    
        notification nbr-state-change {
          description
            "This notification is sent when neighbor
          state change is detected.";
          uses notification-instance-hdr;
    
          leaf link-type {
            type identityref {
              base if-link-type;
            }
            description
              "Type of OSPF interface.";
          }
    
          container interface {
            description "Normal interface.";
            leaf interface {
              type if:interface-ref;
              description "Interface.";
            }
    
            leaf neighbor-router-id {
              type yang:dotted-quad;
              description "Neighbor router id.";
            }
    
            leaf neighbor-ip-addr {
              type yang:dotted-quad;
              description "Neighbor address.";
            }
          }  // container interface
    
          container virtual-link {
            description "virtual-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf neighbor-router-id {
              type yang:dotted-quad;
              description "Neighbor router id.";
            }
          }  // container virtual-link
    
          container sham-link {
            description "sham-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf local-ip-addr {
              type inet:ip-address;
              description
                "Sham link local address.";
            }
    
            leaf neighbor-router-id {
              type yang:dotted-quad;
              description "Neighbor router id.";
            }
    
            leaf neighbor-ip-addr {
              type yang:dotted-quad;
              description "Neighbor address.";
            }
          }  // container sham-link
    
          leaf state {
            type nbr-state-type;
            description "Neighbor state.";
          }
        }  // notification nbr-state-change
    
        notification nbr-restart-helper-status-change {
          description
            "This notification is sent when neighbor restart
          helper status change is detected.";
          uses notification-instance-hdr;
    
          leaf link-type {
            type identityref {
              base if-link-type;
            }
            description
              "Type of OSPF interface.";
          }
    
          container interface {
            description "Normal interface.";
            leaf interface {
              type if:interface-ref;
              description "Interface.";
            }
    
            leaf neighbor-router-id {
              type yang:dotted-quad;
              description "Neighbor router id.";
            }
    
            leaf neighbor-ip-addr {
              type yang:dotted-quad;
              description "Neighbor address.";
            }
          }  // container interface
    
          container virtual-link {
            description "virtual-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf neighbor-router-id {
              type yang:dotted-quad;
              description "Neighbor router id.";
            }
          }  // container virtual-link
    
          leaf status {
            type restart-helper-status-type;
            description "Restart helper status.";
          }
    
          leaf age {
            type uint32;
            units "seconds";
            description
              "Remaining time in current OSPF graceful restart
            interval, if the router is acting as a restart
            helper for the neighbor.";
          }
    
          leaf exit-reason {
            type restart-exit-reason-type;
            description
              "Restart helper exit reason.";
          }
        }  // notification nbr-restart-helper-status-change
    
        notification rx-bad-packet {
          description
            "This notification is sent when an OSPF packet
          has been received on a interface that cannot be parsed.";
          uses notification-instance-hdr;
    
          leaf link-type {
            type identityref {
              base if-link-type;
            }
            description
              "Type of OSPF interface.";
          }
    
          container interface {
            description "Normal interface.";
            leaf interface {
              type if:interface-ref;
              description "Interface.";
            }
    
            leaf packet-source {
              type yang:dotted-quad;
              description "Source address.";
            }
          }  // container interface
    
          container virtual-link {
            description "virtual-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf neighbor-router-id {
              type yang:dotted-quad;
              description "Neighbor router id.";
            }
          }  // container virtual-link
    
          container sham-link {
            description "sham-link.";
            leaf area-id {
              type uint32;
              description "Area ID.";
            }
    
            leaf local-ip-addr {
              type inet:ip-address;
              description
                "Sham link local address.";
            }
    
            leaf remote-ip-addr {
              type inet:ip-address;
              description
                "Sham link remote address.";
            }
          }  // container sham-link
    
          leaf packet-type {
            type packet-type;
            description "OSPF packet type.";
          }
        }  // notification rx-bad-packet
    
        notification lsdb-approaching-overflow {
          description
            "This notification is sent when the number of LSAs
          in the router's link state database has exceeded
          ninety percent of the ext-lsdb-limit.";
          uses notification-instance-hdr;
    
          leaf ext-lsdb-limit {
            type uint32;
            description
              "The maximum number of non-default AS-external LSAs
            entries that can be stored in the link state database.";
          }
        }  // notification lsdb-approaching-overflow
    
        notification lsdb-overflow {
          description
            "This notification is sent when the number of LSAs
          in the router's link state database has exceeded
          ext-lsdb-limit.";
          uses notification-instance-hdr;
    
          leaf ext-lsdb-limit {
            type uint32;
            description
              "The maximum number of non-default AS-external LSAs
            entries that can be stored in the link state database.";
          }
        }  // notification lsdb-overflow
    
        notification nssa-translator-status-change {
          description
            "This notification is sent when there is a change
          in the router's ability to translate OSPF NSSA LSAs
          OSPF AS-External LSAs.";
          uses notification-instance-hdr;
    
          leaf area-id {
            type uint32;
            description "Area ID.";
          }
    
          leaf status {
            type nssa-translator-state-type;
            description
              "NSSA translator status.";
          }
        }  // notification nssa-translator-status-change
    
        notification restart-status-change {
          description
            "This notification is sent when the graceful restart
          state for the router has changed.";
          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.";
          }
        }  // notification restart-status-change
      }  // module ietf-ospf
    

© 2023 YumaWorks, Inc. All rights reserved.