draft-ietf-ospf-yang-04.txt   draft-ietf-ospf-yang-05.txt 
Internet D. Yeung Internet D. Yeung
Internet-Draft Y. Qu Internet-Draft Y. Qu
Intended status: Informational Cisco Systems Intended status: Informational Cisco Systems
Expires: September 22, 2016 J. Zhang Expires: January 8, 2017 J. Zhang
Juniper Networks Juniper Networks
D. Bogdanovic D. Bogdanovic
K. Sreenivasa K. Sreenivasa
Cisco Systems Cisco Systems
March 21, 2016 July 7, 2016
Yang Data Model for OSPF Protocol Yang Data Model for OSPF Protocol
draft-ietf-ospf-yang-04 draft-ietf-ospf-yang-05
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 37 skipping to change at page 1, line 37
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 September 22, 2016. This Internet-Draft will expire on January 8, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2016 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
skipping to change at page 2, line 23 skipping to change at page 2, line 23
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 . . . . . . . . . . . . . . . . 6
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 . . . . . . . . . . . . . . 10
2.9. OSPF notification . . . . . . . . . . . . . . . . . . . . 11 2.9. OSPF notification . . . . . . . . . . . . . . . . . . . . 11
3. OSPF Segment Routing . . . . . . . . . . . . . . . . . . . . 14 3. OSPF Segment Routing . . . . . . . . . . . . . . . . . . . . 14
4. OSPF BFD Yang Module . . . . . . . . . . . . . . . . . . . . 21 4. OSPF BFD Yang Module . . . . . . . . . . . . . . . . . . . . 22
5. OSPF Yang Module . . . . . . . . . . . . . . . . . . . . . . 22 5. OSPF Yang Module . . . . . . . . . . . . . . . . . . . . . . 22
6. OSPF Segment Routing Yang Module . . . . . . . . . . . . . . 93 6. OSPF Segment Routing Yang Module . . . . . . . . . . . . . . 95
7. OSPF BFD Yang Module . . . . . . . . . . . . . . . . . . . . 107 7. OSPF BFD Yang Module . . . . . . . . . . . . . . . . . . . . 110
8. Security Considerations . . . . . . . . . . . . . . . . . . . 110 8. Security Considerations . . . . . . . . . . . . . . . . . . . 113
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 110 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 113
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 111 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 113
10.1. Normative References . . . . . . . . . . . . . . . . . . 111 10.1. Normative References . . . . . . . . . . . . . . . . . . 113
10.2. Informative References . . . . . . . . . . . . . . . . . 112 10.2. Informative References . . . . . . . . . . . . . . . . . 115
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 113 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 115
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
[I-D.ietf-netmod-routing-cfg], and it provides the basis for the [I-D.ietf-netmod-routing-cfg], and it provides the basis for the
development of data models for routing protocols. The interface data development of data models for routing protocols. The interface data
model is defined in [RFC7223] and is used for referencing interfaces model is defined in [RFC7223] and is used for referencing interfaces
from the routing protocol. The key-chain data model used for OSPF from the routing protocol. The key-chain data model used for OSPF
authentication is defined in [I-D.acee-rtg-yang-key-chain] and authentication is defined in [I-D.ietf-rtgwg-yang-key-chain] and
provides both a reference to configured key-chains and an enumeration provides both a reference to configured key-chains and an enumeration
of cryptographic algorithms. 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. They includes demand circuit [RFC1793], RFCs are also supported. They 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 sham link graceful restart [RFC3623] [RFC5187], NSSA [RFC3101], and sham link
[RFC4577]. These non-core features are made optional in the OSPF [RFC4577]. These non-core features are made optional in the OSPF
data model. data model.
skipping to change at page 4, line 7 skipping to change at page 4, line 7
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/routing-instance/routing-
protocols/routing-protocol path defined in the ietf-routing module. protocols/routing-protocol path defined in the ietf-routing module.
module: ospf module: ospf
+--rw routing +--rw routing
+--rw routing-protocols +--rw router-id? yang:dotted-quad
+--rw routing-protocol [name] +--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 instance* [routing-instance af] +--rw instance* [routing-instance af]
. .
. .
+--rw areas +--rw areas
skipping to change at page 7, line 45 skipping to change at page 7, line 45
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: ospf
+--rw ospf +--rw ospf
. .
. .
+--rw instance* [routing-instance af] +--rw instance* [routing-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* [router-id] | | +--rw virtual-link* [router-id]
| | +--rw router-id yang:dotted-quad | | +--rw transit-area-id -> ../../../area-id
| | +--rw cost? uint16 | | +--rw router-id yang:dotted-quad
| | +--rw hello-interval? uint16 | | +--rw hello-interval? uint16
| | +--rw dead-interval? uint16 | | +--rw dead-interval? uint16
| | +--rw retransmit-interval? uint16 | | +--rw retransmit-interval? uint16
| | +--rw transmit-delay? uint16 | | +--rw transmit-delay? uint16
| | +--rw mtu-ignore? boolean {mtu-ignore}? | | +--rw mtu-ignore? boolean {mtu-ignore}?
| | +--rw lls? boolean {lls}? | | +--rw lls? boolean {lls}?
| | +--rw prefix-suppression? boolean {prefix-suppression}? | | +--rw prefix-suppression? boolean {prefix-suppression}?
| | +--rw ttl-security {ttl-security}? | | +--rw ttl-security {ttl-security}?
| | | +--rw enable? boolean | | | +--rw enable? boolean
| | | +--rw hops? uint8 | | | +--rw hops? uint8
| | +--rw enable? boolean {admin-control}? | | +--rw enable? boolean {admin-control}?
| | +--rw authentication | | +--rw authentication
| | +--rw (auth-type-selection)? | | +--rw (auth-type-selection)?
| | +--:(auth-ipsec) {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? key-chain:key-chain-ref | | | +--rw key-chain? key-chain:key-chain-ref
| | +--:(auth-trailer-key) | | +--:(auth-trailer-key)
| | +--rw key? string | | +--rw key? string
| | +--rw crypto-algorithm | | +--rw crypto-algorithm
| | +--rw (algorithm)? | | +--rw (algorithm)?
| | +--:(hmac-sha-1-12) {crypto-hmac-sha-1-12}? | | +--:(hmac-sha-1-12) {crypto-hmac-sha-1-12}?
| | | +--rw hmac-sha1-12? empty | | | +--rw hmac-sha1-12? empty
| | +--:(md5) | | +--:(md5)
| | | +--rw md5? empty | | | +--rw md5? empty
| | +--:(sha-1) | | +--:(sha-1)
| | | +--rw sha-1? empty | | | +--rw sha-1? empty
| | +--:(hmac-sha-1) | | +--:(hmac-sha-1)
| | | +--rw hmac-sha-1? empty | | | +--rw hmac-sha-1? empty
| | +--:(hmac-sha-256) | | +--:(hmac-sha-256)
| | | +--rw hmac-sha-256? empty | | | +--rw hmac-sha-256? empty
| | +--:(hmac-sha-384) | | +--:(hmac-sha-384)
| | | +--rw hmac-sha-384? empty | | | +--rw hmac-sha-384? empty
| | +--:(hmac-sha-512) | | +--:(hmac-sha-512)
| | | +--rw hmac-sha-512? empty | | | +--rw hmac-sha-512? empty
| | +--:(clear-text) {clear-text}? | | +--:(clear-text) {clear-text}?
| | +--rw clear-text? empty | | +--rw clear-text? empty
| +--rw sham-link | | +--:(replay-protection-only) {replay-protection-only}?
| | +--rw sham-link* [local-id remote-id] | | +--rw replay-protection-only? empty
| | +--rw local-id inet:ip-address | +--rw sham-link
| | +--rw remote-id inet:ip-address | | +--rw sham-link* [local-id remote-id]
| | +--rw cost? uint16 | | +--rw local-id inet:ip-address
| | +--rw hello-interval? uint16 | | +--rw remote-id inet:ip-address
| | +--rw dead-interval? uint16 | | +--rw cost? uint16
| | +--rw retransmit-interval? uint16 | | +--rw hello-interval? uint16
| | +--rw transmit-delay? uint16 | | +--rw dead-interval? uint16
| | +--rw mtu-ignore? boolean {mtu-ignore}? | | +--rw retransmit-interval? uint16
| | +--rw lls? boolean {lls}? | | +--rw transmit-delay? uint16
| | +--rw prefix-suppression? boolean {prefix-suppression}? | | +--rw mtu-ignore? boolean {mtu-ignore}?
| | +--rw bfd? boolean {bfd}? | | +--rw lls? boolean {lls}?
| | +--rw ttl-security {ttl-security}? | | +--rw prefix-suppression? boolean {prefix-suppression}?
| | | +--rw enable? boolean | | +--rw bfd? boolean {bfd}?
| | | +--rw hops? uint8 | | +--rw ttl-security {ttl-security}?
| | +--rw enable? boolean {admin-control}? | | | +--rw enable? boolean
| | +--rw authentication | | | +--rw hops? uint8
| | +--rw (auth-type-selection)? | | +--rw enable? boolean {admin-control}?
| | +--:(auth-ipsec) {ospfv3-authentication-ipsec}? | | +--rw authentication
| | | +--rw sa? string | | +--rw (auth-type-selection)?
| | +--:(auth-trailer-key-chain) | | +--:(auth-ipsec) {ospfv3-authentication-ipsec}?
| | | +--rw key-chain? key-chain:key-chain-ref | | | +--rw sa? string
| | +--:(auth-trailer-key) | | +--:(auth-trailer-key-chain)
| | +--rw key? string | | | +--rw key-chain? key-chain:key-chain-ref
| | +--rw crypto-algorithm | | +--:(auth-trailer-key)
| | +--rw (algorithm)? | | +--rw key? string
| | +--:(hmac-sha-1-12) {crypto-hmac-sha-1-12}? | | +--rw crypto-algorithm
| | | +--rw hmac-sha1-12? empty | | +--rw (algorithm)?
| | +--:(md5) | | +--:(hmac-sha-1-12) {crypto-hmac-sha-1-12}?
| | | +--rw md5? empty | | | +--rw hmac-sha1-12? empty
| | +--:(sha-1) | | +--:(md5)
| | | +--rw sha-1? empty | | | +--rw md5? empty
| | +--:(hmac-sha-1) | | +--:(sha-1)
| | | +--rw hmac-sha-1? empty | | | +--rw sha-1? empty
| | +--:(hmac-sha-256) | | +--:(hmac-sha-1)
| | | +--rw hmac-sha-256? empty | | | +--rw hmac-sha-1? empty
| | +--:(hmac-sha-384) | | +--:(hmac-sha-256)
| | | +--rw hmac-sha-384? empty | | | +--rw hmac-sha-256? empty
| | +--:(hmac-sha-512) | | +--:(hmac-sha-384)
| | | +--rw hmac-sha-512? empty | | | +--rw hmac-sha-384? empty
| | +--:(clear-text) {clear-text}? | | +--:(hmac-sha-512)
| | +--rw clear-text? empty | | | +--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: ospf
+--rw ospf +--rw ospf
. .
. .
+--rw instance* [routing-instance af] +--rw instance* [routing-instance af]
. .
. .
+--rw areas +--rw areas
| +--rw area* [area-id] | +--rw area* [area-id]
. .
. .
| +--rw interfaces | +--rw interfaces
| +--rw interface* [interface] | +--rw interface* [interface]
| +--rw interface if:interface-ref | +--rw name if:interface-ref
| +--rw network-type? enumeration | +--rw network-type? enumeration
| +--rw passive? boolean | +--rw passive? boolean
| +--rw demand-circuit? boolean {demand-circuit}? | +--rw demand-circuit? boolean {demand-circuit}?
| +--rw multi-areas | +--rw multi-areas
| | +--rw multi-area* [multi-area-id] {multi-area-adj}? | | +--rw multi-area* [multi-area-id] {multi-area-adj}?
| | +--rw multi-area-id area-id-type | | +--rw multi-area-id area-id-type
| | +--rw cost? uint16 | | +--rw cost? uint16
| +--rw static-neighbors | +--rw static-neighbors
| | +--rw neighbor* [address] | | +--rw neighbor* [address]
| | +--rw address inet:ip-address | | +--rw address inet:ip-address
| | +--rw cost? uint16 | | +--rw cost? uint16
| | +--rw poll-interval? uint16 | | +--rw poll-interval? uint16
| | +--rw priority? uint8 | | +--rw priority? uint8
| +--rw node-flag? boolean {node-flag}? | +--rw node-flag? boolean {node-flag}?
| +--rw fast-reroute {fast-reroute}? | +--rw fast-reroute {fast-reroute}?
| | +--rw lfa {lfa}? | | +--rw lfa {lfa}?
| | +--rw candidate-disabled? boolean | | +--rw candidate-disabled? boolean
| | +--rw enabled? boolean | | +--rw enabled? boolean
| | +--rw remote-lfa {remote-lfa}? | | +--rw remote-lfa {remote-lfa}?
| | +--rw enabled? boolean | | +--rw enabled? boolean
| +--rw cost? uint16 | +--rw hello-interval? uint16
| +--rw hello-interval? uint16 | +--rw dead-interval? uint16
| +--rw dead-interval? uint16 | +--rw retransmit-interval? uint16
| +--rw retransmit-interval? uint16 | +--rw transmit-delay? uint16
| +--rw transmit-delay? uint16 | +--rw mtu-ignore? boolean {mtu-ignore}?
| +--rw mtu-ignore? boolean {mtu-ignore}? | +--rw lls? boolean {lls}?
| +--rw lls? boolean {lls}? | +--rw prefix-suppression? boolean {prefix-suppression}?
| +--rw prefix-suppression? boolean {prefix-suppression}? | +--rw ttl-security {ttl-security}?
| +--rw ttl-security {ttl-security}? | | +--rw enable? boolean
| | +--rw enable? boolean | | +--rw hops? uint8
| | +--rw hops? uint8 | +--rw enable? boolean {admin-control}?
| +--rw enable? boolean {admin-control}? | +--rw authentication
| +--rw authentication | | +--rw (auth-type-selection)?
| | +--rw (auth-type-selection)? | | +--:(auth-ipsec) {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? key-chain:key-chain-ref
| | | +--rw key-chain? key-chain:key-chain-ref | | +--:(auth-trailer-key)
| | +--:(auth-trailer-key) | | +--rw key? string
| | +--rw key? string | | +--rw crypto-algorithm
| | +--rw crypto-algorithm | | +--rw (algorithm)?
| | +--rw (algorithm)? | | +--:(hmac-sha-1-12) {crypto-hmac-sha-1-12}?
| | +--:(hmac-sha-1-12) {crypto-hmac-sha-1-12}? | | | +--rw hmac-sha1-12? empty
| | | +--rw hmac-sha1-12? empty | | +--:(md5)
| | +--:(md5) | | | +--rw md5? empty
| | | +--rw md5? empty | | +--:(sha-1)
| | +--:(sha-1) | | | +--rw sha-1? empty
| | | +--rw sha-1? empty | | +--:(hmac-sha-1)
| | +--:(hmac-sha-1) | | | +--rw hmac-sha-1? empty
| | | +--rw hmac-sha-1? empty | | +--:(hmac-sha-256)
| | +--:(hmac-sha-256) | | | +--rw hmac-sha-256? empty
| | | +--rw hmac-sha-256? empty | | +--:(hmac-sha-384)
| | +--:(hmac-sha-384) | | | +--rw hmac-sha-384? empty
| | | +--rw hmac-sha-384? empty | | +--:(hmac-sha-512)
| | +--:(hmac-sha-512) | | | +--rw hmac-sha-512? empty
| | | +--rw hmac-sha-512? empty | | +--:(clear-text) {clear-text}?
| | +--:(clear-text) {clear-text}? | | +--rw clear-text? empty
| | +--rw clear-text? empty | | +--:(replay-protection-only) {replay-protection-only}?
| +--rw topologies | | +--rw replay-protection-only? empty
| | +--rw topology* [name] | +--rw cost? uint16
| | +--rw name leafref | +--rw topologies
| | +--rw cost? uint32 | | +--rw topology* [name]
| +--rw instance-id? uint8 | | +--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 module: ospf
notifications: notifications:
skipping to change at page 14, line 48 skipping to change at page 15, line 8
In addition to the OSPF base YANG model, this document also defines a In addition to the OSPF base YANG model, this document also defines a
model for the OSPF segment routing feature. model for the OSPF segment routing feature.
The OSPF SR YANG module requires support for the base segment routing The OSPF SR YANG module requires support for the base segment routing
module [I-D.ietf-spring-sr-yang], which defines the global segment module [I-D.ietf-spring-sr-yang], which defines the global segment
routing configuration independent of any specific routing protocol routing configuration independent of any specific routing protocol
configuration. configuration.
module: ietf-ospf-sr module: ietf-ospf-sr
augment /rt:routing/rt:routing-protocols augment /rt:routing/rt:control-plane-protocols
/rt:routing-protocol/ospf:ospf/ospf:instance: /rt:control-plane-protocol/ospf:ospf/ospf:instance:
+--rw segment-routing +--rw segment-routing
| +--rw enabled? boolean | +--rw enabled? boolean
| +--rw bindings | +--rw bindings
| +--rw advertise | +--rw advertise
| | +--rw policies* string | | +--rw policies* string
| +--rw receive? boolean | +--rw receive? boolean
+--rw protocol-srgb {sr:protocol-srgb}? +--rw protocol-srgb {sr:protocol-srgb}?
+--rw srgb* [lower-bound upper-bound] +--rw srgb* [lower-bound upper-bound]
+--rw lower-bound uint32 +--rw lower-bound uint32
+--rw upper-bound uint32 +--rw upper-bound uint32
augment /rt:routing/rt:routing-protocols augment /rt:routing/rt:control-plane-protocols
/rt:routing-protocol/ospf:ospf/ospf:instance /rt:control-plane-protocol/ospf:ospf/ospf:instance
/ospf:areas/ospf:area/ospf:interfaces/ospf:interface: /ospf:areas/ospf:area/ospf:interfaces/ospf:interface:
+--rw segment-routing +--rw segment-routing
+--rw adjacency-sid +--rw adjacency-sid
+--rw advertise-adj-group-sid* [group-id] +--rw advertise-adj-group-sid* [group-id]
| +--rw group-id uint32 | +--rw group-id uint32
+--rw advertise-protection? enumeration +--rw advertise-protection? enumeration
augment /rt:routing/rt:routing-protocols augment /rt:routing/rt:control-plane-protocols
/rt:routing-protocol/ospf:ospf/ospf:instance/ospf:areas /rt:control-plane-protocol/ospf:ospf/ospf:instance
/ospf:area/ospf:interfaces/ospf:interface/ospf:fast-reroute: /ospf:areas/ospf:area/ospf:interfaces/ospf:interface
/ospf:fast-reroute:
+--rw ti-lfa {ti-lfa}? +--rw ti-lfa {ti-lfa}?
+--rw enable? boolean +--rw enable? boolean
augment /rt:routing-state/rt:routing-protocols augment /rt:routing-state/rt:control-plane-protocols
/rt:routing-protocol/ospf:ospf/ospf:instance: /rt:control-plane-protocol/ospf:ospf/ospf:instance:
+--ro segment-routing +--ro segment-routing
| +--ro enabled? boolean | +--ro enabled? boolean
| +--ro bindings | +--ro bindings
| +--ro advertise | +--ro advertise
| | +--ro policies* string | | +--ro policies* string
| +--ro receive? boolean | +--ro receive? boolean
+--ro protocol-srgb {sr:protocol-srgb}? +--ro protocol-srgb {sr:protocol-srgb}?
+--ro srgb* [lower-bound upper-bound] +--ro srgb* [lower-bound upper-bound]
+--ro lower-bound uint32 +--ro lower-bound uint32
+--ro upper-bound uint32 +--ro upper-bound uint32
augment /rt:routing-state/rt:routing-protocols augment /rt:routing-state/rt:control-plane-protocols
/rt:routing-protocol/ospf:ospf/ospf:instance /rt:control-plane-protocol/ospf:ospf/ospf:instance
/ospf:areas/ospf:area/ospf:interfaces/ospf:interface: /ospf:areas/ospf:area/ospf:interfaces/ospf:interface:
+--ro segment-routing +--ro segment-routing
+--ro adjacency-sid +--ro adjacency-sid
+--ro advertise-adj-group-sid* [group-id] +--ro advertise-adj-group-sid* [group-id]
| +--ro group-id uint32 | +--ro group-id uint32
+--ro advertise-protection? enumeration +--ro advertise-protection? enumeration
augment /rt:routing-state/rt:routing-protocols augment /rt:routing-state/rt:control-plane-protocols
/rt:routing-protocol/ospf:ospf/ospf:instance/ospf:areas /rt:control-plane-protocol/ospf:ospf/ospf:instance
/ospf:area/ospf:interfaces/ospf:interface/ospf:database /ospf:areas/ospf:area/ospf:interfaces/ospf:interface
/ospf:link-scope-lsa-type/ospf:link-scope-lsas /ospf:database/ospf:link-scope-lsa-type
/ospf:link-scope-lsa/ospf:version/ospf:ospfv2 /ospf:link-scope-lsas/ospf:link-scope-lsa/ospf:version
/ospf:ospfv2/ospf:body/ospf:opaque /ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque
/ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv: /ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv:
+--ro perfix-sid-sub-tlvs +--ro perfix-sid-sub-tlvs
| +--ro prefix-sid-sub-tlv* | +--ro prefix-sid-sub-tlv*
| +--ro flags? bits | +--ro flags? bits
| +--ro mt-id? uint8 | +--ro mt-id? uint8
| +--ro algorithm? uint8 | +--ro algorithm? uint8
| +--ro sid? uint32 | +--ro sid? uint32
+--ro sid-binding-sub-tlvs +--ro sid-binding-sub-tlvs
+--ro sid-binding-sub-tlv* +--ro sid-binding-sub-tlv*
+--ro flags? bits +--ro flags? bits
+--ro mt-id? uint8 +--ro mt-id? uint8
skipping to change at page 16, line 34 skipping to change at page 16, line 42
| +--ro flags? bits | +--ro flags? bits
| +--ro router-id? yang:dotted-quad | +--ro router-id? yang:dotted-quad
| +--ro interface-id? uint32 | +--ro interface-id? uint32
+--ro ipv4-backup-ero-sub-tlv +--ro ipv4-backup-ero-sub-tlv
| +--ro flags? bits | +--ro flags? bits
| +--ro ipv4-address? inet:ipv4-address | +--ro ipv4-address? inet:ipv4-address
+--ro unnumbered-backup-ero-sub-tlv +--ro unnumbered-backup-ero-sub-tlv
+--ro flags? bits +--ro flags? bits
+--ro router-id? yang:dotted-quad +--ro router-id? yang:dotted-quad
+--ro interface-id? uint32 +--ro interface-id? uint32
augment /rt:routing-state/rt:routing-protocols augment /rt:routing-state/rt:control-plane-protocols
/rt:routing-protocol/ospf:ospf/ospf:instance /rt:control-plane-protocol/ospf:ospf/ospf:instance
/ospf:areas/ospf:area/ospf:database /ospf:areas/ospf:area/ospf:database
/ospf:area-scope-lsa-type/ospf:area-scope-lsas /ospf:area-scope-lsa-type/ospf:area-scope-lsas
/ospf:area-scope-lsa/ospf:version/ospf:ospfv2 /ospf:area-scope-lsa/ospf:version/ospf:ospfv2
/ospf:ospfv2/ospf:body/ospf:opaque /ospf:ospfv2/ospf:body/ospf:opaque
/ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv: /ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv:
+--ro perfix-sid-sub-tlvs +--ro perfix-sid-sub-tlvs
| +--ro prefix-sid-sub-tlv* | +--ro prefix-sid-sub-tlv*
| +--ro flags? bits | +--ro flags? bits
| +--ro mt-id? uint8 | +--ro mt-id? uint8
| +--ro algorithm? uint8 | +--ro algorithm? uint8
skipping to change at page 17, line 21 skipping to change at page 17, line 30
| +--ro flags? bits | +--ro flags? bits
| +--ro router-id? yang:dotted-quad | +--ro router-id? yang:dotted-quad
| +--ro interface-id? uint32 | +--ro interface-id? uint32
+--ro ipv4-backup-ero-sub-tlv +--ro ipv4-backup-ero-sub-tlv
| +--ro flags? bits | +--ro flags? bits
| +--ro ipv4-address? inet:ipv4-address | +--ro ipv4-address? inet:ipv4-address
+--ro unnumbered-backup-ero-sub-tlv +--ro unnumbered-backup-ero-sub-tlv
+--ro flags? bits +--ro flags? bits
+--ro router-id? yang:dotted-quad +--ro router-id? yang:dotted-quad
+--ro interface-id? uint32 +--ro interface-id? uint32
augment /rt:routing-state/rt:routing-protocols augment /rt:routing-state/rt:control-plane-protocols
/rt:routing-protocol/ospf:ospf/ospf:instance /rt:control-plane-protocol/ospf:ospf/ospf:instance
/ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas /ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas
/ospf:as-scope-lsa/ospf:version/ospf:ospfv2 /ospf:as-scope-lsa/ospf:version/ospf:ospfv2
/ospf:ospfv2/ospf:body/ospf:opaque ospf:ospfv2/ospf:body/ospf:opaque
/ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv: /ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv:
+--ro perfix-sid-sub-tlvs +--ro perfix-sid-sub-tlvs
| +--ro prefix-sid-sub-tlv* | +--ro prefix-sid-sub-tlv*
| +--ro flags? bits | +--ro flags? bits
| +--ro mt-id? uint8 | +--ro mt-id? uint8
| +--ro algorithm? uint8 | +--ro algorithm? uint8
| +--ro sid? uint32 | +--ro sid? uint32
+--ro sid-binding-sub-tlvs +--ro sid-binding-sub-tlvs
+--ro sid-binding-sub-tlv* +--ro sid-binding-sub-tlv*
+--ro flags? bits +--ro flags? bits
skipping to change at page 18, line 8 skipping to change at page 18, line 17
| +--ro flags? bits | +--ro flags? bits
| +--ro router-id? yang:dotted-quad | +--ro router-id? yang:dotted-quad
| +--ro interface-id? uint32 | +--ro interface-id? uint32
+--ro ipv4-backup-ero-sub-tlv +--ro ipv4-backup-ero-sub-tlv
| +--ro flags? bits | +--ro flags? bits
| +--ro ipv4-address? inet:ipv4-address | +--ro ipv4-address? inet:ipv4-address
+--ro unnumbered-backup-ero-sub-tlv +--ro unnumbered-backup-ero-sub-tlv
+--ro flags? bits +--ro flags? bits
+--ro router-id? yang:dotted-quad +--ro router-id? yang:dotted-quad
+--ro interface-id? uint32 +--ro interface-id? uint32
augment /rt:routing-state/rt:routing-protocols augment /rt:routing-state/rt:control-plane-protocols
/rt:routing-protocol/ospf:ospf/ospf:instance /rt:control-plane-protocol/ospf:ospf/ospf:instance
/ospf:areas/ospf:area/ospf:database /ospf:areas/ospf:area/ospf:database
/ospf:area-scope-lsa-type/ospf:area-scope-lsas /ospf:area-scope-lsa-type/ospf:area-scope-lsas
/ospf:area-scope-lsa/ospf:version/ospf:ospfv2 /ospf:area-scope-lsa/ospf:version/ospf:ospfv2
/ospf:ospfv2/ospf:body/ospf:opaque /ospf:ospfv2/ospf:body/ospf:opaque
/ospf:extended-link-tlvs/ospf:extended-link-tlv: /ospf:extended-link-tlvs/ospf:extended-link-tlv:
+--ro adj-sid-sub-tlvs +--ro adj-sid-sub-tlvs
| +--ro adj-sid-sub-tlv* | +--ro adj-sid-sub-tlv*
| +--ro flags? bits | +--ro flags? bits
| +--ro mt-id? uint8 | +--ro mt-id? uint8
| +--ro weight? uint8 | +--ro weight? uint8
| +--ro sid? uint32 | +--ro sid? uint32
+--ro lan-adj-sid-sub-tlvs +--ro lan-adj-sid-sub-tlvs
+--ro lan-adj-sid-sub-tlv* +--ro lan-adj-sid-sub-tlv*
+--ro flags? bits +--ro flags? bits
+--ro mt-id? uint8 +--ro mt-id? uint8
+--ro weight? uint8 +--ro weight? uint8
+--ro neighbor-router-id? yang:dotted-quad +--ro neighbor-router-id? yang:dotted-quad
+--ro sid? uint32 +--ro sid? uint32
augment /rt:routing-state/rt:routing-protocols augment /rt:routing-state/rt:control-plane-protocols
/rt:routing-protocol/ospf:ospf/ospf:instance/ospf:areas /rt:control-plane-protocol/ospf:ospf/ospf:instance
/ospf:area/ospf:interfaces/ospf:interface /ospf:areas/ospf:area/ospf:interfaces/ospf:interface
/ospf:database/ospf:link-scope-lsa-type/ospf:link-scope-lsas /ospf:database/ospf:link-scope-lsa-type
/ospf:link-scope-lsa/ospf:version/ospf:ospfv2 /ospf:link-scope-lsas/ospf:link-scope-lsa
/ospf:ospfv2/ospf:body/ospf:opaque: /ospf:version/ospf:ospfv2/ospf:ospfv2
/ospf:body/ospf:opaque:
+--ro extended-prefix-range-tlvs +--ro extended-prefix-range-tlvs
| +--ro extended-prefix-range-tlv* | +--ro extended-prefix-range-tlv*
| +--ro range-size? uint16 | +--ro range-size? uint16
| +--ro flags? bits | +--ro flags? bits
| +--ro prefix? inet:ip-prefix | +--ro prefix? inet:ip-prefix
| +--ro perfix-sid-sub-tlvs | +--ro perfix-sid-sub-tlvs
| | +--ro prefix-sid-sub-tlv* | | +--ro prefix-sid-sub-tlv*
| | +--ro flags? bits | | +--ro flags? bits
| | +--ro mt-id? uint8 | | +--ro mt-id? uint8
| | +--ro algorithm? uint8 | | +--ro algorithm? uint8
skipping to change at page 19, line 32 skipping to change at page 19, line 42
| +--ro type? uint16 | +--ro type? uint16
| +--ro length? uint16 | +--ro length? uint16
| +--ro value? yang:hex-string | +--ro value? yang:hex-string
+--ro sr-algorithm-tlv +--ro sr-algorithm-tlv
| +--ro sr-algorithm* uint8 | +--ro sr-algorithm* uint8
+--ro sid-range-tlvs +--ro sid-range-tlvs
+--ro sid-range-tlv* +--ro sid-range-tlv*
+--ro range-size? ospf:uint24 +--ro range-size? ospf:uint24
+--ro sid-sub-tlv +--ro sid-sub-tlv
+--ro sid? uint32 +--ro sid? uint32
augment /rt:routing-state/rt:routing-protocols augment /rt:routing-state/rt:control-plane-protocols
/rt:routing-protocol/ospf:ospf/ospf:instance/ospf:areas /rt:control-plane-protocol/ospf:ospf/ospf:instance
/ospf:area/ospf:database/ospf:area-scope-lsa-type /ospf:areas/ospf:area/ospf:database
/ospf:area-scope-lsas/ospf:area-scope-lsa /ospf:area-scope-lsa-type/ospf:area-scope-lsas
/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque: /ospf:area-scope-lsa/ospf:version/ospf:ospfv2
/ospf:ospfv2/ospf:body/ospf:opaque:
+--ro extended-prefix-range-tlvs +--ro extended-prefix-range-tlvs
| +--ro extended-prefix-range-tlv* | +--ro extended-prefix-range-tlv*
| +--ro range-size? uint16 | +--ro range-size? uint16
| +--ro flags? bits | +--ro flags? bits
| +--ro prefix? inet:ip-prefix | +--ro prefix? inet:ip-prefix
| +--ro perfix-sid-sub-tlvs | +--ro perfix-sid-sub-tlvs
| | +--ro prefix-sid-sub-tlv* | | +--ro prefix-sid-sub-tlv*
| | +--ro flags? bits | | +--ro flags? bits
| | +--ro mt-id? uint8 | | +--ro mt-id? uint8
| | +--ro algorithm? uint8 | | +--ro algorithm? uint8
skipping to change at page 20, line 35 skipping to change at page 20, line 46
| +--ro type? uint16 | +--ro type? uint16
| +--ro length? uint16 | +--ro length? uint16
| +--ro value? yang:hex-string | +--ro value? yang:hex-string
+--ro sr-algorithm-tlv +--ro sr-algorithm-tlv
| +--ro sr-algorithm* uint8 | +--ro sr-algorithm* uint8
+--ro sid-range-tlvs +--ro sid-range-tlvs
+--ro sid-range-tlv* +--ro sid-range-tlv*
+--ro range-size? ospf:uint24 +--ro range-size? ospf:uint24
+--ro sid-sub-tlv +--ro sid-sub-tlv
+--ro sid? uint32 +--ro sid? uint32
augment /rt:routing-state/rt:routing-protocols augment /rt:routing-state/rt:control-plane-protocols
/rt:routing-protocol/ospf:ospf/ospf:instance/ospf:database /rt:control-plane-protocol/ospf:ospf/ospf:instance
/ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa /ospf:database/ospf:as-scope-lsa-type
/ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque: /ospf:as-scope-lsas/ospf:as-scope-lsa/ospf:version
/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque:
+--ro extended-prefix-range-tlvs +--ro extended-prefix-range-tlvs
| +--ro extended-prefix-range-tlv* | +--ro extended-prefix-range-tlv*
| +--ro range-size? uint16 | +--ro range-size? uint16
| +--ro flags? bits | +--ro flags? bits
| +--ro prefix? inet:ip-prefix | +--ro prefix? inet:ip-prefix
| +--ro perfix-sid-sub-tlvs | +--ro perfix-sid-sub-tlvs
| | +--ro prefix-sid-sub-tlv* | | +--ro prefix-sid-sub-tlv*
| | +--ro flags? bits | | +--ro flags? bits
| | +--ro mt-id? uint8 | | +--ro mt-id? uint8
| | +--ro algorithm? uint8 | | +--ro algorithm? uint8
skipping to change at page 22, line 8 skipping to change at page 22, line 22
between systems. A YANG data model is defined in [I-D.ietf-bfd-yang] between systems. A YANG data model is defined in [I-D.ietf-bfd-yang]
that supports BFD configuration and management. that supports BFD configuration and management.
As a client of BFD, the OSPF protocol uses the services provided by As a client of BFD, the OSPF protocol uses the services provided by
BFD. The OSPF BFD YANG augments the base OSPF module and is defined BFD. The OSPF BFD YANG augments the base OSPF module and is defined
as a separate module. So any implementation that does not support as a separate module. So any implementation that does not support
BFD can still use the OSPF base model without having to import the BFD can still use the OSPF base model without having to import the
BFD module [I-D.ietf-bfd-yang]. BFD module [I-D.ietf-bfd-yang].
module: ietf-ospf-bfd module: ietf-ospf-bfd
augment /rt:routing/rt:routing-protocols augment /rt:routing/rt:control-plane-protocols
/rt:routing-protocol/ospf:ospf/ospf:instance /rt:control-plane-protocol/ospf:ospf/ospf:instance
/ospf:areas/ospf:area/ospf:interfaces/ospf:interface: /ospf:areas/ospf:area/ospf:interfaces/ospf:interface:
+--rw bfd +--rw bfd
+--rw enabled? boolean +--rw enabled? boolean
augment /rt:routing-state/rt:routing-protocols augment /rt:routing-state/rt:control-plane-protocols
/rt:routing-protocol/ospf:ospf/ospf:instance /rt:control-plane-protocol/ospf:ospf/ospf:instance
/ospf:areas/ospf:area/ospf:interfaces/ospf:interface: /ospf:areas/ospf:area/ospf:interfaces/ospf:interface:
+--ro bfd +--ro bfd
+--ro enabled? boolean +--ro enabled? boolean
5. OSPF Yang Module 5. OSPF Yang Module
<CODE BEGINS> file "ietf-ospf@2016-03-20.yang" <CODE BEGINS> file "ietf-ospf@2016-07-07.yang"
module ietf-ospf { module ietf-ospf {
namespace "urn:ietf:params:xml:ns:yang:ietf-ospf"; namespace "urn:ietf:params:xml:ns:yang:ietf-ospf";
prefix ospf; prefix ospf;
import ietf-inet-types { import ietf-inet-types {
prefix "inet"; prefix "inet";
} }
import ietf-yang-types { import ietf-yang-types {
prefix "yang"; prefix "yang";
} }
import ietf-interfaces { import ietf-interfaces {
prefix "if"; prefix "if";
} }
import ietf-routing {
prefix "rt";
}
import ietf-routing { import ietf-key-chain {
prefix "rt"; prefix "key-chain";
} }
import ietf-routing-key-chain { organization
prefix "key-chain"; "Cisco Systems
} 170 West Tasman Drive
San Jose, CA 95134-1706
USA";
organization contact
"Cisco Systems "WG Web: <http://tools.ietf.org/wg/ospf/>
170 West Tasman Drive WG List: <mailto:ospf@ietf.org>
San Jose, CA 95134-1706
USA";
contact WG Chair: Acee Lindem
"WG Web: <http://tools.ietf.org/wg/ospf/> <mailto:acee@cisco.com>
WG List: <mailto:ospf@ietf.org>
WG Chair: Acee Lindem WG Chair: Abhay Roy
<mailto:acee@cisco.com> <mailto:akr@cisco.com>
WG Chair: Abhay Roy Editor: Derek Yeung
<mailto:akr@cisco.com> <mailto:myeung@cisco.com>
Author: Derek Yeung
<mailto:myeung@cisco.com>
Author: Yingzhen Qu
<mailto:yiqu@cisco.com>
Author: Jeffrey Zhang
<mailto:zzhang@juniper.net>
Author: Ing-Wher Chen
<mailto:ing-wher.chen@ericsson.com>
Author: Dean Bogdanovic
<mailto:ivandean@gmail.com>
Author: Kiran Agrahara Sreenivasa
<mailto:kkoushik@cisco.com>";
Editor: Derek Yeung description
<mailto:myeung@cisco.com> "This YANG module defines the generic configuration and
Author: Derek Yeung operational state for the OSPF protocol common to all
<mailto:myeung@cisco.com> vendor implementations. It is intended that the module
Author: Yingzhen Qu will be extended by vendors to define vendor-specific
<mailto:yiqu@cisco.com> OSPF configuration parameters and policies,
Author: Jeffrey Zhang for example route maps or route policies.
<mailto:zzhang@juniper.net>
Author: Ing-Wher Chen
<mailto:ing-wher.chen@ericsson.com>
Author: Dean Bogdanovic
<mailto:ivandean@gmail.com>
Author: Kiran Agrahara Sreenivasa
<mailto:kkoushik@cisco.com>";
description Terms and Acronyms
"This YANG module defines the generic configuration and OSPF (ospf): Open Shortest Path First
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 IP (ip): Internet Protocol
OSPF (ospf): Open Shortest Path First IPv4 (ipv4):Internet Protocol Version 4
IP (ip): Internet Protocol IPv6 (ipv6): Internet Protocol Version 6
IPv4 (ipv4):Internet Protocol Version 4 MTU (mtu) Maximum Transmission Unit
";
IPv6 (ipv6): Internet Protocol Version 6 revision 2016-07-07 {
description
"* 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.";
}
MTU (mtu) Maximum Transmission Unit revision 2016-03-20 {
"; description
"* 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 2016-03-20 { revision 2015-10-19 {
description description
"* Reorganize *-config and *-operation groupings. "* Remove the abstract identity ospf.
* 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 { * Make area-id-type dotted-quad only.
description * Use area-id-type for all area-id leafs.
"* Remove the abstract identity ospf. * Restructure notifications.
* Make area-id-type dotted-quad only. * Move BFD support to the new ietf-ospf-bfd module.
* Use area-id-type for all area-id leafs. * Update author information.
* Restructure notifications. * Editorial changes.";
* Move BFD support to the new ietf-ospf-bfd module. reference
* Update author information. "RFC XXXX: A YANG Data Model for OSPF.";
* Editorial changes."; }
reference
"RFC XXXX: A YANG Data Model for OSPF.";
}
revision 2015-09-02 { revision 2015-09-02 {
description description
"* Author information update. "* Author information update.
* Editorial changes"; * Editorial changes";
reference reference
"RFC XXXX: A YANG Data Model for OSPF."; "RFC XXXX: A YANG Data Model for OSPF.";
} }
revision 2015-07-06 { revision 2015-07-06 {
description description
"* Remove support for protocol-centric config. "* Remove support for protocol-centric config.
* Enclose list in container, except for instance. * Enclose list in container, except for instance.
* Replace protocol-shutdown with admin-control. * Replace protocol-shutdown with admin-control.
* Add IP-FRR per-interface config. * Add IP-FRR per-interface config.
* Reorganize max-path etc node. * Reorganize max-path etc node.
* Add node-flag. * Add node-flag.
* Align config/operation hierarchy. * Align config/operation hierarchy.
* Use relative path for reference to rib. * Use relative path for reference to rib.
* Add ability to set single admin distance. * Add ability to set single admin distance.
* Make unreserved bandwidth into list. * Make unreserved bandwidth into list.
* Add F and T bit to OSPFv3 external LSA. * Add F and T bit to OSPFv3 external LSA.
* Remove key statement inside LSA body. * 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.";
}
* Add stub router support. revision 2015-03-09 {
* Fix usage of af-area-config. description
* Add statistics to operation data. "Initial revision.";
* Add local rib. reference
* Use dotted-quad for all router-id fields. "RFC XXXX: A YANG Data Model for OSPF.";
* 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 { identity ospfv2 {
description base "rt:routing-protocol";
"Initial revision."; description "OSPFv2";
reference }
"RFC XXXX: A YANG Data Model for OSPF.";
}
identity ospfv2 { identity ospfv3 {
base "rt:routing-protocol"; base "rt:routing-protocol";
description "OSPFv2"; description "OSPFv3";
} }
identity ospfv3 { identity operation-mode {
base "rt:routing-protocol"; description
description "OSPFv3"; "OSPF operation mode.";
} }
identity operation-mode { identity ships-in-the-night {
description base operation-mode;
"OSPF operation mode."; description
} "Ships-in-the-night operation mode in which
each OSPF instance carries only one address family";
}
identity ships-in-the-night { identity area-type {
base operation-mode; description "Base identity for OSPF area type.";
description }
"Ships-in-the-night operation mode in which
each OSPF instance carries only one address family";
}
identity area-type {
description "Base identity for OSPF area type.";
}
identity normal { identity normal {
base area-type; base area-type;
description "OSPF normal area."; description "OSPF normal area.";
} }
identity stub { identity stub {
base area-type; base area-type;
description "OSPF stub area."; description "OSPF stub area.";
} }
identity nssa { identity nssa {
base area-type; base area-type;
description "OSPF NSSA area."; description "OSPF NSSA area.";
} }
typedef uint24 { typedef uint24 {
type uint32 { type uint32 {
range "0 .. 16777215"; range "0 .. 16777215";
} }
description description
"24-bit unsigned integer."; "24-bit unsigned integer.";
} }
typedef area-id-type { typedef area-id-type {
type yang:dotted-quad; type yang:dotted-quad;
description description
"Area ID type."; "Area ID type.";
} }
typedef route-type { typedef route-type {
type enumeration { type enumeration {
enum intra-area { enum intra-area {
description "OSPF intra-area route."; description "OSPF intra-area route.";
} }
enum inter-area { enum inter-area {
description "OSPF inter-area route."; description "OSPF inter-area route.";
} }
enum external-1 { enum external-1 {
description "OSPF type 1 external route."; description "OSPF type 1 external route.";
} }
enum external-2 { enum external-2 {
description "OSPF type 2 external route."; description "OSPF type 2 external route.";
} }
enum nssa-1 { enum nssa-1 {
description "OSPF type 1 NSSA route."; description "OSPF type 1 NSSA route.";
} }
enum nssa-2 { enum nssa-2 {
description "OSPF type 2 NSSA route."; description "OSPF type 2 NSSA route.";
} }
} }
description "OSPF route type."; description "OSPF route type.";
} }
typedef if-state-type { typedef if-state-type {
type enumeration { type enumeration {
enum Down { enum Down {
value "1"; value "1";
description description
"Interface down state."; "Interface down state.";
} }
enum Loopback { enum Loopback {
value "2"; value "2";
description description
"Interface loopback state."; "Interface loopback state.";
} }
enum Waiting { enum Waiting {
value "3"; value "3";
description description
"Interface waiting state."; "Interface waiting state.";
} }
enum Point-to-Point { enum Point-to-Point {
value "4"; value "4";
description description
"Interface point-to-point state."; "Interface point-to-point state.";
} }
enum DR { enum DR {
value "5"; value "5";
description description
"Interface Designated Router (DR) state."; "Interface Designated Router (DR) state.";
} }
enum BDR { enum BDR {
value "6"; value "6";
description description
"Interface Backup Designated Router (BDR) state."; "Interface Backup Designated Router (BDR) state.";
} }
enum DR-Other { enum DR-Other {
value "7"; value "7";
description description
"Interface Other Designated Router state."; "Interface Other Designated Router state.";
} }
} }
description description
"OSPF interface state type."; "OSPF interface state type.";
} }
typedef nbr-state-type { typedef nbr-state-type {
type enumeration { type enumeration {
enum Down { enum Down {
value "1"; value "1";
description description
"Neighbor down state."; "Neighbor down state.";
} }
enum Attempt { enum Attempt {
value "2"; value "2";
description description
"Neighbor attempt state."; "Neighbor attempt state.";
} }
enum Init { enum Init {
value "3"; value "3";
description description
"Neighbor init state."; "Neighbor init state.";
} }
enum 2-Way { enum 2-Way {
value "4"; value "4";
description description
"Neighbor 2-Way state."; "Neighbor 2-Way state.";
} }
enum ExStart { enum ExStart {
value "5"; value "5";
description description
"Neighbor exchange start state."; "Neighbor exchange start state.";
} }
enum Exchange { enum Exchange {
value "6"; value "6";
description description
"Neighbor exchange state."; "Neighbor exchange state.";
} }
enum Loading { enum Loading {
value "7"; value "7";
description description
"Neighbor loading state."; "Neighbor loading state.";
} }
enum Full { enum Full {
value "8"; value "8";
description description
"Neighbor full state."; "Neighbor full state.";
} }
} }
description description
"OSPF neighbor state type."; "OSPF neighbor state type.";
}
} typedef restart-helper-status-type {
type enumeration {
enum Not-Helping {
value "1";
description
"Restart helper status not helping.";
}
enum Helping {
value "2";
description
"Restart helper status helping.";
}
}
description
"Restart helper status type.";
}
typedef restart-helper-status-type { typedef restart-exit-reason-type {
type enumeration { type enumeration {
enum Not-Helping { enum None {
value "1"; value "1";
description description
"Restart helper status not helping."; "Not attempted.";
} }
enum Helping { enum InProgress {
value "2"; value "2";
description description
"Restart helper status helping."; "Restart in progress.";
} }
} enum Completed {
description value "3";
"Restart helper status type."; 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 restart-exit-reason-type { typedef nssa-translator-state-type {
type enumeration { type enumeration {
enum None { enum Enabled {
value "1"; value "1";
description description
"Not attempted."; "NSSA translator enabled state.";
} }
enum InProgress { enum Elected {
value "2"; description
description "NSSA translator elected state.";
"Restart in progress."; }
} enum Disabled {
enum Completed { value "3";
value "3"; description
description "NSSA translator disabled state.";
"Successfully completed."; }
} }
enum TimedOut { description
value "4"; "OSPF NSSA translator state type.";
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 { typedef restart-status-type {
type enumeration { type enumeration {
enum Enabled { enum Not-Restarting {
value "1"; value "1";
description description
"NSSA translator enabled state."; "Router is not restarting.";
} }
enum Elected { enum Planned-Restart {
description description
"NSSA translator elected state."; "Router is going through planned restart.";
} }
enum Disabled { enum Unplanned-Restart {
value "3"; value "3";
description description
"NSSA translator disabled state."; "Router is going through unplanned restart.";
} }
} }
description description
"OSPF NSSA translator state type."; "OSPF graceful restart status type.";
} }
typedef restart-status-type { typedef checksum16-type {
type enumeration { type string {
enum Not-Restarting { pattern '(0x)?[0-9a-fA-F]{4}';
value "1"; }
description description
"Router is not restarting."; "16-bit checksum in hex-string format 0xXXXX.";
} }
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 multi-topology { feature multi-topology {
description description
"Support Multiple-Topolgy Routing (MTR)."; "Support Multiple-Topolgy Routing (MTR).";
} }
feature multi-area-adj { feature multi-area-adj {
description description
"OSPF multi-area adjacency support as in RFC 5185."; "OSPF multi-area adjacency support as in RFC 5185.";
} }
feature explicit-router-id { feature explicit-router-id {
description description
"Set Router-ID per instance explicitly."; "Set Router-ID per instance explicitly.";
} }
feature demand-circuit { feature demand-circuit {
description description
"OSPF demand circuit support as in RFC 1793."; "OSPF demand circuit support as in RFC 1793.";
} }
feature mtu-ignore {
description
"Disable OSPF Database Description packet MTU
mismatch checking.";
}
feature lls { feature mtu-ignore {
description description
"OSPF link-local signaling (LLS) as in RFC 5613."; "Disable OSPF Database Description packet MTU
} mismatch checking.";
}
feature prefix-suppression { feature lls {
description description
"OSPF prefix suppression support as in RFC 6860."; "OSPF link-local signaling (LLS) as in RFC 5613.";
} }
feature ttl-security { feature prefix-suppression {
description description
"OSPF TTL security check."; "OSPF prefix suppression support as in RFC 6860.";
} }
feature nsr { feature ttl-security {
description description
"Non-Stop-Routing (NSR)."; "OSPF TTL security check.";
} }
feature graceful-restart { feature nsr {
description description
"Graceful OSPF Restart as defined in RFC 3623 and "Non-Stop-Routing (NSR).";
RFC 5187."; }
}
feature admin-control { feature graceful-restart {
description description
"Administrative control of the protocol state."; "Graceful OSPF Restart as defined in RFC 3623 and
} RFC 5187.";
}
feature auto-cost { feature admin-control {
description description
"Calculate OSPF interface cost according to "Administrative control of the protocol state.";
reference bandwidth."; }
}
feature max-ecmp { feature auto-cost {
description description
"Setting maximum number of ECMP paths."; "Calculate OSPF interface cost according to
} reference bandwidth.";
feature max-lsa { }
description
"Setting maximum number of LSAs the OSPF instance
will accept.";
}
feature te-rid { feature max-ecmp {
description description
"TE Router-ID."; "Setting maximum number of ECMP paths.";
} }
feature ldp-igp-sync { feature max-lsa {
description description
"LDP IGP synchronization."; "Setting maximum number of LSAs the OSPF instance
} will accept.";
}
feature ldp-igp-autoconfig { feature te-rid {
description description
"LDP IGP auto-config."; "TE Router-ID.";
} }
feature ospfv3-authentication-ipsec { feature ldp-igp-sync {
description description
"Use IPsec for OSPFv3 authentication."; "LDP IGP synchronization.";
} }
feature fast-reroute { feature ldp-igp-autoconfig {
description description
"Support of IP Fast Reroute (IP-FRR)."; "LDP IGP auto-config.";
} }
feature node-flag { feature ospfv3-authentication-ipsec {
description
"Use IPsec for OSPFv3 authentication.";
}
feature fast-reroute {
description
"Support of IP Fast Reroute (IP-FRR).";
}
feature node-flag {
description
"Support of node flag.";
}
feature lfa {
description
"Support of Loop Free Alternates (LFAs).";
}
feature remote-lfa {
description
"Support of Remote Loop Free Alternates (R-LFA).";
}
feature stub-router {
description
"Support of RFC 6987 OSPF Stub Router Advertisement.";
}
feature instance-inheritance {
description
"Support instance inheritance";
}
feature area-inheritance {
description
"Support area inheritance";
}
feature interface-inheritance {
description
"Support interface inheritance";
}
grouping tlv {
description
"TLV";
leaf type {
type uint16;
description "TLV type.";
}
leaf length {
type uint16;
description "TLV length.";
}
leaf value {
type yang:hex-string;
description "TLV value.";
}
}
grouping unknown-tlvs {
description
"Unknown TLVs grouping - Used for unknown TLVs or
unknown sub-TLVs.";
container unknown-tlvs {
description "All unknown TLVs.";
list unknown-tlv {
description "Unknown TLV.";
uses tlv;
}
}
}
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 type {
type uint8;
description "Link type.";
}
}
grouping ospfv2-lsa-body {
description "OSPFv2 LSA body.";
container router {
when "../../header/type = 1" {
description
"Only applies to Router LSAs.";
}
description description
"Support of node flag."; "Router LSA.";
} leaf flags {
feature lfa { 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).";
}
}
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 description
"Support of Loop Free Alternates (LFAs)."; "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" {
feature remote-lfa { description
"Only applies to Summary LSAs.";
}
description description
"Support of Remote Loop Free Alternates (R-LFA)."; "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.";
feature stub-router { uses unknown-tlvs;
description
"Support of RFC 6987 OSPF Stub Router Advertisement.";
} container router-address-tlv {
description
"Router address TLV.";
leaf router-address {
type inet:ipv4-address;
description
"Router address.";
}
}
feature instance-inheritance { container link-tlvs {
description description "All link TLVs in the LSA.";
"Support instance inheritance"; container link-tlv {
} description "Link TLV.";
leaf link-type {
type uint8;
mandatory true;
description "Link type.";
}
leaf link-id {
type union {
type inet:ipv4-address;
type yang:dotted-quad;
}
mandatory true;
description "Link ID.";
}
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 decimal64 {
fraction-digits 2;
}
description "Maximum bandwidth.";
}
leaf max-reservable-bandwidth {
type decimal64 {
fraction-digits 2;
}
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 decimal64 {
fraction-digits 2;
}
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;
}
}
feature area-inheritance { container extended-prefix-tlvs {
description description "All extended prefix TLVs in the LSA.";
"Support area inheritance"; list extended-prefix-tlv {
} 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.";
feature interface-inheritance { }
description enum inter-area {
"Support interface inheritance"; 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;
}
}
grouping tlv { container extended-link-tlvs {
description description "All extended link TLVs in the LSA.";
"TLV"; list extended-link-tlv {
leaf type { description "Extended link TLV.";
type uint16; uses ospfv2-router-link;
description "TLV type."; uses unknown-tlvs;
} }
leaf length { }
type uint16; }
description "TLV length."; }
} grouping ospfv3-lsa-options {
leaf value { description "OSPFv3 LSA options";
type yang:hex-string; leaf options {
description "TLV value."; 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 unknown-tlvs { grouping ospfv3-lsa-prefix {
description description
"Unknown TLVs grouping - Used for unknown TLVs or "OSPFv3 LSA prefix.";
unknown sub-TLVs.";
container unknown-tlvs {
description "All unknown TLVs.";
list unknown-tlv {
description "Unknown TLV.";
uses tlv;
}
}
}
grouping ospfv2-router-link { leaf prefix {
description "OSPFv2 router link."; type inet:ip-prefix;
leaf link-id { description
type union { "Prefix.";
type inet:ipv4-address; }
type yang:dotted-quad; leaf prefix-options {
} type bits {
description "Link ID."; bit NU {
} description
leaf link-data { "When set, the prefix should be excluded
type union { from IPv6 unicast calculations.";
type inet:ipv4-address; }
type uint32; bit LA {
} description
description "Link data."; "When set, the prefix is actually an IPv6 interface
} address of the Advertising Router.";
leaf type { }
type uint8; bit P {
description "Link type."; 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 ospfv2-lsa-body { grouping ospfv3-lsa-external {
description "OSPFv2 LSA body."; description
container router { "AS-External and NSSA LSA.";
when "../../header/type = 1" { leaf metric {
description type uint24;
"Only applies to Router LSAs."; description "Metric";
} }
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).";
}
}
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.";
uses unknown-tlvs; leaf flags {
type bits {
bit E {
description
"When set, the metric specified is a Type 2
external metric.";
}
bit F {
description
"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.";
}
container router-address-tlv { leaf referenced-ls-type {
description type uint16;
"Router address TLV."; description "Referenced Link State type.";
leaf router-address { }
type inet:ipv4-address;
description
"Router address.";
}
}
container link-tlvs { uses ospfv3-lsa-prefix;
description "All link TLVs in the LSA.";
container link-tlv {
description "Link TLV.";
leaf link-type {
type uint8;
mandatory true;
description "Link type.";
}
leaf link-id {
type union {
type inet:ipv4-address;
type yang:dotted-quad;
}
mandatory true;
description "Link ID.";
}
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 forwarding-address {
leaf max-bandwidth { type inet:ipv6-address;
type decimal64 { description
fraction-digits 2; "Forwarding address.";
} }
description "Maximum bandwidth.";
}
leaf max-reservable-bandwidth {
type decimal64 {
fraction-digits 2;
}
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 decimal64 {
fraction-digits 2;
}
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 { leaf external-route-tag {
description "All extended prefix TLVs in the LSA."; type uint32;
list extended-prefix-tlv { description
description "Extended prefix TLV."; "Route tag.";
leaf route-type { }
type enumeration { leaf referenced-link-state-id {
enum unspecified { type uint32;
value "0"; description
description "Unspecified."; "Referenced Link State ID.";
} }
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 { grouping ospfv3-lsa-body {
description "All extended link TLVs in the LSA."; description "OSPFv3 LSA body.";
list extended-link-tlv { container router {
description "Extended link TLV."; when "../../header/type = 8193" { // 0x2001
uses ospfv2-router-link; description
uses unknown-tlvs; "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.";
}
grouping ospfv3-lsa-options { uses ospfv3-lsa-options;
description "OSPFv3 LSA options";
leaf options {
type bits {
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 { container links {
description description "All router link.";
"OSPFv3 LSA prefix."; list link {
description "Router LSA link.";
leaf interface-id {
type uint32;
description "Interface ID.";
}
leaf neighbor-interface-id {
type uint32;
description "Neighbor Interface ID.";
}
leaf neighbor-router-id {
type yang:dotted-quad;
description "Neighbor Router ID.";
}
leaf type {
type uint8;
description "Link type.";
}
leaf metric {
type uint16;
description "Metric.";
}
}
leaf prefix { }
type inet:ip-prefix; }
description container network {
"Prefix."; when "../../header/type = 8194" { // 0x2002
} description
leaf prefix-options { "Only applies to Network LSA.";
type bits { }
bit NU { description "Network LSA.";
description
"When set, the prefix should be excluded
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 { uses ospfv3-lsa-options;
description
"AS-External and NSSA LSA.";
leaf metric {
type uint24;
description "Metric";
}
leaf flags { container attached-routers {
type bits { description "All attached routers.";
bit E { leaf-list attached-router {
description type yang:dotted-quad;
"When set, the metric specified is a Type 2 description
external metric."; "List of the routers attached to the network.";
} }
bit F { }
description }
"When set, a Forwarding Address is included container inter-area-prefix {
in the LSA."; when "../../header/type = 8195" { // 0x2003
} description
bit T { "Only applies to Inter-Area-Prefix LSAs.";
description }
"When set, an External Route Tag is included leaf metric {
in the LSA."; type uint24;
} description "Metric";
} }
description "Flags."; 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.";
leaf referenced-ls-type { }
type uint16; container as-external {
description "Referenced Link State type."; when "../../header/type = 16389" { // 0x4005
} description
"Only applies to AS-external LSAs.";
}
uses ospfv3-lsa-prefix; uses ospfv3-lsa-external;
leaf forwarding-address { description "AS-External LSA.";
type inet:ipv6-address; }
description container nssa {
"Forwarding address."; when "../../header/type = 8199" { // 0x2007
} description
"Only applies to NSSA LSAs.";
}
uses ospfv3-lsa-external;
leaf external-route-tag { description "NSSA LSA.";
type uint32; }
description container link {
"Route tag."; when "../../header/type = 8" { // 0x0008
} description
leaf referenced-link-state-id { "Only applies to Link LSAs.";
type uint32; }
description leaf rtr-priority {
"Referenced Link State ID."; type uint8;
} description "Router Priority for the interface.";
} }
uses ospfv3-lsa-options;
grouping ospfv3-lsa-body { leaf link-local-interface-address {
description "OSPFv3 LSA body."; type inet:ipv6-address;
container router { description
when "../../header/type = 8193" { // 0x2001 "The originating router's link-local
description interface address for the link.";
"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; leaf num-of-prefixes {
type uint32;
description "Number of prefixes.";
}
container links { container prefixes {
description "All router link."; description "All prefixes for the link.";
list link { list prefix {
description "Router LSA link."; description
leaf interface-id { "List of prefixes associated with the link.";
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 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.";
container attached-routers { leaf referenced-ls-type {
description "All attached routers."; type uint16;
leaf-list attached-router { description "Referenced Link State type.";
type yang:dotted-quad; }
description leaf referenced-link-state-id {
"List of the routers attached to the network."; type uint32;
} description
} "Referenced Link State ID.";
} }
container inter-area-prefix { leaf referenced-adv-router {
when "../../header/type = 8195" { // 0x2003 type inet:ipv4-address;
description description
"Only applies to Inter-Area-Prefix LSAs."; "Referenced Advertising Router.";
} }
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; leaf num-of-prefixes {
type uint16;
description "Number of prefixes.";
}
container prefixes {
description "All prefixes in this LSA.";
list prefix {
description "List of prefixes in this LSA.";
uses ospfv3-lsa-prefix;
leaf metric {
type uint24;
description "Prefix Metric.";
}
}
}
}
}
description "AS-External LSA."; grouping lsa-header {
} description
container nssa { "Common LSA for OSPFv2 and OSPFv3";
when "../../header/type = 8199" { // 0x2007
description
"Only applies to NSSA LSAs.";
}
uses ospfv3-lsa-external;
description "NSSA LSA."; leaf age {
} type uint16;
container link { mandatory true;
when "../../header/type = 8" { // 0x0008 description "LSA age.";
description }
"Only applies to Link LSAs."; leaf type {
} type uint16;
leaf rtr-priority { mandatory true;
type uint8; description "LSA type.";
description "Router Priority for the interface."; }
} leaf adv-router {
uses ospfv3-lsa-options; 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.";
}
}
leaf link-local-interface-address { grouping ospfv2-lsa {
type inet:ipv6-address; description
description "OSPFv2 LSA.";
"The originating router's link-local container header {
interface address for the link."; 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 L {
description
"L-bit is set in Hello and DD packets to indicate that
the packet contains an LLS data block as in RFC 5613.";
}
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 num-of-prefixes { leaf opaque-type {
type uint32; type uint8;
description "Number of prefixes."; description "Opaque type.";
} }
container prefixes { leaf opaque-id {
description "All prefixes for the link."; type uint24;
list prefix { description "Opaque ID.";
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 { uses lsa-header;
type uint16; }
description "Referenced Link State type."; container body {
} description
leaf referenced-link-state-id { "Decoded OSPFv2 LSA body data.";
type uint32; uses ospfv2-lsa-body;
description }
"Referenced Link State ID."; }
}
leaf referenced-adv-router {
type inet:ipv4-address;
description
"Referenced Advertising Router.";
}
leaf num-of-prefixes { grouping ospfv3-lsa {
type uint16; description
description "Number of prefixes."; "Decoded OSPFv3 LSA.";
} container header {
container prefixes { description
description "All prefixes in this LSA."; "Decoded OSPFv3 LSA header data.";
list prefix { leaf lsa-id {
description "List of prefixes in this LSA."; type uint32;
uses ospfv3-lsa-prefix; mandatory true;
leaf metric { description "LSA ID.";
type uint24; }
description "Prefix Metric."; uses lsa-header;
} }
} container body {
} description
} "Decoded OSPF LSA body data.";
} uses ospfv3-lsa-body;
grouping lsa-header { }
description }
"Common LSA for OSPFv2 and OSPFv3"; grouping lsa-common {
leaf age { description
type uint16; "Common field for OSPF LSA represenation.";
mandatory true; leaf decoded-completed {
description "LSA age."; type boolean;
} description
leaf type { "The OSPF LSA body is fully decoded.";
type uint16; }
mandatory true; leaf raw-data {
description "LSA type."; type yang:hex-string;
} description
leaf adv-router { "The complete LSA in network byte
type yang:dotted-quad; order hexadecimal as received or originated.";
mandatory true; }
description "LSA advertising router."; }
}
leaf seq-num {
type uint32;
mandatory true;
description "LSA sequence number.";
}
leaf checksum {
type uint16;
mandatory true;
description "LSA checksum.";
}
leaf length {
type uint16;
mandatory true;
description "LSA length.";
}
}
grouping ospfv2-lsa { grouping lsa {
description description
"OSPFv2 LSA."; "OSPF LSA.";
container header { uses lsa-common;
must "(type = 9 or type = 10 or type = 11) and " choice version {
+ "opaque-id and opaque-type " description
+ "or (type != 9 and type != 10 and type != 11) " "OSPFv2 or OSPFv3 LSA body.";
+ "and not(opaque-id) and " container ospfv2 {
+ "not(opaque-type)" { description "OSPFv2 LSA";
description uses ospfv2-lsa;
"Opaque type and ID only apply to Opaque LSAs."; }
} container ospfv3 {
description description "OSPFv3 LSA";
"Decoded OSPFv2 LSA header data."; uses ospfv3-lsa;
leaf option { }
type bits { }
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";
}
}
mandatory true;
description "LSA options.";
}
leaf lsa-id {
type inet:ipv4-address;
mandatory true;
description "LSA ID.";
}
leaf opaque-type { grouping lsa-key {
type uint8; description
description "Opaque type."; "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.";
}
}
leaf opaque-id { grouping instance-stat {
type uint24; description "Per-instance statistics";
description "Opaque ID."; leaf originate-new-lsa-count {
} type yang:counter32;
description "The number of new LSAs originated.";
}
leaf rx-new-lsas-count {
type yang:counter32;
description "The number of LSAs received.";
}
leaf as-scope-lsa-count {
type yang:gauge32;
description "The number of AS Scope LSAs.";
}
leaf as-scope-lsa-chksum-sum {
type uint32;
description
"The sum of the LSA checksums for AS Scope LSAs.";
}
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
"The sum of the LSA checksums of the LSA type.";
}
}
}
}
uses lsa-header; grouping area-stat {
} description "Per-area statistics.";
container body { leaf spf-runs-count {
description type yang:counter32;
"Decoded OSPFv2 LSA body data."; description
uses ospfv2-lsa-body; "The number of times the intra-area SPF has run.";
}
leaf abr-count {
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.";
}
leaf lsa-cksum-sum {
type int32;
description
"The sum of the LSA checksums of the LSA type.";
}
}
}
}
} grouping interface-stat {
} description "Per-interface statistics";
leaf if-event-count {
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.";
}
}
}
}
grouping ospfv3-lsa { grouping neighbor-stat {
description description "Per-neighbor statistics.";
"Decoded OSPFv3 LSA."; leaf nbr-event-count {
container header { type yang:counter32;
description description
"Decoded OSPFv3 LSA header data."; "The number of times this neighbor has changed
leaf lsa-id { state or an error has occurred.";
type uint32; }
mandatory true; leaf nbr-retrans-qlen {
description "LSA ID."; type yang:gauge32;
} description
uses lsa-header; "The current length of the retransmission queue.";
} }
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 { grouping instance-fast-reroute-config {
description description
"OSPF LSA."; "This group defines global configuration of IP-FRR.";
uses lsa-common; container fast-reroute {
choice version { if-feature fast-reroute;
description description
"OSPFv2 or OSPFv3 LSA body."; "This container may be augmented with global
container ospfv2 { parameters for IP-FRR.";
description "OSPFv2 LSA"; container lfa {
uses ospfv2-lsa; if-feature lfa;
description
"This container may be augmented with
global parameters for LFA. Container creation
has no effect on LFA activation.";
}
}
}
} grouping interface-fast-reroute-config {
container ospfv3 { description
description "OSPFv3 LSA"; "This group defines interface configuration of IP-FRR.";
uses ospfv3-lsa; container fast-reroute {
} if-feature fast-reroute;
} container lfa {
} if-feature lfa;
leaf candidate-disabled {
type boolean;
description
"Prevent the interface to be used as backup.";
}
leaf enabled {
type boolean;
description
"Activates LFA - Per-prefix LFA computation
is assumed.";
}
container remote-lfa {
if-feature remote-lfa;
leaf enabled {
type boolean;
description
"Activates Remote LFA (R-LFA).";
}
description
"Remote LFA configuration.";
}
description
"LFA configuration.";
}
description
"IP Fast-reroute configuration.";
}
}
grouping interface-cost-config {
description
"Interface cost configuration that only applies to
physical interfaces and sham links.";
leaf cost {
type uint16 {
range "1..65535";
}
description
"Interface cost.";
}
}
grouping lsa-key { grouping interface-common-config {
description description
"OSPF LSA key."; "Common configuration for all types of interfaces,
leaf lsa-id { including virtual links and sham links.";
type union {
type inet:ipv4-address;
type uint32;
}
description
"LSA ID.";
}
leaf adv-router {
type inet:ipv4-address;
description
"Advertising router.";
}
}
grouping instance-stat { leaf hello-interval {
description "Per-instance statistics"; type uint16 {
leaf originate-new-lsa-count { range "1..65535";
type yang:counter32; }
description "The number of new LSAs originated."; units seconds;
} description
leaf rx-new-lsas-count { "Interval between hello packets in seconds.";
type yang:counter32; }
description "The number of LSAs received.";
}
leaf as-scope-lsa-count {
type yang:gauge32;
description "The number of AS Scope LSAs.";
}
leaf as-scope-lsa-chksum-sum {
type uint32;
description
"The sum of the LSA checksums for AS Scope LSAs.";
}
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
"The sum of the LSA checksums of the LSA type.";
}
}
}
}
grouping area-stat { leaf dead-interval {
description "Per-area statistics."; type uint16 {
leaf spf-runs-count { range "1..65535";
type yang:counter32; }
description units seconds;
"The number of times the intra-area SPF has run."; must "../dead-interval > ../hello-interval" {
} error-message "The dead interval must be "
leaf abr-count { + "larger than the hello interval";
type yang:gauge32; description
description "The value MUST be greater than 'hello-internval'.";
"The total number of Area Border Routers (ABRs) }
reachable within this area."; description
} "Interval after which a neighbor is
leaf asbr-count { declared down in seconds.";
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.";
}
leaf lsa-cksum-sum {
type int32;
description
"The sum of the LSA checksums of the LSA type.";
}
}
}
}
grouping interface-stat { leaf retransmit-interval {
description "Per-interface statistics"; type uint16 {
leaf if-event-count { range "1..65535";
type yang:counter32; }
description units seconds;
"The number of times this interface has changed its description
state or an error has occurred."; "Interval between retransmitting unacknowledged Link
} State Advertisements (LSAs) in seconds.";
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 transmit-delay {
description "Per-neighbor statistics."; type uint16 {
leaf nbr-event-count { range "1..65535";
type yang:counter32; }
description units seconds;
"The number of times this neighbor has changed description
state or an error has occurred."; "Estimated time needed to transmit Link State Update
} packets on the interface in seconds.";
leaf nbr-retrans-qlen { }
type yang:gauge32;
description
"The current length of the retransmission queue.";
}
}
grouping instance-fast-reroute-config { leaf mtu-ignore {
description if-feature mtu-ignore;
"This group defines global configuration of IP-FRR."; type boolean;
container fast-reroute { description
if-feature fast-reroute; "Enable/Disable bypassing the MTU mismatch check in
description Database Description packets.";
"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.";
}
}
}
grouping interface-fast-reroute-config { leaf lls {
description if-feature lls;
"This group defines interface configuration of IP-FRR."; type boolean;
description
"Enable/Disable link-local signaling (LLS) support.";
}
container fast-reroute { leaf prefix-suppression {
if-feature fast-reroute; if-feature prefix-suppression;
container lfa { type boolean;
if-feature lfa; description
leaf candidate-disabled { "Suppress advertisement of the prefixes associated
type boolean; with the interface.";
description }
"Prevent the interface to be used as backup.";
}
leaf enabled {
type boolean;
description
"Activates LFA - Per-prefix LFA computation
is assumed.";
}
container remote-lfa {
if-feature remote-lfa;
leaf enabled {
type boolean;
description
"Activates Remote LFA (R-LFA).";
}
description
"Remote LFA configuration.";
}
description
"LFA configuration.";
}
description
"IP Fast-reroute configuration.";
}
}
grouping interface-common-config { container ttl-security {
description if-feature ttl-security;
"Common configuration for all types of interfaces, description "TTL security check.";
including virtual links and sham links."; leaf enable {
type boolean;
description
"Enable/Disable TTL security check.";
}
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 cost { container authentication {
type uint16 { description "Authentication configuration.";
range "1..65535"; choice auth-type-selection {
} description
description "Options for expressing authentication setting.";
"Interface cost."; case auth-ipsec {
} when "../../../../../../../rt:type = 'ospf:ospfv3'" {
leaf hello-interval { description "Applied to OSPFv3 only.";
type uint16 { }
range "1..65535"; if-feature ospfv3-authentication-ipsec;
leaf sa {
type string;
description
"Security Association name.";
}
}
case auth-trailer-key-chain {
leaf key-chain {
type key-chain:key-chain-ref;
description
"key-chain name.";
}
}
case auth-trailer-key {
leaf key {
type string;
description
"Key string in ASCII format.";
}
container crypto-algorithm {
uses key-chain:crypto-algorithm-types;
description
"Cryptographic algorithm associated with key.";
} }
units seconds; }
description }
"Interval between hello packets in seconds."; }
} } // interface-common-config
leaf dead-interval { grouping interface-config {
type uint16 { description "Configuration for real interfaces.";
range "1..65535";
}
units seconds;
must "../dead-interval > ../hello-interval" {
error-message "The dead interval must be "
+ "larger than the hello interval";
description
"The value MUST be greater than 'hello-internval'.";
}
description
"Interval after which a neighbor is
declared down in seconds.";
}
leaf retransmit-interval { leaf network-type {
type uint16 { type enumeration {
range "1..65535"; enum "broadcast" {
} description
units seconds; "Specify OSPF broadcast multi-access network.";
description }
"Interval between retransmitting unacknowledged Link enum "non-broadcast" {
State Advertisements (LSAs) in seconds."; 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.";
}
}
description
"Network type.";
}
leaf transmit-delay { leaf passive {
type uint16 { type boolean;
range "1..65535"; description
} "Enable/Disable passive interface - a passive interface's
units seconds; prefix will be advertised but no neighbor adjacencies
description will be formed on the interface.";
"Estimated time needed to transmit Link State Update }
packets on the interface in seconds.";
}
leaf mtu-ignore { leaf demand-circuit {
if-feature mtu-ignore; if-feature demand-circuit;
type boolean; type boolean;
description description
"Enable/Disable bypassing the MTU mismatch check in "Enable/Disable demand circuit.";
Database Description packets."; }
leaf priority {
type uint8;
description
"Configure OSPF router priority.";
}
} container multi-areas {
if-feature multi-area-adj;
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 lls { container static-neighbors {
if-feature lls; description "Statically configured neighbors.";
type boolean;
description
"Enable/Disable link-local signaling (LLS) support.";
}
leaf prefix-suppression { list neighbor {
if-feature prefix-suppression; key "address";
type boolean; description
description "Specify a static OSPF neighbor.";
"Suppress advertisement of the prefixes associated
with the interface.";
}
container ttl-security { leaf address {
if-feature ttl-security; type inet:ip-address;
description "TTL security check."; description "Neighbor IP address.";
leaf enable { }
type boolean;
description
"Enable/Disable TTL security check.";
}
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.";
}
container authentication { leaf cost {
description "Authentication configuration."; type uint16 {
choice auth-type-selection { range "1..65535";
description }
"Options for expressing authentication setting."; description "Neighbor cost.";
case auth-ipsec { }
when "../../../../../../../rt:type = 'ospf:ospfv3'" { leaf poll-interval {
description "Applied to OSPFv3 only."; type uint16 {
} range "1..65535";
if-feature ospfv3-authentication-ipsec;
leaf sa {
type string;
description
"Security Association name.";
}
}
case auth-trailer-key-chain {
leaf key-chain {
type key-chain:key-chain-ref;
description
"key-chain name.";
}
}
case auth-trailer-key {
leaf key {
type string;
description
"Key string in ASCII format.";
}
container crypto-algorithm {
uses key-chain:crypto-algorithm-types;
description
"Cryptographic algorithm associated with key.";
}
}
}
}
} // interface-common-config
grouping interface-config { }
description "Configuration for real interfaces."; units seconds;
description "Neighbor poll interval in seconds.";
}
leaf priority {
type uint8 {
range "1..255";
}
description "Neighbor priority for DR election.";
}
}
}
leaf network-type { leaf node-flag {
type enumeration { if-feature node-flag;
enum "broadcast" { type boolean;
description default false;
"Specify OSPF broadcast multi-access network."; description
} "Set prefix as a node representative prefix.";
enum "non-broadcast" { }
description uses interface-fast-reroute-config;
"Specify OSPF Non-Broadcast Multi-Access uses interface-common-config;
(NBMA) network."; uses interface-cost-config;
} } // grouping interface-config
enum "point-to-multipoint" {
description
"Specify OSPF point-to-multipoint network.";
}
enum "point-to-point" {
description
"Specify OSPF point-to-point network.";
}
}
description
"Network type.";
}
leaf passive { grouping neighbor-operation {
type boolean; description
description "OSPF neighbor operation data.";
"Enable/Disable passive interface - a passive interface's
prefix will be advertised but no neighbor adjacencies
will be formed on the interface.";
}
leaf demand-circuit { leaf address {
if-feature demand-circuit; type inet:ip-address;
type boolean; description
description "Neighbor address.";
"Enable/Disable demand circuit."; }
} leaf dr-router-id {
type yang:dotted-quad;
description "Neighbor's Designated Router (DR) router ID.";
}
container multi-areas { leaf dr-ip-addr {
description "Container for multi-area config."; type inet:ip-address;
list multi-area { description "Neighbor's Designated Router (DR) IP address.";
if-feature multi-area-adj; }
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.";
}
}
}
container static-neighbors { leaf bdr-router-id {
description "Statically configured neighbors."; type yang:dotted-quad;
description
"Neighbor's Backup Designated Router (BDR) router ID.";
list neighbor { }
key "address";
description
"Specify a static OSPF neighbor.";
leaf address { leaf bdr-ip-addr {
type inet:ip-address; type inet:ip-address;
description "Neighbor IP address."; description
} "Neighbor's Backup Designated Router (BDR) IP Address.";
}
leaf state {
type nbr-state-type;
description
"OSPF neighbor state.";
}
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 "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.";
}
}
}
leaf node-flag { leaf state {
if-feature node-flag; type if-state-type;
type boolean; description "Interface state.";
default false; }
description
"Set prefix as a segment routing (SR) node
representative prefix.";
}
uses interface-fast-reroute-config;
uses interface-common-config;
} // grouping interface-config
grouping neighbor-operation { leaf hello-timer {
description type uint32;
"OSPF neighbor operation data."; units "milliseconds";
description "Hello timer.";
}
leaf address { leaf wait-timer {
type inet:ip-address; type uint32;
description units "milliseconds";
"Neighbor address."; description "Wait timer.";
} }
leaf dr-router-id {
type yang:dotted-quad;
description "Neighbor's Designated Router (DR) router ID.";
}
leaf dr-ip-addr { leaf dr-router-id {
type inet:ip-address; type yang:dotted-quad;
description "Neighbor's Designated Router (DR) IP address."; description "Designated Router (DR) router ID.";
} }
leaf bdr-router-id { leaf dr-ip-addr {
type yang:dotted-quad; type inet:ip-address;
description description "Designated Router (DR) IP address.";
"Neighbor's Backup Designated Router (BDR) router ID.";
}
leaf bdr-ip-addr { }
type inet:ipv4-address;
description
"Neighbor's Backup Designated Router (BDR) IP Address.";
}
leaf state {
type nbr-state-type;
description
"OSPF neighbor state.";
}
container statistics {
description "Per neighbor statistics";
uses neighbor-stat;
}
}
grouping interface-common-operation { leaf bdr-router-id {
description type yang:dotted-quad;
"OSPF interface common operation state."; description "Backup Designated Router (BDR) router ID.";
reference "RFC2328 Section 9"; }
leaf state { leaf bdr-ip-addr {
type if-state-type; type inet:ip-address;
description "Interface state."; description "Backup Designated Router (BDR) IP Address.";
} }
leaf hello-timer {
type uint32;
units "milliseconds";
description "Hello timer.";
}
leaf wait-timer { container statistics {
type uint32; description "Per interface statistics";
units "milliseconds"; uses interface-stat;
description "Wait timer."; }
}
leaf dr-router-id { container neighbors {
type yang:dotted-quad; description "All neighbors for the interface.";
description "Designated Router (DR) router ID."; list neighbor {
} key "neighbor-router-id";
description
"List of OSPF neighbors.";
leaf neighbor-router-id {
type yang:dotted-quad;
description
"Neighbor router ID.";
}
uses neighbor-operation;
} // list of OSPF neighbors
}
} // interface-common-operation
leaf dr-ip-addr { grouping interface-operation {
type inet:ip-address; description
description "Designated Router (DR) IP address."; "OSPF interface operation state.";
} reference "RFC2328 Section 9";
leaf bdr-router-id { uses interface-common-operation;
type yang:dotted-quad;
description "Backup Designated Router (BDR) router ID.";
}
leaf bdr-ip-addr { container database {
type inet:ipv4-address; description "Link scope LSA database.";
description "Backup Designated Router (BDR) IP Address."; list link-scope-lsa-type {
} 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.";
}
}
}
}
}
} // list link-scope-lsas
}
}
container statistics { grouping virtual-link-config {
description "Per interface statistics"; description
uses interface-stat; "OSPF virtual link configuration state.";
}
container neighbors { uses interface-common-config;
description "All neighbors for the interface."; }
list neighbor {
key "neighbor-router-id";
description
"List of OSPF neighbors.";
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 { grouping virtual-link-operation {
description description
"OSPF interface operation state."; "OSPF virtual link operation state.";
reference "RFC2328 Section 9";
uses interface-common-operation; leaf cost {
type uint16 {
range "1..65535";
}
description
"Virtual link interface cost.";
}
uses interface-common-operation;
container database { }
description "Link scope LSA database.";
list link-scope-lsa-type {
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.";
}
}
}
}
}
} // list link-scope-lsas
}
}
grouping virtual-link-config {
description
"OSPF virtual link configuration state.";
uses interface-common-config; grouping sham-link-config {
} description
"OSPF sham link configuration state.";
grouping virtual-link-operation { uses interface-common-config;
description uses interface-cost-config;
"OSPF virtual link operation state."; }
uses interface-common-operation; grouping sham-link-operation {
} description
"OSPF sham link operation state.";
grouping sham-link-config { uses interface-common-operation;
description }
"OSPF sham link configuration state.";
uses interface-common-config; grouping af-area-config {
} description
"OSPF address-family specific area config state.";
grouping sham-link-operation { container ranges {
description description "Container for summary ranges";
"OSPF sham link operation state.";
uses interface-common-operation; list range {
} key "prefix";
description
"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 af-area-config { }
description
"OSPF address-family specific area config state.";
container ranges { grouping area-common-config {
description "Container for summary ranges"; description
"OSPF area common configuration state.";
list range { leaf summary {
key "prefix"; when "../area-type = 'ospf:stub' or "
description + "../area-type = 'ospf:nssa'" {
"Summarize routes matching address/mask description
(Area Border Routers (ABRs) only)"; "Summary advertisement into the stub/NSSA area.";
leaf prefix { }
type inet:ip-prefix; type boolean;
description description
"IPv4 or IPv6 prefix"; "Enable/Disable summary advertisement into the stub or
} NSSA area.";
leaf advertise { }
type boolean; leaf default-cost {
description when "../area-type = 'ospf:stub' or "
"Advertise or hide."; + "../area-type = 'ospf:nssa'" {
} description
leaf cost { "Cost for LSA default route advertised into the
type uint24 { stub or NSSA area.";
range "0..16777214"; }
} type uint32 {
description range "1..16777215";
"Advertised cost of summary route."; }
} description
} "Set the summary default route cost for a
} stub or NSSA area.";
} }
}
grouping area-common-config { grouping area-config {
description description
"OSPF area common configuration state."; "OSPF area configuration state.";
leaf summary { container all-interfaces-inherit {
when "../area-type = 'ospf:stub' or " if-feature interface-inheritance;
+ "../area-type = 'ospf:nssa'" { description
description "Inheritance for all interfaces";
"Summary advertisement into the stub/NSSA area."; container interface {
} description
type boolean; "Interface config to be inherited by all
description interfaces in the area.";
"Enable/Disable summary advertisement into the stub or }
NSSA area."; }
} leaf area-type {
leaf default-cost { type identityref {
when "../area-type = 'ospf:stub' or " base area-type;
+ "../area-type = 'ospf:nssa'" { }
description default normal;
"Cost for LSA default route advertised into the description
stub or NSSA area."; "Area type.";
} }
type uint32 {
range "1..16777215";
}
description
"Set the summary default route cost for a
stub or NSSA area.";
}
}
grouping area-config { uses area-common-config;
description
"OSPF area configuration state.";
container all-interfaces-inherit { uses af-area-config {
if-feature interface-inheritance; when "../../operation-mode = "
description + "'ospf:ships-in-the-night'" {
"Inheritance for all interfaces"; description
container interface { "Ships in the night configuration.";
description }
"Interface config to be inherited by all }
interfaces in the area."; }
}
}
leaf area-type { grouping area-operation {
type identityref { description
base area-type; "OSPF area operation state.";
}
default normal;
description
"Area type.";
}
uses area-common-config; container statistics {
description "Per area statistics";
uses area-stat;
}
uses af-area-config { container database {
when "../../operation-mode = " description "Area scope LSA database.";
+ "'ospf:ships-in-the-night'" { list area-scope-lsa-type {
description key "lsa-type";
"Ships in the night configuration."; 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 area-operation { grouping local-rib {
description description "Local-rib grouping.";
"OSPF area operation state."; 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.";
container statistics { }
description "Per area statistics"; leaf route-type {
uses area-stat; type route-type;
} description "Route type for this route.";
}
leaf route-tag {
type uint32;
description "Route tag for this route.";
}
}
}
}
container database { grouping instance-config {
description "Area scope LSA database."; description
list area-scope-lsa-type { "OSPF instance config state.";
key "lsa-type";
description "List OSPF area scope LSA databases.";
leaf lsa-type {
type uint16;
description "OSPF area scope LSA type.";
} container all-areas-inherit {
container area-scope-lsas { if-feature area-inheritance;
description description
"All area scope LSAs of an area scope "Inheritance for all areas.";
LSA type."; container area {
list area-scope-lsa { description
key "lsa-id adv-router"; "Area config to be inherited by all areas.";
description "List of OSPF area scope LSAs"; }
uses lsa-key; container interface {
uses lsa { description
refine "version/ospfv2/ospfv2" { "Interface config to be inherited by all interfaces
must "../../../../../../../../../" in all areas.";
+ "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 { leaf explicit-router-id {
description "Local-rib grouping."; if-feature explicit-router-id;
container local-rib { type yang:dotted-quad;
description "Local-rib."; description
list route { "Defined in RFC 2328. A 32-bit number
key "prefix"; that uniquely identifies the router.";
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 { container admin-distance {
description description "Admin distance config state.";
"OSPF instance config state."; 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 all-areas-inherit { container nsr {
if-feature area-inheritance; if-feature nsr;
description description
"Inheritance for all areas."; "Non-Stop Routing (NSR) config state.";
container area { leaf enable {
description type boolean;
"Area config to be inherited by all areas."; description
} "Enable/Disable NSR.";
container interface { }
description }
"Interface config to be inherited by all interfaces
in all areas.";
}
}
leaf explicit-router-id { container graceful-restart {
if-feature explicit-router-id; if-feature graceful-restart;
type yang:dotted-quad; description
description "Graceful restart config state.";
"Defined in RFC 2328. A 32-bit number leaf enable {
that uniquely identifies the router."; 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).";
}
}
container admin-distance { leaf enable {
description "Admin distance config state."; if-feature admin-control;
choice scope { type boolean;
description default true;
"Options for expressing admin distance description
as single or multiple values."; "Enable/Disable the protocol.";
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 auto-cost {
} if-feature auto-cost;
} 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.";
}
}
container nsr { container spf-control {
if-feature nsr; leaf paths {
description if-feature max-ecmp;
"Non-Stop Routing (NSR) config state."; type uint16 {
leaf enable { range "1..32";
type boolean; }
description description
"Enable/Disable NSR."; "Maximum number of Equal-Cost Multi-Path (ECMP) paths.";
} }
} description "SPF calculation control.";
}
container graceful-restart { container database-control {
if-feature graceful-restart; leaf max-lsa {
description if-feature max-lsa;
"Graceful restart config state."; type uint32 {
leaf enable { range "1..4294967294";
type boolean; }
description description
"Enable/Disable graceful restart as defined in RFC 3623 "Maximum number of LSAs OSPF the router will accept.";
for OSPFv2 and RFC 5187 for OSPFv3."; }
} description "Database maintenance control.";
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 {
if-feature admin-control;
type boolean;
default true;
description
"Enable/Disable the protocol.";
}
container auto-cost { container stub-router {
if-feature auto-cost; if-feature stub-router;
description description "Set maximum metric configuration";
"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 spf-control { choice trigger {
leaf paths { description
if-feature max-ecmp; "Specific triggers which will enable stub
type uint16 { router state.";
range "1..32"; container always {
} presence
description "Enables unconditional stub router support";
"Maximum number of Equal-Cost Multi-Path (ECMP) paths."; description
} "Unconditional stub router state (advertise
description "SPF calculation control."; transit links with max metric";
} }
}
}
container database-control { container mpls {
leaf max-lsa { description
if-feature max-lsa; "OSPF MPLS config state.";
type uint32 { container te-rid {
range "1..4294967294"; if-feature te-rid;
} description
description "Stable OSPF Router IP Address used for Traffic
"Maximum number of LSAs OSPF the router will accept."; Engineering (TE)";
} choice source {
description "Database maintenance control."; 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.";
container stub-router { leaf igp-sync {
if-feature stub-router; if-feature ldp-igp-sync;
description "Set maximum metric configuration"; 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;
}
choice trigger { grouping instance-operation {
description description
"Specific triggers which will enable stub "OSPF Address Family operation state.";
router state.";
container always {
presence
"Enables unconditional stub router support";
description
"Unconditional stub router state (advertise
transit links with max metric";
}
}
}
container mpls { leaf router-id {
description type yang:dotted-quad;
"OSPF MPLS config state."; description
container te-rid { "Defined in RFC 2328. A 32-bit number
if-feature te-rid; that uniquely identifies the router.";
description }
"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 { uses local-rib;
description
"OSPF Address Family operation state.";
leaf router-id { container statistics {
type yang:dotted-quad; description "Per instance statistics";
description uses instance-stat;
"Defined in RFC 2328. A 32-bit number }
that uniquely identifies the router.";
}
uses local-rib; container database {
description "AS scope LSA database.";
list as-scope-lsa-type {
key "lsa-type";
description "List OSPF AS scope LSA databases.";
leaf lsa-type {
type uint16;
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 statistics { grouping ospf-config {
description "Per instance statistics"; description
uses instance-stat; "OSPF top configuration state.";
}
container database { container all-instances-inherit {
description "AS scope LSA database."; if-feature instance-inheritance;
list as-scope-lsa-type { description
key "lsa-type"; "Inheritance support to all instances.";
description "List OSPF AS scope LSA databases."; container area {
leaf lsa-type { description
type uint16; "Area config to be inherited by all areas
description "OSPF AS scope LSA type."; in all instances.";
} }
container as-scope-lsas { container interface {
description "All AS scope of LSA of this LSA type."; description
list as-scope-lsa { "Interface config to be inherited by all
key "lsa-id adv-router"; interfaces in all instances.";
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
}
}
grouping ospf-config { leaf operation-mode {
description type identityref {
"OSPF top configuration state."; base operation-mode;
}
default ospf:ships-in-the-night;
description
"OSPF operation mode.";
}
}
container all-instances-inherit { grouping ospf-operation {
if-feature instance-inheritance; description
description "OSPF top operation 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 { grouping multi-topology-area-config {
type identityref { description
base operation-mode; "OSPF multi-topology area configuration state.";
}
default ospf:ships-in-the-night;
description
"OSPF operation mode.";
}
}
grouping ospf-operation { uses area-common-config;
description
"OSPF top operation state.";
}
grouping multi-topology-area-config { uses af-area-config {
description when "../../../../operation-mode = "
"OSPF multi-topology area configuration state."; + "'ospf:ships-in-the-night'" {
description
"Ships in the night configuration.";
}
}
}
uses area-common-config; grouping multi-topology-area-operation {
description
"OSPF multi-topology area operation state.";
}
uses af-area-config { grouping multi-topology-config {
when "../../../../operation-mode = " description
+ "'ospf:ships-in-the-night'" { "OSPF multi-topology configuration state.";
description }
"Ships in the night configuration.";
}
}
}
grouping multi-topology-area-operation { grouping multi-topology-operation {
description description
"OSPF multi-topology area operation state."; "OSPF multi-topology operation state.";
}
grouping multi-topology-config { uses local-rib;
description }
"OSPF multi-topology configuration state.";
}
grouping multi-topology-operation { grouping multi-topology-interface-config {
description
"OSPF multi-topology configuration state.";
leaf cost {
type uint32;
description description
"OSPF multi-topology operation state."; "Interface cost for this topology.";
}
}
uses local-rib; grouping multi-topology-interface-operation {
} description
"OSPF multi-topology operation state.";
}
grouping multi-topology-interface-config { grouping ospfv3-interface-config {
description description
"OSPF multi-topology configuration state."; "OSPFv3 interface specific configuration state.";
leaf cost { leaf instance-id {
type uint32; type uint8 {
description range "0 .. 31";
"Interface cost for this topology."; }
} description
} "OSPFv3 instance ID.";
}
}
grouping multi-topology-interface-operation { grouping ospfv3-interface-operation {
description description
"OSPF multi-topology operation state."; "OSPFv3 interface specific operation state.";
}
grouping ospfv3-interface-config { leaf interface-id {
description type uint16;
"OSPFv3 interface specific configuration state."; description
"OSPFv3 interface ID.";
}
}
leaf instance-id { augment "/rt:routing/rt:control-plane-protocols/"
type uint8 { + "rt:control-plane-protocol" {
range "0 .. 31"; when "rt:type = 'ospf:ospfv2' or rt:type = 'ospf:ospfv3'" {
} description
description "This augmentation is only valid for a routing protocol
"OSPFv3 instance ID."; instance of OSPF (type 'ospfv2' or 'ospfv3').";
} }
} description "OSPF augmentation.";
grouping ospfv3-interface-operation { container ospf {
description description
"OSPFv3 interface specific operation state."; "OSPF.";
leaf interface-id { uses ospf-config;
type uint16; list instance {
description key "af";
"OSPFv3 interface ID."; description
} "An OSPF routing protocol instance.";
}
augment "/rt:routing/rt:routing-protocols/" leaf af {
+ "rt:routing-protocol" { type identityref {
when "rt:type = 'ospf:ospfv2' or rt:type = 'ospf:ospfv3'" { base rt:address-family;
description }
"This augmentation is only valid for a routing protocol description
instance of OSPF (type 'ospfv2' or 'ospfv3')."; "Address-family of the instance.";
} }
description "OSPF augmentation.";
container ospf { uses instance-config;
description
"OSPF.";
uses ospf-config; container areas {
description "All areas.";
list area {
key "area-id";
description
"List of OSPF areas";
leaf area-id {
type area-id-type;
description
"Area ID.";
}
list instance { uses area-config;
key "af";
description
"An OSPF routing protocol instance.";
leaf af { container virtual-links {
type identityref { when "../area-id = '0' and "
base rt:address-family; + "../area-type = 'ospf:normal'" {
} description
description "Virutal links must be in backbone area.";
"Address-family of the instance."; }
} 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 instance-config; uses virtual-link-config;
}
}
container sham-links {
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
container areas { }
description "All areas."; } // list of instance
list area { } // container ospf
key "area-id"; }
description
"List of OSPF areas";
leaf area-id {
type area-id-type;
description
"Area ID.";
}
uses area-config; augment "/rt:routing/rt:control-plane-protocols/"
+ "rt:control-plane-protocol/ospf:ospf/ospf:instance" {
when "../../rt:type = 'ospf:ospfv2' or
../../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";
}
container virtual-links { uses multi-topology-config;
description "All virtual links.";
list virtual-link {
when "../../area-id != '0' and "
+ "../../area-type = 'ospf:normal'" {
description
"Transit area must be a non-backbone
normal area.";
}
key "router-id";
description
"OSPF virtual link";
leaf router-id {
type yang:dotted-quad;
description
"Virtual Link remote endpoint router ID.";
}
uses virtual-link-config; container areas {
} description "All areas in the topology.";
} list area {
container sham-links { key "area-id";
description "All sham links."; description
list sham-link { "List of OSPF areas";
key "local-id remote-id"; leaf area-id {
description type area-id-type;
"OSPF sham link"; description
leaf local-id { "Area ID.";
type inet:ip-address; }
description uses multi-topology-area-config;
"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 "interface";
description
"List of OSPF interfaces.";
leaf interface {
type if:interface-ref;
description
"Interface.";
}
uses interface-config;
} // list of interfaces
}
} // list of areas
}
} // list of instance
} // container ospf }
} }
augment "/rt:routing/rt:routing-protocols/" augment "/rt:routing/rt:control-plane-protocols/"
+ "rt:routing-protocol/ospf:ospf/ospf:instance" { + "rt:control-plane-protocol/ospf:ospf/ospf:instance/"
when "../../rt:type = 'ospf:ospfv2' or + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" {
../../rt:type = 'ospf:ospfv3'" { when "../../../../../../rt:type = 'ospf:ospfv2'" {
description description
"This augmentation is only valid for OSPF "This augmentation is only valid for OSPFv2.";
(type 'ospfv2' or 'ospfv3')."; }
} if-feature ospf:multi-topology;
if-feature multi-topology; description
description "OSPF multi-topology interface configuration state
"OSPF multi-topology instance configuration augmentation.";
state augmentation."; container topologies {
container topologies { description "All topologies for the interface.";
description "All topologies."; list topology {
list topology { key "name";
// Topology must be in the same routing-instance description "OSPF interface topology.";
// and of same AF as the container. leaf name {
key "name"; type leafref {
description "OSPF topology."; path "../../../../../../../../../../../"
leaf name { + "rt:ribs/rt:rib/rt:name";
type leafref { }
path "../../../../../../../rt:ribs/rt:rib/rt:name"; description
} "One of the topologies enabled on this interface.";
description "RIB"; }
}
uses multi-topology-config; uses multi-topology-interface-config;
}
}
}
container areas { augment "/rt:routing/rt:control-plane-protocols/"
description "All areas in the topology."; + "rt:control-plane-protocol/ospf:ospf/ospf:instance/"
list area { + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" {
key "area-id"; when "../../../../../../rt:type = 'ospf:ospfv3'" {
description description
"List of OSPF areas"; "This augmentation is only valid for OSPFv3.";
leaf area-id { }
type area-id-type; description
description "OSPFv3 interface specific configuration state
"Area ID."; augmentation.";
} uses ospfv3-interface-config;
uses multi-topology-area-config; }
}
}
}
}
}
augment "/rt:routing/rt:routing-protocols/"
+ "rt:routing-protocol/ospf:ospf/ospf:instance/"
+ "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
"One of the topologies enabled on this interface.";
}
uses multi-topology-interface-config; augment "/rt:routing-state/"
} + "rt:control-plane-protocols/rt:control-plane-protocol" {
}
}
augment "/rt:routing/rt:routing-protocols/" when "rt:type = 'ospf:ospfv2' or "
+ "rt:routing-protocol/ospf:ospf/ospf:instance/" + "rt:type = 'ospf:ospfv3'" {
+ "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" { description
when "../../../../../../rt:type = 'ospf:ospfv3'" { "This augmentation is only valid for a routing protocol
description instance of type 'ospfv2' or 'ospfv3'.";
"This augmentation is only valid for OSPFv3."; }
} description
description "OSPF operational state.";
"OSPFv3 interface specific configuration state container ospf {
augmentation."; description "OSPF";
uses ospfv3-interface-config;
}
augment "/rt:routing-state/" uses ospf-config;
+ "rt:routing-protocols/rt:routing-protocol" { uses ospf-operation;
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; list instance {
uses ospf-operation; key "af";
description
"An OSPF routing protocol instance.";
list instance { leaf af {
key "af"; type identityref {
description base rt:address-family;
"An OSPF routing protocol instance."; }
description
"Address-family of the instance.";
}
leaf af { uses instance-config;
type identityref { uses instance-operation;
base rt:address-family;
}
description
"Address-family of the instance.";
}
uses instance-config; container areas {
uses instance-operation; description "All areas";
list area {
key "area-id";
description "List of OSPF areas";
leaf area-id {
type area-id-type;
description "Area ID.";
}
container areas { uses area-config;
description "All areas"; uses area-operation;
list area {
key "area-id";
description "List of OSPF areas";
leaf area-id {
type area-id-type;
description "Area ID.";
}
uses area-config; container virtual-links {
uses area-operation; description "All virtual links.";
list virtual-link {
description
"OSPF virtual link";
container virtual-links { leaf transit-area-id {
description "All virtual links."; type leafref {
list virtual-link { path "../../../area-id";
description }
"OSPF virtual link"; description
leaf router-id { "Virutal link transit area ID.";
type yang:dotted-quad; }
description leaf router-id {
"Virtual link router ID."; type yang:dotted-quad;
} description
"Virtual link router ID.";
}
uses virtual-link-config; uses virtual-link-config;
uses virtual-link-operation; uses virtual-link-operation;
} }
} }
container sham-links { container sham-links {
description "All sham links."; description "All sham links.";
list sham-link { list sham-link {
description description
"OSPF sham link"; "OSPF sham link";
leaf local-id { leaf local-id {
type inet:ip-address; type inet:ip-address;
description description
"Address of the local Sham Link endpoint."; "Address of the local Sham Link endpoint.";
} }
leaf remote-id { leaf remote-id {
type inet:ip-address; type inet:ip-address;
description description
"Address of the remote Sham Link endpoint."; "Address of the remote Sham Link endpoint.";
} }
uses sham-link-config; uses sham-link-config;
uses sham-link-operation; uses sham-link-operation;
} }
} }
container interfaces { container interfaces {
description "All interfaces in the area."; description "All interfaces in the area.";
list interface { list interface {
key "interface"; key "name";
description description
"List of OSPF interfaces."; "List of OSPF interfaces.";
leaf interface { leaf name {
// Should it refer to config state leaf? // Should it refer to config state leaf?
type if:interface-ref; type if:interface-ref;
description "Interface."; description "Interface name.";
} }
uses interface-config;
uses interface-operation;
} // list of OSPF interfaces
}
} // list of OSPF areas
}
} // list of instances
} // container ospf
}
uses interface-config; augment "/rt:routing-state/"
uses interface-operation; + "rt:control-plane-protocols/rt:control-plane-protocol/"
} // list of OSPF interfaces + "ospf:ospf/ospf:instance" {
} when "../../rt:type = 'ospf:ospfv2'" {
} // list of OSPF areas description
} "This augmentation is only valid for OSPFv2.";
} // list of instances }
} // container ospf if-feature multi-topology;
} description
augment "/rt:routing-state/" "OSPF multi-topology instance operation state
+ "rt:routing-protocols/rt:routing-protocol/" augmentation.";
+ "ospf:ospf/ospf:instance" { container topologies {
when "../../rt:type = 'ospf:ospfv2'" { description "All topologies.";
description list topology {
"This augmentation is only valid for OSPFv2."; // Topology must be in the same routing-instance
} // and of same AF as the container.
if-feature multi-topology; key "name";
description description "OSPF topology.";
"OSPF multi-topology instance operation state leaf name {
augmentation."; type leafref {
container topologies { path "../../../../../../../"
description "All topologies."; + "rt:ribs/rt:rib/rt:name";
list topology { }
// Topology must be in the same routing-instance description "RIB";
// 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 multi-topology-config;
uses multi-topology-operation; uses multi-topology-operation;
container areas { container areas {
description "All areas in the topology."; description "All areas in the topology.";
list area { list area {
key "area-id"; key "area-id";
description description
"List of OSPF areas"; "List of OSPF areas";
leaf area-id { leaf area-id {
type area-id-type; type area-id-type;
description description
"Area ID."; "Area ID.";
} }
uses multi-topology-area-config; uses multi-topology-area-config;
uses multi-topology-area-operation; uses multi-topology-area-operation;
} }
} }
} }
} }
} }
augment "/rt:routing-state/"
+ "rt:routing-protocols/rt:routing-protocol/"
+ "ospf:ospf/ospf:instance/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 operation state
augmentation.";
container topologies {
description "All topologies.";
list topology {
key "name";
description "OSPF interface topology.";
leaf name {
type leafref {
path "../../../../../../../../../../../"
+ "rt:ribs/rt:rib/rt:name";
}
description
"One of the topologies enabled on this interface.";
}
uses multi-topology-interface-config;
uses multi-topology-interface-operation;
}
}
}
augment "/rt:routing-state/" augment "/rt:routing-state/"
+ "rt:routing-protocols/rt:routing-protocol/" + "rt:control-plane-protocols/rt:control-plane-protocol/"
+ "ospf:ospf/ospf:instance/ospf:areas/ospf:area/" + "ospf:ospf/ospf:instance/ospf:areas/ospf:area/"
+ "ospf:interfaces/ospf:interface" { + "ospf:interfaces/ospf:interface" {
when "../../../../../../rt:type = 'ospf:ospfv3'" { when "../../../../../../rt:type = 'ospf:ospfv2'" {
description description
"This augmentation is only valid for OSPFv3."; "This augmentation is only valid for OSPFv2.";
} }
description if-feature ospf:multi-topology;
"OSPFv3 interface specific operation state description
augmentation."; "OSPF multi-topology interface operation state
uses ospfv3-interface-config; augmentation.";
uses ospfv3-interface-operation; container topologies {
} description "All topologies.";
list topology {
key "name";
description "OSPF interface topology.";
leaf name {
type leafref {
path "../../../../../../../../../../../"
+ "rt:ribs/rt:rib/rt:name";
}
description
"One of the topologies enabled on this interface.";
}
uses multi-topology-interface-config;
uses multi-topology-interface-operation;
}
}
}
grouping route-content { augment "/rt:routing-state/"
description + "rt:control-plane-protocols/rt:control-plane-protocol/"
"This grouping defines OSPF-specific route attributes."; + "ospf:ospf/ospf:instance/ospf:areas/ospf:area/"
leaf metric { + "ospf:interfaces/ospf:interface" {
type uint32; when "../../../../../../rt:type = 'ospf:ospfv3'" {
description "OSPF route metric."; description
} "This augmentation is only valid for OSPFv3.";
leaf tag {
type uint32;
default "0";
description "OSPF route tag.";
}
leaf route-type {
type route-type;
description "OSPF route type";
}
}
augment "/rt:routing-state/" }
+ "rt:ribs/rt:rib/rt:routes/rt:route" { description
when "rt:source-protocol = 'ospf:ospfv2' or " "OSPFv3 interface specific operation state
+ "rt:source-protocol = 'ospf:ospfv3'" { augmentation.";
description uses ospfv3-interface-config;
"This augmentation is only valid for a routes whose uses ospfv3-interface-operation;
source protocol is OSPF."; }
}
description
"OSPF-specific route attributes.";
uses route-content;
}
grouping notification-instance-hdr { grouping route-content {
description description
"This group describes common instance specific "This grouping defines OSPF-specific route attributes.";
data for notifications."; leaf metric {
type uint32;
description "OSPF route metric.";
}
leaf tag {
type uint32;
default "0";
description "OSPF route tag.";
}
leaf route-type {
type route-type;
description "OSPF route type";
}
}
/* augment "/rt:routing-state/"
* TBD: + "rt:ribs/rt:rib/rt:routes/rt:route" {
* Need to define a way to reference routing-instance. when "rt:source-protocol = 'ospf:ospfv2' or "
*/ + "rt:source-protocol = 'ospf:ospfv3'" {
leaf routing-instance { description
type string; "This augmentation is only valid for a routes whose
description source protocol is OSPF.";
"Describe the routing instance."; }
} description
"OSPF-specific route attributes.";
uses route-content;
}
leaf routing-protocol-type { grouping notification-instance-hdr {
type leafref { description
path "/rt:routing/rt:routing-protocols/" "This group describes common instance specific
+ "rt:routing-protocol/rt:type"; data for notifications.";
} /*
must ". = 'ospf:ospfv2' or . = 'ospf:ospfv3'" { * TBD:
description "Only applies to the OSPF routing protocol."; * Need to define a way to reference routing-instance.
} */
description
"OSPF routing protocol type (OSPFv2 or OSPFv3).";
}
leaf routing-protocol-name { leaf routing-instance {
type leafref { type string;
path "/rt:routing/" description
+ "rt:routing-protocols/rt:routing-protocol" "Describe the routing instance.";
+ "[rt:type=current()/../routing-protocol-type]/" }
+ "rt:name";
}
description
"OSPF routing protocol instance name.";
}
leaf af { leaf routing-protocol-type {
type leafref { type leafref {
path "/rt:routing/" path "/rt:routing/rt:control-plane-protocols/"
+ "rt:routing-protocols/rt:routing-protocol" + "rt:control-plane-protocol/rt:type";
+ "[rt:name=current()/../routing-protocol-name]" }
+ "[rt:type=current()/../routing-protocol-type]/" must ". = 'ospf:ospfv2' or . = 'ospf:ospfv3'" {
+ "ospf:ospf/ospf:instance/af"; description "Only applies to the OSPF routing protocol.";
} }
description description
"Address family of the OSPF instance."; "OSPF routing protocol type (OSPFv2 or OSPFv3).";
} }
}
grouping notification-interface { leaf routing-protocol-name {
description type leafref {
"This grouping provides the interface information path "/rt:routing/"
for the notifications."; + "rt:control-plane-protocols/rt:control-plane-protocol"
+ "[rt:type=current()/../routing-protocol-type]/"
+ "rt:name";
}
description
"OSPF routing protocol instance name.";
}
choice if-link-type-selection { leaf af {
description type leafref {
"Options for link type."; path "/rt:routing/"
container interface { + "rt:control-plane-protocols/rt:control-plane-protocol"
description "Normal interface."; + "[rt:name=current()/../routing-protocol-name]"
leaf interface { + "[rt:type=current()/../routing-protocol-type]/"
type if:interface-ref; + "ospf:ospf/ospf:instance/af";
description "Interface."; }
} description
} "Address family of the OSPF instance.";
container virtual-link { }
description "virtual-link."; }
leaf area-id {
type area-id-type;
description "Area ID.";
}
leaf neighbor-router-id {
type yang:dotted-quad;
description "Neighbor Router ID.";
}
}
container sham-link {
description "sham-link.";
leaf area-id {
type area-id-type;
description "Area ID.";
}
leaf local-ip-addr {
type inet:ip-address;
description "Sham link local address.";
}
leaf remote-ip-addr {
type inet:ip-address;
description "Sham link remote address.";
}
}
}
}
grouping notification-neighbor { grouping notification-interface {
description description
"This grouping provides the neighbor information "This grouping provides the interface information
for the notifications."; for the notifications.";
leaf neighbor-router-id { choice if-link-type-selection {
type yang:dotted-quad; description
description "Neighbor Router ID."; "Options for link type.";
} container interface {
description "Normal interface.";
leaf interface {
type if:interface-ref;
description "Interface.";
}
}
container virtual-link {
description "virtual-link.";
leaf transit-area-id {
type area-id-type;
description "Area ID.";
}
leaf neighbor-router-id {
type yang:dotted-quad;
description "Neighbor Router ID.";
}
}
container sham-link {
description "sham-link.";
leaf area-id {
type area-id-type;
description "Area ID.";
}
leaf local-ip-addr {
type inet:ip-address;
description "Sham link local address.";
}
leaf remote-ip-addr {
type inet:ip-address;
description "Sham link remote address.";
}
}
}
}
leaf neighbor-ip-addr { grouping notification-neighbor {
type yang:dotted-quad; description
description "Neighbor address."; "This grouping provides the neighbor information
} for the notifications.";
}
notification if-state-change { leaf neighbor-router-id {
uses notification-instance-hdr; type yang:dotted-quad;
uses notification-interface; description "Neighbor Router ID.";
leaf state { }
type if-state-type; leaf neighbor-ip-addr {
description "Interface state."; type yang:dotted-quad;
} description "Neighbor address.";
description }
"This notification is sent when an interface }
state change is detected.";
}
notification if-config-error { notification if-state-change {
uses notification-instance-hdr; uses notification-instance-hdr;
uses notification-interface; uses notification-interface;
leaf packet-source { leaf state {
type yang:dotted-quad; type if-state-type;
description "Source address."; description "Interface state.";
} }
description
"This notification is sent when an interface
state change is detected.";
}
leaf packet-type { notification if-config-error {
type packet-type; uses notification-instance-hdr;
description "OSPF packet type."; uses notification-interface;
}
leaf error { leaf packet-source {
type enumeration { type yang:dotted-quad;
enum "badVersion" { description "Source address.";
description "Bad version."; }
}
enum "areaMismatch" {
description "Area mistmatch.";
}
enum "unknownNbmaNbr" {
description "Unknown NBMA neighbor.";
}
enum "unknownVirtualNbr" {
description "Unknown virtual link neighbor.";
}
enum "authTypeMismatch" {
description "Auth type mismatch.";
}
enum "authFailure" {
description "Auth failure.";
}
enum "netMaskMismatch" {
description "Network mask mismatch.";
}
enum "helloIntervalMismatch" {
description "Hello interval mismatch.";
} leaf packet-type {
enum "deadIntervalMismatch" { type packet-type;
description "Dead interval mismatch."; description "OSPF packet type.";
} }
enum "optionMismatch" {
description "Option mismatch.";
}
enum "mtuMismatch" {
description "MTU mismatch.";
}
enum "duplicateRouterId" {
description "Duplicate router ID.";
}
enum "noError" {
description "No error.";
}
}
description "Error code.";
}
description
"This notification is sent when interface
config error is detected.";
}
notification nbr-state-change { leaf error {
uses notification-instance-hdr; type enumeration {
uses notification-interface; enum "badVersion" {
uses notification-neighbor; description "Bad version.";
}
enum "areaMismatch" {
description "Area mistmatch.";
}
enum "unknownNbmaNbr" {
description "Unknown NBMA neighbor.";
}
enum "unknownVirtualNbr" {
description "Unknown virtual link neighbor.";
}
enum "authTypeMismatch" {
description "Auth type mismatch.";
}
enum "authFailure" {
description "Auth failure.";
}
enum "netMaskMismatch" {
description "Network mask mismatch.";
}
enum "helloIntervalMismatch" {
description "Hello interval mismatch.";
}
enum "deadIntervalMismatch" {
description "Dead interval mismatch.";
}
enum "optionMismatch" {
description "Option mismatch.";
}
enum "mtuMismatch" {
description "MTU mismatch.";
}
enum "duplicateRouterId" {
description "Duplicate router ID.";
}
enum "noError" {
description "No error.";
}
}
description "Error code.";
}
description
"This notification is sent when interface
config error is detected.";
}
leaf state { notification nbr-state-change {
type nbr-state-type; uses notification-instance-hdr;
description "Neighbor state."; uses notification-interface;
} uses notification-neighbor;
description leaf state {
"This notification is sent when neighbor type nbr-state-type;