This YANG module defines the Cisco OSPF common yang model Copyright (c) 2016 by Cisco Systems, Inc. All rights reserved.
Version: 2019-07-01
module cisco-ospf { yang-version 1; namespace "urn:ietf:params:xml:ns:yang:cisco-ospf"; prefix cisco-ospf; import cisco-semver { prefix cisco-semver; } import ietf-inet-types { prefix inet; } import ietf-routing { prefix rt; } import ietf-ospf { prefix ospf; } organization "Cisco Systems 170 West Tasman Drive San Jose, CA 95134-1706 USA"; contact "Author: Manish Gupta <magupta2@cisco.com>"; description "This YANG module defines the Cisco OSPF common yang model Copyright (c) 2016 by Cisco Systems, Inc. All rights reserved."; revision "2019-07-01" { description "Establish semantic version baseline"; } revision "2016-03-30" { description "Update description with copyright notice."; } revision "2015-05-19" { description "Comments addressed"; reference "ietf-ospf.yang"; } revision "2015-05-07" { description "Initial revision."; reference "ietf-ospf.yang"; } cisco-semver:module-version "1.0.0"; typedef ospf-external-type { type enumeration { enum "1" { value 0; description "type 1"; } enum "2" { value 1; description "type 2"; } } description "external route types"; } typedef access-list-standard-id-type { type union { type default-access-list-standard-id-type; type string; } description "WORD;;Standard access-list name"; } typedef default-access-list-standard-id-type { type union { type uint8 { range "1..99"; } type uint16 { range "1300..1999"; } } description "IP Standard/Expanded access list number"; } typedef uint32_max { type uint32 { range "0..4294967295"; } description "32-bit unsigned integer range."; } typedef uint16_max { type uint16 { range "1 .. 65535"; } description "16-bit unsigned integer range"; } typedef uint8_max { type uint8 { range "1 .. 255"; } description "8-bit unsigned integer range"; } typedef delay_range { type uint32 { range "0..600000"; } description "defintion for timer range"; } typedef access-list-in-out-type { type enumeration { enum "in" { value 0; description "Filter incoming routing updates"; } enum "out" { value 1; description "Filter outgoing routing updates"; } } description "Access list in and out"; } typedef prefix-applicability { type enumeration { enum "protected" { value 1; description "Protected prefixes only"; } enum "all" { value 2; description "All prefixes"; } } description "Ospf uloop avoidance"; } typedef process-id-or-name { type union { type uint16_max; type string; } description "Process ID or Name."; } typedef ospf-log-adj { type enumeration { enum "enable" { value 0; description "Enable log adjacency brief"; } enum "detail" { value 1; description "Enable log adjcency detail"; } enum "disable" { value 2; description "disable log adjacency"; } } description "Ospf log adjacency changes"; } feature graceful-shutdown { description "graceful-shutdown feature currently present in XR os"; } feature database-filter { description "database-filter feature currently present in XR os"; } feature flood-reduction { description "flood-reduction feature currently present in XR os"; } grouping default-information { description "Common node of default-vrf, vrf"; container default-information { description "Control distribution of default information"; container originate { presence "Originate a default route"; description "Distribute a default route"; leaf always-advertise { type boolean; default "false"; description "Always advertise default route"; } leaf metric { type ospf:uint24; default "1"; description "OSPF metric"; } leaf metric-type { type ospf-external-type; default "2"; description "OSPF External metric type"; } leaf route-map { type string; description "Routing policy or route-map name"; } } // container originate } // container default-information } // grouping default-information grouping default-metric { description "Common node of default-vrf, vrf"; container default-metric { description "OSPF default metric"; leaf default-metric { type ospf:uint24; default "1"; description "Default metric of redistributed routes"; } } // container default-metric } // grouping default-metric grouping log-adjacency-changes { description "Common node of default-vrf, vrf"; container log-adjacency-changes { description "Log adjacency changes"; leaf adjacency-changes { type ospf-log-adj; description "Log adjacecny state changes"; } } // container log-adjacency-changes } // grouping log-adjacency-changes grouping summary-prefixes { description "Common node of default-vrf, vrf"; container summary-prefixes { description "Configure IP address summaries"; list summary-prefix { key "prefix"; description "Summarize redistributed routes matching prefix/length"; leaf prefix { type inet:ip-prefix; description "IPv4 or IPv6 prefix"; } choice not-advertise-or-tag { description "Either NSSA or tag id"; case tag-nssa-only { leaf nssa-only { type empty; description "Limit summary to NSSA areas"; } leaf tag { type uint32_max; description "32-bit tag value"; } } // case tag-nssa-only leaf not-advertise { type boolean; description "Do not advertise when translating OSPF type-7 LSA"; } } // choice not-advertise-or-tag } // list summary-prefix } // container summary-prefixes } // grouping summary-prefixes grouping graceful-shutdown-timers { description "Common node of default-vrf, vrf"; container graceful-shutdown { if-feature graceful-shutdown; description "Timers for graceful shutdown"; leaf initial-delay { type uint32 { range "0 .. 90"; } units "seconds"; default "5"; description "OSPF Delay before starting graceful shutdown"; } leaf retain-routes { type uint32 { range "0 .. 90"; } units "seconds"; default "5"; description "Time to keep routes active after graceful shutdown"; } } // container graceful-shutdown } // grouping graceful-shutdown-timers grouping timer-lsa { description "OSPF LSA timer"; container lsa { description "OSPF LSA timers"; uses throttle-timers; leaf arrival { type delay_range; units "millisecond"; default "1000"; description "The minimum interval in milliseconds between accepting the same LSA arrival timer"; } leaf group-pacing { type uint32 { range "10 .. 1800"; } units "seconds"; default "240"; description "OSPF LSA group pacing timer"; } leaf refresh { type uint32 { range "1800 .. 2700"; } units "seconds"; default "1800"; description "How often self-originated LSAs should be refreshed, in seconds"; } leaf flood { type uint32 { range "5 .. 100"; } units "millisecond"; default "33"; description "OSPF flood pacing timer"; } leaf retransmission { type uint32 { range "5 .. 200"; } units "millisecond"; default "66"; description "OSPF retransmission pacing timer"; } } // container lsa } // grouping timer-lsa grouping throttle-timers { description "lsa spf throttle timer configurations"; container throttle-timers { description "timers value"; leaf init-delay { type delay_range; units "millisecond"; description "Delay between receiving a change to SPF or LSA calculation in milliseconds"; } leaf min-delay { type delay_range; units "millisecond"; description "Delay between first and second SPF or LSA calculation in milliseconds"; } leaf max-delay { type delay_range; units "millisecond"; description "Maximum wait time in milliseconds for SPF or LSA calculations"; } } // container throttle-timers } // grouping throttle-timers grouping discard-route { description "Discard route configuration"; container discard-route { presence "Enable or disable discard-route installation"; description "Enable or disable discard-route installation"; leaf external { type empty; description "Discard route for redistributed summarised routes"; } leaf external-admin-distance { type uint8_max; default "254"; description "admin distance value for external routes"; } leaf internal { type empty; description "Discard route for summarised internal routes"; } leaf internal-admin-distance { type uint8_max; default "110"; description "admin distance value for internal routes"; } } // container discard-route } // grouping discard-route grouping max-metric { description "Common node of default-vrf, vrf"; container max-metric { description "Set maximum metric configuration"; container on-proc-restart { description "Set maximum metric on-proc-restart configuration"; uses wait-for-bgp-or-time; uses max-metric-lsa-option; } // container on-proc-restart container on-startup { description "Set maximum metric on-startup configuration"; uses wait-for-bgp-or-time; uses max-metric-lsa-option; } // container on-startup container on-proc-migration { description "Set maximum metric on-proc-migration configuration"; uses wait-for-bgp-or-time; uses max-metric-lsa-option; } // container on-proc-migration container always { description "Set maximum metric always configuration"; uses max-metric-lsa-option; } // container always container on-switchover { description "Set maximum metric on-switchover configuration"; uses wait-for-bgp-or-time; uses max-metric-lsa-option; } // container on-switchover } // container max-metric } // grouping max-metric grouping wait-for-bgp-or-time { description "wait for bgp or time"; choice lsa-grouping { description " Options of LSA"; leaf wait-for-bgp { type boolean; description "Till BGP converge originate router-LSA with max metric"; } leaf time { type uint32 { range "5..86400"; } units "second"; description "Till how much time originate router-LSA with max-metric"; } } // choice lsa-grouping } // grouping wait-for-bgp-or-time grouping max-metric-lsa-option { description "max metric option"; container max-metric-options { description "max metric options"; leaf include-stub { type boolean; description "Set maximum metric for stub links in router-LSAs"; } leaf summary-lsa { type boolean; description "Override summary-lsa metric with max-metric value"; } leaf summary-lsa-metric { type ospf:uint24; description "Overriding metric in summary-LSAs (default 16711680)"; } leaf external-lsa { type boolean; description "Override external-lsa metric with max-metric value"; } leaf external-lsa-metric { type ospf:uint24; description "Overriding metric in external-LSAs (default 16711680)"; } } // container max-metric-options } // grouping max-metric-lsa-option grouping microloop-avoidance { description "Common node of default-vrf, vrf"; container microloop-avoidance { description "Microloop avoidance configuration"; leaf enable { type prefix-applicability; default "all"; description "Type of prefixes for which to avoid microloops"; } leaf disable { type empty; description "disable microloop avoidance"; } leaf rib-update-delay { type ospf:uint24; units "millisecond"; default "5000"; description "Delay to introduce between SPF and RIB update in msecs"; } } // container microloop-avoidance } // grouping microloop-avoidance grouping redistribute-ospf-match { description "Redistribution OSPF route options"; container match { description "Redistribution of OSPF routes"; leaf internal { type empty; description "Redistribute OSPF internal routes"; } container external { presence "Redistribute OSPF external routes"; description "Redistribute OSPF external routes"; leaf external-routes { type ospf-external-type; description "Redistribute OSPF external routes"; } } // container external container nssa-external { presence "Redistribute OSPF NSSA external routes"; description "Redistribute OSPF NSSA external routes"; leaf nssa-external-routes { type ospf-external-type; description "NSSA external routes"; } } // container nssa-external } // container match } // grouping redistribute-ospf-match grouping redistribution { description "Common node of default-vrf, vrf"; container redistribution { description "redistribute other routing protocols inside ospf"; container maximum-prefix { presence "Maximum prefix to redistribute"; description "Maximum number of prefixes redistributed to protocol"; leaf IP-prefixes { type uint32_max; description "Maximum number of IP prefixes redistributed"; } leaf Threshold-value { type uint32 { range "1..100"; } description "Threshold value (%) at which to generate a warning msg"; } leaf warning-only { type empty; description "Only give warning message when limit is exceeded"; } } // container maximum-prefix container bgp { description "Border Gateway Protocol (BGP)"; list bgp-protocol { key "as-number"; description "Border Gateway Protocol (BGP)"; leaf as-number { type uint32_max; description "Autonomous system number"; } uses redist-option-grouping; } // list bgp-protocol } // container bgp container eigrp { description "Enhanced Interior Gateway Routing Protocol (EIGRP)"; list eigrp-protocol { key "as-number"; description "Enhanced Interior Gateway Routing Protocol (EIGRP)"; leaf as-number { type uint16_max; description "Autonomous system number"; } uses redist-option-grouping; } // list eigrp-protocol } // container eigrp container isis { description "ISO IS-IS"; list isis-protocol { key "process-name"; description "Intermediate system intermediate system (ISIS)"; leaf process-name { type string; description "instance name"; } uses redistribute-isis-grouping; uses redist-option-grouping; } // list isis-protocol } // container isis container applications { description "Application"; list application { key "application-name"; description "Application routes"; leaf application-name { type string; description "application name"; } uses redist-option-grouping; } // list application } // container applications container ospf { description "Open Shortest Path First (OSPF)"; list ospf { key "id-or-name"; description "Open Shortest Path First (OSPF)"; leaf id-or-name { type process-id-or-name; description "Process id or Name"; } uses redistribute-ospf-match; uses redist-option-grouping; } // list ospf } // container ospf container rip { presence "rip routes"; description "rip routes"; uses redist-option-grouping; } // container rip container static { presence "Static routes"; description "Static routes"; uses redist-option-grouping; } // container static container subscriber { presence "Subscriber routes"; description "Subscriber routes"; uses redist-option-grouping; } // container subscriber container connected { presence "connected routes"; description "Connected routes"; uses redist-option-grouping; } // container connected } // container redistribution } // grouping redistribution grouping redist-option-grouping { description "Metric route map configuarion"; container redist-option { description "Redist options"; leaf metric { type ospf:uint24; description "Default metric"; } leaf metric-type { type uint32 { range "1..2"; } description "Set OSPF External Type metrics"; } leaf tag { type uint32_max; description " Set tag for routes redistributed into OSPF"; } leaf nssa-only { type empty; description "Limit redistributed routes to NSSA areas"; } leaf route-map { type string; description "Routing policy or route-map name"; } } // container redist-option } // grouping redist-option-grouping grouping redistribute-isis-grouping { description "Configuration of Redistribute IS-IS"; choice isis-levels { description "Options for IS-IS routes"; leaf level-1 { type empty; description "IS-IS level-1 routes only"; } leaf level-2 { type empty; description "IS-IS level-2 routes only"; } leaf level-1-2 { type empty; description "IS-IS level-1 and level-2 routes"; } } // choice isis-levels } // grouping redistribute-isis-grouping grouping database-filter { description "Common node of process-scope, area-scope, interface-scope"; container database-filter { if-feature database-filter; description "Filter OSPF LSA during synchronization and flooding"; leaf all-out { type boolean; default "false"; description "Filter all Outgoing LSA"; } } // container database-filter } // grouping database-filter grouping flood-reduction { description "Common node of process-scope, area-scope, name-scope"; container flood-reduction { description "OSPF Flood Reduction"; leaf flood-reduction { if-feature flood-reduction; type boolean; default "false"; description "Enable OSPF flood reduction"; } } // container flood-reduction } // grouping flood-reduction grouping ignore-lsa { description "Common node of default-vrf, vrf"; container ignore-lsa { description "Do not complain upon receiving LSA of the specified type"; leaf mospf { type empty; description "Ignore Type 6 LSAs"; } } // container ignore-lsa } // grouping ignore-lsa grouping distance-ip { description "Grouping for Admin Distance"; container ospf-distance { description "configuration of Admin Distance"; leaf distance { type uint32 { range "1 .. 255"; } description "<1-255>;;OSPF Administrative distance"; } leaf ip { type inet:ipv4-address; description "A.B.C.D;;IP source address"; } leaf wildcard { type inet:ipv4-address; description "A.B.C.D;;Wildcard bits"; } leaf acl-name { type access-list-standard-id-type; description "standard acl"; } } // container ospf-distance } // grouping distance-ip grouping max-lsa { description "Grouping for Max-LSA"; container max-lsa-options { description "Option of Max-LSA"; leaf threshold-value { type uint32 { range "1 .. 100"; } description "<1-100> Threshold value (%) at which to generate a warning msg"; } leaf ignore-count { type uint32 { range "1 .. 65534"; } description "<1-65534> count on how many times adjacencies can be suppressed"; } leaf ignore-time { type uint32 { range "1 .. 17895"; } description "<1-17895> number of minutes during which all adjacencies are suppressed"; } leaf reset-time { type uint32 { range "2 .. 35791"; } description "<2-35791> number of minutes after which ignore-count is reset to zero"; } leaf warning-only { type empty; description "Only give warning message when limit is exceeded"; } } // container max-lsa-options } // grouping max-lsa grouping if-shutdown { description "interface shutdown"; container shutdown { presence "shut down the interface"; description "Shut down the interface in OSPFv3"; leaf disable { type empty; description "Disable inherited shutdown"; } } // container shutdown } // grouping if-shutdown augment /rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/ospf:ospf/ospf:instance { description "OSPF router configuration"; uses default-information; uses default-metric; uses log-adjacency-changes; uses summary-prefixes; uses graceful-shutdown-timers; uses redistribution; uses discard-route; uses microloop-avoidance; } augment /rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/ospf:ospf/ospf:instance/ospf:area/ospf:interface { description "OSPF interface configuration"; uses database-filter; uses flood-reduction; } augment /rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/ospf:ospf/ospf:instance/ospf:admin-distance { description "OSPF Admin Distance configuration"; uses distance-ip; } augment /rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/ospf:ospf/ospf:instance/ospf:spf-control { description "OSPF SPF control configuration"; uses throttle-timers; } augment /rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/ospf:ospf/ospf:instance/ospf:reload-control { description "OSPF reload control configuration"; uses max-metric; } augment /rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/ospf:ospf/ospf:instance/ospf:database-control { description "OSPF Database control configuration"; uses max-lsa; uses database-filter; uses flood-reduction; uses ignore-lsa; uses timer-lsa; } } // module cisco-ospf
© 2023 YumaWorks, Inc. All rights reserved.