<
 draft-ietf-ospf-yang-06.txt   draft-ietf-ospf-yang-07.txt 
Internet D. Yeung Internet D. Yeung
Internet-Draft Arrcus Internet-Draft Arrcus
Intended status: Informational Y. Qu Intended status: Informational Y. Qu
Expires: May 4, 2017 Cisco Systems Expires: September 14, 2017 Huawei
J. Zhang J. Zhang
Juniper Networks Juniper Networks
I. Chen I. Chen
Kuatro Technologies Jabil
A. Lindem A. Lindem
Cisco Systems Cisco Systems
October 31, 2016 March 13, 2017
Yang Data Model for OSPF Protocol Yang Data Model for OSPF Protocol
draft-ietf-ospf-yang-06 draft-ietf-ospf-yang-07
Abstract Abstract
This document defines a YANG data model that can be used to configure This document defines a YANG data model that can be used to configure
and manage OSPF. and manage OSPF.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
skipping to change at page 1, line 38 skipping to change at page 1, line 38
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 4, 2017. This Internet-Draft will expire on September 14, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
skipping to change at page 2, line 18 skipping to change at page 2, line 18
Table of Contents Table of Contents
1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3
2. Design of Data Model . . . . . . . . . . . . . . . . . . . . 3 2. Design of Data Model . . . . . . . . . . . . . . . . . . . . 3
2.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2. OSPFv2 and OSPFv3 . . . . . . . . . . . . . . . . . . . . 5 2.2. OSPFv2 and OSPFv3 . . . . . . . . . . . . . . . . . . . . 5
2.3. Optional Features . . . . . . . . . . . . . . . . . . . . 5 2.3. Optional Features . . . . . . . . . . . . . . . . . . . . 5
2.4. Inheritance . . . . . . . . . . . . . . . . . . . . . . . 5 2.4. Inheritance . . . . . . . . . . . . . . . . . . . . . . . 5
2.5. OSPF Router Configuration . . . . . . . . . . . . . . . . 6 2.5. OSPF Router Configuration . . . . . . . . . . . . . . . . 5
2.6. OSPF Instance Configuration . . . . . . . . . . . . . . . 6 2.6. OSPF Instance Configuration . . . . . . . . . . . . . . . 6
2.7. OSPF Area Configuration . . . . . . . . . . . . . . . . . 7 2.7. OSPF Area Configuration . . . . . . . . . . . . . . . . . 7
2.8. OSPF Interface Configuration . . . . . . . . . . . . . . 10 2.8. OSPF Interface Configuration . . . . . . . . . . . . . . 9
2.9. OSPF notification . . . . . . . . . . . . . . . . . . . . 12 2.9. OSPF notification . . . . . . . . . . . . . . . . . . . . 11
3. OSPF BFD Yang Module . . . . . . . . . . . . . . . . . . . . 15 2.10. OSPF RPC Operations . . . . . . . . . . . . . . . . . . . 15
4. OSPF Yang Module . . . . . . . . . . . . . . . . . . . . . . 15 3. OSPF Yang Module . . . . . . . . . . . . . . . . . . . . . . 15
5. OSPF BFD Yang Module . . . . . . . . . . . . . . . . . . . . 91 4. Security Considerations . . . . . . . . . . . . . . . . . . . 95
6. Security Considerations . . . . . . . . . . . . . . . . . . . 94 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 95
7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 94 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 96
8. References . . . . . . . . . . . . . . . . . . . . . . . . . 94 6.1. Normative References . . . . . . . . . . . . . . . . . . 96
8.1. Normative References . . . . . . . . . . . . . . . . . . 94 6.2. Informative References . . . . . . . . . . . . . . . . . 97
8.2. Informative References . . . . . . . . . . . . . . . . . 96 Appendix A. Contributors' Addreses . . . . . . . . . . . . . . . 98
Appendix A. Contributors' Addreses . . . . . . . . . . . . . . . 97 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 98
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 97
1. Overview 1. Overview
YANG [RFC6020] is a data definition language used to define the YANG [RFC6020] is a data definition language used to define the
contents of a conceptual data store that allows networked devices to contents of a conceptual data store that allows networked devices to
be managed using NETCONF [RFC6241]. YANG is proving relevant beyond be managed using NETCONF [RFC6241]. YANG is proving relevant beyond
its initial confines, as bindings to other interfaces (e.g., ReST) its initial confines, as bindings to other interfaces (e.g., ReST)
and encodings other than XML (e.g., JSON) are being defined. and encodings other than XML (e.g., JSON) are being defined.
Furthermore, YANG data models can be used as the basis for Furthermore, YANG data models can be used as the basis for
implementation of other interfaces, such as CLI and programmatic implementation of other interfaces, such as CLI and programmatic
APIs. APIs.
This document defines a YANG data model that can be used to configure This document defines a YANG data model that can be used to configure
and manage OSPF and it is an augmentation to the core routing data and manage OSPF and it is an augmentation to the core routing data
model. A core routing data model is defined in model. A core routing data model is defined in [RFC8022], and it
[I-D.ietf-netmod-routing-cfg], and it provides the basis for the provides the basis for the development of data models for routing
development of data models for routing protocols. The interface data protocols. The interface data model is defined in [RFC7223] and is
model is defined in [RFC7223] and is used for referencing interfaces used for referencing interfaces from the routing protocol. The key-
from the routing protocol. The key-chain data model used for OSPF chain data model used for OSPF authentication is defined in
authentication is defined in [I-D.ietf-rtgwg-yang-key-chain] and
provides both a reference to configured key-chains and an enumeration [I-D.ietf-rtgwg-yang-key-chain] and provides both a reference to
of cryptographic algorithms. configured key-chains and an enumeration of cryptographic algorithms.
Both OSPFv2 [RFC2328] and OSPFv3 [RFC5340] are supported. In Both OSPFv2 [RFC2328] and OSPFv3 [RFC5340] are supported. In
addition to the core OSPF protocol, features described in other OSPF addition to the core OSPF protocol, features described in other OSPF
RFCs are also supported. These includes demand circuit [RFC1793], RFCs are also supported. These includes demand circuit [RFC1793],
traffic engineering [RFC3630], multiple address family [RFC5838], traffic engineering [RFC3630], multiple address family [RFC5838],
graceful restart [RFC3623] [RFC5187], NSSA [RFC3101], and OSPF(v3) as graceful restart [RFC3623] [RFC5187], NSSA [RFC3101], and OSPF(v3) as
a PE-CE Protocol [RFC4577], [RFC6565]. These non-core features are a PE-CE Protocol [RFC4577], [RFC6565]. These non-core features are
optional in the OSPF data model. optional in the OSPF data model.
1.1. Requirements Language 1.1. Requirements Language
skipping to change at page 3, line 42 skipping to change at page 3, line 42
common user interface to the OSPFv2 and OSPFv3 protocols. There is common user interface to the OSPFv2 and OSPFv3 protocols. There is
very little information that is designated as "mandatory", providing very little information that is designated as "mandatory", providing
freedom for vendors to adapt this data model to their respective freedom for vendors to adapt this data model to their respective
product implementations. product implementations.
2.1. Overview 2.1. Overview
The OSPF YANG module defined in this document has all the common The OSPF YANG module defined in this document has all the common
building blocks for the OSPF protocol. building blocks for the OSPF protocol.
The OSPF YANG module augments the routing/routing-instance/routing- The OSPF YANG module augments the /routing/control-plane-protocols/
protocols/routing-protocol path defined in the ietf-routing module. control-plane-protocol path defined in the ietf-routing module.
module: ospf module: ietf-ospf
+--rw routing augment /rt:routing/rt:control-plane-protocols/
+--rw router-id? yang:dotted-quad rt:control-plane-protocol:
+--rw control-plane-protocols
+--rw control-plane-protocol* [type name]
+--rw ospf +--rw ospf
+--rw all-instances-inherit {instance-inheritance}?
. .
. .
+--rw all-instances-inherit {instance-inheritance}? +--rw operation-mode? identityref
| . +--rw instance* [af]
| . .
+--rw instance* [routing-instance af] .
. +--rw areas
. | +--rw area* [area-id]
+--rw areas | +--rw area-id area-id-type
| +--rw area* [area-id] | +--rw all-interfaces-inherit {interface-inheritance}?
| . | .
| . | .
| +--rw all-interfaces-inherit {interface-inheritance}? | +--rw virtual-links
| . | | +--rw virtual-link* [transit-area-id router-id]
| . | | .
| +--rw virtual-links | | .
| | +--rw virtual-link* [router-id] | +--rw sham-links {pe-ce-protocol}?
| | . | | +--rw sham-link* [local-id remote-id]
| | . | | .
| +--rw sham-links | | .
| | +--rw sham-link* [local-id remote-id] | +--rw interfaces
| | . | +--rw interface* [name]
| | . | .
| +--rw interfaces | .
| | +--rw interface* [interface] +--rw topologies {multi-topology}?
| | . +--rw topology* [name]
| | . .
| . .
| .
+--rw topologies
+--rw topology* [name]
The ospf module is intended to match to the vendor specific OSPF The ospf module is intended to match to the vendor specific OSPF
configuration construct that is identified by the local identifier configuration construct that is identified by the local identifier
'name'. The field 'version' allows support for OSPFv2 and OSPFv3. 'name'. The field 'version' allows support for OSPFv2 and OSPFv3.
The ospf container includes one or more OSPF protocol engines, each The ospf container includes one or more OSPF protocol engines, each
enclosed in a separate instance entity. Each instance includes enclosed in a separate instance entity. Each instance includes
information for the routing domain based on the [routing-instance af] information for the routing domain based on the [routing-instance af]
specification. There is no default routing domain assumed by the specification. There is no default routing domain assumed by the
data model. For example, to enable OSPF on a vendor's default IPv4 data model. For example, to enable OSPF on a vendor's default IPv4
skipping to change at page 6, line 11 skipping to change at page 6, line 5
Inheritance is defined as an optional feature, and vendors are Inheritance is defined as an optional feature, and vendors are
permitted to augment the inheritance containers with their own vendor permitted to augment the inheritance containers with their own vendor
specific parameters. specific parameters.
2.5. OSPF Router Configuration 2.5. OSPF Router Configuration
The ospf container is the top level container in this data model. It The ospf container is the top level container in this data model. It
contains shared information among the OSPF instances configured contains shared information among the OSPF instances configured
within the container. within the container.
module: ospf module: ietf-ospf
+--rw ospf augment /rt:routing/rt:control-plane-protocols/
+--rw all-instances-inherit {instance-inheritance}? rt:control-plane-protocol:
| +--rw area +--rw ospf
| +--rw interface +--rw all-instances-inherit {instance-inheritance}?
+--rw operation-mode? identityref | +--rw area
+--rw instance* [af] | +--rw interface
. +--rw operation-mode? identityref
. +--rw instance* [af]
.
.
2.6. OSPF Instance Configuration 2.6. OSPF Instance Configuration
The instance container represents an OSPF protocol engine and The instance container represents an OSPF protocol engine and
contains the router level configuration. The routing domain for each contains the router level configuration. The routing domain for each
instance is dictated through the specification of [routing-instance instance is dictated through the specification of [routing-instance
af]. af].
The all-areas-inherit container contains area configuration that may The all-areas-inherit container contains area configuration that may
be inherited by configured OSPF areas in the OSPF instance. be inherited by configured OSPF areas in the OSPF instance.
module: ospf module: ietf-ospf
+--rw ospf augment /rt:routing/rt:control-plane-protocols/
. rt:control-plane-protocol:
. +--rw ospf
+--rw instance* [af] .
+--rw af identityref .
+--rw all-areas-inherit {area-inheritance}? +--rw instance* [af]
| +--rw area +--rw af identityref
| +--rw interface +--rw all-areas-inherit {area-inheritance}?
+--rw explicit-router-id? yang:dotted-quad {explicit-router-id}? | +--rw area
+--rw admin-distance | +--rw interface
| +--rw (scope)? +--rw explicit-router-id? rt-types:router-id
| +--:(single-value) | {explicit-router-id}?
| | +--rw all? uint8 +--rw preference
| +--:(multi-values) | +--rw (scope)?
| +--rw (granularity)? | +--:(single-value)
| | +--:(detail) | | +--rw all? uint8
| | | +--rw intra-area? uint8 | +--:(multi-values)
| | | +--rw inter-area? uint8 | +--rw (granularity)?
| | +--:(coarse) | | +--:(detail)
| | +--rw internal? uint8 | | | +--rw intra-area? uint8
| +--rw external? uint8 | | | +--rw inter-area? uint8
+--rw nsr {nsr}? | | +--:(coarse)
| +--rw enable? boolean | | +--rw internal? uint8
+--rw graceful-restart {graceful-restart}? | +--rw external? uint8
| +--rw enable? boolean +--rw nsr {nsr}?
| +--rw helper-enable? boolean | +--rw enable? boolean
| +--rw restart-interval? uint16 +--rw graceful-restart {graceful-restart}?
| +--rw helper-strict-lsa-checking? boolean | +--rw enable? boolean
+--rw enable? boolean {admin-control}? | +--rw helper-enable? boolean
+--rw auto-cost {auto-cost}? | +--rw restart-interval? uint16
| +--rw enable? boolean | +--rw helper-strict-lsa-checking? boolean
| +--rw reference-bandwidth? uint32 +--rw enable? boolean {admin-control}?
+--rw spf-control +--rw auto-cost {auto-cost}?
| +--rw paths? uint16 {max-ecmp}? | +--rw enable? boolean
+--rw database-control | +--rw reference-bandwidth? uint32
| +--rw max-lsa? uint32 {max-lsa}? +--rw spf-control
+--rw stub-router {stub-router}? | +--rw paths? uint16 {max-ecmp}?
| +--rw (trigger)? | +--rw ietf-spf-delay {ietf-spf-delay}?
| +--:(always) | +--rw initial-delay? uint16
| +--rw always! | +--rw short-delay? uint16
+--rw mpls | +--rw long-delay? uint16
| +--rw te-rid {te-rid}? | +--rw hold-down? uint16
| | +--rw (source)? | +--rw time-to-learn? uint16
| | +--:(interface) +--rw database-control
| | | +--rw interface? if:interface-ref | +--rw max-lsa? uint32 {max-lsa}?
| | +--:(explicit) +--rw stub-router {stub-router}?
| | +--rw router-id? inet:ipv4-address | +--rw (trigger)?
| +--rw ldp | +--:(always)
| +--rw igp-sync? boolean {ldp-igp-sync}? | +--rw always!
| +--rw autoconfig? boolean {ldp-igp-autoconfig}? +--rw mpls
+--rw fast-reroute {fast-reroute}? | +--rw te-rid {te-rid}?
| +--rw lfa {lfa}? | | +--rw ipv4-router-id? inet:ipv4-address
| | +--rw ipv6-router-id? inet:ipv6-address
| +--rw ldp
| +--rw igp-sync? boolean {ldp-igp-sync}?
+--rw fast-reroute {fast-reroute}?
| +--rw lfa {lfa}?
+--rw node-tags {node-tag}?
| +--rw node-tag* [tag]
| +--rw tag uint32
.
.
2.7. OSPF Area Configuration 2.7. OSPF Area Configuration
The area container contains OSPF area configuration and the list of The area container contains OSPF area configuration and the list of
interface containers representing all the OSPF interfaces in the interface containers representing all the OSPF interfaces in the
area. area.
The all-interfaces-inherit contains interface configuration that may The all-interfaces-inherit contains interface configuration that may
be inherited by all OSPF area interfaces. be inherited by all OSPF area interfaces.
module: ospf module: ietf-ospf
+--rw ospf augment /rt:routing/rt:control-plane-protocols/
. rt:control-plane-protocol:
. +--rw ospf
+--rw instance* [routing-instance af] .
. .
. +--rw instance* [af]
+--rw areas
+--rw areas | +--rw area* [area-id]
| +--rw area* [area-id] | +--rw area-id area-id-type
| +--rw area-id area-id-type | +--rw all-interfaces-inherit {interface-inheritance}?
| +--rw all-interfaces-inherit {interface-inheritance}? | | +--rw interface
| | +--rw interface | +--rw area-type? identityref
| +--rw area-type? identityref | +--rw summary? boolean
| +--rw summary? boolean | +--rw default-cost? uint32
| +--rw default-cost? uint32 | +--rw ranges
| +--rw ranges | | +--rw range* [prefix]
| | +--rw range* [prefix] | | +--rw prefix inet:ip-prefix
| | +--rw prefix inet:ip-prefix | | +--rw advertise? boolean
| | +--rw advertise? boolean | | +--rw cost? uint24
| | +--rw cost? uint24 | +--rw virtual-links
| +--rw virtual-links | | +--rw virtual-link* [transit-area-id router-id]
| | +--rw virtual-link* [router-id] | | +--rw transit-area-id -> ../../../area-id
| | +--rw transit-area-id -> ../../../area-id | | +--rw router-id rt-types:router-id
| | +--rw router-id yang:dotted-quad | | +--rw hello-interval? uint16
| | +--rw hello-interval? uint16 | | +--rw dead-interval? uint32
| | +--rw dead-interval? uint32 | | +--rw retransmit-interval? uint16
| | +--rw retransmit-interval? uint16 | | +--rw transmit-delay? uint16
| | +--rw transmit-delay? uint16 | | +--rw lls? boolean {lls}?
| | +--rw mtu-ignore? boolean {mtu-ignore}? | | +--rw ttl-security {ttl-security}?
| | +--rw lls? boolean {lls}? | | | +--rw enable? boolean
| | +--rw prefix-suppression? boolean {prefix-suppression}? | | | +--rw hops? uint8
| | +--rw ttl-security {ttl-security}? | | +--rw enable? boolean
| | | +--rw enable? boolean | | {admin-control}?
| | | +--rw hops? uint8 | | +--rw authentication
| | +--rw enable? boolean {admin-control}? | | +--rw (auth-type-selection)?
| | +--rw authentication | | +--:(auth-ipsec)
| | +--rw (auth-type-selection)? | | {ospfv3-authentication-ipsec}?
| | +--:(auth-ipsec) {ospfv3-authentication-ipsec}? | | | +--rw sa? string
| | | +--rw sa? string | | +--:(auth-trailer-key-chain)
| | +--:(auth-trailer-key-chain) | | | +--rw key-chain?
| | | +--rw key-chain? key-chain:key-chain-ref | | key-chain:key-chain-ref
| | +--:(auth-trailer-key) | | +--:(auth-trailer-key)
| | +--rw key? string | | +--rw key? string
| | +--rw crypto-algorithm | | +--rw crypto-algorithm? identityref
| | +--rw (algorithm)? | +--rw sham-links {pe-ce-protocol}?
| | +--:(hmac-sha-1-12) {crypto-hmac-sha-1-12}? | | +--rw sham-link* [local-id remote-id]
| | | +--rw hmac-sha1-12? empty | | +--rw local-id inet:ip-address
| | +--:(md5) | | +--rw remote-id inet:ip-address
| | | +--rw md5? empty | | +--rw hello-interval? uint16
| | +--:(sha-1) | | +--rw dead-interval? uint32
| | | +--rw sha-1? empty | | +--rw retransmit-interval? uint16
| | +--:(hmac-sha-1) | | +--rw transmit-delay? uint16
| | | +--rw hmac-sha-1? empty | | +--rw lls? boolean {lls}?
| | +--:(hmac-sha-256) | | +--rw ttl-security {ttl-security}?
| | | +--rw hmac-sha-256? empty | | | +--rw enable? boolean
| | +--:(hmac-sha-384) | | | +--rw hops? uint8
| | | +--rw hmac-sha-384? empty | | +--rw enable? boolean
| | +--:(hmac-sha-512) | | {admin-control}?
| | | +--rw hmac-sha-512? empty | | +--rw authentication
| | +--:(clear-text) {clear-text}? | | | +--rw (auth-type-selection)?
| | +--rw clear-text? empty | | | +--:(auth-ipsec)
| | +--:(replay-protection-only) | | | {ospfv3-authentication-ipsec}?
| | {replay-protection-only}? | | | | +--rw sa? string
| | +--rw replay-protection-only? empty | | | +--:(auth-trailer-key-chain)
| +--rw sham-link | | | | +--rw key-chain?
| | +--rw sham-link* [local-id remote-id] | | | key-chain:key-chain-ref
| | +--rw local-id inet:ip-address | | | +--:(auth-trailer-key)
| | +--rw remote-id inet:ip-address | | | +--rw key? string
| | +--rw cost? uint16 | | | +--rw crypto-algorithm? identityref
| | +--rw hello-interval? uint16 | | +--rw cost? uint16
| | +--rw dead-interval? uint16 | | +--rw mtu-ignore? boolean
| | +--rw retransmit-interval? uint16 | | {mtu-ignore}?
| | +--rw transmit-delay? uint16 | | +--rw prefix-suppression? boolean
| | +--rw mtu-ignore? boolean {mtu-ignore}? | | {prefix-suppression}?
| | +--rw lls? boolean {lls}? . .
| | +--rw prefix-suppression? boolean {prefix-suppression}? . .
| | +--rw bfd? boolean {bfd}?
| | +--rw ttl-security {ttl-security}?
| | | +--rw enable? boolean
| | | +--rw hops? uint8
| | +--rw enable? boolean {admin-control}?
| | +--rw authentication
| | +--rw (auth-type-selection)?
| | +--:(auth-ipsec) {ospfv3-authentication-ipsec}?
| | | +--rw sa? string
| | +--:(auth-trailer-key-chain)
| | | +--rw key-chain? key-chain:key-chain-ref
| | +--:(auth-trailer-key)
| | +--rw key? string
| | +--rw crypto-algorithm
| | +--rw (algorithm)?
| | +--:(hmac-sha-1-12) {crypto-hmac-sha-1-12}?
| | | +--rw hmac-sha1-12? empty
| | +--:(md5)
| | | +--rw md5? empty
| | +--:(sha-1)
| | | +--rw sha-1? empty
| | +--:(hmac-sha-1)
| | | +--rw hmac-sha-1? empty
| | +--:(hmac-sha-256)
| | | +--rw hmac-sha-256? empty
| | +--:(hmac-sha-384)
| | | +--rw hmac-sha-384? empty
| | +--:(hmac-sha-512)
| | | +--rw hmac-sha-512? empty
| | +--:(clear-text) {clear-text}?
| | +--rw clear-text? empty
| | +--:(replay-protection-only)
| | {replay-protection-only}?
| | +--rw replay-protection-only? empty
2.8. OSPF Interface Configuration 2.8. OSPF Interface Configuration
The interface container contains OSPF interface configuration. The interface container contains OSPF interface configuration.
module: ospf module: ietf-ospf
+--rw ospf augment /rt:routing/rt:control-plane-protocols/
. rt:control-plane-protocol:
. +--rw ospf
+--rw instance* [routing-instance af] .
. .
. +--rw instance* [af]
+--rw areas .
| +--rw area* [area-id] .
. +--rw areas
. | +--rw area* [area-id]
| +--rw interfaces | .
| +--rw interface* [interface] | .
| +--rw name if:interface-ref | +--rw interfaces
| +--rw network-type? enumeration | +--rw interface* [name]
| +--rw passive? boolean | +--rw name if:interface-ref
| +--rw demand-circuit? boolean {demand-circuit}? | +--rw interface-type? enumeration
| +--rw multi-areas | +--rw passive? boolean
| | +--rw multi-area* [multi-area-id] {multi-area-adj}? | +--rw demand-circuit? boolean
| | +--rw multi-area-id area-id-type | {demand-circuit}?
| | +--rw cost? uint16 | +--rw priority? uint8
| +--rw static-neighbors | +--rw multi-areas {multi-area-adj}?
| | +--rw neighbor* [address] | | +--rw multi-area* [multi-area-id]
| | +--rw address inet:ip-address | | +--rw multi-area-id area-id-type
| | +--rw cost? uint16 | | +--rw cost? uint16
| | +--rw poll-interval? uint16 | +--rw static-neighbors
| | +--rw priority? uint8 | | +--rw neighbor* [identifier]
| +--rw node-flag? boolean {node-flag}? | | +--rw identifier inet:ip-address
| +--rw fast-reroute {fast-reroute}? | | +--rw cost? uint16
| | +--rw lfa {lfa}? | | +--rw poll-interval? uint16
| | +--rw candidate-disable? boolean | | +--rw priority? uint8
| | +--rw enable? boolean | +--rw node-flag? boolean
| | +--rw remote-lfa {remote-lfa}? | {node-flag}?
| | +--rw enable? boolean | +--rw bfd {bfd}?
| +--rw hello-interval? uint16 | | +--rw enable? boolean
| +--rw dead-interval? uint16 | +--rw fast-reroute {fast-reroute}?
| +--rw retransmit-interval? uint16 | | +--rw lfa {lfa}?
| +--rw transmit-delay? uint16 | | +--rw candidate-enable? boolean
| +--rw mtu-ignore? boolean {mtu-ignore}? | | +--rw enable? boolean
| +--rw lls? boolean {lls}? | | +--rw remote-lfa {remote-lfa}?
| +--rw prefix-suppression? boolean {prefix-suppression}? | | +--rw enable? boolean
| +--rw ttl-security {ttl-security}? | +--rw hello-interval? uint16
| | +--rw enable? boolean | +--rw dead-interval? uint32
| | +--rw hops? uint8 | +--rw retransmit-interval? uint16
| +--rw enable? boolean {admin-control}? | +--rw transmit-delay? uint16
| +--rw authentication | +--rw lls? boolean {lls}?
| | +--rw (auth-type-selection)? | +--rw ttl-security {ttl-security}?
| | +--:(auth-ipsec) {ospfv3-authentication-ipsec}? | | +--rw enable? boolean
| | | +--rw sa? string | | +--rw hops? uint8
| | +--:(auth-trailer-key-chain) | +--rw enable? boolean
| | | +--rw key-chain? key-chain:key-chain-ref | {admin-control}?
| | +--:(auth-trailer-key) | +--rw authentication
| | +--rw key? string | | +--rw (auth-type-selection)?
| | +--rw crypto-algorithm | | +--:(auth-ipsec)
| | +--rw (algorithm)? | | | {ospfv3-authentication-ipsec}?
| | +--:(hmac-sha-1-12) {crypto-hmac-sha-1-12}? | | | +--rw sa? string
| | | +--rw hmac-sha1-12? empty | | +--:(auth-trailer-key-chain)
| | +--:(md5) | | | +--rw key-chain?
| | | +--rw md5? empty | | | key-chain:key-chain-ref
| | +--:(sha-1) | | +--:(auth-trailer-key)
| | | +--rw sha-1? empty | | +--rw key? string
| | +--:(hmac-sha-1) | | +--rw crypto-algorithm? identityref
| | | +--rw hmac-sha-1? empty | +--rw cost? uint16
| | +--:(hmac-sha-256) | +--rw mtu-ignore? boolean
| | | +--rw hmac-sha-256? empty | | {mtu-ignore}?
| | +--:(hmac-sha-384) | +--rw prefix-suppression? boolean
| | | +--rw hmac-sha-384? empty | | {prefix-suppression}?
| | +--:(hmac-sha-512) | +--rw topologies {ospf:multi-topology}?
| | | +--rw hmac-sha-512? empty | | +--rw topology* [name]
| | +--:(clear-text) {clear-text}? | | +--rw name -> ../../../../../../../../
| | +--rw clear-text? empty | | ../../../rt:ribs/rib/name
| | +--:(replay-protection-only) | | +--rw cost? uint32
| | {replay-protection-only}? | +--rw instance-id? uint8
| | +--rw replay-protection-only? empty .
| +--rw cost? uint16 .
| +--rw topologies
| | +--rw topology* [name]
| | +--rw name leafref
| | +--rw cost? uint32
| +--rw instance-id? uint8
2.9. OSPF notification 2.9. OSPF notification
This YANG model defines a list of notifications that inform YANG This YANG model defines a list of notifications that inform YANG
clients of important events detected during protocol operation. The clients of important events detected during protocol operation. The
defined notifications cover the common set of traps from the OSPFv2 defined notifications cover the common set of traps from the OSPFv2
MIB [RFC4750] and OSPFv3 MIB [RFC5643]. MIB [RFC4750] and OSPFv3 MIB [RFC5643].
module: ospf notifications:
notifications: +---n if-state-change
+---n if-state-change | +--ro routing-protocol-name?
| +--ro routing-instance? string | + -> /rt:routing/control-plane-protocols/
| +--ro routing-protocol-type? -> ... | + control-plane-protocol/name
| +--ro routing-protocol-name? -> ... | +--ro af?
| +--ro af? -> ... | + -> /rt:routing/control-plane-protocols/
| +--ro (if-link-type-selection)? | + control-plane-protocol
| | +--:(interface) | + [rt:name=current()/../routing-protocol-name]/
| | | +--ro interface | + ospf:ospf/instance/af
| | | +--ro interface? if:interface-ref | +--ro (if-link-type-selection)?
| | +--:(virtual-link) | | +--:(interface)
| | | +--ro virtual-link | | | +--ro interface
| | | +--ro area-id? area-id-type | | | +--ro interface? if:interface-ref
| | | +--ro neighbor-router-id? yang:dotted-quad | | +--:(virtual-link)
| | +--:(sham-link) | | | +--ro virtual-link
| | +--ro sham-link | | | +--ro transit-area-id? area-id-type
| | +--ro area-id? area-id-type | | | +--ro neighbor-router-id? rt-types:router-id
| | +--ro local-ip-addr? inet:ip-address | | +--:(sham-link)
| | +--ro remote-ip-addr? inet:ip-address | | +--ro sham-link
| +--ro state? if-state-type | | +--ro area-id? area-id-type
+---n if-config-error | | +--ro local-ip-addr? inet:ip-address
| +--ro routing-instance? string | | +--ro remote-ip-addr? inet:ip-address
| +--ro routing-protocol-type? -> ... | +--ro state? if-state-type
| +--ro routing-protocol-name? -> ... +---n if-config-error
| +--ro af? -> ... | +--ro routing-protocol-name?
| +--ro (if-link-type-selection)? | + -> /rt:routing/control-plane-protocols/
| | +--:(interface) | + control-plane-protocol/name
| | | +--ro interface | +--ro af?
| | | +--ro interface? if:interface-ref | + -> /rt:routing/control-plane-protocols/
| | +--:(virtual-link) | + control-plane-protocol
| | | +--ro virtual-link | + [rt:name=current()/../routing-protocol-name]/
| | | +--ro area-id? area-id-type | + ospf:ospf/instance/af
| | | +--ro neighbor-router-id? yang:dotted-quad | +--ro (if-link-type-selection)?
| | +--:(sham-link) | | +--:(interface)
| | +--ro sham-link | | | +--ro interface
| | +--ro area-id? area-id-type | | | +--ro interface? if:interface-ref
| | +--ro local-ip-addr? inet:ip-address | | +--:(virtual-link)
| | +--ro remote-ip-addr? inet:ip-address | | | +--ro virtual-link
| +--ro packet-source? yang:dotted-quad | | | +--ro transit-area-id? area-id-type
| +--ro packet-type? packet-type | | | +--ro neighbor-router-id? rt-types:router-id
| +--ro error? enumeration | | +--:(sham-link)
+---n nbr-state-change | | +--ro sham-link
| +--ro routing-instance? string | | +--ro area-id? area-id-type
| +--ro routing-protocol-type? -> ... | | +--ro local-ip-addr? inet:ip-address
| +--ro routing-protocol-name? -> ... | | +--ro remote-ip-addr? inet:ip-address
| +--ro af? -> ... | +--ro packet-source? yang:dotted-quad
| +--ro (if-link-type-selection)? | +--ro packet-type? packet-type
| | +--:(interface) | +--ro error? enumeration
| | | +--ro interface +---n nbr-state-change
| | | +--ro interface? if:interface-ref | +--ro routing-protocol-name?
| | +--:(virtual-link) | + -> /rt:routing/control-plane-protocols/
| | | +--ro virtual-link | + control-plane-protocol/name
| | | +--ro area-id? area-id-type | +--ro af?
| | | +--ro neighbor-router-id? yang:dotted-quad | + -> /rt:routing/control-plane-protocols/
| | +--:(sham-link) | + control-plane-protocol
| | +--ro sham-link | + [rt:name=current()/../routing-protocol-name]/
| | +--ro area-id? area-id-type | + ospf:ospf/instance/af
| | +--ro local-ip-addr? inet:ip-address | +--ro (if-link-type-selection)?
| | +--ro remote-ip-addr? inet:ip-address | | +--:(interface)
| +--ro neighbor-router-id? yang:dotted-quad | | | +--ro interface
| +--ro neighbor-ip-addr? yang:dotted-quad | | | +--ro interface? if:interface-ref
| +--ro state? nbr-state-type | | +--:(virtual-link)
+---n nbr-restart-helper-status-change | | | +--ro virtual-link
| +--ro routing-instance? string | | | +--ro transit-area-id? area-id-type
| +--ro routing-protocol-type? -> ... | | | +--ro neighbor-router-id? rt-types:router-id
| +--ro routing-protocol-name? -> ... | | +--:(sham-link)
| +--ro af? -> ... | | +--ro sham-link
| +--ro (if-link-type-selection)? | | +--ro area-id? area-id-type
| | +--:(interface) | | +--ro local-ip-addr? inet:ip-address
| | | +--ro interface | | +--ro remote-ip-addr? inet:ip-address
| | | +--ro interface? if:interface-ref | +--ro neighbor-router-id? rt-types:router-id
| | +--:(virtual-link) | +--ro neighbor-ip-addr? yang:dotted-quad
| | | +--ro virtual-link | +--ro state? nbr-state-type
| | | +--ro area-id? area-id-type +---n nbr-restart-helper-status-change
| | | +--ro neighbor-router-id? yang:dotted-quad | +--ro routing-protocol-name?
| | +--:(sham-link) | + -> /rt:routing/control-plane-protocols/
| | +--ro sham-link | + control-plane-protocol/name
| | +--ro area-id? area-id-type | +--ro af?
| | +--ro local-ip-addr? inet:ip-address | + -> /rt:routing/control-plane-protocols/
| | +--ro remote-ip-addr? inet:ip-address | + control-plane-protocol
| +--ro neighbor-router-id? yang:dotted-quad | + [rt:name=current()/../routing-protocol-name]/
| +--ro neighbor-ip-addr? yang:dotted-quad | + ospf:ospf/instance/af
| +--ro status? restart-helper-status-type | +--ro (if-link-type-selection)?
| +--ro age? uint32 | | +--:(interface)
| +--ro exit-reason? restart-exit-reason-type | | | +--ro interface
+---n rx-bad-packet | | | +--ro interface? if:interface-ref
| +--ro routing-instance? string | | +--:(virtual-link)
| +--ro routing-protocol-type? -> ... | | | +--ro virtual-link
| | | +--ro transit-area-id? area-id-type
| +--ro routing-protocol-name? -> ... | | | +--ro neighbor-router-id? rt-types:router-id
| +--ro af? -> ... | | +--:(sham-link)
| +--ro (if-link-type-selection)? | | +--ro sham-link
| | +--:(interface) | | +--ro area-id? area-id-type
| | | +--ro interface | | +--ro local-ip-addr? inet:ip-address
| | | +--ro interface? if:interface-ref | | +--ro remote-ip-addr? inet:ip-address
| | +--:(virtual-link) | +--ro neighbor-router-id? rt-types:router-id
| | | +--ro virtual-link | +--ro neighbor-ip-addr? yang:dotted-quad
| | | +--ro area-id? area-id-type | +--ro status? restart-helper-status-type
| | | +--ro neighbor-router-id? yang:dotted-quad | +--ro age? uint32
| | +--:(sham-link) | +--ro exit-reason? restart-exit-reason-type
| | +--ro sham-link +---n if-rx-bad-packet
| | +--ro area-id? area-id-type | +--ro routing-protocol-name?
| | +--ro local-ip-addr? inet:ip-address | + -> /rt:routing/control-plane-protocols/
| | +--ro remote-ip-addr? inet:ip-address | + control-plane-protocol/name
| +--ro packet-source? yang:dotted-quad | +--ro af?
| +--ro packet-type? packet-type | + -> /rt:routing/control-plane-protocols/
+---n lsdb-approaching-overflow | + control-plane-protocol
| +--ro routing-instance? string | + [rt:name=current()/../routing-protocol-name]/
| +--ro routing-protocol-type? -> ... | + ospf:ospf/instance/af
| +--ro routing-protocol-name? -> ... | +--ro (if-link-type-selection)?
| +--ro af? -> ... | | +--:(interface)
| +--ro ext-lsdb-limit? uint32 | | | +--ro interface
+---n lsdb-overflow | | | +--ro interface? if:interface-ref
| +--ro routing-instance? string | | +--:(virtual-link)
| +--ro routing-protocol-type? -> ... | | | +--ro virtual-link
| +--ro routing-protocol-name? -> ... | | | +--ro transit-area-id? area-id-type
| +--ro af? -> ... | | | +--ro neighbor-router-id? rt-types:router-id
| +--ro ext-lsdb-limit? uint32 | | +--:(sham-link)
+---n nssa-translator-status-change | | +--ro sham-link
| +--ro routing-instance? string | | +--ro area-id? area-id-type
| +--ro routing-protocol-type? -> ... | | +--ro local-ip-addr? inet:ip-address
| +--ro routing-protocol-name? -> ... | | +--ro remote-ip-addr? inet:ip-address
| +--ro af? -> ... | +--ro packet-source? yang:dotted-quad
| +--ro area-id? area-id-type | +--ro packet-type? packet-type
| +--ro status? nssa-translator-state-type +---n lsdb-approaching-overflow
+---n restart-status-change | +--ro routing-protocol-name?
+--ro routing-instance? string | + -> /rt:routing/control-plane-protocols/
+--ro routing-protocol-type? -> ... | + control-plane-protocol/name
+--ro routing-protocol-name? -> ... | +--ro af?
+--ro af? -> ... | + -> /rt:routing/control-plane-protocols/
+--ro status? restart-status-type | + control-plane-protocol
+--ro restart-interval? uint16 | + [rt:name=current()/../routing-protocol-name]/
+--ro exit-reason? restart-exit-reason-type | + ospf:ospf/instance/af
| +--ro ext-lsdb-limit? uint32
3. OSPF BFD Yang Module +---n lsdb-overflow
| +--ro routing-protocol-name?
Additionally, this document defines a module that can be used to | + -> /rt:routing/control-plane-protocols/
configure and monitor the OSPF BFD feature. | + control-plane-protocol/name
| +--ro af?
Bidirectional Forwarding Detection (BFD) [RFC5880] is a network | + -> /rt:routing/control-plane-protocols/
protocol that is used for liveness detection of arbitrary paths | + control-plane-protocol
between systems. A YANG data model is defined in [I-D.ietf-bfd-yang] | + [rt:name=current()/../routing-protocol-name]/
that supports BFD configuration and management. | + ospf:ospf/instance/af
| +--ro ext-lsdb-limit? uint32
As a client of BFD, the OSPF protocol uses the services provided by +---n nssa-translator-status-change
BFD. The OSPF BFD YANG augments the base OSPF module and is defined | +--ro routing-protocol-name?
as a separate module. Hence, an implementation that does not support | + -> /rt:routing/control-plane-protocols/
BFD can still use the OSPF base model without having to import the | + control-plane-protocol/name
BFD module [I-D.ietf-bfd-yang]. | +--ro af?
| + -> /rt:routing/control-plane-protocols/
module: ietf-ospf-bfd | + control-plane-protocol
augment /rt:routing/rt:control-plane-protocols | + [rt:name=current()/../routing-protocol-name]/
/rt:control-plane-protocol/ospf:ospf/ospf:instance | + ospf:ospf/instance/af
/ospf:areas/ospf:area/ospf:interfaces/ospf:interface: | +--ro area-id? area-id-type
+--rw bfd | +--ro status? nssa-translator-state-type
+--rw enable? boolean +---n restart-status-change
augment /rt:routing-state/rt:control-plane-protocols +--ro routing-protocol-name?
/rt:control-plane-protocol/ospf:ospf/ospf:instance + -> /rt:routing/control-plane-protocols/
/ospf:areas/ospf:area/ospf:interfaces/ospf:interface: + control-plane-protocol/name
+--ro bfd +--ro af?
+--ro enable? boolean + -> /rt:routing/control-plane-protocols/
+ control-plane-protocol
4. OSPF Yang Module + [rt:name=current()/../routing-protocol-name]/
+ ospf:ospf/instance/af
<CODE BEGINS> file "ietf-ospf@2016-10-31.yang" +--ro status? restart-status-type
module ietf-ospf { +--ro restart-interval? uint16
namespace "urn:ietf:params:xml:ns:yang:ietf-ospf"; +--ro exit-reason? restart-exit-reason-type
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 2.10. OSPF RPC Operations
<mailto:akr@cisco.com>
Editor: Derek Yeung The "ietf-ospf" module defines two RPC operations:
<mailto:derek@arrcus.com>
Author: Derek Yeung
<mailto:derek@arrcus.com>
Author: Yingzhen Qu
<mailto:yiqu@cisco.com>
Author: Jeffrey Zhang
<mailto:zzhang@juniper.net>
Author: Ing-Wher Chen
<mailto:ichen@kuatrotech.com>
Author: Dean Bogdanovic
<mailto:ivandean@gmail.com>
Author: Kiran Agrahara Sreenivasa
<mailto:kkoushik@cisco.com>";
description o clear-database: reset the content of a particular OSPF database.
"This YANG module defines the generic configuration and
operational state for the OSPF protocol common to all
vendor implementations. It is intended that the module
will be extended by vendors to define vendor-specific
OSPF configuration parameters and policies,
for example route maps or route policies.
Terms and Acronyms o clear-neighbor: restart a particular set of OSPF neighbor.
OSPF (ospf): Open Shortest Path First
IP (ip): Internet Protocol rpcs:
+---x clear-neighbor
| +---w input
| +---w routing-protocol-name
| + -> /rt:routing/control-plane-protocols/
| + control-plane-protocol/name
| +---w interface? if:interface-ref
+---x clear-database
+---w input
+---w routing-protocol-name
-> /rt:routing/control-plane-protocols/
control-plane-protocol/name
IPv4 (ipv4):Internet Protocol Version 4 3. OSPF Yang Module
IPv6 (ipv6): Internet Protocol Version 6 <CODE BEGINS> file "ietf-ospf@2017-03-12.yang"
module ietf-ospf {
namespace "urn:ietf:params:xml:ns:yang:ietf-ospf";
MTU (mtu) Maximum Transmission Unit prefix ospf;
";
revision 2016-10-31 { import ietf-inet-types {
description prefix "inet";
"* Update authors information. }
* Rename candidate-disabled to candidiate-enable
and set the default value to TRUE.
* Rename node identifiers that end with
'enabled' to 'enable'.
* Set the default value of
ospf/instance/areas/area/interfaces/interface/
fast-reroute/lfa/enable (previously named 'enabled')
to FALSE.
* Set the default value of
ospf/instance/areas/area/interfaces/interface/
fast-reroute/remote-lfa/enable (previously named 'enabled')
to FALSE.
* Rename
ospf/instance/areas/area/interfaces/interface/
static-neighbors/neighbor/address to 'identifier'
with type inet:ip-address
* Add 'dead-timer' to
ospf-state/instance/areas/area/interfaces/interface/
neighbors/neighbor.
* Remove 'mtu-ignore' and 'prefix-suppression' from
virtual-link configuration.
* Adjust range specifications from 'transmit-delay',
'dead-interval', and 'retransmit-interval' in
ospf/instance/areas/area/interfaces/interface.
* Change the type of
ospf/instance/areas/area/interface/interface/dead-interval
to uint32 to match RFC2328 Appendix A.3.2.
* Change hello-timer and wait-timer unit to seconds.
* Update hello-timer, dead-timer and wait-timer descriptions.
* Add IEEE bandwidth type and update all TE bandwidth fields to use it.
* Add Nt-bit to OSPFv2 router LSA.
* Remove L-bit from OSPFv2 router LSA.
";
reference
"RFC XXXX: A YANG Data Model for OSPF.";
}
revision 2016-07-07 { import ietf-yang-types {
description prefix "yang";
"* Add ospfv3 AF bit. }
* Add ospfv2 MT, L, O, DN bit.
* Add interface priority config.
* Change bdr-ip-address to type ip-address.
* Rename leaf interface to name.
* Rename rx-bad-packet to if-rx-bad-packet.
* Move virtual link placement to backbone area.
* Remove cost configuration from virtual link.
* Move if-feature multi-area-adj statement.
* Add type checksum16-type.
* Change LSA header checksum to use checksum16-type.
* Change routing-protocol to control-plane-protocol.
* Change import module name to ietf-key-chain.";
reference
"RFC XXXX: A YANG Data Model for OSPF.";
}
revision 2016-03-20 { import ietf-interfaces {
description prefix "if";
"* Reorganize *-config and *-operation groupings. }
* Use *-config under state tree for applied config.
* Rename config router-id to explicit-router-id.
* Rename feature router-id to explicit-router-id.
* Add OSPFv3 instance ID.
* Add OSPFv3 interface ID.
* Add ip-address for DR and BDR.
* Remove routing-instance.
* Change import module name to ietf-routing-key-chain.";
reference
"RFC XXXX: A YANG Data Model for OSPF.";
}
revision 2015-10-19 { import ietf-routing-types {
description prefix "rt-types";
"* Remove the abstract identity ospf. }
* Make area-id-type dotted-quad only.
* Use area-id-type for all area-id leafs.
* Restructure notifications.
* Move BFD support to the new ietf-ospf-bfd module.
* Update author information.
* Editorial changes.";
reference
"RFC XXXX: A YANG Data Model for OSPF.";
} import ietf-routing {
prefix "rt";
}
import ietf-key-chain {
prefix "key-chain";
}
revision 2015-09-02 { organization
description "Cisco Systems
"* Author information update. 170 West Tasman Drive
* Editorial changes"; San Jose, CA 95134-1706
reference USA";
"RFC XXXX: A YANG Data Model for OSPF.";
}
revision 2015-07-06 { contact
description "WG Web: <http://tools.ietf.org/wg/ospf/>
"* Remove support for protocol-centric config. WG List: <mailto:ospf@ietf.org>
* Enclose list in container, except for instance.
* Replace protocol-shutdown with admin-control.
* Add IP-FRR per-interface config.
* Reorganize max-path etc node.
* Add node-flag.
* Align config/operation hierarchy.
* Use relative path for reference to rib.
* Add ability to set single admin distance.
* Make unreserved bandwidth into list.
* Add F and T bit to OSPFv3 external LSA.
* Remove key statement inside LSA body.
* Add stub router support.
* Fix usage of af-area-config.
* Add statistics to operation data.
* Add local rib.
* Use dotted-quad for all router-id fields.
* Support more than one multi-area per interface.
* Use uint16 for LSA type.
* Update grouping notification-instance-hdr.
* Rework condition for opaque type and id in OSPFv2 LSA.
* Rename local-remote-ipv4-addr with remote-if-ipv4-addr.
* Add virtual-link/sham-link to operation state.
* Allow multiple link TLVs in one LSA.
* Fix bug in as-scope-lsas.
* Remove OSPFv3 restriction in link-scope-lsas.
* Editorial changes.";
reference
"RFC XXXX: A YANG Data Model for OSPF.";
}
revision 2015-03-09 { WG Chair: Acee Lindem
description <mailto:acee@cisco.com>
"Initial revision.";
reference
"RFC XXXX: A YANG Data Model for OSPF.";
} WG Chair: Abhay Roy
<mailto:akr@cisco.com>
identity ospfv2 { Editor: Derek Yeung
base "rt:routing-protocol"; <mailto:derek@arrcus.com>
description "OSPFv2"; Author: Derek Yeung
} <mailto:derek@arrcus.com>
Author: Yingzhen Qu
<mailto:yingzhen.qu@huawei.com>
Author: Jeffrey Zhang
<mailto:zzhang@juniper.net>
Author: Ing-Wher Chen
<mailto:ing-wher_chen@jabil.com>
Author: Dean Bogdanovic
<mailto:ivandean@gmail.com>
Author: Kiran Agrahara Sreenivasa
<mailto:kkoushik@cisco.com>";
identity ospfv3 { description
base "rt:routing-protocol"; "This YANG module defines the generic configuration and
description "OSPFv3"; operational state for the OSPF protocol common to all
} vendor implementations. It is intended that the module
will be extended by vendors to define vendor-specific
OSPF configuration parameters and policies,
for example route maps or route policies.
identity operation-mode { Terms and Acronyms
description
"OSPF operation mode.";
}
identity ships-in-the-night { OSPF (ospf): Open Shortest Path First
base operation-mode;
description
"Ships-in-the-night operation mode in which
each OSPF instance carries only one address family";
}
identity area-type { IP (ip): Internet Protocol
description "Base identity for OSPF area type."; IPv4 (ipv4):Internet Protocol Version 4
}
identity normal { IPv6 (ipv6): Internet Protocol Version 6
base area-type;
description "OSPF normal area.";
}
identity stub { MTU (mtu) Maximum Transmission Unit
base area-type; ";
description "OSPF stub area.";
}
identity nssa { revision 2017-03-12 {
base area-type; description
description "OSPF NSSA area."; "* Update authors information.
} * Rename admin distance to preference.
* Rename network type to interface type.
* Add ietf-spf-delay as a feature.
* Add node-tag as a feature and update LSA
definition accordingly.
* Remove LDP IGP autoconfig.
* Add BFD as a feature instead of a separate module.
* Change TE router ID to support IPv4 and IPv6 router ID.
* Replace key-chain:crypto-algorithm-types with
key-chain:crypto-algorithm.
* Remove type ieee-bandwidth.
* Import ietf-routing-types and make use of
router-id, address-family and bandwidth-ieee-float32
type definitions.
* Simplify notification header.
* Fix compilation issue in multiple must statements.
";
reference
"RFC XXXX: A YANG Data Model for OSPF.";
}
typedef uint24 { revision 2016-10-31 {
type uint32 { description
range "0 .. 16777215"; "* Update authors information.
} * Rename candidate-disabled to candidiate-enable
description and set the default value to TRUE.
"24-bit unsigned integer."; * Rename node identifiers that end with
} 'enabled' to 'enable'.
* Set the default value of
ospf/instance/areas/area/interfaces/interface/
fast-reroute/lfa/enable (previously named 'enabled')
to FALSE.
* Set the default value of
ospf/instance/areas/area/interfaces/interface/
fast-reroute/remote-lfa/enable (previously named 'enabled')
to FALSE.
* Rename
ospf/instance/areas/area/interfaces/interface/
static-neighbors/neighbor/address to 'identifier'
with type inet:ip-address
* Add 'dead-timer' to
ospf-state/instance/areas/area/interfaces/interface/
neighbors/neighbor.
* Remove 'mtu-ignore' and 'prefix-suppression' from
virtual-link configuration.
* Adjust range specifications from 'transmit-delay',
'dead-interval', and 'retransmit-interval' in
ospf/instance/areas/area/interfaces/interface.
* Change the type of
ospf/instance/areas/area/interface/interface/dead-interval
to uint32 to match RFC2328 Appendix A.3.2.
* Change hello-timer and wait-timer unit to seconds.
* Update hello-timer, dead-timer and wait-timer descriptions.
* Add IEEE bandwidth type and update all TE bandwidth fields
to use it.
* Add Nt-bit to OSPFv2 router LSA.
* Remove L-bit from OSPFv2 router LSA.
";
reference
"RFC XXXX: A YANG Data Model for OSPF.";
}
typedef area-id-type { revision 2016-07-07 {
type yang:dotted-quad; description
description "* Add ospfv3 AF bit.
"Area ID type."; * Add ospfv2 MT, L, O, DN bit.
} * Add interface priority config.
* Change bdr-ip-address to type ip-address.
* Rename leaf interface to name.
* Rename rx-bad-packet to if-rx-bad-packet.
* Move virtual link placement to backbone area.
* Remove cost configuration from virtual link.
* Move if-feature multi-area-adj statement.
* Add type checksum16-type.
* Change LSA header checksum to use checksum16-type.
* Change routing-protocol to control-plane-protocol.
* Change import module name to ietf-key-chain.";
reference
"RFC XXXX: A YANG Data Model for OSPF.";
}
typedef route-type { revision 2016-03-20 {
type enumeration { description
enum intra-area { "* Reorganize *-config and *-operation groupings.
description "OSPF intra-area route."; * Use *-config under state tree for applied config.
} * Rename config router-id to explicit-router-id.
enum inter-area {
description "OSPF inter-area route.";
}
enum external-1 {
description "OSPF type 1 external route.";
}
enum external-2 {
description "OSPF type 2 external route.";
}
enum nssa-1 {
description "OSPF type 1 NSSA route.";
}
enum nssa-2 {
description "OSPF type 2 NSSA route.";
}
}
description "OSPF route type.";
}
typedef if-state-type { * Rename feature router-id to explicit-router-id.
type enumeration { * Add OSPFv3 instance ID.
enum Down { * Add OSPFv3 interface ID.
value "1"; * Add ip-address for DR and BDR.
description * Remove routing-instance.
"Interface down state."; * Change import module name to ietf-routing-key-chain.";
} reference
enum Loopback { "RFC XXXX: A YANG Data Model for OSPF.";
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 { revision 2015-10-19 {
type enumeration { description
enum Down { "* Remove the abstract identity ospf.
value "1"; * Make area-id-type dotted-quad only.
description * Use area-id-type for all area-id leafs.
"Neighbor down state."; * Restructure notifications.
} * Move BFD support to the new ietf-ospf-bfd module.
enum Attempt { * Update author information.
value "2"; * Editorial changes.";
description reference
"Neighbor attempt state."; "RFC XXXX: A YANG Data Model for OSPF.";
} }
enum Init {
value "3";
description
"Neighbor init state.";
}
enum 2-Way {
value "4";
description
"Neighbor 2-Way state.";
} revision 2015-09-02 {
enum ExStart { description
value "5"; "* Author information update.
description * Editorial changes";
"Neighbor exchange start state."; reference
} "RFC XXXX: A YANG Data Model for OSPF.";
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 { revision 2015-07-06 {
type enumeration { description
enum Not-Helping { "* Remove support for protocol-centric config.
value "1"; * Enclose list in container, except for instance.
description * Replace protocol-shutdown with admin-control.
"Restart helper status not helping."; * Add IP-FRR per-interface config.
} * Reorganize max-path etc node.
enum Helping { * Add node-flag.
value "2"; * Align config/operation hierarchy.
description * Use relative path for reference to rib.
"Restart helper status helping."; * Add ability to set single admin distance.
} * Make unreserved bandwidth into list.
} * Add F and T bit to OSPFv3 external LSA.
description * Remove key statement inside LSA body.
"Restart helper status type."; * Add stub router support.
} * Fix usage of af-area-config.
* Add statistics to operation data.
typedef restart-exit-reason-type { * Add local rib.
type enumeration { * Use dotted-quad for all router-id fields.
enum None { * Support more than one multi-area per interface.
value "1"; * Use uint16 for LSA type.
description * Update grouping notification-instance-hdr.
"Not attempted."; * Rework condition for opaque type and id in OSPFv2 LSA.
} * Rename local-remote-ipv4-addr with remote-if-ipv4-addr.
enum InProgress { * Add virtual-link/sham-link to operation state.
value "2"; * Allow multiple link TLVs in one LSA.
description * Fix bug in as-scope-lsas.
"Restart in progress."; * Remove OSPFv3 restriction in link-scope-lsas.
} * Editorial changes.";
enum Completed { reference
value "3"; "RFC XXXX: A YANG Data Model for OSPF.";
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 { revision 2015-03-09 {
type enumeration { description
enum Enabled { "Initial revision.";
value "1"; reference
description "RFC XXXX: A YANG Data Model for OSPF.";
"NSSA translator enabled state."; }
}
enum Elected {
description
"NSSA translator elected state.";
}
enum Disabled {
value "3";
description
"NSSA translator disabled state.";
}
}
description
"OSPF NSSA translator state type.";
}
typedef restart-status-type { identity ospfv2 {
type enumeration { base "rt:routing-protocol";
enum Not-Restarting { description "OSPFv2";
value "1"; }
description
"Router is not restarting.";
}
enum Planned-Restart {
description
"Router is going through planned restart.";
}
enum Unplanned-Restart {
value "3";
description
"Router is going through unplanned restart.";
} identity ospfv3 {
} base "rt:routing-protocol";
description description "OSPFv3";
"OSPF graceful restart status type."; }
}
typedef checksum16-type { identity operation-mode {
type string { description
pattern '(0x)?[0-9a-fA-F]{4}'; "OSPF operation mode.";
} }
description
"16-bit checksum in hex-string format 0xXXXX.";
}
typedef ieee-bandwidth { identity ships-in-the-night {
type string { base operation-mode;
pattern description
'0[xX](0((\.0?)?[pP](\+)?0?|(\.0?))|' "Ships-in-the-night operation mode in which
+ '1(\.([\da-fA-F]{0,5}[02468aAcCeE]?)?)?[pP](\+)?(12[0-7]|' each OSPF instance carries only one address family";
+ '1[01]\d|0?\d?\d)?)|0[xX][\da-fA-F]{1,8}'; }
}
description
"Bandwidth in IEEE 754 floating point 32-bit binary format:
(-1)**(S) * 2**(Exponent-127) * (1 + Fraction),
where Exponent uses 8 bits, and Fraction uses 23 bits.
The units are bytes per second.
The encoding format is the external hexadecimal-significand
character sequences specified in IEEE 754 and C99,
restricted to be normalized, non-negative, and non-fraction:
0x1.hhhhhhp{+}d or 0X1.HHHHHHP{+}D
where 'h' and 'H' are hexadecimal digits, 'd' and 'D' are
integers in the range of [0..127].
When six hexadecimal digits are used for 'hhhhhh' or 'HHHHHH',
the least significant digit must be an even number.
'x' and 'X' indicate hexadecimal; 'p' and 'P' indicate power
of two.
Some examples are: 0x0p0, 0x1p10, and 0x1.abcde2p+20";
reference
"IEEE Std 754-2008: IEEE Standard for Floating-Point
Arithmetic.";
}
feature multi-topology { identity area-type {
description description "Base identity for OSPF area type.";
"Support Multiple-Topolgy Routing (MTR)."; }
} identity normal {
base area-type;
description "OSPF normal area.";
}
feature multi-area-adj { identity stub {
description base area-type;
"OSPF multi-area adjacency support as in RFC 5185."; description "OSPF stub area.";
} }
feature explicit-router-id {
description
"Set Router-ID per instance explicitly.";
}
feature demand-circuit { identity nssa {
description base area-type;
"OSPF demand circuit support as in RFC 1793."; description "OSPF NSSA area.";
} }
feature mtu-ignore { typedef uint24 {
description type uint32 {
"Disable OSPF Database Description packet MTU range "0 .. 16777215";
mismatch checking."; }
} description
"24-bit unsigned integer.";
}
feature lls { typedef area-id-type {
description type yang:dotted-quad;
"OSPF link-local signaling (LLS) as in RFC 5613."; description
} "Area ID type.";
}
feature prefix-suppression { typedef route-type {
description type enumeration {
"OSPF prefix suppression support as in RFC 6860."; enum intra-area {
} description "OSPF intra-area route.";
}
enum inter-area {
description "OSPF inter-area route.";
}
enum external-1 {
description "OSPF type 1 external route.";
}
enum external-2 {
description "OSPF type 2 external route.";
}
enum nssa-1 {
description "OSPF type 1 NSSA route.";
}
enum nssa-2 {
description "OSPF type 2 NSSA route.";
feature ttl-security { }
description }
"OSPF TTL security check."; description "OSPF route type.";
} }
feature nsr { typedef if-state-type {
description type enumeration {
"Non-Stop-Routing (NSR)."; 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.";
}
feature graceful-restart { typedef nbr-state-type {
description type enumeration {
"Graceful OSPF Restart as defined in RFC 3623 and enum Down {
RFC 5187."; 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.";
}
feature admin-control { typedef restart-helper-status-type {
description type enumeration {
"Administrative control of the protocol state."; 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.";
}
feature auto-cost { typedef nssa-translator-state-type {
description type enumeration {
"Calculate OSPF interface cost according to enum Enabled {
reference bandwidth."; value "1";
} description
"NSSA translator enabled state.";
}
enum Elected {
description
"NSSA translator elected state.";
}
enum Disabled {
value "3";
description
"NSSA translator disabled state.";
}
feature max-ecmp { }
description description
"Setting maximum number of ECMP paths."; "OSPF NSSA translator state type.";
} }
feature max-lsa { typedef restart-status-type {
description type enumeration {
"Setting maximum number of LSAs the OSPF instance enum Not-Restarting {
will accept."; value "1";
} description
"Router is not restarting.";
}
enum Planned-Restart {
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 te-rid { typedef checksum16-type {
description type string {
"TE Router-ID."; pattern '(0x)?[0-9a-fA-F]{4}';
} }
description
"16-bit checksum in hex-string format 0xXXXX.";
}
feature ldp-igp-sync { feature multi-topology {
description description
"LDP IGP synchronization."; "Support Multiple-Topolgy Routing (MTR).";
} }
feature ldp-igp-autoconfig { feature multi-area-adj {
description description
"LDP IGP auto-config."; "OSPF multi-area adjacency support as in RFC 5185.";
} }
feature explicit-router-id {
description
"Set Router-ID per instance explicitly.";
}
feature demand-circuit {
description
"OSPF demand circuit support as in RFC 1793.";
}
feature ospfv3-authentication-ipsec { feature mtu-ignore {
description description
"Use IPsec for OSPFv3 authentication."; "Disable OSPF Database Description packet MTU
} mismatch checking.";
}
feature fast-reroute { feature lls {
description description
"Support of IP Fast Reroute (IP-FRR)."; "OSPF link-local signaling (LLS) as in RFC 5613.";
} }
feature node-flag { feature prefix-suppression {
description description
"Support of node flag."; "OSPF prefix suppression support as in RFC 6860.";
} }
feature lfa {
description
"Support of Loop Free Alternates (LFAs).";
}
feature remote-lfa { feature ttl-security {
description description
"Support of Remote Loop Free Alternates (R-LFA)."; "OSPF TTL security check.";
} }
feature stub-router { feature nsr {
description description
"Support of RFC 6987 OSPF Stub Router Advertisement."; "Non-Stop-Routing (NSR).";
} }
feature instance-inheritance { feature graceful-restart {
description description
"Support instance inheritance"; "Graceful OSPF Restart as defined in RFC 3623 and
} RFC 5187.";
}
feature area-inheritance { feature admin-control {
description description
"Support area inheritance"; "Administrative control of the protocol state.";
} }
feature interface-inheritance { feature auto-cost {
description description
"Support interface inheritance"; "Calculate OSPF interface cost according to
} reference bandwidth.";
}
feature max-ecmp {
description
"Setting maximum number of ECMP paths.";
}
feature pe-ce-protocol { feature max-lsa {
description description
"Support PE-CE protocol"; "Setting maximum number of LSAs the OSPF instance
} will accept.";
}
grouping tlv { feature te-rid {
description description
"TLV"; "TE Router-ID.";
leaf type { }
type uint16;
description "TLV type.";
}
leaf length {
type uint16;
description "TLV length.";
}
leaf value {
type yang:hex-string;
description "TLV value.";
}
}
grouping unknown-tlvs { feature ldp-igp-sync {
description description
"Unknown TLVs grouping - Used for unknown TLVs or "LDP IGP synchronization.";
unknown sub-TLVs."; }
container unknown-tlvs {
description "All unknown TLVs.";
list unknown-tlv {
description "Unknown TLV.";
uses tlv;
}
}
}
grouping ospfv2-router-link { feature ospfv3-authentication-ipsec {
description "OSPFv2 router link."; description
leaf link-id { "Use IPsec for OSPFv3 authentication.";
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.";
}
}
grouping ospfv2-lsa-body { feature fast-reroute {
description "OSPFv2 LSA body.";
container router {
when "../../header/type = 1" {
description
"Only applies to Router LSAs.";
}
description description
"Router LSA."; "Support of IP Fast Reroute (IP-FRR).";
}
leaf flags { feature node-flag {
type bits {
bit V {
description
"When set, the router is an endpoint of one or
more virtual links.";
}
bit E {
description
"When set, the router is an AS Boundary Router
(ASBR).";
}
bit B {
description
"When set, the router is an Area Border
Router (ABR).";
}
bit Nt {
description
"When set, the router is an NSSA border router
that is unconditionally translating NSSA LSAs
into AS-external LSAs.";
}
}
description "Flags.";
}
leaf num-of-links {
type uint16;
description "Number of links.";
}
container links {
description "All router Links.";
list link {
description "Router LSA link.";
uses ospfv2-router-link;
container topologies {
description "All topologies for the link.";
list topology {
description
"Topology specific information.";
leaf mt-id {
type uint8;
description
"The MT-ID for the topology enabled on
the link.";
}
leaf metric {
type uint16;
description "Metric for the topology.";
}
}
}
}
}
}
container network {
when "../../header/type = 2" {
description
"Only applies to Network LSAs.";
}
description
"Network LSA.";
leaf network-mask {
type inet:ipv4-address;
description
"The IP address mask for the network.";
}
container attached-routers {
description "All attached routers.";
leaf-list attached-router {
type yang:dotted-quad;
description
"List of the routers attached to the network.";
}
}
}
container summary {
when "../../header/type = 3 or "
+ "../../header/type = 4" {
description
"Only applies to Summary LSAs.";
}
description description
"Summary LSA."; "Support of node flag.";
leaf network-mask { }
type inet:ipv4-address;
description feature node-tag {
"The IP address mask for the network"; description
} "Support of node tag.";
container topologies { }
description "All topologies for the summary LSA.";
list topology { feature lfa {
description
"Topology specific information.";
leaf mt-id {
type uint8;
description
"The MT-ID for the topology enabled for
the summary.";
}
leaf metric {
type uint24;
description "Metric for the topology.";
}
}
}
}
container external {
when "../../header/type = 5 or "
+ "../../header/type = 7" {
description
"Only applies to AS-external LSAs and NSSA LSAs.";
}
description description
"External LSA."; "Support of Loop Free Alternates (LFAs).";
leaf network-mask { }
type inet:ipv4-address;
description
"The IP address mask for the network";
}
container topologies {
description "All topologies for the external.";
list topology {
description
"Topology specific information.";
leaf mt-id {
type uint8;
description
"The MT-ID for the topology enabled for the
external or NSSA prefix.";
}
leaf flags {
type bits {
bit E {
description
"When set, the metric specified is a Type 2
external metric.";
}
}
description "Flags.";
}
leaf metric {
type uint24;
description "Metric for the topology.";
} feature remote-lfa {
leaf forwarding-address {
type inet:ipv4-address;
description
"Forwarding address.";
}
leaf external-route-tag {
type uint32;
description
"Route tag for the topology.";
}
}
}
}
container opaque {
when "../../header/type = 9 or "
+ "../../header/type = 10 or "
+ "../../header/type = 11" {
description
"Only applies to Opaque LSAs.";
}
description description
"Opaque LSA."; "Support of Remote Loop Free Alternates (R-LFA).";
}
uses unknown-tlvs; feature stub-router {
description
"Support of RFC 6987 OSPF Stub Router Advertisement.";
}
container router-address-tlv { feature instance-inheritance {
description description
"Router address TLV."; "Support instance inheritance";
leaf router-address { }
type inet:ipv4-address;
description
"Router address.";
}
}
container link-tlvs { feature area-inheritance {
description "All link TLVs in the LSA."; description
container link-tlv { "Support area inheritance";
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.";
}
container local-if-ipv4-addrs {
description "All local interface IPv4 addresses.";
leaf-list local-if-ipv4-addr {
type inet:ipv4-address;
description
"List of local interface IPv4 addresses.";
}
}
container remote-if-ipv4-addrs {
description "All remote interface IPv4 addresses.";
leaf-list remote-if-ipv4-addr {
type inet:ipv4-address;
description
"List of remote interface IPv4 addresses.";
}
}
leaf te-metric {
type uint32;
description "TE metric.";
}
leaf max-bandwidth {
type ieee-bandwidth;
description "Maximum bandwidth.";
}
leaf max-reservable-bandwidth {
type ieee-bandwidth;
description "Maximum reservable bandwidth.";
}
container unreserved-bandwidths {
description "All unreserved bandwidths.";
list unreserved-bandwidth {
leaf priority {
type uint8 {
range "0 .. 7";
}
description "Priority from 0 to 7.";
}
leaf unreserved-bandwidth {
type ieee-bandwidth;
description "Unreserved bandwidth.";
}
description
"List of unreserved bandwidths for different
priorities.";
}
}
leaf admin-group {
type uint32;
description
"Administrative group/Resource Class/Color.";
}
uses unknown-tlvs;
}
}
container extended-prefix-tlvs { feature interface-inheritance {
description "All extended prefix TLVs in the LSA."; description
list extended-prefix-tlv { "Support interface inheritance";
description "Extended prefix TLV."; }
leaf route-type {
type enumeration {
enum unspecified {
value "0";
description "Unspecified.";
}
enum intra-area {
value "1";
description "OSPF intra-area route.";
}
enum inter-area {
value "3";
description "OSPF inter-area route.";
}
enum external {
value "5";
description "OSPF External route.";
}
enum nssa {
value "7";
description "OSPF NSSA external route.";
}
}
description "Route type.";
}
leaf flags {
type bits {
bit A {
description
"Attach flag.";
}
bit N {
description
"Node flag.";
}
}
description "Flags.";
}
leaf prefix {
type inet:ip-prefix;
description "Address prefix.";
}
uses unknown-tlvs;
}
}
container extended-link-tlvs { feature pe-ce-protocol {
description "All extended link TLVs in the LSA."; description
list extended-link-tlv { "Support PE-CE protocol";
description "Extended link TLV."; }
uses ospfv2-router-link;
uses unknown-tlvs;
}
}
}
}
grouping ospfv3-lsa-options { feature ietf-spf-delay {
description "OSPFv3 LSA options"; description
leaf options { "Support of IETF SPF delay algorithm.";
type bits { }
bit AF {
description
"When set, the router supprts OSPFv3 AFs as in RFC5838. ";
}
bit DC {
description
"When set, the router supports demand circuits.";
}
bit R {
description
"When set, the originator is an active router.";
}
bit N {
description
"If set, the router is attached to an NSSA";
}
bit E {
description
"This bit describes the way AS-external LSAs
are flooded";
}
bit V6 {
description
"If clear, the router/link should be excluded
from IPv6 routing calculaton";
}
}
mandatory true;
description "OSPFv3 LSA options.";
}
}
grouping ospfv3-lsa-prefix { feature bfd {
description description
"OSPFv3 LSA prefix."; "Support of BFD.";
}
leaf prefix { grouping tlv {
type inet:ip-prefix; description
description "TLV";
"Prefix."; leaf type {
} type uint16;
leaf prefix-options { description "TLV type.";
type bits { }
bit NU { leaf length {
description type uint16;
"When set, the prefix should be excluded description "TLV length.";
from IPv6 unicast calculations.";
}
bit LA {
description
"When set, the prefix is actually an IPv6 interface
address of the Advertising Router.";
}
bit P {
description
"When set, the NSSA area prefix should be
translated to an AS External LSA and readvertised
by the translating NSSA Border Router.";
}
bit DN {
description
"When set, the inter-area-prefix LSA or
AS-external LSA prefix has been advertised as an
L3VPN prefix.";
}
}
mandatory true;
description "Prefix options.";
}
}
grouping ospfv3-lsa-external { }
description leaf value {
"AS-External and NSSA LSA."; type yang:hex-string;
leaf metric { description "TLV value.";
type uint24; }
description "Metric"; }
}
leaf flags { grouping unknown-tlvs {
type bits { description
bit E { "Unknown TLVs grouping - Used for unknown TLVs or
description unknown sub-TLVs.";
"When set, the metric specified is a Type 2 container unknown-tlvs {
external metric."; description "All unknown TLVs.";
} list unknown-tlv {
bit F { description "Unknown TLV.";
description uses tlv;
"When set, a Forwarding Address is included }
in the LSA."; }
} }
bit T {
description
"When set, an External Route Tag is included
in the LSA.";
}
}
description "Flags.";
}
leaf referenced-ls-type { grouping node-tag-tlv {
type uint16; description "OSPF Node Admin Tag TLV grouping.";
description "Referenced Link State type."; list node-tag {
} leaf tag {
type uint32;
description
"Node tag value.";
}
description
"List of tags.";
}
}
uses ospfv3-lsa-prefix; grouping ospfv2-router-link {
description "OSPFv2 router 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 forwarding-address { }
type inet:ipv6-address; leaf type {
description type uint8;
"Forwarding address."; description "Link type.";
} }
}
leaf external-route-tag { grouping ospfv2-lsa-body {
type uint32; description "OSPFv2 LSA body.";
description container router {
"Route tag."; when "../../header/type = 1" {
} description
leaf referenced-link-state-id { "Only applies to Router LSAs.";
type uint32; }
description description
"Referenced Link State ID."; "Router LSA.";
} leaf flags {
} type bits {
bit V {
description
"When set, the router is an endpoint of one or
more virtual links.";
}
bit E {
description
"When set, the router is an AS Boundary Router
(ASBR).";
}
bit B {
description
"When set, the router is an Area Border
Router (ABR).";
}
bit Nt {
description
"When set, the router is an NSSA border router
that is unconditionally translating NSSA LSAs
into AS-external LSAs.";
}
}
description "Flags.";
}
leaf num-of-links {
type uint16;
description "Number of links.";
}
container links {
description "All router Links.";
list link {
description "Router LSA link.";
uses ospfv2-router-link;
container topologies {
description "All topologies for the link.";
list topology {
description
"Topology specific information.";
leaf mt-id {
type uint8;
description
"The MT-ID for the topology enabled on
the link.";
}
leaf metric {
type uint16;
description "Metric for the topology.";
}
}
}
}
}
}
container network {
when "../../header/type = 2" {
description
"Only applies to Network LSAs.";
}
description
"Network LSA.";
leaf network-mask {
type inet:ipv4-address;
description
"The IP address mask for the network.";
}
container attached-routers {
description "All attached routers.";
leaf-list attached-router {
type yang:dotted-quad;
description
"List of the routers attached to the network.";
}
}
}
container summary {
when "../../header/type = 3 or "
+ "../../header/type = 4" {
description
"Only applies to Summary LSAs.";
}
description
"Summary LSA.";
leaf network-mask {
type inet:ipv4-address;
description
"The IP address mask for the network";
}
container topologies {
description "All topologies for the summary LSA.";
list topology {
description
"Topology specific information.";
leaf mt-id {
type uint8;
description
"The MT-ID for the topology enabled for
the summary.";
}
leaf metric {
type uint24;
description "Metric for the topology.";
}
}
}
}
container external {
when "../../header/type = 5 or "
+ "../../header/type = 7" {
description
"Only applies to AS-external LSAs and NSSA LSAs.";
}
description
"External LSA.";
leaf network-mask {
type inet:ipv4-address;
description
"The IP address mask for the network";
}
container topologies {
description "All topologies for the external.";
list topology {
description
"Topology specific information.";
leaf mt-id {
type uint8;
description
"The MT-ID for the topology enabled for the
external or NSSA prefix.";
}
leaf flags {
type bits {
bit E {
description
"When set, the metric specified is a Type 2
external metric.";
}
}
description "Flags.";
}
leaf metric {
type 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 for the topology.";
}
}
}
}
container opaque {
when "../../header/type = 9 or "
+ "../../header/type = 10 or "
+ "../../header/type = 11" {
description
"Only applies to Opaque LSAs.";
}
description
"Opaque LSA.";
grouping ospfv3-lsa-body { uses unknown-tlvs;
description "OSPFv3 LSA body.";
container router {
when "../../header/type = 8193" { // 0x2001
description
"Only applies to Router LSAs.";
}
description "Router LSA.";
leaf flags {
type bits {
bit V {
description
"When set, the router is an endpoint of one or
more virtual links.";
}
bit E {
description
"When set, the router is an AS Boundary Router
(ASBR).";
}
bit B {
description
"When set, the router is an Area Border
Router (ABR).";
}
bit Nt {
description
"When set, the router is an NSSA border router
that is unconditionally translating NSSA LSAs
into AS-external LSAs.";
}
}
mandatory true;
description "Router LSA flags.";
}
uses ospfv3-lsa-options; container node-tag-tlvs {
container links { description
description "All router link."; "All node tag tlvs.";
list link { list node-tag-tlv {
description "Router LSA link."; description
leaf interface-id { "Node tag tlv.";
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.";
}
}
}
}
container network {
when "../../header/type = 8194" { // 0x2002
description
"Only applies to Network LSA.";
}
description "Network LSA.";
uses ospfv3-lsa-options; uses node-tag-tlv;
}
}
container attached-routers { container router-address-tlv {
description "All attached routers."; description
leaf-list attached-router { "Router address TLV.";
type yang:dotted-quad; leaf router-address {
description type inet:ipv4-address;
"List of the routers attached to the network."; description
} "Router address.";
} }
} }
container inter-area-prefix {
when "../../header/type = 8195" { // 0x2003
description
"Only applies to Inter-Area-Prefix LSAs.";
}
leaf metric {
type uint24;
description "Metric";
}
uses ospfv3-lsa-prefix;
description "Inter-Area-Prefix LSA.";
}
container inter-area-router {
when "../../header/type = 8196" { // 0x2004
description
"Only applies to Inter-Area-Router LSAs.";
}
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.";
}
description "Inter-Area-Router LSA.";
}
container as-external {
when "../../header/type = 16389" { // 0x4005
description
"Only applies to AS-external LSAs.";
}
uses ospfv3-lsa-external; container link-tlvs {
description "All link TLVs in the LSA.";
list 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.";
}
container local-if-ipv4-addrs {
description "All local interface IPv4 addresses.";
leaf-list local-if-ipv4-addr {
type inet:ipv4-address;
description
"List of local interface IPv4 addresses.";
}
}
container remote-if-ipv4-addrs {
description "All remote interface IPv4 addresses.";
leaf-list remote-if-ipv4-addr {
type inet:ipv4-address;
description
"List of remote interface IPv4 addresses.";
}
}
leaf te-metric {
type uint32;
description "TE metric.";
}
leaf max-bandwidth {
type rt-types:bandwidth-ieee-float32;
description "Maximum bandwidth.";
}
leaf max-reservable-bandwidth {
type rt-types:bandwidth-ieee-float32;
description "Maximum reservable bandwidth.";
}
container unreserved-bandwidths {
description "All unreserved bandwidths.";
list unreserved-bandwidth {
leaf priority {
type uint8 {
range "0 .. 7";
}
description "Priority from 0 to 7.";
}
leaf unreserved-bandwidth {
type rt-types:bandwidth-ieee-float32;
description "Unreserved bandwidth.";
}
description
"List of unreserved bandwidths for different
priorities.";
}
}
leaf admin-group {
type uint32;
description
"Administrative group/Resource Class/Color.";
}
uses unknown-tlvs;
}
}
description "AS-External LSA."; container extended-prefix-tlvs {
} description "All extended prefix TLVs in the LSA.";
container nssa { list extended-prefix-tlv {
when "../../header/type = 8199" { // 0x2007 description "Extended prefix TLV.";
description leaf route-type {
"Only applies to NSSA LSAs."; type enumeration {
} enum unspecified {
uses ospfv3-lsa-external; value "0";
description "Unspecified.";
}
enum intra-area {
value "1";
description "OSPF intra-area route.";
}
enum inter-area {
value "3";
description "OSPF inter-area route.";
}
enum external {
value "5";
description "OSPF External route.";
}
enum nssa {
value "7";
description "OSPF NSSA external route.";
}
}
description "Route type.";
}
leaf flags {
type bits {
bit A {
description
"Attach flag.";
}
bit N {
description
"Node flag.";
}
}
description "Flags.";
}
leaf prefix {
type inet:ip-prefix;
description "Address prefix.";
}
uses unknown-tlvs;
}
}
description "NSSA LSA."; container extended-link-tlvs {
} description "All extended link TLVs in the LSA.";
container link { list extended-link-tlv {
when "../../header/type = 8" { // 0x0008 description "Extended link TLV.";
description uses ospfv2-router-link;
"Only applies to Link LSAs."; uses unknown-tlvs;
} }
leaf rtr-priority { }
type uint8;
description "Router Priority for the interface.";
}
uses ospfv3-lsa-options;
leaf link-local-interface-address { }
type inet:ipv6-address; }
description
"The originating router's link-local
interface address for the link.";
}
leaf num-of-prefixes { grouping ospfv3-lsa-options {
type uint32; description "OSPFv3 LSA options";
description "Number of prefixes."; leaf options {
} type bits {
bit AF {
description
"When set, the router supprts OSPFv3 AFs as in RFC5838.";
}
bit DC {
description
"When set, the router supports demand circuits.";
}
bit R {
description
"When set, the originator is an active router.";
}
bit N {
description
"If set, the router is attached to an NSSA";
}
bit E {
description
"This bit describes the way AS-external LSAs
are flooded";
}
bit V6 {
description
"If clear, the router/link should be excluded
from IPv6 routing calculaton";
}
}
mandatory true;
description "OSPFv3 LSA options.";
}
}
container prefixes { grouping ospfv3-lsa-prefix {
description "All prefixes for the link."; description
list prefix { "OSPFv3 LSA prefix.";
description
"List of prefixes associated with the link.";
uses ospfv3-lsa-prefix;
}
}
description "Link LSA.";
}
container intra-area-prefix {
when "../../header/type = 8201" { // 0x2009
description
"Only applies to Intra-Area-Prefix LSA.";
}
description "Intra-Area-Prefix LSA.";
leaf referenced-ls-type { leaf prefix {
type uint16; type inet:ip-prefix;
description "Referenced Link State type."; description
} "Prefix.";
leaf referenced-link-state-id { }
type uint32; leaf prefix-options {
description type bits {
"Referenced Link State ID."; bit NU {
} description
leaf referenced-adv-router { "When set, the prefix should be excluded
type inet:ipv4-address; from IPv6 unicast calculations.";
description }
"Referenced Advertising Router."; bit LA {
} description
"When set, the prefix is actually an IPv6 interface
address of the Advertising Router.";
}
bit P {
description
"When set, the NSSA area prefix should be
translated to an AS External LSA and readvertised
by the translating NSSA Border Router.";
}
bit DN {
description
"When set, the inter-area-prefix LSA or
AS-external LSA prefix has been advertised as an
L3VPN prefix.";
}
}
mandatory true;
description "Prefix options.";
}
}
leaf num-of-prefixes { grouping ospfv3-lsa-external {
type uint16; description
description "Number of prefixes."; "AS-External and NSSA LSA.";
} leaf metric {
container prefixes { type uint24;
description "All prefixes in this LSA."; description "Metric";
list prefix { }
description "List of prefixes in this LSA.";
uses ospfv3-lsa-prefix;
leaf metric {
type uint24;
description "Prefix Metric.";
}
}
}
}
}
grouping lsa-header { leaf flags {
description type bits {
"Common LSA for OSPFv2 and OSPFv3"; bit E {
leaf age { description
type uint16; "When set, the metric specified is a Type 2
mandatory true; external metric.";
description "LSA age."; }
} bit F {
leaf type { description
type uint16; "When set, a Forwarding Address is included
mandatory true; in the LSA.";
description "LSA type."; }
} bit T {
leaf adv-router { description
type yang:dotted-quad; "When set, an External Route Tag is included
mandatory true; in the LSA.";
description "LSA advertising router."; }
} }
leaf seq-num { description "Flags.";
type uint32; }
mandatory true;
description "LSA sequence number.";
}
leaf checksum {
type checksum16-type;
mandatory true;
description "LSA checksum.";
}
leaf length {
type uint16;
mandatory true;
description "LSA length.";
}
}
grouping ospfv2-lsa { leaf referenced-ls-type {
description type uint16;
"OSPFv2 LSA."; description "Referenced Link State type.";
container header { }
must "(type = 9 or type = 10 or type = 11) and "
+ "opaque-id and opaque-type "
+ "or (type != 9 and type != 10 and type != 11) "
+ "and not(opaque-id) and "
+ "not(opaque-type)" {
description
"Opaque type and ID only apply to Opaque LSAs.";
}
description
"Decoded OSPFv2 LSA header data.";
leaf option {
type bits {
bit MT {
description
"When set, the router supports multi-topology as in RFC 4915.";
}
bit DC {
description
"When set, the router supports demand circuits.";
}
bit P {
description
"Only used in type-7 LSA. When set, an NSSA
border router should translate the type-7 LSA
to a type-5 LSA.";
}
bit MC {
description
"When set, the router supports MOSPF.";
}
bit E {
description
"This bit describes the way AS-external LSAs
are flooded.";
}
bit O {
description
"When set, the router is opaque-capable as in RFC 5250.";
}
bit DN {
description
"When a type 3, 5 or 7 LSA is sent from a PE to a CE, the DN
bit must be set. See RFC 4576.";
}
}
mandatory true;
description "LSA options.";
}
leaf lsa-id {
type inet:ipv4-address;
mandatory true;
description "LSA ID.";
}
leaf opaque-type { uses ospfv3-lsa-prefix;
type uint8;
description "Opaque type.";
}
leaf opaque-id { leaf forwarding-address {
type uint24; type inet:ipv6-address;
description "Opaque ID."; description
} "Forwarding address.";
}
uses lsa-header; leaf external-route-tag {
} type uint32;
container body { description
description "Route tag.";
"Decoded OSPFv2 LSA body data."; }
uses ospfv2-lsa-body; leaf referenced-link-state-id {
} type uint32;
} description
"Referenced Link State ID.";
}
}
grouping ospfv3-lsa { grouping ospfv3-lsa-body {
description description "OSPFv3 LSA body.";
"Decoded OSPFv3 LSA."; container router {
container header { when "../../header/type = 8193" { // 0x2001
description description
"Decoded OSPFv3 LSA header data."; "Only applies to Router LSAs.";
leaf lsa-id { }
type uint32; description "Router LSA.";
mandatory true; leaf flags {
description "LSA ID."; type bits {
bit V {
description
"When set, the router is an endpoint of one or
more virtual links.";
}
bit E {
description
"When set, the router is an AS Boundary Router
(ASBR).";
}
bit B {
description
"When set, the router is an Area Border
Router (ABR).";
}
bit Nt {
description
"When set, the router is an NSSA border router
that is unconditionally translating NSSA LSAs
into AS-external LSAs.";
}
}
mandatory true;
description "Router LSA flags.";
}
} uses ospfv3-lsa-options;
uses lsa-header;
}
container body {
description
"Decoded OSPF LSA body data.";
uses ospfv3-lsa-body;
}
}
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 hexadecimal as received or originated.";
}
}
grouping lsa { container links {
description description "All router link.";
"OSPF LSA."; list link {
uses lsa-common; description "Router LSA link.";
choice version { leaf interface-id {
description type uint32;
"OSPFv2 or OSPFv3 LSA body."; description "Interface ID.";
container ospfv2 { }
description "OSPFv2 LSA"; leaf neighbor-interface-id {
uses ospfv2-lsa; type uint32;
} description "Neighbor Interface ID.";
container ospfv3 { }
description "OSPFv3 LSA"; leaf neighbor-router-id {
uses ospfv3-lsa; type rt-types:router-id;
} description "Neighbor Router ID.";
} }
} leaf type {
type uint8;
description "Link type.";
}
leaf metric {
type uint16;
description "Metric.";
}
}
}
}
container network {
when "../../header/type = 8194" { // 0x2002
description
"Only applies to Network LSA.";
}
description "Network LSA.";
grouping lsa-key { uses ospfv3-lsa-options;
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 instance-stat { container attached-routers {
description "Per-instance statistics"; description "All attached routers.";
leaf originate-new-lsa-count { leaf-list attached-router {
type yang:counter32; type yang:dotted-quad;
description "The number of new LSAs originated."; description
} "List of the routers attached to the network.";
leaf rx-new-lsas-count { }
type yang:counter32; }
description "The number of LSAs received."; }
} container inter-area-prefix {
leaf as-scope-lsa-count { when "../../header/type = 8195" { // 0x2003
type yang:gauge32; description
description "The number of AS Scope LSAs."; "Only applies to Inter-Area-Prefix LSAs.";
} }
leaf as-scope-lsa-chksum-sum { leaf metric {
type uint32; type uint24;
description description "Metric";
"The sum of the LSA checksums for AS Scope LSAs."; }
} uses ospfv3-lsa-prefix;
container database { description "Inter-Area-Prefix LSA.";
description "Container for per AS-scope LSA statistics."; }
list as-scope-lsa-type { container inter-area-router {
description "List of AS-scope LSA statistics"; when "../../header/type = 8196" { // 0x2004
leaf lsa-type { description
type uint16; "Only applies to Inter-Area-Router LSAs.";
description "AS-scope LSA type."; }
} uses ospfv3-lsa-options;
leaf lsa-count { leaf metric {
type yang:gauge32; type uint24;
description "The number of LSAs of the LSA type."; description "Metric.";
} }
leaf lsa-cksum-sum { leaf destination-router-id {
type int32; type rt-types:router-id;
description description
"The sum of the LSA checksums of the LSA type."; "The Router ID of the router being described by the LSA.";
}
description "Inter-Area-Router LSA.";
}
container as-external {
when "../../header/type = 16389" { // 0x4005
description
"Only applies to AS-external LSAs.";
}
} uses ospfv3-lsa-external;
}
}
}
grouping area-stat { description "AS-External LSA.";
description "Per-area statistics."; }
leaf spf-runs-count { container nssa {
type yang:counter32; when "../../header/type = 8199" { // 0x2007
description description
"The number of times the intra-area SPF has run."; "Only applies to NSSA LSAs.";
} }
leaf abr-count { uses ospfv3-lsa-external;
type yang:gauge32;
description
"The total number of Area Border Routers (ABRs)
reachable within this area.";
}
leaf asbr-count {
type yang:gauge32;
description
"The total number of AS Border Routers (ASBRs).";
}
leaf ar-nssa-translator-event-count {
type yang:counter32;
description
"The number of NSSA translator-state changes.";
}
leaf area-scope-lsa-count {
type yang:gauge32;
description
"The number of area scope LSAs in the area.";
}
leaf area-scope-lsa-cksum-sum {
type int32;
description "The sum of the area scope LSAs checksums.";
}
container database {
description "Container for area scope LSA type statistics.";
list area-scope-lsa-type {
description "List of area scope LSA statistics";
leaf lsa-type {
type uint16;
description "Area scope LSA type.";
}
leaf lsa-count {
type yang:gauge32;
description "The number of LSAs of the LSA type.";
} description "NSSA LSA.";
leaf lsa-cksum-sum { }
type int32; container link {
description when "../../header/type = 8" { // 0x0008
"The sum of the LSA checksums of the LSA type."; description
} "Only applies to Link LSAs.";
} }
} leaf rtr-priority {
} type uint8;
description "Router Priority for the interface.";
}
uses ospfv3-lsa-options;
grouping interface-stat { leaf link-local-interface-address {
description "Per-interface statistics"; type inet:ipv6-address;
leaf if-event-count { description
type yang:counter32; "The originating router's link-local
description interface address for the link.";
"The number of times this interface has changed its }
state or an error has occurred.";
}
leaf link-scope-lsa-count {
type yang:gauge32;
description "The number of link scope LSAs.";
}
leaf link-scope-lsa-cksum-sum {
type uint32;
description "The sum of link scope LSA checksums.";
}
container database {
description "Container for link scope LSA type statistics.";
list link-scope-lsa-type {
description "List of link scope LSA statistics";
leaf lsa-type {
type uint16;
description "Link scope LSA type.";
}
leaf lsa-count {
type yang:gauge32;
description "The number of LSAs of the LSA type.";
}
leaf lsa-cksum-sum {
type int32;
description
"The sum of the LSA checksums of the LSA type.";
}
}
}
}
grouping neighbor-stat { leaf num-of-prefixes {
description "Per-neighbor statistics."; type uint32;
leaf nbr-event-count { description "Number of prefixes.";
type yang:counter32; }
description
"The number of times this neighbor has changed
state or an error has occurred.";
}
leaf nbr-retrans-qlen {
type yang:gauge32;
description
"The current length of the retransmission queue.";
}
}
grouping instance-fast-reroute-config { container prefixes {
description description "All prefixes for the link.";
"This group defines global configuration of IP-FRR."; list prefix {
container fast-reroute { description
if-feature fast-reroute; "List of prefixes associated with the link.";
description uses ospfv3-lsa-prefix;
"This container may be augmented with global }
parameters for IP-FRR."; }
container lfa { description "Link LSA.";
if-feature lfa; }
description container intra-area-prefix {
"This container may be augmented with when "../../header/type = 8201" { // 0x2009
global parameters for LFA. Container creation description
has no effect on LFA activation."; "Only applies to Intra-Area-Prefix LSA.";
} }
} description "Intra-Area-Prefix LSA.";
}
grouping interface-fast-reroute-config { leaf referenced-ls-type {
description type uint16;
"This group defines interface configuration of IP-FRR."; description "Referenced Link State type.";
container fast-reroute { }
if-feature fast-reroute; leaf referenced-link-state-id {
container lfa { type uint32;
if-feature lfa; description
leaf candidate-enable { "Referenced Link State ID.";
type boolean; }
default true; leaf referenced-adv-router {
description type inet:ipv4-address;
"Enable the interface to be used as backup."; description
} "Referenced Advertising Router.";
leaf enable { }
type boolean;
default false;
description
"Activates LFA - Per-prefix LFA computation
is assumed.";
}
container remote-lfa {
if-feature remote-lfa;
leaf enable {
type boolean;
default false;
description
"Activates Remote LFA (R-LFA).";
}
description
"Remote LFA configuration.";
}
description
"LFA configuration.";
}
description
"IP Fast-reroute configuration.";
}
}
grouping interface-physical-link-config { leaf num-of-prefixes {
description type uint16;
"Interface cost configuration that only applies to description "Number of prefixes.";
physical interfaces and sham links."; }
leaf cost { container prefixes {
type uint16 { description "All prefixes in this LSA.";
range "1..65535"; list prefix {
} description "List of prefixes in this LSA.";
description uses ospfv3-lsa-prefix;
"Interface cost."; leaf metric {
} type uint24;
leaf mtu-ignore { description "Prefix Metric.";
if-feature mtu-ignore; }
type boolean; }
description }
"Enable/Disable bypassing the MTU mismatch check in }
Database Description packets."; container router-information {
} when "../../header/type = 32780 or " // 0x800C
leaf prefix-suppression { + "../../header/type = 40972 or " // 0xA00C
if-feature prefix-suppression; + "../../header/type = 49164 or " // 0xC00C
type boolean; + "../../header/type = 57356" { // 0xE00C
description description
"Suppress advertisement of the prefixes associated "Only applies to Router Information LSAs (RFC7770).";
with the interface."; }
} container node-tag-tlvs {
description
"All node tag tlvs.";
list node-tag-tlv {
description
"Node tag tlv.";
uses node-tag-tlv;
}
}
description "Router Information LSA.";
}
}
} 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 uint32;
mandatory true;
description "LSA sequence number.";
}
leaf checksum {
type checksum16-type;
mandatory true;
description "LSA checksum.";
}
leaf length {
type uint16;
mandatory true;
description "LSA length.";
}
}
grouping interface-common-config { grouping ospfv2-lsa {
description description
"Common configuration for all types of interfaces, "OSPFv2 LSA.";
including virtual links and sham links."; container header {
must "(type = 9 or type = 10 or type = 11) and "
+ "opaque-id and opaque-type "
+ "or (type != 9 and type != 10 and type != 11) "
+ "and not(opaque-id) and "
+ "not(opaque-type)" {
description
"Opaque type and ID only apply to Opaque LSAs.";
}
description
"Decoded OSPFv2 LSA header data.";
leaf option {
type bits {
bit MT {
description
"When set, the router supports multi-topology as
in RFC 4915.";
}
bit DC {
description
"When set, the router supports demand circuits.";
}
bit P {
description
"Only used in type-7 LSA. When set, an NSSA
border router should translate the type-7 LSA
to a type-5 LSA.";
}
bit MC {
description
"When set, the router supports MOSPF.";
}
bit E {
description
"This bit describes the way AS-external LSAs
are flooded.";
}
bit O {
description
"When set, the router is opaque-capable as in
RFC 5250.";
}
bit DN {
description
"When a type 3, 5 or 7 LSA is sent from a PE to a CE,
the DN bit must be set. See RFC 4576.";
}
}
mandatory true;
description "LSA options.";
}
leaf lsa-id {
type inet:ipv4-address;
mandatory true;
description "LSA ID.";
}
leaf hello-interval { leaf opaque-type {
type uint16 { type uint8;
range "1..65535"; description "Opaque type.";
} }
units seconds;
description
"Interval between hello packets in seconds.";
}
leaf dead-interval { leaf opaque-id {
type uint32 { type uint24;
range "1..2147483647"; description "Opaque ID.";
} }
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 down in seconds.";
}
leaf retransmit-interval { uses lsa-header;
type uint16 { }
range "1..3600"; container body {
} description
units seconds; "Decoded OSPFv2 LSA body data.";
description uses ospfv2-lsa-body;
"Interval between retransmitting unacknowledged Link }
State Advertisements (LSAs) in seconds."; }
}
leaf transmit-delay { grouping ospfv3-lsa {
type uint16 { description
range "1..3600"; "Decoded OSPFv3 LSA.";
} container header {
units seconds; description
description "Decoded OSPFv3 LSA header data.";
"Estimated time needed to transmit Link State Update leaf lsa-id {
packets on the interface in seconds."; type uint32;
} mandatory true;
description "LSA ID.";
}
uses lsa-header;
}
container body {
description
"Decoded OSPF LSA body data.";
uses ospfv3-lsa-body;
}
}
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 hexadecimal as received or originated.";
}
}
leaf lls { grouping lsa {
if-feature lls; description
type boolean; "OSPF LSA.";
description uses lsa-common;
"Enable/Disable link-local signaling (LLS) support."; choice version {
} description
"OSPFv2 or OSPFv3 LSA body.";
container ospfv2 {
description "OSPFv2 LSA";
uses ospfv2-lsa;
}
container ospfv3 {
description "OSPFv3 LSA";
uses ospfv3-lsa;
}
}
}
container ttl-security { grouping lsa-key {
if-feature ttl-security; description
description "TTL security check."; "OSPF LSA key.";
leaf enable { leaf lsa-id {
type boolean; type union {
description type inet:ipv4-address;
"Enable/Disable TTL security check."; type uint32;
} }
leaf hops { description
type uint8 { "LSA ID.";
range "1..254"; }
} leaf adv-router {
description type inet:ipv4-address;
"Maximum number of hops that an OSPF packet may description
have traversed before reception."; "Advertising router.";
} }
} }
leaf enable {
if-feature admin-control;
type boolean;
default true;
description
"Enable/disable protocol on the interface.";
}
container authentication { grouping instance-stat {
description "Authentication configuration."; description "Per-instance statistics";
choice auth-type-selection { leaf originate-new-lsa-count {
description type yang:counter32;
"Options for expressing authentication setting."; description "The number of new LSAs originated.";
case auth-ipsec { }
when "../../../../../../../rt:type = 'ospf:ospfv3'" { leaf rx-new-lsas-count {
description "Applied to OSPFv3 only."; type yang:counter32;
} description "The number of LSAs received.";
if-feature ospfv3-authentication-ipsec; }
leaf sa { leaf as-scope-lsa-count {
type string; type yang:gauge32;
description description "The number of AS Scope LSAs.";
"Security Association name."; }
} leaf as-scope-lsa-chksum-sum {
} type uint32;
case auth-trailer-key-chain { description
leaf key-chain { "The sum of the LSA checksums for AS Scope LSAs.";
type key-chain:key-chain-ref; }
container database {
description "Container for per AS-scope LSA statistics.";
list as-scope-lsa-type {
description "List of AS-scope LSA statistics";
leaf lsa-type {
type uint16;
description "AS-scope LSA type.";
}
leaf lsa-count {
type yang:gauge32;
description "The number of LSAs of the LSA type.";
}
leaf lsa-cksum-sum {
type int32;
description description
"key-chain name."; "The sum of the LSA checksums of the LSA type.";
} }
}
case auth-trailer-key {
leaf key {
type string;
description
"Key string in ASCII format.";
}
container crypto-algorithm {
uses key-chain:crypto-algorithm-types;
description
"Cryptographic algorithm associated with key.";
}
}
}
}
} // interface-common-config
grouping interface-config { }
description "Configuration for real interfaces."; }
}
leaf network-type { grouping area-stat {
type enumeration { description "Per-area statistics.";
enum "broadcast" { leaf spf-runs-count {
description type yang:counter32;
"Specify OSPF broadcast multi-access network."; description
} "The number of times the intra-area SPF has run.";
enum "non-broadcast" { }
description leaf abr-count {
"Specify OSPF Non-Broadcast Multi-Access type yang:gauge32;
(NBMA) network."; description
} "The total number of Area Border Routers (ABRs)
enum "point-to-multipoint" { reachable within this area.";
description }
"Specify OSPF point-to-multipoint network."; leaf asbr-count {
} type yang:gauge32;
enum "point-to-point" { description
description "The total number of AS Border Routers (ASBRs).";
"Specify OSPF point-to-point network."; }
leaf ar-nssa-translator-event-count {
type yang:counter32;
description
"The number of NSSA translator-state changes.";
}
leaf area-scope-lsa-count {
type yang:gauge32;
description
"The number of area scope LSAs in the area.";
}
leaf area-scope-lsa-cksum-sum {
type int32;
description "The sum of the area scope LSAs checksums.";
}
container database {
description "Container for area scope LSA type statistics.";
list area-scope-lsa-type {
description "List of area scope LSA statistics";
leaf lsa-type {
type uint16;
description "Area scope LSA type.";
}
leaf lsa-count {
type yang:gauge32;
description "The number of LSAs of the LSA type.";
}
leaf lsa-cksum-sum {
type int32;
description
"The sum of the LSA checksums of the LSA type.";
}
}
}
}
} grouping interface-stat {
} description "Per-interface statistics";
description leaf if-event-count {
"Network type."; type yang:counter32;
} description
"The number of times this interface has changed its
state or an error has occurred.";
}
leaf link-scope-lsa-count {
type yang:gauge32;
description "The number of link scope LSAs.";
}
leaf link-scope-lsa-cksum-sum {
type uint32;
description "The sum of link scope LSA checksums.";
}
container database {
description "Container for link scope LSA type statistics.";
list link-scope-lsa-type {
description "List of link scope LSA statistics";
leaf lsa-type {
type uint16;
description "Link scope LSA type.";
}
leaf lsa-count {
type yang:gauge32;
description "The number of LSAs of the LSA type.";
}
leaf lsa-cksum-sum {
type int32;
description
"The sum of the LSA checksums of the LSA type.";
}
}
}
}
leaf passive { grouping neighbor-stat {
type boolean; description "Per-neighbor statistics.";
description leaf nbr-event-count {
"Enable/Disable passive interface - a passive interface's type yang:counter32;
prefix will be advertised but no neighbor adjacencies description
will be formed on the interface."; "The number of times this neighbor has changed
} state or an error has occurred.";
}
leaf nbr-retrans-qlen {
type yang:gauge32;
description
"The current length of the retransmission queue.";
}
}
leaf demand-circuit { grouping instance-fast-reroute-config {
if-feature demand-circuit; description
type boolean; "This group defines global configuration of IP-FRR.";
description container fast-reroute {
"Enable/Disable demand circuit."; if-feature fast-reroute;
} description
"This container may be augmented with global
parameters for IP-FRR.";
container lfa {
if-feature lfa;
description
"This container may be augmented with
global parameters for LFA. Container creation
has no effect on LFA activation.";
}
}
}
leaf priority { grouping interface-fast-reroute-config {
type uint8; description
description "This group defines interface configuration of IP-FRR.";
"Configure OSPF router priority."; container fast-reroute {
} if-feature fast-reroute;
container lfa {
if-feature lfa;
leaf candidate-enable {
type boolean;
default true;
description
"Enable the interface to be used as backup.";
}
leaf enable {
type boolean;
default false;
description
"Activates LFA - Per-prefix LFA computation
is assumed.";
}
container remote-lfa {
if-feature remote-lfa;
leaf enable {
type boolean;
default false;
description
"Activates Remote LFA (R-LFA).";
}
description
"Remote LFA configuration.";
}
description
"LFA configuration.";
}
description
"IP Fast-reroute configuration.";
}
}
container multi-areas { grouping interface-physical-link-config {
if-feature multi-area-adj; description
description "Container for multi-area config."; "Interface cost configuration that only applies to
list multi-area { physical interfaces and sham links.";
key multi-area-id; leaf cost {
description type uint16 {
"Configure OSPF multi-area adjacency."; range "1..65535";
leaf multi-area-id { }
type area-id-type; description
description "Interface cost.";
"Multi-area adjacency area ID."; }
} leaf mtu-ignore {
leaf cost { if-feature mtu-ignore;
type uint16; type boolean;
description description
"Interface cost for multi-area adjacency."; "Enable/Disable bypassing the MTU mismatch check in
} Database Description packets.";
} }
} leaf prefix-suppression {
if-feature prefix-suppression;
type boolean;
description
"Suppress advertisement of the prefixes associated
with the interface.";
}
}
grouping interface-common-config {
description
"Common configuration for all types of interfaces,
including virtual links and sham links.";
container static-neighbors { leaf hello-interval {
description "Statically configured neighbors."; type uint16 {
range "1..65535";
}
units seconds;
description
"Interval between hello packets in seconds.";
}
list neighbor { leaf dead-interval {
key "identifier"; type uint32 {
description range "1..2147483647";
"Specify a static OSPF neighbor."; }
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 down in seconds.";
}
leaf identifier { leaf retransmit-interval {
type inet:ip-address; type uint16 {
description "Neighbor IPv4 address or router ID."; range "1..3600";
} }
units seconds;
description
"Interval between retransmitting unacknowledged Link
State Advertisements (LSAs) in seconds.";
}
leaf cost { leaf transmit-delay {
type uint16 { type uint16 {
range "1..65535"; range "1..3600";
} }
description "Neighbor cost."; units seconds;
} description
leaf poll-interval { "Estimated time needed to transmit Link State Update
type uint16 { packets on the interface in seconds.";
range "1..65535";
}
units seconds;
description "Neighbor poll interval in seconds.";
}
leaf priority {
type uint8 {
range "1..255";
}
description "Neighbor priority for DR election.";
}
}
}
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;
uses interface-physical-link-config;
} // grouping interface-config
grouping neighbor-operation { leaf lls {
description if-feature lls;
"OSPF neighbor operation data."; type boolean;
description
"Enable/Disable link-local signaling (LLS) support.";
}
leaf address { container ttl-security {
type inet:ip-address; if-feature ttl-security;
description description "TTL security check.";
"Neighbor address."; leaf enable {
} type boolean;
leaf dr-router-id { description
type yang:dotted-quad; "Enable/Disable TTL security check.";
description "Neighbor's Designated Router (DR) router ID."; }
} leaf hops {
type uint8 {
range "1..254";
}
description
"Maximum number of hops that an OSPF packet may
have traversed before reception.";
}
}
leaf enable {
if-feature admin-control;
type boolean;
default true;
description
"Enable/disable protocol on the interface.";
}
leaf dr-ip-addr { container authentication {
type inet:ip-address; description "Authentication configuration.";
description "Neighbor's Designated Router (DR) IP address."; choice auth-type-selection {
} description
"Options for expressing authentication setting.";
case auth-ipsec {
when "../../../../../../../rt:type = 'ospf:ospfv3'" {
description "Applied to OSPFv3 only.";
}
if-feature ospfv3-authentication-ipsec;
leaf sa {
type string;
description
"Security Association name.";
leaf bdr-router-id { }
type yang:dotted-quad; }
description case auth-trailer-key-chain {
"Neighbor's Backup Designated Router (BDR) router ID."; 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.";
}
leaf crypto-algorithm {
type identityref {
base key-chain:crypto-algorithm;
}
description
"Cryptographic algorithm associated with key.";
}
}
}
}
} // interface-common-config
leaf bdr-ip-addr { grouping interface-config {
type inet:ip-address; description "Configuration for real interfaces.";
description
"Neighbor's Backup Designated Router (BDR) IP Address.";
}
leaf state {
type nbr-state-type;
description
"OSPF neighbor state.";
}
leaf dead-timer {
type uint32;
units "seconds";
description "This timer tracks the remaining time before
the neighbor is declared dead.";
}
container statistics {
description "Per neighbor statistics";
uses neighbor-stat;
}
}
grouping interface-common-operation { leaf interface-type {
description type enumeration {
"OSPF interface common operation state."; enum "broadcast" {
description
"Specify OSPF broadcast multi-access network.";
}
enum "non-broadcast" {
description
"Specify OSPF Non-Broadcast Multi-Access
(NBMA) network.";
}
enum "point-to-multipoint" {
description
"Specify OSPF point-to-multipoint network.";
}
enum "point-to-point" {
description
"Specify OSPF point-to-point network.";
reference "RFC2328 Section 9"; }
}
description
"Interface type.";
}
leaf state { leaf passive {
type if-state-type; type boolean;
description "Interface state."; description
} "Enable/Disable passive interface - a passive interface's
prefix will be advertised but no neighbor adjacencies
will be formed on the interface.";
}
leaf hello-timer { leaf demand-circuit {
type uint32; if-feature demand-circuit;
units "seconds"; type boolean;
description "This timer tracks the remaining time before description
the next hello packet is sent."; "Enable/Disable demand circuit.";
} }
leaf wait-timer { leaf priority {
type uint32; type uint8;
units "seconds"; description
description "This timer tracks the remaining time before "Configure OSPF router priority.";
the interface exits the Waiting state."; }
}
leaf dr-router-id { container multi-areas {
type yang:dotted-quad; if-feature multi-area-adj;
description "Designated Router (DR) router ID."; description "Container for multi-area config.";
} list multi-area {
key multi-area-id;
description
"Configure OSPF multi-area adjacency.";
leaf multi-area-id {
type area-id-type;
description
"Multi-area adjacency area ID.";
}
leaf cost {
type uint16;
description
"Interface cost for multi-area adjacency.";
}
}
}
leaf dr-ip-addr { container static-neighbors {
type inet:ip-address; description "Statically configured neighbors.";
description "Designated Router (DR) IP address.";
}
leaf bdr-router-id { list neighbor {
type yang:dotted-quad; key "identifier";
description "Backup Designated Router (BDR) router ID."; description
} "Specify a static OSPF neighbor.";
leaf bdr-ip-addr { leaf identifier {
type inet:ip-address; type inet:ip-address;
description "Backup Designated Router (BDR) IP Address."; description "Neighbor IPv4 address or router ID.";
} }
container statistics { leaf cost {
description "Per interface statistics"; type uint16 {
uses interface-stat; range "1..65535";
} }
description "Neighbor cost.";
}
leaf poll-interval {
type uint16 {
range "1..65535";
}
units seconds;
description "Neighbor poll interval in seconds.";
}
leaf priority {
type uint8 {
range "1..255";
}
description "Neighbor priority for DR election.";
}
}
}
container neighbors { leaf node-flag {
description "All neighbors for the interface."; if-feature node-flag;
list neighbor { type boolean;
key "neighbor-router-id"; default false;
description description
"List of OSPF neighbors."; "Set prefix as a node representative prefix.";
leaf neighbor-router-id { }
type yang:dotted-quad;
description
"Neighbor router ID.";
}
uses neighbor-operation;
} // list of OSPF neighbors
}
} // interface-common-operation
grouping interface-operation { container bfd {
description if-feature bfd;
"OSPF interface operation state."; description "BFD configuration.";
reference "RFC2328 Section 9"; leaf enable {
type boolean;
default false;
description
"True if BFD is enabled for the OSPF interface.";
}
}
uses interface-common-operation; uses interface-fast-reroute-config;
uses interface-common-config;
uses interface-physical-link-config;
} // grouping interface-config
container database { grouping neighbor-operation {
description "Link scope LSA database."; description
list link-scope-lsa-type { "OSPF neighbor operation data.";
key "lsa-type";
description
"List OSPF link scope LSA databases.";
leaf lsa-type {
type uint16;
description "OSPF link scope LSA type.";
}
container link-scope-lsas {
description
"All link scope LSAs of this LSA type.";
list link-scope-lsa {
key "lsa-id adv-router";
description "List of OSPF link scope LSAs";
uses lsa-key;
uses lsa {
refine "version/ospfv2/ospfv2" {
must "../../../../../../../../../../../"
+ "rt:type = 'ospf:ospfv2'" {
description "OSPFv2 LSA.";
}
}
refine "version/ospfv3/ospfv3" {
must "../../../../../../../../../../../"
+ "rt:type = 'ospf:ospfv3'" {
description "OSPFv3 LSA."; leaf address {
} type inet:ip-address;
} description
} "Neighbor address.";
} }
} leaf dr-router-id {
} // list link-scope-lsas type rt-types:router-id;
} description "Neighbor's Designated Router (DR) router ID.";
} }
grouping virtual-link-config { leaf dr-ip-addr {
description type inet:ip-address;
"OSPF virtual link configuration state."; description "Neighbor's Designated Router (DR) IP address.";
}
uses interface-common-config; leaf bdr-router-id {
} type rt-types:router-id;
description
"Neighbor's Backup Designated Router (BDR) router ID.";
}
grouping virtual-link-operation { leaf bdr-ip-addr {
description type inet:ip-address;
"OSPF virtual link operation state."; description
"Neighbor's Backup Designated Router (BDR) IP Address.";
}
leaf state {
type nbr-state-type;
description
"OSPF neighbor state.";
}
leaf dead-timer {
type uint32;
units "seconds";
description "This timer tracks the remaining time before
the neighbor is declared dead.";
}
container statistics {
description "Per neighbor statistics";
uses neighbor-stat;
}
}
leaf cost { grouping interface-common-operation {
type uint16 { description
range "1..65535"; "OSPF interface common operation state.";
} reference "RFC2328 Section 9";
description
"Virtual link interface cost.";
}
uses interface-common-operation;
}
grouping sham-link-config { leaf state {
description type if-state-type;
"OSPF sham link configuration state."; description "Interface state.";
}
uses interface-common-config; leaf hello-timer {
uses interface-physical-link-config; type uint32;
} units "seconds";
description "This timer tracks the remaining time before
the next hello packet is sent.";
}
grouping sham-link-operation { leaf wait-timer {
description type uint32;
"OSPF sham link operation state."; units "seconds";
description "This timer tracks the remaining time before
the interface exits the Waiting state.";
}
uses interface-common-operation; leaf dr-router-id {
} type rt-types:router-id;
description "Designated Router (DR) router ID.";
}
grouping af-area-config { leaf dr-ip-addr {
description type inet:ip-address;
"OSPF address-family specific area config state."; description "Designated Router (DR) IP address.";
}
container ranges { leaf bdr-router-id {
description "Container for summary ranges"; type rt-types:router-id;
description "Backup Designated Router (BDR) router ID.";
}
leaf bdr-ip-addr {
type inet:ip-address;
description "Backup Designated Router (BDR) IP Address.";
}
list range { container statistics {
key "prefix"; description "Per interface statistics";
description uses interface-stat;
"Summarize routes matching address/mask }
(Area Border Routers (ABRs) only)";
leaf prefix {
type inet:ip-prefix;
description
"IPv4 or IPv6 prefix";
}
leaf advertise {
type boolean;
description
"Advertise or hide.";
}
leaf cost {
type uint24 {
range "0..16777214";
}
description
"Advertised cost of summary route.";
}
}
}
}
grouping area-common-config { container neighbors {
description description "All neighbors for the interface.";
"OSPF area common configuration state."; list neighbor {
key "neighbor-router-id";
description
"List of OSPF neighbors.";
leaf neighbor-router-id {
type rt-types:router-id;
description
"Neighbor router ID.";
}
uses neighbor-operation;
} // list of OSPF neighbors
}
} // interface-common-operation
leaf summary { grouping interface-operation {
when "../area-type = 'ospf:stub' or " description
+ "../area-type = 'ospf:nssa'" { "OSPF interface operation state.";
description reference "RFC2328 Section 9";
"Summary advertisement into the stub/NSSA area.";
}
type boolean;
description
"Enable/Disable summary advertisement into the stub or
NSSA area.";
}
leaf default-cost {
when "../area-type = 'ospf:stub' or "
+ "../area-type = 'ospf:nssa'" {
description
"Cost for LSA default route advertised into the
stub or NSSA area.";
}
type uint32 {
range "1..16777215";
}
description
"Set the summary default route cost for a
stub or NSSA area.";
}
}
grouping area-config { uses interface-common-operation;
description
"OSPF area configuration state.";
container all-interfaces-inherit { container database {
if-feature interface-inheritance; description "Link scope LSA database.";
description list link-scope-lsa-type {
"Inheritance for all interfaces"; key "lsa-type";
container interface { description
description "List OSPF link scope LSA databases.";
"Interface config to be inherited by all leaf lsa-type {
interfaces in the area."; type uint16;
} description "OSPF link scope LSA type.";
} }
container link-scope-lsas {
description
"All link scope LSAs of this LSA type.";
list link-scope-lsa {
key "lsa-id adv-router";
description "List of OSPF link scope LSAs";
uses lsa-key;
uses lsa {
refine "version/ospfv2/ospfv2" {
must "../../../../../../../../../../../"
+ "rt:type = 'ospf:ospfv2'" {
description "OSPFv2 LSA.";
}
}
refine "version/ospfv3/ospfv3" {
must "../../../../../../../../../../../"
+ "rt:type = 'ospf:ospfv3'" {
description "OSPFv3 LSA.";
}
}
}
}
}
} // list link-scope-lsas
}
}
leaf area-type { grouping virtual-link-config {
type identityref { description
base area-type; "OSPF virtual link configuration state.";
}
default normal;
description
"Area type.";
}
uses area-common-config; uses interface-common-config;
}
uses af-area-config { grouping virtual-link-operation {
when "../../../operation-mode = " description
+ "'ospf:ships-in-the-night'" { "OSPF virtual link operation state.";
description
"Ships in the night configuration.";
}
}
}
grouping area-operation {
description
"OSPF area operation state.";
container statistics { leaf cost {
description "Per area statistics"; type uint16 {
uses area-stat; range "1..65535";
} }
description
"Virtual link interface cost.";
}
uses interface-common-operation;
}
container database { grouping sham-link-config {
description "Area scope LSA database."; description
list area-scope-lsa-type { "OSPF sham link configuration state.";
key "lsa-type";
description "List OSPF area scope LSA databases.";
leaf lsa-type {
type uint16;
description "OSPF area scope LSA type.";
}
container area-scope-lsas {
description
"All area scope LSAs of an area scope
LSA type.";
list area-scope-lsa {
key "lsa-id adv-router";
description "List of OSPF area scope LSAs";
uses lsa-key;
uses lsa {
refine "version/ospfv2/ospfv2" {
must "../../../../../../../../../"
+ "rt:type = 'ospf:ospfv2'" {
description "OSPFv2 LSA.";
}
}
refine "version/ospfv3/ospfv3" {
must "../../../../../../../../../"
+ "rt:type = 'ospf:ospfv3'" {
description "OSPFv3 LSA.";
}
}
}
}
}
} // list area-scope-lsas
}
}
grouping local-rib { uses interface-common-config;
description "Local-rib grouping."; uses interface-physical-link-config;
container local-rib { }
description "Local-rib.";
list route {
key "prefix";
description "Routes";
leaf prefix {
type inet:ip-prefix;
description "Destination prefix.";
}
container next-hops {
description "All next hops for the route.";
list next-hop {
key "next-hop";
description "List of next hop for the route";
leaf outgoing-interface {
type if:interface-ref;
description
"Name of the outgoing interface.";
}
leaf next-hop {
type inet:ip-address;
description "Nexthop address.";
}
}
}
leaf metric {
type uint32;
description "Metric for this route.";
}
leaf route-type {
type route-type;
description "Route type for this route.";
}
leaf route-tag {
type uint32;
description "Route tag for this route.";
}
}
}
}
grouping instance-config { grouping sham-link-operation {
description description
"OSPF instance config state."; "OSPF sham link operation state.";
container all-areas-inherit { uses interface-common-operation;
if-feature area-inheritance; }
description
"Inheritance for all areas.";
container area {
description
"Area config to be inherited by all areas.";
}
container interface {
description
"Interface config to be inherited by all interfaces
in all areas.";
}
}
leaf explicit-router-id { grouping af-area-config {
if-feature explicit-router-id; description
type yang:dotted-quad; "OSPF address-family specific area config state.";
description
"Defined in RFC 2328. A 32-bit number
that uniquely identifies the router.";
}
container admin-distance { container ranges {
description "Admin distance config state."; description "Container for summary ranges";
choice scope {
description
"Options for expressing admin distance
as single or multiple values.";
case single-value {
leaf all {
type uint8;
description
"Admin distance for intra-area, inter-area and
external routes.";
}
}
case multi-values {
choice granularity {
description
"Options for expressing admin distance
for intra-area and inter-area routes.";
case detail {
leaf intra-area {
type uint8;
description
"Admin distance for intra-area routes.";
}
leaf inter-area {
type uint8;
description
"Admin distance for inter-area routes.";
}
}
case coarse {
leaf internal {
type uint8;
description
"Admin distance for both intra-area and
inter-area routes.";
}
}
}
leaf external {
type uint8;
description
"Admin distance for external routes.";
}
}
}
}
container nsr { list range {
if-feature nsr; key "prefix";
description description
"Non-Stop Routing (NSR) config state."; "Summarize routes matching address/mask
leaf enable { (Area Border Routers (ABRs) only)";
type boolean; leaf prefix {
description type inet:ip-prefix;
"Enable/Disable NSR."; description
} "IPv4 or IPv6 prefix";
} }
leaf advertise {
type boolean;
description
"Advertise or hide.";
}
leaf cost {
type uint24 {
range "0..16777214";
}
description
"Advertised cost of summary route.";
}
}
}
}
container graceful-restart { grouping area-common-config {
if-feature graceful-restart; description
description "OSPF area common configuration state.";
"Graceful restart config state.";
leaf enable {
type boolean;
description
"Enable/Disable graceful restart as defined in RFC 3623
for OSPFv2 and RFC 5187 for OSPFv3.";
}
leaf helper-enable {
type boolean;
description
"Enable graceful restart helper support for restarting
routers (RFC 3623 Section 3).";
}
leaf restart-interval {
type uint16 {
range "1..1800"; // Range is defined in RFC 3623.
}
units seconds;
default "120"; // Default is defined in RFC 3623.
description
"Interval in seconds to attempt graceful restart prior
to failing (RFC 3623 Section B.1)";
}
leaf helper-strict-lsa-checking {
type boolean;
description
"Terminate graceful restart when an LSA topology change
is detected (RFC 3623 Section B.2).";
}
}
leaf enable { leaf summary {
if-feature admin-control; when "../area-type = 'ospf:stub' or "
type boolean; + "../area-type = 'ospf:nssa'" {
default true; description
description "Summary advertisement into the stub/NSSA area.";
"Enable/Disable the protocol."; }
} type boolean;
description
"Enable/Disable summary advertisement into the stub or
NSSA area.";
}
leaf default-cost {
when "../area-type = 'ospf:stub' or "
+ "../area-type = 'ospf:nssa'" {
description
"Cost for LSA default route advertised into the
stub or NSSA area.";
}
type uint32 {
range "1..16777215";
}
description
"Set the summary default route cost for a
stub or NSSA area.";
}
}
container auto-cost { grouping area-config {
if-feature auto-cost; description
description "OSPF area configuration state.";
"Interface Auto-cost configuration state.";
leaf enable {
type boolean;
description
"Enable/Disable interface auto-cost.";
}
leaf reference-bandwidth {
when "../enable = 'true'" {
description "Only when auto cost is enabled";
}
type uint32 {
range "1..4294967";
}
units Mbits;
description
"Configure reference bandwidth used to automatically
determine interface cost (Mbits). The cost is the
reference bandwidth divided by the interface speed
with 1 being the minimum cost.";
} container all-interfaces-inherit {
} if-feature interface-inheritance;
description
"Inheritance for all interfaces";
container interface {
description
"Interface config to be inherited by all
interfaces in the area.";
}
}
container spf-control { leaf area-type {
leaf paths { type identityref {
if-feature max-ecmp; base area-type;
type uint16 { }
range "1..32"; default normal;
} description
description "Area type.";
"Maximum number of Equal-Cost Multi-Path (ECMP) paths.";
}
description "SPF calculation control.";
}
container database-control { }
leaf max-lsa {
if-feature max-lsa;
type uint32 {
range "1..4294967294";
}
description
"Maximum number of LSAs OSPF the router will accept.";
}
description "Database maintenance control.";
}
container stub-router { uses area-common-config;
if-feature stub-router;
description "Set maximum metric configuration";
choice trigger { uses af-area-config {
description when "../../../operation-mode = "
"Specific triggers which will enable stub + "'ospf:ships-in-the-night'" {
router state."; description
container always { "Ships in the night configuration.";
presence }
"Enables unconditional stub router support"; }
description }
"Unconditional stub router state (advertise
transit links with max metric";
}
}
}
container mpls { grouping area-operation {
description description
"OSPF MPLS config state."; "OSPF area operation state.";
container te-rid { container statistics {
if-feature te-rid; description "Per area statistics";
description uses area-stat;
"Stable OSPF Router IP Address used for Traffic }
Engineering (TE)";
choice source {
description
"Different options for specifying TE router ID.";
case interface {
leaf interface {
type if:interface-ref;
description
"Use the interface's IPv4 address as TE
router ID.";
}
}
case explicit {
leaf router-id {
type inet:ipv4-address;
description
"Explicitly configure the TE router ID.";
}
}
}
}
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.";
}
}
}
uses instance-fast-reroute-config;
}
grouping instance-operation { container database {
description description "Area scope LSA database.";
"OSPF Address Family operation state."; list area-scope-lsa-type {
key "lsa-type";
description "List OSPF area scope LSA databases.";
leaf lsa-type {
type uint16;
description "OSPF area scope LSA type.";
}
container area-scope-lsas {
description
"All area scope LSAs of an area scope
LSA type.";
list area-scope-lsa {
key "lsa-id adv-router";
description "List of OSPF area scope LSAs";
uses lsa-key;
uses lsa {
refine "version/ospfv2/ospfv2" {
must "../../../../../../../../../"
+ "rt:type = 'ospf:ospfv2'" {
description "OSPFv2 LSA.";
}
}
refine "version/ospfv3/ospfv3" {
must "../../../../../../../../../"
+ "rt:type = 'ospf:ospfv3'" {
description "OSPFv3 LSA.";
}
}
}
}
}
} // list area-scope-lsas
}
}
leaf router-id { grouping local-rib {
type yang:dotted-quad; description "Local-rib grouping.";
description container local-rib {
"Defined in RFC 2328. A 32-bit number description "Local-rib.";
that uniquely identifies the router."; list route {
} key "prefix";
description "Routes";
leaf prefix {
type inet:ip-prefix;
description "Destination prefix.";
}
container next-hops {
description "All next hops for the route.";
list next-hop {
key "next-hop";
description "List of next hop for the route";
leaf outgoing-interface {
type if:interface-ref;
description
"Name of the outgoing interface.";
}
leaf next-hop {
type inet:ip-address;
description "Nexthop address.";
}
}
}
leaf metric {
type uint32;
description "Metric for this route.";
}
leaf route-type {
type route-type;
description "Route type for this route.";
}
leaf route-tag {
type uint32;
description "Route tag for this route.";
}
}
}
}
uses local-rib; grouping ietf-spf-delay-config {
leaf initial-delay {
type uint16;
units msec;
description
"Delay used while in QUIET state.";
}
leaf short-delay {
type uint16;
units msec;
description
"Delay used while in SHORT_WAIT state.";
}
leaf long-delay {
type uint16;
units msec;
description
"Delay used while in LONG_WAIT state.";
}
leaf hold-down {
type uint16;
units msec;
description
"Timer used to consider an IGP stability period.";
}
leaf time-to-learn {
type uint16;
units msec;
description
"Duration used to learn all the IGP events
related to a single component failure.";
}
description
"Grouping for IETF SPF delay configuration.";
}
container statistics { grouping ietf-spf-delay-operation {
description "Per instance statistics"; leaf current-state {
uses instance-stat; type enumeration {
} enum "QUIET" {
description "QUIET state";
}
enum "SHORT_WAIT" {
description "SHORT_WAIT state";
}
enum "LONG_WAIT" {
description "LONG_WAIT state";
}
}
description
"Current state of the algorithm.";
}
leaf remaining-time-to-learn {
type uint16;
units "seconds";
description
"Remaining time until time-to-learn timer fires.";
}
leaf remaining-hold-down {
type uint16;
units "seconds";
description
"Remaining time until hold-down timer fires.";
}
leaf last-event-received {
type yang:timestamp;
description
"Time of last IGP event received";
}
leaf next-spf-time {
type yang:timestamp;
description
"Time when next SPF has been scheduled.";
}
leaf last-spf-time {
type yang:timestamp;
description
"Time of last SPF computation.";
}
description
"Grouping for IETF SPF delay operational states.";
}
container database { grouping node-tag-config {
description "AS scope LSA database."; description
list as-scope-lsa-type { "OSPF node tag config state.";
key "lsa-type"; container node-tags {
description "List OSPF AS scope LSA databases."; if-feature node-tag;
leaf lsa-type { list node-tag {
type uint16; key tag;
description "OSPF AS scope LSA type."; leaf tag {
} type uint32;
container as-scope-lsas { description
description "All AS scope of LSA of this LSA type."; "Node tag value.";
list as-scope-lsa { }
key "lsa-id adv-router"; description
description "List of OSPF area scope LSAs"; "List of tags.";
uses lsa-key; }
uses lsa { description
refine "version/ospfv2/ospfv2" { "Container for node tags.";
must "../../../../../../../rt:type = " }
+ "'ospf:ospfv2'" { }
description "OSPFv2 LSA.";
}
}
refine "version/ospfv3/ospfv3" {
must "../../../../../../../rt:type = "
+ "'ospf:ospfv3'" {
description "OSPFv3 LSA.";
}
}
}
}
}
} // list as-scope-lsas
}
}
grouping ospf-config {
description
"OSPF top configuration state.";
container all-instances-inherit { grouping instance-config {
if-feature instance-inheritance; description
description "OSPF instance config state.";
"Inheritance support to all instances.";
container area {
description
"Area config to be inherited by all areas
in all instances.";
}
container interface {
description
"Interface config to be inherited by all
interfaces in all instances.";
}
}
leaf operation-mode { container all-areas-inherit {
type identityref { if-feature area-inheritance;
base operation-mode; description
} "Inheritance for all areas.";
default ospf:ships-in-the-night; container area {
description description
"OSPF operation mode."; "Area config to be inherited by all areas.";
} }
} container interface {
description
"Interface config to be inherited by all interfaces
in all areas.";
}
}
grouping ospf-operation { leaf explicit-router-id {
description if-feature explicit-router-id;
"OSPF top operation state."; type rt-types:router-id;
} description
"Defined in RFC 2328. A 32-bit number
that uniquely identifies the router.";
}
grouping multi-topology-area-common-config { container preference {
description description "Route preference config state.";
"OSPF multi-topology area common configuration state."; choice scope {
leaf summary { description
when "../../../../../areas/area[area-id=current()/../area-id]/" "Options for expressing preference
+ "area-type = 'ospf:stub' or " as single or multiple values.";
+ "../../../../../areas/area[area-id=current()/../area-id]/" case single-value {
+ "area-type = 'ospf:nssa'" { leaf all {
description type uint8;
"Summary advertisement into the stub/NSSA area."; description
} "Preference for intra-area, inter-area and
type boolean; external routes.";
description }
"Enable/Disable summary advertisement into the }
topology in the stub or NSSA area."; case multi-values {
} choice granularity {
leaf default-cost { description
when "../../../../../areas/area[area-id=current()/../area-id]/" "Options for expressing preference
+ "area-type = 'ospf:stub' or " for intra-area and inter-area routes.";
+ "../../../../../areas/area[area-id=current()/../area-id]/" case detail {
+ "area-type = 'ospf:nssa'" { leaf intra-area {
description type uint8;
"Cost for LSA default route advertised into the description
topology into the stub or NSSA area."; "Preference for intra-area routes.";
} }
type uint32 { leaf inter-area {
range "1..16777215"; type uint8;
} description
description "Preference for inter-area routes.";
"Set the summary default route cost for a }
stub or NSSA area."; }
} case coarse {
} leaf internal {
type uint8;
description
"Preference for both intra-area and
inter-area routes.";
}
}
}
leaf external {
type uint8;
description
"Preference for external routes.";
}
}
}
}
grouping multi-topology-area-config { container nsr {
description if-feature nsr;
"OSPF multi-topology area configuration state."; description
"Non-Stop Routing (NSR) config state.";
leaf enable {
type boolean;
description
"Enable/Disable NSR.";
}
}
uses multi-topology-area-common-config; 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
for OSPFv2 and RFC 5187 for OSPFv3.";
}
leaf helper-enable {
type boolean;
description
"Enable graceful restart helper support for restarting
routers (RFC 3623 Section 3).";
}
leaf restart-interval {
type uint16 {
range "1..1800"; // Range is defined in RFC 3623.
}
units seconds;
default "120"; // Default is defined in RFC 3623.
description
"Interval in seconds to attempt graceful restart prior
to failing (RFC 3623 Section B.1)";
}
leaf helper-strict-lsa-checking {
type boolean;
description
"Terminate graceful restart when an LSA topology change
is detected (RFC 3623 Section B.2).";
}
}
uses af-area-config { leaf enable {
when "../../../../../operation-mode = " if-feature admin-control;
+ "'ospf:ships-in-the-night'" { type boolean;
description default true;
"Ships in the night configuration."; description
} "Enable/Disable the protocol.";
} }
}
grouping multi-topology-area-operation { container auto-cost {
description if-feature auto-cost;
"OSPF multi-topology area operation state."; description
} "Interface Auto-cost configuration state.";
leaf enable {
type boolean;
description
"Enable/Disable interface auto-cost.";
}
leaf reference-bandwidth {
when "../enable = 'true'" {
description "Only when auto cost is enabled";
}
type uint32 {
range "1..4294967";
}
units Mbits;
description
"Configure reference bandwidth used to automatically
determine interface cost (Mbits). The cost is the
reference bandwidth divided by the interface speed
with 1 being the minimum cost.";
}
}
grouping multi-topology-config { container spf-control {
description leaf paths {
"OSPF multi-topology configuration state."; if-feature max-ecmp;
} type uint16 {
range "1..32";
}
description
"Maximum number of Equal-Cost Multi-Path (ECMP) paths.";
}
container ietf-spf-delay {
if-feature ietf-spf-delay;
uses ietf-spf-delay-config;
description
"IETF spf delay algorithm configuration.";
}
description "SPF calculation control.";
}
grouping multi-topology-operation { container database-control {
description leaf max-lsa {
"OSPF multi-topology operation state."; if-feature max-lsa;
type uint32 {
range "1..4294967294";
}
description
"Maximum number of LSAs OSPF the router will accept.";
}
description "Database maintenance control.";
}
uses local-rib; container stub-router {
} if-feature stub-router;
description "Set maximum metric configuration";
grouping multi-topology-interface-config { choice trigger {
description description
"OSPF multi-topology configuration state."; "Specific triggers which will enable stub
router state.";
container always {
presence
"Enables unconditional stub router support";
description
"Unconditional stub router state (advertise
transit links with max metric";
}
}
}
leaf cost { container mpls {
type uint32; description
description "OSPF MPLS config state.";
"Interface cost for this topology."; container te-rid {
} if-feature te-rid;
} description
"Stable OSPF Router IP Address used for Traffic
Engineering (TE)";
leaf ipv4-router-id {
type inet:ipv4-address;
description
"Explicitly configure the TE IPv4 router ID.";
}
leaf ipv6-router-id {
type inet:ipv6-address;
description
"Explicitly configure the TE IPv6 router ID.";
}
}
container ldp {
description
"OSPF MPLS LDP config state.";
leaf igp-sync {
if-feature ldp-igp-sync;
type boolean;
description
"Enable LDP IGP synchronization.";
}
}
}
uses instance-fast-reroute-config;
uses node-tag-config;
}
grouping multi-topology-interface-operation { grouping instance-operation {
description description
"OSPF multi-topology operation state."; "OSPF Address Family operation state.";
}
grouping ospfv3-interface-config { leaf router-id {
description type rt-types:router-id;
"OSPFv3 interface specific configuration state."; description
"Defined in RFC 2328. A 32-bit number
that uniquely identifies the router.";
}
leaf instance-id { uses local-rib;
type uint8 {
range "0 .. 31";
}
description
"OSPFv3 instance ID.";
}
}
grouping ospfv3-interface-operation { container statistics {
description description "Per instance statistics";
"OSPFv3 interface specific operation state."; uses instance-stat;
}
leaf interface-id { container ietf-spf-delay {
type uint16; if-feature ietf-spf-delay;
description uses ietf-spf-delay-config;
"OSPFv3 interface ID."; uses ietf-spf-delay-operation;
} description
} "IETF SPF delay operational states.";
}
augment "/rt:routing/rt:control-plane-protocols/" container database {
+ "rt:control-plane-protocol" { description "AS scope LSA database.";
when "rt:type = 'ospf:ospfv2' or rt:type = 'ospf:ospfv3'" { list as-scope-lsa-type {
description key "lsa-type";
"This augmentation is only valid for a routing protocol description "List OSPF AS scope LSA databases.";
instance of OSPF (type 'ospfv2' or 'ospfv3')."; leaf lsa-type {
} type uint16;
description "OSPF augmentation."; description "OSPF AS scope LSA type.";
}
container as-scope-lsas {
description "All AS scope of LSA of this LSA type.";
list as-scope-lsa {
key "lsa-id adv-router";
description "List of OSPF area scope LSAs";
uses lsa-key;
uses lsa {
refine "version/ospfv2/ospfv2" {
must "../../../../../../../rt:type = "
+ "'ospf:ospfv2'" {
description "OSPFv2 LSA.";
}
}
refine "version/ospfv3/ospfv3" {
must "../../../../../../../rt:type = "
+ "'ospf:ospfv3'" {
description "OSPFv3 LSA.";
}
}
}
}
}
} // list as-scope-lsas
}
}
container ospf { grouping ospf-config {
description description
"OSPF."; "OSPF top configuration state.";
uses ospf-config; 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 interface {
description
"Interface config to be inherited by all
interfaces in all instances.";
}
}
list instance { leaf operation-mode {
key "af"; type identityref {
description base operation-mode;
"An OSPF routing protocol instance."; }
default ospf:ships-in-the-night;
description
"OSPF operation mode.";
}
}
leaf af { grouping ospf-operation {
type identityref { description
base rt:address-family; "OSPF top operation state.";
} }
description
"Address-family of the instance.";
}
uses instance-config; grouping multi-topology-area-common-config {
description
"OSPF multi-topology area common configuration state.";
leaf summary {
when "../../../../../areas/area[area-id=current()/../area-id]/"
+ "area-type = 'ospf:stub' or "
+ "../../../../../areas/area[area-id=current()/../area-id]/"
+ "area-type = 'ospf:nssa'" {
description
"Summary advertisement into the stub/NSSA area.";
}
type boolean;
description
"Enable/Disable summary advertisement into the
topology in the stub or NSSA area.";
}
leaf default-cost {
when "../../../../../areas/area[area-id=current()/../area-id]/"
+ "area-type = 'ospf:stub' or "
+ "../../../../../areas/area[area-id=current()/../area-id]/"
+ "area-type = 'ospf:nssa'" {
description
"Cost for LSA default route advertised into the
topology into the stub or NSSA area.";
}
type uint32 {
range "1..16777215";
}
description
"Set the summary default route cost for a
stub or NSSA area.";
}
}
container areas { grouping multi-topology-area-config {
description "All areas."; description
list area { "OSPF multi-topology area configuration state.";
key "area-id";
description
"List of OSPF areas";
leaf area-id {
type area-id-type;
description
"Area ID.";
}
uses area-config; uses multi-topology-area-common-config;
uses af-area-config {
when "../../../../../operation-mode = "
+ "'ospf:ships-in-the-night'" {
description
"Ships in the night configuration.";
}
}
}
container virtual-links { grouping multi-topology-area-operation {
when "../area-id = '0' and " description
+ "../area-type = 'ospf:normal'" { "OSPF multi-topology area operation state.";
description }
"Virutal links must be in backbone area.";
}
description "All virtual links.";
list virtual-link {
key "transit-area-id router-id";
description
"OSPF virtual link";
leaf transit-area-id {
type leafref {
path "../../../area-id";
}
must ".!='0.0.0.0'" {
error-message "Virtual link transit area must "
+ "be non-zero.";
description
"Virtual-link trasit area must be non-zero area.";
}
description
"Virtual link tranist area ID.";
}
leaf router-id {
type yang:dotted-quad;
description
"Virtual Link remote endpoint router ID.";
}
uses virtual-link-config; grouping multi-topology-config {
} description
} "OSPF multi-topology configuration state.";
container sham-links { }
if-feature pe-ce-protocol;
description "All sham links.";
list sham-link {
key "local-id remote-id";
description
"OSPF sham link";
leaf local-id {
type inet:ip-address;
description
"Address of the local Sham Link endpoint.";
}
leaf remote-id {
type inet:ip-address;
description
"Address of the remote Sham Link endpoint.";
}
uses sham-link-config;
}
}
container interfaces {
description "All interfaces.";
list interface {
key "name";
description
"List of OSPF interfaces.";
leaf name {
type if:interface-ref;
description
"Interface name.";
}
uses interface-config;
} // list of interfaces
}
} // list of areas
}
} // list of instance
} // container ospf
}
augment "/rt:routing/rt:control-plane-protocols/" grouping multi-topology-operation {
+ "rt:control-plane-protocol/ospf:ospf/ospf:instance" { description
when "../../rt:type = 'ospf:ospfv2' or "OSPF multi-topology operation state.";
../../rt:type = 'ospf:ospfv3'" {
description
"This augmentation is only valid for OSPF
(type 'ospfv2' or 'ospfv3').";
}
if-feature multi-topology;
description
"OSPF multi-topology instance configuration
state augmentation.";
container topologies {
description "All topologies.";
list topology {
// Topology must be in the same routing-instance
// and of same AF as the container.
key "name";
description "OSPF topology.";
leaf name {
type leafref {
path "../../../../../../../rt:ribs/rt:rib/rt:name";
}
description "RIB";
}
uses multi-topology-config; uses local-rib;
}
container areas { grouping multi-topology-interface-config {
description "All areas in the topology."; description
list area { "OSPF multi-topology configuration state.";
key "area-id";
description
"List of OSPF areas";
leaf area-id {
type area-id-type;
description
"Area ID.";
}
uses multi-topology-area-config;
}
}
}
}
}
augment "/rt:routing/rt:control-plane-protocols/" leaf cost {
+ "rt:control-plane-protocol/ospf:ospf/ospf:instance/" type uint32;
+ "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" {
when "../../../../../../rt:type = 'ospf:ospfv2'" {
description
"This augmentation is only valid for OSPFv2.";
}
if-feature ospf:multi-topology;
description
"OSPF multi-topology interface configuration state
augmentation.";
container topologies {
description "All topologies for the interface.";
list topology {
key "name";
description "OSPF interface topology.";
leaf name {
type leafref {
path "../../../../../../../../../../../"
+ "rt:ribs/rt:rib/rt:name";
}
description description
"One of the topologies enabled on this interface."; "Interface cost for this topology.";
} }
}
uses multi-topology-interface-config;
}
}
}
augment "/rt:routing/rt:control-plane-protocols/"
+ "rt:control-plane-protocol/ospf:ospf/ospf:instance/"
+ "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" {
when "../../../../../../rt:type = 'ospf:ospfv3'" {
description
"This augmentation is only valid for OSPFv3.";
}
description
"OSPFv3 interface specific configuration state
augmentation.";
uses ospfv3-interface-config;
}
augment "/rt:routing-state/"
+ "rt:control-plane-protocols/rt:control-plane-protocol" {
when "rt:type = 'ospf:ospfv2' or "
+ "rt:type = 'ospf:ospfv3'" {
description
"This augmentation is only valid for a routing protocol
instance of type 'ospfv2' or 'ospfv3'.";
}
description
"OSPF operational state.";
container ospf {
description "OSPF";
uses ospf-config;
uses ospf-operation;
list instance {
key "af";
description
"An OSPF routing protocol instance.";
leaf af { grouping multi-topology-interface-operation {
type identityref { description
base rt:address-family; "OSPF multi-topology operation state.";
} }
description
"Address-family of the instance.";
}
uses instance-config; grouping ospfv3-interface-config {
uses instance-operation; description
"OSPFv3 interface specific configuration state.";
container areas { leaf instance-id {
description "All areas"; type uint8 {
list area { range "0 .. 31";
key "area-id"; }
description "List of OSPF areas"; description
leaf area-id { "OSPFv3 instance ID.";
type area-id-type; }
description "Area ID."; }
}
uses area-config; grouping ospfv3-interface-operation {
uses area-operation; description
"OSPFv3 interface specific operation state.";
container virtual-links { leaf interface-id {
description "All virtual links."; type uint16;
list virtual-link { description
description "OSPFv3 interface ID.";
"OSPF virtual link"; }
leaf transit-area-id { }
type leafref {
path "../../../area-id";
}
description
"Virutal link transit area ID.";
}
leaf router-id {
type yang:dotted-quad;
description
"Virtual link router ID.";
}
uses virtual-link-config; augment "/rt:routing/rt:control-plane-protocols/"
uses virtual-link-operation; + "rt:control-plane-protocol" {
} when "rt:type = 'ospf:ospfv2' or rt:type = 'ospf:ospfv3'" {
} description
container sham-links { "This augmentation is only valid for a routing protocol
description "All sham links."; instance of OSPF (type 'ospfv2' or 'ospfv3').";
list sham-link { }
description