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";
        }
    
        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.";
        }
    
        notification if-state-change {
          description
            "This notification is sent when interface
          state change is detected.";
          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
    
          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.";
          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
    
          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.";
          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
    
          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.";
          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
    
          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.";
          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
    
          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.";
          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
    
          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.";
          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
    
          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.";
          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
    
          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.";
          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
    
          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.