diff --git a/release/models/network-instance/openconfig-network-instance.yang b/release/models/network-instance/openconfig-network-instance.yang index 574caa1ab..b656fa081 100644 --- a/release/models/network-instance/openconfig-network-instance.yang +++ b/release/models/network-instance/openconfig-network-instance.yang @@ -22,6 +22,7 @@ module openconfig-network-instance { import openconfig-mpls { prefix "oc-mpls"; } import openconfig-vlan { prefix "oc-vlan"; } import openconfig-ospfv2 { prefix "oc-ospfv2"; } + import openconfig-ospf { prefix "oc-ospf"; } import openconfig-policy-forwarding { prefix "oc-pf"; } import openconfig-segment-routing { prefix "oc-sr"; } import openconfig-isis { prefix "oc-isis"; } @@ -48,7 +49,13 @@ module openconfig-network-instance { virtual switch instance (VSI). Mixed Layer 2 and Layer 3 instances are also supported."; - oc-ext:openconfig-version "4.4.1"; + oc-ext:openconfig-version "4.5.1"; + + revision "2025-02-18" { + description + "Add OSPFv3 container"; + reference "4.5.1"; + } revision "2024-02-27" { description @@ -949,6 +956,14 @@ module openconfig-network-instance { } } + uses oc-ospf:ospfv3-top { + when "./config/identifier = 'oc-pol-types:OSPF3'" { + description + "Include OSPFv3 parameters only when the protocol + is of type OSPFv3"; + } + } + uses oc-isis:isis-top { when "./config/identifier = 'oc-pol-types:ISIS'" { description diff --git a/release/models/ospf/openconfig-ospf-area-interface.yang b/release/models/ospf/openconfig-ospf-area-interface.yang new file mode 100644 index 000000000..5a9c2fb21 --- /dev/null +++ b/release/models/ospf/openconfig-ospf-area-interface.yang @@ -0,0 +1,492 @@ +submodule openconfig-ospf-area-interface { + + belongs-to openconfig-ospf { + prefix "oc-ospf"; + } + + import ietf-yang-types { prefix "yang"; } + import ietf-inet-types { prefix "inet"; } + import openconfig-extensions { prefix "oc-ext"; } + import openconfig-types { prefix "oc-types"; } + import openconfig-interfaces { prefix "oc-if"; } + import openconfig-ospf-types { prefix "oc-ospf-types"; } + import openconfig-bfd { prefix "oc-bfd"; } + + // include common submodule + include openconfig-ospf-common; + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This submodule provides common OSPF configuration and operational + state parameters that are specific to the area context"; + + oc-ext:openconfig-version "0.0.1"; + + revision "2025-02-13" { + description + "Initial revision"; + reference "0.0.1"; + } + + grouping ospf-area-interface-config { + description + "Configuration parameters for an OSPF interface"; + + leaf id { + type string; + description + "An operator-specified string utilised to uniquely + reference this interface"; + } + + leaf network-type { + type identityref { + base "oc-ospf-types:OSPF_NETWORK_TYPE"; + } + description + "The type of network that OSPF should use for the specified + interface."; + } + + leaf priority { + type uint8; + default 1; + description + "The local system's priority to become the designated + router"; + } + + leaf multi-area-adjacency-primary { + type boolean; + default true; + description + "When the specified interface is included in more than one + area's configuration, this leaf marks whether the area should + be considered the primary (when the value is true). In the + case that this value is false, the area is considered a + secondary area."; + } + + leaf authentication-type { + type string; + // rjs TODO: discuss with bogdanov@ what the approach for auth + // links should be. + description + "The type of authentication that should be used on this + interface"; + } + + leaf metric { + type oc-ospf-types:ospf-metric; + default 10; + description + "The metric for the interface"; + } + + leaf passive { + type boolean; + default false; + description + "When this leaf is set to true, the interface should be + advertised within the OSPF area but OSPF adjacencies should + not be established over the interface"; + } + + leaf hide-network { + type boolean; + description + "When this leaf is set to true, the network connected to + the interface should be hidden from OSPF advertisements + per the procedure described in RFC6860."; + reference + "RFC6860 - Hiding Transit-Only Networks in OSFF"; + } + + } + + grouping ospf-area-interface-timers-config { + description + "Configuration parameters relating to per-interface OSPF + timers"; + + leaf dead-interval { + type uint32; + units seconds; + default 40; + description + "The number of seconds that the local system should let + elapse before declaring a silent router down"; + reference "RFC2328"; + } + + leaf hello-interval { + type uint32; + units seconds; + default 10; + description + "The number of seconds the local system waits between the + transmission of subsequent Hello packets"; + } + + leaf retransmission-interval { + type uint32; + units seconds; + default 5; + description + "The number of seconds that the local system waits before + retransmitting an unacknowledged LSA."; + } + + leaf interface-transmission-delay { + type uint32; + units seconds; + default 1; + description + "The estimated number of seconds it takes to transmit a Link State + Update packet over this interface."; + } + } + + grouping ospf-area-interface-state { + description + "Operation state parameters of an OSPF interface"; + + // TODO: Add the Interface state-machine state + + leaf dr-router-id { + type yang:dotted-quad; + description + "The router-id of the designated router for this interface."; + } + + leaf dr-ip-address { + type inet:ip-address; + description + "The IP address of the designated router for this interface."; + } + + leaf bdr-router-id { + type yang:dotted-quad; + description + "The router-id of the backup designated router for this + interface."; + } + + leaf bdr-ip-address { + type inet:ip-address; + description + "The IP address of the backup designated router for this + interface."; + } + } + + grouping ospf-area-interface-neighbor-config { + description + "Configuration parameters relating to an individual neighbor + system on an interface within an OSPF area"; + + leaf neighbor-ip-address { + type inet:ip-address; + description + "The IP address of the configured neighbor."; + } + + leaf metric { + type oc-ospf-types:ospf-metric; + description + "The metric that should be considered to the remote neighbor + over this interface. This configuration is only applicable + for multiple-access networks"; + } + + leaf poll-interval { + type uint16; + description + "Neighbor poll interval (seconds) for sending OSPF Hello + packets to discover the neighbor on NBMA networks. Refer + Appendix C.5 in RFC 2328."; + } + + leaf priority { + type uint8; + default 1; + description + "The local system's priority to become the designated router"; + } + } + + grouping ospf-area-interface-neighbor-state { + description + "Operational state parameters relating an individual neighbor + system on an interface within an OSPF area"; + + leaf router-id { + type yang:dotted-quad; + description + "The router ID of the remote system."; + } + + leaf neighbor-ip-address { + type inet:ip-address; + description + "The IP address of the remote system."; + } + + leaf priority { + type uint8; + description + "The remote system's priority to become the designated + router"; + } + + leaf dead-time { + type oc-types:timeticks64; + description + "The time at which this neighbor's adjacency will be + considered dead. The value is expressed relative to + the Unix Epoch (Jan 1, 1970 00:00:00 UTC)."; + } + + leaf dr-router-id { + type yang:dotted-quad; + description + "The router ID of designated router for the adjacency. This device + advertises the Network LSA for broadcast and NBMA networks."; + } + + leaf dr-ip-address { + type inet:ip-address; + description + "The IP address of designated router for the adjacency. This device + advertises the Network LSA for broadcast and NBMA networks."; + } + + leaf bdr-router-id { + type yang:dotted-quad; + description + "The router ID of backup designated router for the adjacency."; + } + + leaf bdr-ip-address { + type inet:ip-address; + description + "The IP address of backup designated router for the adjacency."; + } + + leaf optional-capabilities { + // rjs TODO: should this be anything more than the hex-string + // this is currently what is shown in IOS/JUNOS + type yang:hex-string; + description + "The optional capabilities field received in the Hello + message from the neighbor"; + } + + leaf last-established-time { + type oc-types:timeticks64; + // rjs TODO: check implementations - is FULL considered 'up' + // since the adjacency is probably up since ExStart + description + "The time at which the adjacency was last established with + the neighbor. That is to say the time at which the + adjacency last transitioned into the FULL state. The + value is expressed relative to the Unix Epoch (Jan 1 1970 + 00:00:00 UTC)."; + } + + leaf adjacency-state { + type identityref { + base "oc-ospf-types:OSPF_NEIGHBOR_STATE"; + } + description + "The state of the adjacency with the neighbor."; + } + + leaf state-changes { + type uint32; + description + "The number of transitions out of the FULL state that this + neighbor has been through"; + } + + leaf retransmission-queue-length { + type uint32; + description + "The number of LSAs that are currently in the queue to be + retransmitted to the neighbor"; + } + } + + grouping ospf-area-interface-lsa-filter-config { + description + "Configuration options relating to filtering LSAs + on an interface."; + + leaf all { + type boolean; + description + "When this leaf is set to true, all LSAs should be + filtered to the neighbours with whom adjacencies are + formed on the interface."; + } + + // NB: this container can be augmented to add additional + // filtering options which exist in some implementations. + } + + grouping ospf-area-interfaces-structure { + description + "Structural grouping for configuration and operational state + parameters that relate to an interface"; + + container interfaces { + description + "Enclosing container for a list of interfaces enabled within + this area"; + + list interface { + key "id"; + + description + "List of interfaces which are enabled within this area"; + + leaf id { + type leafref { + path "../config/id"; + } + description + "A pointer to the identifier for the interface."; + } + + container config { + description + "Configuration parameters for the interface on which + OSPF is enabled"; + + uses ospf-area-interface-config; + } + + container state { + config false; + description + "Operational state parameters for the interface on which + OSPF is enabled"; + uses ospf-area-interface-config; + uses ospf-area-interface-state; + } + + uses oc-if:interface-ref; + + container timers { + description + "Timers relating to OSPF on the interface"; + + container config { + description + "Configuration parameters for OSPF timers on the + interface"; + uses ospf-area-interface-timers-config; + } + + container state { + config false; + description + "Operational state parameters for OSPF timers on + the interface"; + + uses ospf-area-interface-timers-config; + } + } + + container lsa-filter { + description + "OSPF parameters relating to filtering of LSAs to + neighbors the specified interface."; + + container config { + description + "Configuration parameters relating to filtering LSAs + on the specified interface."; + uses ospf-area-interface-lsa-filter-config; + } + + container state { + config false; + description + "Operational state parameters relating to filtering + LSAs on the specified interface"; + uses ospf-area-interface-lsa-filter-config; + } + } + + container static-neighbors { + description + "Enclosing container for the list of statically + configured neighbors"; + + list static-neighbor { + key "neighbor-ip-address"; + + description + "A neighbor which has been statically configured on + this router"; + + leaf neighbor-ip-address { + type leafref { + path "../config/neighbor-ip-address"; + } + description + "The IP address of the static neighbor."; + } + + container config { + description + "Configuration parameters relating to the adjacent + system"; + uses ospf-area-interface-neighbor-config; + } + } + } + + container neighbors { + config false; + description + "Enclosing container for the list of neighbors that + an adjacency has been established with on the interface"; + + list neighbor { + key "router-id"; + + description + "A neighbor with which an OSPF adjacency has been + established within this area"; + + leaf router-id { + type leafref { + path "../state/router-id"; + } + description + "The router ID of the remote system."; + } + + container state { + config false; + description + "Operational state parameters relating to the adjacent + system"; + uses ospf-area-interface-neighbor-state; + } + } + } + + uses oc-bfd:bfd-enable; + } + } + } +} diff --git a/release/models/ospf/openconfig-ospf-area.yang b/release/models/ospf/openconfig-ospf-area.yang new file mode 100644 index 000000000..988b581f5 --- /dev/null +++ b/release/models/ospf/openconfig-ospf-area.yang @@ -0,0 +1,231 @@ +submodule openconfig-ospf-area { + + belongs-to openconfig-ospf { + prefix "oc-ospf"; + } + + import openconfig-extensions { prefix "oc-ext"; } + import openconfig-ospf-types { prefix "oc-ospf-types"; } + import openconfig-ospf-types { prefix "oc-ospft"; } + import ietf-inet-types { prefix "inet"; } + + // include other required submodules + include openconfig-ospf-area-interface; + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This submodule provides common OSPF configuration and operational + state parameters that are specific to the area context"; + + oc-ext:openconfig-version "0.0.1"; + + revision "2025-02-13" { + description + "Initial revision"; + reference "0.0.1"; + } + + + grouping address-range-config { + description + "Configuration data for static routes."; + + leaf prefix { + type inet:ip-prefix; + description + "IP address range"; + } + + leaf status { + type enumeration { + enum ADVERTISE { + description + "The route is advertised."; + } + enum DONOTADVERTISE { + description + "The route is not advertised."; + } + } + default ADVERTISE; + description + "Set to either Advertise or DoNotAdvertise. Routing information + is condensed at area boundaries. External to the area, at most + a single route is advertised (via a inter-area-prefix-LSA) for + each address range. The route is advertised if and only if the + address range's Status is set to Advertise. Unadvertised + ranges allow the existence of certain networks to be + intentionally hidden from other areas."; + } + } + + grouping address-range-state { + description + "Operational state data for address range"; + } + + grouping ospf-area-config { + description + "Configuration parameters relating to an OSPF area"; + + leaf identifier { + type oc-ospf-types:ospf-area-identifier; + description + "An identifier for the OSPFv2 area - described as either a + 32-bit unsigned integer, or a dotted-quad"; + } + + leaf type { + type identityref { + base "oc-ospft:OSPF-AREA-TYPE"; + } + default oc-ospft:NORMAL; + description + "OSPF area type."; + } + + leaf stub-default-cost { + /* when "../area-type = 'STUB' or ../area-type = 'NSSA'" { + description + "Default cost for LSA advertised into stub or + NSSA area." + } */ + + type uint32 { + range "1..16777215"; + } + description + "If the area has been configured as a stub area, + and the router itself is an area border router, + then the StubDefaultCost indicates the cost of + the default inter-area-prefix-LSA that the router + should advertise into the area."; + } + + leaf import-summaries { + /* when "../area-type = 'STUB' or ../area-type = 'NSSA'" { + description + "Summary generation valid for stub/NSSA area." + } */ + + type boolean; + default true; + description + "When set to enabled, prefixes external to the + area are imported into the area via the advertisement + of inter-area-prefix-LSAs. When set to disabled, + inter-area routes are not imported into the + area."; + } + + + list address-ranges { + key "prefix"; + description + "List of IPv6 addresses contained in the address range"; + + leaf prefix { + type leafref { + path "../config/prefix"; + } + description + "Reference to the destination prefix list key."; + } + + container config { + description + "Configuration data for address range"; + + uses address-range-config; + } + + container state { + + config false; + + description + "Operational state data for address range"; + + uses address-range-config; + uses address-range-state; + } + } + } + + grouping ospf-area-virtual-link-config { + description + "Configuration parameters relating to a virtual-link within + the OSPF area"; + + leaf remote-router-id { + type inet:ipv4-address-no-zone; + description + "The router ID of the device which terminates the remote end + of the virtual link"; + } + } + + grouping ospf-area-structure { + description + "Structural grouping for configuration and operational state + parameters that relate to an individual area"; + + container config { + description + "Configuration parameters relating to an OSPFv2 area"; + + uses ospf-area-config; + } + + container state { + config false; + description + "Operational state parameters relating to an OSPFv2 area"; + uses ospf-area-config; + } + + uses ospf-area-interfaces-structure; + + container virtual-links { + description + "Configuration and state parameters relating to virtual + links from the source area to a remote router"; + + list virtual-link { + key "remote-router-id"; + + description + "Configuration and state parameters relating to a + virtual link"; + + leaf remote-router-id { + type leafref { + path "../config/remote-router-id"; + } + description + "Reference to the remote router ID"; + } + + container config { + description + "Configuration parameters relating to the OSPF virtual link"; + uses ospf-area-virtual-link-config; + } + + container state { + config false; + description + "State parameters relating to the OSPF virtual link"; + uses ospf-area-virtual-link-config; + uses ospf-area-interface-neighbor-state; + } + } + } + } +} diff --git a/release/models/ospf/openconfig-ospf-common.yang b/release/models/ospf/openconfig-ospf-common.yang new file mode 100644 index 000000000..07b960943 --- /dev/null +++ b/release/models/ospf/openconfig-ospf-common.yang @@ -0,0 +1,51 @@ +submodule openconfig-ospf-common { + + belongs-to openconfig-ospf { + prefix "oc-ospf"; + } + + import openconfig-extensions { prefix "oc-ext"; } + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This submodule provides common OSPF configuration and operational + state parameters that are shared across multiple contexts"; + + oc-ext:openconfig-version "0.0.1"; + + revision "2025-02-13" { + description + "Initial revision"; + reference "0.0.1"; + } + + grouping ospf-common-timers { + description + "Common definition of the type of timers that the OSPF implementation + uses"; + + leaf timer-type { + type enumeration { + enum LINEAR_BACKOFF { + description + "The backoff used by the OSPF implementation is linear, such that + a common delay is added following each event."; + } + enum EXPONENTIAL_BACKOFF { + description + "The backoff used by the OSPF implementation is exponential, such + that the delay added following each event increases."; + } + } + description + "The timer mode that is utilised by the implementation."; + } + } + +} diff --git a/release/models/ospf/openconfig-ospf-global.yang b/release/models/ospf/openconfig-ospf-global.yang new file mode 100644 index 000000000..fefaaa29b --- /dev/null +++ b/release/models/ospf/openconfig-ospf-global.yang @@ -0,0 +1,421 @@ +submodule openconfig-ospf-global { + + belongs-to openconfig-ospf { + prefix "oc-ospf"; + } + + import ietf-yang-types { prefix "yang"; } + import openconfig-extensions { prefix "oc-ext"; } + import openconfig-routing-policy { prefix "oc-rpol"; } + import openconfig-ospf-types { prefix "oc-ospft"; } + + // Include common submodule + include openconfig-ospf-common; + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This submodule provides common OSPF configuration and operational + state parameters that are global to a particular OSPF instance"; + + oc-ext:openconfig-version "0.0.1"; + + revision "2025-02-13" { + description + "Initial revision"; + reference "0.0.1"; + } + + grouping ospf-global-config { + description + "Global configuration for OSPF"; + + leaf router-id { + type yang:dotted-quad; + description + "A 32-bit number represented as a dotted quad assigned to + each router running the OSPF protocol. This number should + be unique within the autonomous system"; + reference "rfc2828"; + } + + leaf log-adjacency-changes { + type boolean; + description + "When this leaf is set to true, a log message will be + generated when the state of an OSPF neighbour changes."; + } + + leaf hide-transit-only-networks { + type boolean; + description + "When this leaf is set to true, do not advertise prefixes + into OSPF that correspond to transit interfaces, as per + the behaviour discussed in RFC6860."; + reference + "RFC6860 - Hiding Transit-Only Networks in OSPF"; + } + + leaf abr-capability { + type identityref { + base "oc-ospft:OSPF-ABR-TYPE"; + } + description + "When the leaf is set to RFC2328_ABR, the router + acts as an ABR when it participates in multiple OSPF + areas. It does not matter whether the backbone area + exists or not. When the leaf is set to RFC3509_ABR, + the router acts as an ABR when the router participates + in multiple OSPF areas, one of which must be backbone."; + } + } + + grouping ospf-global-spf-timers-config { + description + "Configuration parameters relating to global SPF timer + parameters for OSPF"; + + leaf initial-delay { + // rjs TODO: IS-IS model has this as decimal64 - should it be + // that or uint32 msec? + type uint32; + units msec; + description + "The value of this leaf specifies the time between a change + in topology being detected and the first run of the SPF + algorithm."; + } + + leaf maximum-delay { + // rjs TODO: same question as above + type uint32; + units msec; + description + "The value of this leaf specifies the maximum delay between + a topology change being detected and the SPF algorithm + running. This value is used for implementations that support + increasing the wait time between SPF runs."; + } + + // rjs TODO: some questions here around what we should specify: + // JUNOS has rapid-runs and holddown + // Cisco has maximum time between runs, and then a doubling of + // the wait interval up to that maximum. + // ALU has first-wait, second-wait, max-wait + } + + grouping ospf-global-lsa-generation-timers-config { + description + "Configuration parameters relating to global LSA generation + parameters for OSPF"; + + leaf initial-delay { + type uint32; + units msec; + description + "The value of this leaf specifies the time between the first + time an LSA is generated and advertised and the subsequent + generation of that LSA."; + } + + leaf maximum-delay { + type uint32; + units msec; + description + "The value of this leaf specifies the maximum time between the + generation of an LSA and the subsequent re-generation of that + LSA. This value is used in implementations that support + increasing delay between generation of an LSA"; + } + } + + grouping ospf-global-spf-timers-state { + description + "Operational state parameters relating to OSPF global + timers"; + + uses ospf-common-timers; + } + + grouping ospf-global-lsa-generation-timers-state { + description + "Operational state parameters relating to OSPF global + timers"; + + uses ospf-common-timers; + } + + grouping ospf-global-graceful-restart-config { + description + "Configuration parameters relating to graceful restart for + OSPF"; + + leaf enabled { + type boolean; + description + "When the value of this leaf is set to true, graceful restart + is enabled on the local system. In this case, the system will + use Grace-LSAs to signal that it is restarting to its + neighbors."; + } + + leaf helper-only { + type boolean; + description + "Operate graceful-restart only in helper mode. When this leaf + is set to true, the local system does not use Grace-LSAs to + indicate that it is restarting, but will accept Grace-LSAs + from remote systems, and suppress withdrawl of adjacencies + of the system for the grace period specified"; + } + } + + grouping ospf-global-inter-areapp-config { + description + "Configuration parameters for OSPF policies which propagate + prefixes between areas"; + + leaf src-area { + type leafref { + // we are at ospf/global/inter-area-propagation-policies/... + // inter-area-propagation-policy/config/src-area + path "../../../../../areas/area/identifier"; + } + description + "The area from which prefixes are to be exported."; + } + + leaf dst-area { + type leafref { + // we are at ospf/global/inter-area-propagation-policies/... + // inter-area-propagation-policy/config/src-area + path "../../../../../areas/area/identifier"; + } + description + "The destination area to which prefixes are to be imported"; + } + + uses oc-rpol:apply-policy-import-config; + uses oc-rpol:default-policy-import-config; + } + + grouping ospf-global-max-metric-config { + description + "Configuration paramters relating to setting the OSPF + maximum metric."; + + leaf set { + type boolean; + description + "When this leaf is set to true, all non-stub interfaces of + the local system are advertised with the maximum metric, + such that the router does not act as a transit system, + (similarly to the IS-IS overload functionality)."; + reference + "RFC3137 - OSPF Stub Router Advertisement"; + } + + leaf timeout { + type uint64; + units "seconds"; + description + "The delay, in seconds, after which the advertisement of + entities with the maximum metric should be cleared, and + the system reverts to the default, or configured, metrics."; + } + + leaf-list include { + type identityref { + base "oc-ospft:MAX_METRIC_INCLUDE"; + } + description + "By default, the maximum metric is advertised for all + non-stub interfaces of a device. When identities are + specified within this leaf-list, additional entities + are also advertised with the maximum metric according + to the values within the list."; + } + + leaf-list trigger { + type identityref { + base "oc-ospft:MAX_METRIC_TRIGGER"; + } + description + "By default, the maximum metric is only advertised + when the max-metric/set leaf is specified as true. + In the case that identities are specified within this + list, they provide additional triggers (e.g., system + boot) that may cause the max-metric to be set. In this + case, the system should still honour the timeout specified + by the max-metric/timeout leaf, and clear the max-metric + advertisements after the expiration of this timer."; + } + } + + grouping ospf-global-structural { + description + "Top level structural grouping for OSPF global parameters"; + + container global { + description + "Configuration and operational state parameters for settings + that are global to the OSPF instance"; + + container config { + description + "Global configuration parameters for OSPF"; + uses ospf-global-config; + } + + container state { + config false; + description + "Operational state parameters for OSPF"; + uses ospf-global-config; + } + + container timers { + description + "Configuration and operational state parameters for OSPF + timers"; + + container spf { + description + "Configuration and operational state parameters relating + to timers governing the operation of SPF runs"; + + container config { + description + "Configuration parameters relating to global OSPF + SPF timers"; + uses ospf-global-spf-timers-config; + } + + container state { + config false; + description + "Operational state parameters relating to the global + OSPF SPF timers"; + uses ospf-global-spf-timers-config; + uses ospf-global-spf-timers-state; + } + } + + container max-metric { + description + "Configuration and operational state parameters relating + to setting the OSPF maximum metric."; + + container config { + description + "Configuration parameters relating to setting the OSPF + maximum metric for a set of advertised entities."; + uses ospf-global-max-metric-config; + } + + container state { + config false; + description + "Operational state parameters relating to setting the + OSPF maximum metric for a set of advertised entities."; + uses ospf-global-max-metric-config; + } + } + + container lsa-generation { + description + "Configuration and operational state parameters relating + to timers governing the generation of LSAs by the local + system"; + + container config { + description + "Configuration parameters relating to the generation of + LSAs by the local system"; + uses ospf-global-lsa-generation-timers-config; + } + + container state { + config false; + description + "Operational state parameters relating to the generation + of LSAs by the local system"; + uses ospf-global-lsa-generation-timers-config; + uses ospf-global-lsa-generation-timers-state; + } + } + } + + container graceful-restart { + description + "Configuration and operational state parameters for OSPF + graceful restart"; + + container config { + description + "Configuration parameters relating to OSPF graceful + restart"; + uses ospf-global-graceful-restart-config; + } + + container state { + config false; + description + "Operational state parameters relating to OSPF graceful + restart"; + uses ospf-global-graceful-restart-config; + } + } + + container inter-area-propagation-policies { + description + "Policies defining how inter-area propagation should be performed + by the OSPF instance"; + + list inter-area-propagation-policy { + key "src-area dst-area"; + description + "A list of connections between pairs of areas - routes are + propagated from the source (src) area to the destination (dst) + area according to the policy specified"; + + leaf src-area { + type leafref { + path "../config/src-area"; + } + description + "Reference to the source area"; + } + + leaf dst-area { + type leafref { + path "../config/dst-area"; + } + description + "Reference to the destination area"; + } + + container config { + description + "Configuration parameters relating to the inter-area + propagation policy"; + uses ospf-global-inter-areapp-config; + } + + container state { + config false; + description + "Operational state parameters relating to the inter-area + propagation policy"; + uses ospf-global-inter-areapp-config; + } + } + } + } + } +} diff --git a/release/models/ospf/openconfig-ospf-types.yang b/release/models/ospf/openconfig-ospf-types.yang index 4ab7256ea..c88764df9 100644 --- a/release/models/ospf/openconfig-ospf-types.yang +++ b/release/models/ospf/openconfig-ospf-types.yang @@ -21,7 +21,13 @@ module openconfig-ospf-types { description "Type definitions for OSPF"; - oc-ext:openconfig-version "0.1.3"; + oc-ext:openconfig-version "0.1.4"; + + revision "2025-02-13" { + description + "Add OSPF area and ABR types"; + reference "0.1.4"; + } revision "2018-11-21" { description @@ -792,4 +798,47 @@ module openconfig-ospf-types { "Include OSPF Type 2 external routes when advertising the maximum metric."; } + + identity OSPF-AREA-TYPE { + description + "Base identity for OSPF area type."; + } + + identity NORMAL { + base "OSPF-AREA-TYPE"; + description + "OSPF normal area."; + } + + identity STUB { + base "OSPF-AREA-TYPE"; + description + "OSPF stub area."; + } + + identity NSSA { + base "OSPF-AREA-TYPE"; + description + "OSPF NSSA area."; + } + + identity OSPF-ABR-TYPE { + description + "Base identity for OSPF area boarder router type."; + } + + identity RFC3509_ABR { + base "OSPF-ABR-TYPE"; + description + "OSPF ABR requires backbone area as one of the multiple + areas."; + } + + identity RFC2328_ABR { + base "OSPF-ABR-TYPE"; + description + "OSPF ABR does not require backbone area as one of + the multiple areas."; + } + } diff --git a/release/models/ospf/openconfig-ospf.yang b/release/models/ospf/openconfig-ospf.yang new file mode 100644 index 000000000..e4ff1a8d6 --- /dev/null +++ b/release/models/ospf/openconfig-ospf.yang @@ -0,0 +1,90 @@ +module openconfig-ospf { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/ospf"; + + prefix "oc-ospf"; + + import openconfig-extensions { prefix "oc-ext"; } + + // Include submodules. + include openconfig-ospf-global; + include openconfig-ospf-area; + include openconfig-ospf-area-interface; + include openconfig-ospf-common; + + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module provides common OSPF configuration and operational + state parameters that are shared across multiple contexts"; + + oc-ext:openconfig-version "0.0.1"; + + + revision "2025-02-13" { + description + "Initial revision"; + reference "0.0.1"; + } + + + grouping ospfv3-top { + description + "Top-level OSPFv3 configuration and operational state"; + + + + container ospfv3 { + description + "Top-level configuration and operational state for + Open Shortest Path First (OSPF) v3"; + + + + uses ospf-global-structural; + + + + container areas { + description + "Configuration and operational state relating to an + OSPFv3 area."; + + + + list area { + key "identifier"; + + + + description + "The OSPFv3 areas within which the local system exists"; + + + + leaf identifier { + type leafref { + path "../config/identifier"; + } + description + "A reference to the identifier for the area."; + } + + + + uses ospf-area-structure; + } + } + } + } + +} diff --git a/release/models/ospf/openconfig-ospfv3-area-interface.yang b/release/models/ospf/openconfig-ospfv3-area-interface.yang new file mode 100644 index 000000000..714c660bc --- /dev/null +++ b/release/models/ospf/openconfig-ospfv3-area-interface.yang @@ -0,0 +1,74 @@ +module openconfig-ospfv3-area-interface { + + + yang-version "1"; + + + // namespace + namespace "http://openconfig.net/yang/openconfig-ospfv3-area-interface"; + + prefix "oc-ospfv3"; + + import openconfig-extensions { prefix "oc-ext"; } + import openconfig-network-instance { prefix "oc-ni"; } + + // meta + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This submodule provides OSPFv3 configuration and operational + state parameters that are specific to the area context"; + + oc-ext:openconfig-version "0.0.1"; + + revision "2025-02-13" { + description + "Initial revision"; + reference "0.0.1"; + } + + grouping ospfv3-area-interface-config { + description + "Structural grouping for configuration and operational state + parameters that relate to an interface"; + + leaf instance-id { + type uint8; + default 0; + description + "The OSPF protocol instance associated with this OSPF interface."; + } + + leaf interface-id { + type uint32; + description + "32-bit number uniquely identifying this interface among the + collection of this router's interface. If it is not specified, the + interface index can be used."; + } + } + + augment "/oc-ni:network-instances/oc-ni:network-instance/" + + "oc-ni:protocols/oc-ni:protocol/oc-ni:ospfv3/" + + "oc-ni:areas/oc-ni:area/" + + "oc-ni:interfaces/oc-ni:interface/oc-ni:config" { + description + "OSPFv3 interface paramaters"; + uses ospfv3-area-interface-config; + } + + augment "/oc-ni:network-instances/oc-ni:network-instance/" + + "oc-ni:protocols/oc-ni:protocol/oc-ni:ospfv3/" + + "oc-ni:areas/oc-ni:area/" + + "oc-ni:interfaces/oc-ni:interface/oc-ni:state" { + description + "OSPFv3 interface paramaters"; + uses ospfv3-area-interface-config; + } + + +}