draft-ietf-ospf-yang-00.txt   draft-ietf-ospf-yang-01.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 10, 2015 J. Zhang Expires: September 2, 2015 J. Zhang
D. Bogdanovic D. Bogdanovic
Juniper Networks Juniper Networks
K. Sreenivasa K. Sreenivasa
Brocade Communications System Brocade Communications System
March 9, 2015 March 2015
Yang Data Model for OSPF Protocol Yang Data Model for OSPF Protocol
draft-ietf-ospf-yang-00 draft-ietf-ospf-yang-01
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 36 skipping to change at page 1, line 36
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 10, 2015. This Internet-Draft will expire on September 2, 2015.
Copyright Notice Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the Copyright (c) 2015 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 18 skipping to change at page 2, line 18
1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3
2. Design of Data Model . . . . . . . . . . . . . . . . . . . . 3 2. Design of Data Model . . . . . . . . . . . . . . . . . . . . 3
2.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2. OSPFv2 and OSPFv3 . . . . . . . . . . . . . . . . . . . . 5 2.2. OSPFv2 and OSPFv3 . . . . . . . . . . . . . . . . . . . . 5
2.3. Optional Features . . . . . . . . . . . . . . . . . . . . 5 2.3. Optional Features . . . . . . . . . . . . . . . . . . . . 5
2.4. Inheritance . . . . . . . . . . . . . . . . . . . . . . . 5 2.4. Inheritance . . . . . . . . . . . . . . . . . . . . . . . 5
2.5. OSPF Router Configuration . . . . . . . . . . . . . . . . 5 2.5. OSPF Router Configuration . . . . . . . . . . . . . . . . 5
2.6. OSPF Instance Configuration . . . . . . . . . . . . . . . 6 2.6. OSPF Instance Configuration . . . . . . . . . . . . . . . 6
2.7. OSPF Area Configuration . . . . . . . . . . . . . . . . . 8 2.7. OSPF Area Configuration . . . . . . . . . . . . . . . . . 7
2.8. OSPF Interface Configuration . . . . . . . . . . . . . . 10 2.8. OSPF Interface Configuration . . . . . . . . . . . . . . 9
2.9. OSPF notification . . . . . . . . . . . . . . . . . . . . 11 2.9. OSPF notification . . . . . . . . . . . . . . . . . . . . 11
3. OSPF Yang Module . . . . . . . . . . . . . . . . . . . . . . 14 3. OSPF Segment Routing . . . . . . . . . . . . . . . . . . . . 14
4. Security Considerations . . . . . . . . . . . . . . . . . . . 71 4. OSPF Yang Module . . . . . . . . . . . . . . . . . . . . . . 20
5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 72 5. OSPF Segment Routing Yang Module . . . . . . . . . . . . . . 90
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 72 6. Security Considerations . . . . . . . . . . . . . . . . . . . 104
6.1. Normative References . . . . . . . . . . . . . . . . . . 72 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 104
6.2. Informative References . . . . . . . . . . . . . . . . . 73 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 104
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 73 8.1. Normative References . . . . . . . . . . . . . . . . . . 104
8.2. Informative References . . . . . . . . . . . . . . . . . 105
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 105
1. Overview 1. Overview
YANG [RFC6020] is a data definition language that was introduced to YANG [RFC6020] is a data definition language that was introduced to
define the contents of a conceptual data store that allows networked define the contents of a conceptual data store that allows networked
devices to be managed using NETCONF [RFC6241]. YANG is proving devices to be managed using NETCONF [RFC6241]. YANG is proving
relevant beyond its initial confines, as bindings to other interfaces relevant beyond its initial confines, as bindings to other interfaces
(e.g. ReST) and encodings other than XML (e.g. JSON) are being (e.g. ReST) and encodings other than XML (e.g. JSON) are being
defined. Furthermore, YANG data models can be used as the basis of defined. Furthermore, YANG data models can be used as the basis of
implementation for other interfaces, such as CLI and programmatic implementation for other interfaces, such as CLI and programmatic
skipping to change at page 4, line 9 skipping to change at page 4, line 9
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 OSPF protocol. building blocks for 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 of the ietf-routing module. protocols/routing-protocol path of the ietf-routing module.
module: ospf module: ospf
+--rw routing +--rw routing
+--rw routing-instance [name] +--rw routing-instance [name]
+--rw routing-protocols +--rw routing-protocols
+--rw routing-protocol [name] +--rw routing-protocol [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 all-areas-inherit {area-inheritance}? +--rw areas
| . | +--rw area* [area-id]
| . | .
+--rw area* [area-id] | .
| . | +--rw all-interfaces-inherit {interface-inheritance}?
| . | .
| +--rw all-interfaces-inherit {interface-inheritance}? | .
| . | +--rw virtual-links
| . | | +--rw virtual-link* [router-id]
| +--rw interface* [interface] | | .
| . | | .
| . | +--rw sham-links
| | +--rw sham-link* [local-id remote-id]
| | .
| | .
| +--rw interfaces
| | +--rw interface* [interface]
| | .
| | .
| .
| .
+--rw topologies
+--rw topology* [name] +--rw topology* [name]
The ospf is intended to match to the vendor specific OSPF The ospf is intended to match to the vendor specific OSPF
configuration construct which is identified by a local identifier configuration construct which is identified by a local identifier
'name'. The field 'version' allows support for OSPFv2 and OSPFv3. 'name'. The field 'version' allows support for OSPFv2 and OSPFv3.
The ospf container includes one or more OSPF protocol engines, each The ospf container includes one or more OSPF protocol engines, each
encapsulated in the instance entity. Each instance includes encapsulated in the instance entity. Each instance includes
information for the routing domain it is running on based on the information for the routing domain it is running on based on the
[routing-instance af] specification. There is no default routing [routing-instance af] specification. There is no default routing
skipping to change at page 5, line 45 skipping to change at page 6, line 11
The container ospf is the top level container in this data model. It The container ospf is the top level container in this data model. It
contains shared information among different OSPF instances under the contains shared information among different OSPF instances under the
container. container.
module: ospf module: ospf
+--rw ospf +--rw ospf
+--rw all-instances-inherit {instance-inheritance}? +--rw all-instances-inherit {instance-inheritance}?
| +--rw area | +--rw area
| +--rw interface | +--rw interface
+--rw operation-mode? identityref +--rw operation-mode? identityref
+--rw instance* [routing-instance af] +--rw instance* [af]
. .
. .
2.6. OSPF Instance Configuration 2.6. OSPF Instance Configuration
The container instance represents an OSPF protocol engine. Each The container instance represents an OSPF protocol engine. Each
instance indicates the routing domain it is associated with based on instance indicates the routing domain it is associated with based on
[routing-instance af] and contains the router level configurations. [routing-instance af] and contains the router level configurations.
The all-areas-inherit container contains area configuration that The all-areas-inherit container contains area configuration that
could be inherited to all OSPF areas defined. Similarly, the all- could be inherited to all OSPF areas defined. Similarly, the all-
areas-inherit also contains interface configuration that could be areas-inherit also contains interface configuration that could be
inherited to all the OSPF interfaces defined. inherited to all the OSPF interfaces defined.
module: ospf module: ospf
+--rw ospf +--rw ospf
. .
. .
+--rw instance* [routing-instance af] +--rw instance* [af]
+--rw routing-instance rt:routing-instance-ref
+--rw af identityref +--rw af identityref
+--rw router-id? yang:dotted-quad {router-id}? +--rw router-id? yang:dotted-quad {router-id}?
+--rw admin-distance +--rw admin-distance
| +--rw (granularity)? | +--rw (scope)?
| | +--:(detail) | +--:(single-value)
| | | +--rw intra-area? uint8 | | +--rw all? uint8
| | | +--rw inter-area? uint8 | +--:(multi-values)
| | +--:(coarse) | +--rw (granularity)?
| | +--rw internal? uint8 | | +--:(detail)
| +--rw external? uint8 | | | +--rw intra-area? uint8
| | | +--rw inter-area? uint8
| | +--:(coarse)
| | +--rw internal? uint8
| +--rw external? uint8
+--rw nsr {nsr}? +--rw nsr {nsr}?
| +--rw enable? boolean | +--rw enable? boolean
+--rw graceful-restart {graceful-restart}? +--rw graceful-restart {graceful-restart}?
| +--rw enable? boolean | +--rw enable? boolean
| +--rw helper-enable? boolean | +--rw helper-enable? boolean
| +--rw restart-interval? uint16 | +--rw restart-interval? uint16
| +--rw helper-strict-lsa-checking? boolean | +--rw helper-strict-lsa-checking? boolean
+--rw protocol-shutdown {protocol-shutdown}? +--rw enable? boolean {admin-control}?
| +--rw shutdown? boolean
+--rw auto-cost {auto-cost}? +--rw auto-cost {auto-cost}?
| +--rw enable? boolean | +--rw enable? boolean
| +--rw reference-bandwidth? uint32 | +--rw reference-bandwidth? uint32
+--rw maximum +--rw spf-control
| +--rw paths? uint16 {max-ecmp}? | +--rw paths? uint16 {max-ecmp}?
+--rw database-control
| +--rw max-lsa? uint32 {max-lsa}? | +--rw max-lsa? uint32 {max-lsa}?
+--rw stub-router {stub-router}?
| +--rw (trigger)?
| +--:(always)
| +--rw always!
+--rw mpls +--rw mpls
| +--rw te-rid {te-rid}? | +--rw te-rid {te-rid}?
| | +--rw (source)? | | +--rw (source)?
| | +--:(interface) | | +--:(interface)
| | | +--rw interface? if:interface-ref | | | +--rw interface? if:interface-ref
| | +--:(explicit) | | +--:(explicit)
| | +--rw router-id? inet:ipv4-address | | +--rw router-id? inet:ipv4-address
| +--rw ldp | +--rw ldp
| +--rw igp-sync? boolean {ldp-igp-sync}? | +--rw igp-sync? boolean {ldp-igp-sync}?
| +--rw autoconfig? boolean {ldp-igp-autoconfig}? | +--rw autoconfig? boolean {ldp-igp-autoconfig}?
+--rw fast-reroute {fast-reroute}?
| +--rw lfa {lfa}?
+--rw all-areas-inherit {area-inheritance}? +--rw all-areas-inherit {area-inheritance}?
| +--rw area | +--rw area
| +--rw interface | +--rw interface
2.7. OSPF Area Configuration 2.7. OSPF Area Configuration
The container area contains configurations of that area and the list The container area contains configurations of that area and the list
of interface container represents all the OSPF interfaces active in of interface container represents all the OSPF interfaces active in
the enclosing area. the enclosing area.
module: ospf module: ospf
+--rw ospf +--rw ospf
. .
. .
+--rw instance* [routing-instance af] +--rw instance* [routing-instance af]
. .
. .
+--rw area* [area-id] +--rw areas
| +--rw area-id area-id-type | +--rw area* [area-id]
| +--rw area-type? identityref | +--rw area-id area-id-type
| +--rw summary? boolean | +--rw area-type? identityref
| +--rw default-cost? uint32 | +--rw summary? boolean
| +--rw virtual-link* [router-id] | +--rw default-cost? uint32
| | +--rw router-id yang:dotted-quad | +--rw ranges
| | +--rw cost? uint16 | | +--rw range* [prefix]
| | +--rw hello-interval? uint16 | | +--rw prefix inet:ip-prefix
| | +--rw dead-interval? uint16 | | +--rw advertise? boolean
| | +--rw retransmit-interval? uint16 | | +--rw cost? uint24
| | +--rw transmit-delay? uint16 | +--rw all-interfaces-inherit {interface-inheritance}?
| | +--rw mtu-ignore? boolean {mtu-ignore}? | | +--rw interface
| | +--rw lls? boolean {lls}? | +--rw virtual-links
| | +--rw prefix-suppression? boolean {prefix-suppression}? | | +--rw virtual-link* [router-id]
| | +--rw bfd? boolean {bfd}? | | +--rw router-id yang:dotted-quad
| | +--rw ttl-security {ttl-security}? | | +--rw cost? uint16
| | | +--rw enable? boolean | | +--rw hello-interval? uint16
| | | +--rw hops? uint8 | | +--rw dead-interval? uint16
| | +--rw protocol-shutdown {protocol-if-shutdown}? | | +--rw retransmit-interval? uint16
| | +--rw shutdown? boolean | | +--rw transmit-delay? uint16
| | +--rw authentication | | +--rw mtu-ignore? boolean {mtu-ignore}?
| | +--rw (auth-type-selection)? | | +--rw lls? boolean {lls}?
| | +--:(auth-ipsec) {ospfv3-authentication-ipsec}? | | +--rw prefix-suppression? boolean {prefix-suppression}?
| | | +--rw sa? string | | +--rw bfd? boolean {bfd}?
| | +--:(auth-trailer-key-chain) | | +--rw ttl-security {ttl-security}?
| | | +--rw key-chain? key-chain:key-chain-ref | | | +--rw enable? boolean
| | +--:(auth-trailer-key) | | | +--rw hops? uint8
| | +--rw key? string | | +--rw enable? boolean {admin-control}?
| | +--rw crypto-algorithm | | +--rw authentication
| | +--rw (algorithm)? | | +--rw (auth-type-selection)?
| | +--:(hmac-sha1-12) | | +--:(auth-ipsec) {ospfv3-authentication-ipsec}?
| | | +--rw hmac-sha1-12? empty | | | +--rw sa? string
| | +--:(hmac-sha1-20) | | +--:(auth-trailer-key-chain)
| | | +--rw hmac-sha1-20? empty | | | +--rw key-chain? key-chain:key-chain-ref
| | +--:(md5) | | +--:(auth-trailer-key)
| | | +--rw md5? empty | | +--rw key? string
| | +--:(sha-1) | | +--rw crypto-algorithm
| | | +--rw sha-1? empty | | +--rw (algorithm)?
| | +--:(hmac-sha-1) | | +--:(hmac-sha-1-12) {crypto-hmac-sha-1-12}?
| | | +--rw hmac-sha-1? empty | | | +--rw hmac-sha1-12? empty
| | +--:(hmac-sha-256) | | +--:(md5)
| | | +--rw hmac-sha-256? empty | | | +--rw md5? empty
| | +--:(hmac-sha-384) | | +--:(sha-1)
| | | +--rw hmac-sha-384? empty | | | +--rw sha-1? empty
| | +--:(hmac-sha-512) | | +--:(hmac-sha-1)
| | +--rw hmac-sha-512? empty | | | +--rw hmac-sha-1? empty
| +--rw sham-link* [local-id remote-id] | | +--:(hmac-sha-256)
| | +--rw local-id inet:ip-address | | | +--rw hmac-sha-256? empty
| | +--rw remote-id inet:ip-address | | +--:(hmac-sha-384)
| | +--rw cost? uint16 | | | +--rw hmac-sha-384? empty
| | +--rw hello-interval? uint16 | | +--:(hmac-sha-512)
| | +--rw dead-interval? uint16 | | +--rw hmac-sha-512? empty
| | +--rw retransmit-interval? uint16 | +--rw sham-link
| | +--rw transmit-delay? uint16 | | +--rw sham-link* [local-id remote-id]
| | +--rw mtu-ignore? boolean {mtu-ignore}? | | +--rw local-id inet:ip-address
| | +--rw lls? boolean {lls}? | | +--rw remote-id inet:ip-address
| | +--rw prefix-suppression? boolean {prefix-suppression}? | | +--rw cost? uint16
| | +--rw bfd? boolean {bfd}? | | +--rw hello-interval? uint16
| | +--rw ttl-security {ttl-security}? | | +--rw dead-interval? uint16
| | | +--rw enable? boolean | | +--rw retransmit-interval? uint16
| | | +--rw hops? uint8 | | +--rw transmit-delay? uint16
| | +--rw protocol-shutdown {protocol-if-shutdown}? | | +--rw mtu-ignore? boolean {mtu-ignore}?
| | +--rw shutdown? boolean | | +--rw lls? boolean {lls}?
| | +--rw authentication | | +--rw prefix-suppression? boolean {prefix-suppression}?
| | +--rw (auth-type-selection)? | | +--rw bfd? boolean {bfd}?
| | +--:(auth-ipsec) {ospfv3-authentication-ipsec}? | | +--rw ttl-security {ttl-security}?
| | | +--rw sa? string | | | +--rw enable? boolean
| | +--:(auth-trailer-key-chain) | | | +--rw hops? uint8
| | | +--rw key-chain? key-chain:key-chain-ref | | +--rw enable? boolean {admin-control}?
| | +--:(auth-trailer-key) | | +--rw authentication
| | +--rw key? string | | +--rw (auth-type-selection)?
| | +--rw crypto-algorithm | | +--:(auth-ipsec) {ospfv3-authentication-ipsec}?
| | +--rw (algorithm)? | | | +--rw sa? string
| | +--:(hmac-sha1-12) | | +--:(auth-trailer-key-chain)
| | | +--rw hmac-sha1-12? empty | | | +--rw key-chain? key-chain:key-chain-ref
| | +--:(hmac-sha1-20) | | +--:(auth-trailer-key)
| | | +--rw hmac-sha1-20? empty | | +--rw key? string
| | +--:(md5) | | +--rw crypto-algorithm
| | | +--rw md5? empty | | +--rw (algorithm)?
| | +--:(sha-1) | | +--:(hmac-sha-1-12) {crypto-hmac-sha-1-12}?
| | | +--rw sha-1? empty | | | +--rw hmac-sha1-12? empty
| | +--:(hmac-sha-1) | | +--:(md5)
| | | +--rw hmac-sha-1? empty | | | +--rw md5? empty
| | +--:(hmac-sha-256) | | +--:(sha-1)
| | | +--rw hmac-sha-256? empty | | | +--rw sha-1? empty
| | +--:(hmac-sha-384) | | +--:(hmac-sha-1)
| | | +--rw hmac-sha-384? empty | | | +--rw hmac-sha-1? empty
| | +--:(hmac-sha-512) | | +--:(hmac-sha-256)
| | +--rw hmac-sha-512? empty | | | +--rw hmac-sha-256? empty
| +--rw range* [prefix] | | +--:(hmac-sha-384)
| | +--rw prefix inet:ip-prefix | | | +--rw hmac-sha-384? empty
| | +--rw advertise? boolean | | +--:(hmac-sha-512)
| | +--rw cost? uint24 | | +--rw hmac-sha-512? empty
| +--rw all-interfaces-inherit {interface-inheritance}?
| | +--rw interface
2.8. OSPF Interface Configuration 2.8. OSPF Interface Configuration
The container interface contains configurations of that interface. The container interface contains configurations of that interface.
The ospf-interfaces also contain interface configuration that could The ospf-interfaces also contain interface configuration that could
be inherited to all ospf-interface's defined. be inherited to all ospf-interface's defined.
module: ospf module: ospf
+--rw ospf +--rw ospf
. .
. .
+--rw instance* [routing-instance af] +--rw instance* [routing-instance af]
. .
. .
+--rw area* [area-id] +--rw areas
. | +--rw area* [area-id]
. .
| +--rw interface* [interface] .
| +--rw interface if:interface-ref | +--rw interfaces
| +--rw network-type? enumeration | +--rw interface* [interface]
| +--rw passive? boolean | +--rw interface if:interface-ref
| +--rw demand-circuit? boolean {demand-circuit}? | +--rw network-type? enumeration
| +--rw multi-area {multi-area-adj}? | +--rw passive? boolean
| | +--rw multi-area-id? area-id-type | +--rw demand-circuit? boolean {demand-circuit}?
| | +--rw cost? uint16 | +--rw multi-areas
| +--rw static-neighbors | | +--rw multi-area* [multi-area-id] {multi-area-adj}?
| | +--rw neighbor* [address] | | +--rw multi-area-id area-id-type
| | +--rw address inet:ip-address | | +--rw cost? uint16
| | +--rw cost? uint16 | +--rw static-neighbors
| | +--rw poll-interval? uint16 | | +--rw neighbor* [address]
| | +--rw priority? uint8 | | +--rw address inet:ip-address
| +--rw cost? uint16 | | +--rw cost? uint16
| +--rw hello-interval? uint16 | | +--rw poll-interval? uint16
| +--rw dead-interval? uint16 | | +--rw priority? uint8
| +--rw retransmit-interval? uint16 | +--rw node-flag? boolean {node-flag}?
| +--rw transmit-delay? uint16 | +--rw fast-reroute {fast-reroute}?
| +--rw mtu-ignore? boolean {mtu-ignore}? | | +--rw lfa {lfa}?
| +--rw lls? boolean {lls}? | | +--rw candidate-disabled? boolean
| +--rw prefix-suppression? boolean {prefix-suppression}? | | +--rw enabled? boolean
| +--rw bfd? boolean {bfd}? | | +--rw remote-lfa {remote-lfa}?
| +--rw ttl-security {ttl-security}? | | +--rw enabled? boolean
| | +--rw enable? boolean | +--rw cost? uint16
| | +--rw hops? uint8 | +--rw hello-interval? uint16
| +--rw protocol-shutdown {protocol-if-shutdown}? | +--rw dead-interval? uint16
| | +--rw shutdown? boolean | +--rw retransmit-interval? uint16
| +--rw authentication | +--rw transmit-delay? uint16
| | +--rw (auth-type-selection)? | +--rw mtu-ignore? boolean {mtu-ignore}?
| | +--:(auth-ipsec) {ospfv3-authentication-ipsec}? | +--rw lls? boolean {lls}?
| | | +--rw sa? string | +--rw prefix-suppression? boolean {prefix-suppression}?
| | +--:(auth-trailer-key-chain) | +--rw bfd? boolean {bfd}?
| | | +--rw key-chain? key-chain:key-chain-ref | +--rw ttl-security {ttl-security}?
| | +--:(auth-trailer-key) | | +--rw enable? boolean
| | +--rw key? string | | +--rw hops? uint8
| | +--rw crypto-algorithm | +--rw enable? boolean {admin-control}?
| | +--rw (algorithm)? | +--rw authentication
| | +--:(hmac-sha1-12) | | +--rw (auth-type-selection)?
| | | +--rw hmac-sha1-12? empty | | +--:(auth-ipsec) {ospfv3-authentication-ipsec}?
| | +--:(hmac-sha1-20) | | | +--rw sa? string
| | | +--rw hmac-sha1-20? empty | | +--:(auth-trailer-key-chain)
| | +--:(md5) | | | +--rw key-chain? key-chain:key-chain-ref
| | | +--rw md5? empty | | +--:(auth-trailer-key)
| | +--:(sha-1) | | +--rw key? string
| | | +--rw sha-1? empty | | +--rw crypto-algorithm
| | +--:(hmac-sha-1) | | +--rw (algorithm)?
| | | +--rw hmac-sha-1? empty | | +--:(hmac-sha-1-12) {crypto-hmac-sha-1-12}?
| | +--:(hmac-sha-256) | | | +--rw hmac-sha1-12? empty
| | | +--rw hmac-sha-256? empty | | +--:(md5)
| | +--:(hmac-sha-384) | | | +--rw md5? empty
| | | +--rw hmac-sha-384? empty | | +--:(sha-1)
| | +--:(hmac-sha-512) | | | +--rw sha-1? empty
| | +--rw hmac-sha-512? empty | | +--:(hmac-sha-1)
| +--rw topology* [name] | | | +--rw hmac-sha-1? empty
| +--rw name rt:rib-ref | | +--:(hmac-sha-256)
| +--rw cost? uint32 | | | +--rw hmac-sha-256? empty
| | +--:(hmac-sha-384)
| | | +--rw hmac-sha-384? empty
| | +--:(hmac-sha-512)
| | +--rw hmac-sha-512? empty
| +--rw topologies
| +--rw topology* [name]
| +--rw name leafref
| +--rw cost? uint32
2.9. OSPF notification 2.9. OSPF notification
This YANG model defines a list of notifications to inform client of This YANG model defines a list of notifications to inform client of
important events detected during the protocol operation. The important events detected during the protocol operation. The
notifications defined cover the common set of traps from OSPFv2 MIB notifications defined cover the common set of traps from OSPFv2 MIB
[RFC4750] and OSPFv3 MIB [RFC5643]. [RFC4750] and OSPFv3 MIB [RFC5643].
module: ospf module: ospf
notifications: notifications:
+---n if-state-change +---n if-state-change
| +--ro routing-instance? rt:routing-instance-ref | +--ro routing-instance? rt:routing-instance-ref
| +--ro routing-protocol-name? string | +--ro routing-protocol-type? leafref
| +--ro instance-af | +--ro routing-protocol-name? leafref
| | +--ro af? identityref | +--ro af? leafref
| +--ro link-type? identityref | +--ro link-type? identityref
| +--ro interface | +--ro interface
| | +--ro interface? if:interface-ref | | +--ro interface? if:interface-ref
| +--ro virtual-link | +--ro virtual-link
| | +--ro area-id? uint32 | | +--ro area-id? uint32
| | +--ro neighbor-router-id? yang:dotted-quad | | +--ro neighbor-router-id? yang:dotted-quad
| +--ro sham-link | +--ro sham-link
| | +--ro area-id? uint32 | | +--ro area-id? uint32
| | +--ro local-ip-addr? inet:ip-address | | +--ro local-ip-addr? inet:ip-address
| | +--ro remote-ip-addr? inet:ip-address | | +--ro remote-ip-addr? inet:ip-address
| +--ro state? if-state-type | +--ro state? if-state-type
+---n if-config-error +---n if-config-error
| +--ro routing-instance? rt:routing-instance-ref | +--ro routing-instance? rt:routing-instance-ref
| +--ro routing-protocol-name? string | +--ro routing-protocol-type? leafref
| +--ro instance-af | +--ro routing-protocol-name? leafref
| | +--ro af? identityref | +--ro af? leafref
| +--ro link-type? identityref | +--ro link-type? identityref
| +--ro interface | +--ro interface
| | +--ro interface? if:interface-ref | | +--ro interface? if:interface-ref
| | +--ro packet-source? yang:dotted-quad | | +--ro packet-source? yang:dotted-quad
| +--ro virtual-link | +--ro virtual-link
| | +--ro area-id? uint32 | | +--ro area-id? uint32
| | +--ro neighbor-router-id? yang:dotted-quad | | +--ro neighbor-router-id? yang:dotted-quad
| +--ro sham-link | +--ro sham-link
| | +--ro area-id? uint32 | | +--ro area-id? uint32
| | +--ro local-ip-addr? inet:ip-address | | +--ro local-ip-addr? inet:ip-address
| | +--ro remote-ip-addr? inet:ip-address | | +--ro remote-ip-addr? inet:ip-address
| +--ro packet-type? packet-type | +--ro packet-type? packet-type
| +--ro error? enumeration | +--ro error? enumeration
+---n nbr-state-change +---n nbr-state-change
| +--ro routing-instance? rt:routing-instance-ref | +--ro routing-instance? rt:routing-instance-ref
| +--ro routing-protocol-name? string | +--ro routing-protocol-type? leafref
| +--ro instance-af | +--ro routing-protocol-name? leafref
| | +--ro af? identityref | +--ro af? leafref
| +--ro link-type? identityref | +--ro link-type? identityref
| +--ro interface | +--ro interface
| | +--ro interface? if:interface-ref | | +--ro interface? if:interface-ref
| | +--ro neighbor-router-id? yang:dotted-quad | | +--ro neighbor-router-id? yang:dotted-quad
| | +--ro neighbor-ip-addr? yang:dotted-quad | | +--ro neighbor-ip-addr? yang:dotted-quad
| +--ro virtual-link | +--ro virtual-link
| | +--ro area-id? uint32 | | +--ro area-id? uint32
| | +--ro neighbor-router-id? yang:dotted-quad | | +--ro neighbor-router-id? yang:dotted-quad
| +--ro sham-link | +--ro sham-link
| | +--ro area-id? uint32 | | +--ro area-id? uint32
| | +--ro local-ip-addr? inet:ip-address | | +--ro local-ip-addr? inet:ip-address
| | +--ro neighbor-router-id? yang:dotted-quad | | +--ro neighbor-router-id? yang:dotted-quad
| | +--ro neighbor-ip-addr? yang:dotted-quad | | +--ro neighbor-ip-addr? yang:dotted-quad
| +--ro state? nbr-state-type | +--ro state? nbr-state-type
+---n nbr-restart-helper-status-change +---n nbr-restart-helper-status-change
| +--ro routing-instance? rt:routing-instance-ref | +--ro routing-instance? rt:routing-instance-ref
| +--ro routing-protocol-name? string | +--ro routing-protocol-type? leafref
| +--ro instance-af | +--ro routing-protocol-name? leafref
| | +--ro af? identityref | +--ro af? leafref
| +--ro link-type? identityref | +--ro link-type? identityref
| +--ro interface | +--ro interface
| | +--ro interface? if:interface-ref | | +--ro interface? if:interface-ref
| | +--ro neighbor-router-id? yang:dotted-quad | | +--ro neighbor-router-id? yang:dotted-quad
| | +--ro neighbor-ip-addr? yang:dotted-quad | | +--ro neighbor-ip-addr? yang:dotted-quad
| +--ro virtual-link | +--ro virtual-link
| | +--ro area-id? uint32 | | +--ro area-id? uint32
| | +--ro neighbor-router-id? yang:dotted-quad | | +--ro neighbor-router-id? yang:dotted-quad
| +--ro status? restart-helper-status-type | +--ro status? restart-helper-status-type
| +--ro age? uint32 | +--ro age? uint32
| +--ro exit-reason? restart-exit-reason-type | +--ro exit-reason? restart-exit-reason-type
+---n rx-bad-packet +---n rx-bad-packet
| +--ro routing-instance? rt:routing-instance-ref | +--ro routing-instance? rt:routing-instance-ref
| +--ro routing-protocol-name? string | +--ro routing-protocol-type? leafref
| +--ro instance-af | +--ro routing-protocol-name? leafref
| | +--ro af? identityref | +--ro af? leafref
| +--ro link-type? identityref | +--ro link-type? identityref
| +--ro interface | +--ro interface
| | +--ro interface? if:interface-ref | | +--ro interface? if:interface-ref
| | +--ro packet-source? yang:dotted-quad | | +--ro packet-source? yang:dotted-quad
| +--ro virtual-link | +--ro virtual-link
| | +--ro area-id? uint32 | | +--ro area-id? uint32
| | +--ro neighbor-router-id? yang:dotted-quad | | +--ro neighbor-router-id? yang:dotted-quad
| +--ro sham-link | +--ro sham-link
| | +--ro area-id? uint32 | | +--ro area-id? uint32
| | +--ro local-ip-addr? inet:ip-address | | +--ro local-ip-addr? inet:ip-address
| | +--ro remote-ip-addr? inet:ip-address | | +--ro remote-ip-addr? inet:ip-address
| +--ro packet-type? packet-type | +--ro packet-type? packet-type
+---n lsdb-approaching-overflow +---n lsdb-approaching-overflow
| +--ro routing-instance? rt:routing-instance-ref | +--ro routing-instance? rt:routing-instance-ref
| +--ro routing-protocol-name? string | +--ro routing-protocol-type? leafref
| +--ro instance-af | +--ro routing-protocol-name? leafref
| | +--ro af? identityref | +--ro af? leafref
| +--ro ext-lsdb-limit? uint32 | +--ro ext-lsdb-limit? uint32
+---n lsdb-overflow +---n lsdb-overflow
| +--ro routing-instance? rt:routing-instance-ref | +--ro routing-instance? rt:routing-instance-ref
| +--ro routing-protocol-name? string | +--ro routing-protocol-type? leafref
| +--ro instance-af | +--ro routing-protocol-name? leafref
| | +--ro af? identityref | +--ro af? leafref
| +--ro ext-lsdb-limit? uint32 | +--ro ext-lsdb-limit? uint32
+---n nssa-translator-status-change +---n nssa-translator-status-change
| +--ro routing-instance? rt:routing-instance-ref | +--ro routing-instance? rt:routing-instance-ref
| +--ro routing-protocol-name? string | +--ro routing-protocol-type? leafref
| +--ro instance-af | +--ro routing-protocol-name? leafref
| | +--ro af? identityref | +--ro af? leafref
| +--ro area-id? uint32 | +--ro area-id? uint32
| +--ro status? nssa-translator-state-type | +--ro status? nssa-translator-state-type
+---n restart-status-change +---n restart-status-change
+--ro routing-instance? rt:routing-instance-ref +--ro routing-instance? rt:routing-instance-ref
+--ro routing-protocol-name? string +--ro routing-protocol-type? leafref
+--ro instance-af +--ro routing-protocol-name? leafref
| +--ro af? identityref +--ro af? leafref
+--ro status? restart-status-type +--ro status? restart-status-type
+--ro restart-interval? uint16 +--ro restart-interval? uint16
+--ro exit-reason? restart-exit-reason-type +--ro exit-reason? restart-exit-reason-type
3. OSPF Yang Module 3. OSPF Segment Routing
<CODE BEGINS> In additional to the OSPF base YANG model, this document also defines
a model for OSPF segment routing.
The OSPF SR YANG module requires the base segment routing module
[I-D.litkowski-spring-sr-yang] to be supported as there is a strong
relationship between those modules.
module: ietf-ospf-sr
augment /rt:routing/rt:routing-instance/rt:routing-protocols/
rt:routing-protocol/ospf:ospf/ospf:instance:
+--rw segment-routing
+--rw enabled? boolean
+--rw bindings
+--rw advertise
| +--rw policies* string
+--rw receive? boolean
augment /rt:routing/rt:routing-instance/rt:routing-protocols/
rt:routing-protocol/ospf:ospf/ospf:instance/ospf:areas/
ospf:area/ospf:interfaces/ospf:interface:
+--rw segment-routing
+--rw adjacency-sid
+--rw advertise-adj-group-sid* [group-id]
| +--rw group-id uint32
+--rw advertise-protection? enumeration
augment /rt:routing/rt:routing-instance/rt:routing-protocols/
rt:routing-protocol/ospf:ospf/ospf:instance/ospf:areas/
ospf:area/ospf:interfaces/ospf:interface/ospf:fast-reroute:
+--rw ti-lfa {ti-lfa}?
+--rw enable? boolean
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/
rt:routing-protocol/ospf:ospf/ospf:instance:
+--ro segment-routing
+--ro enabled? boolean
+--ro bindings
+--ro advertise
| +--ro policies* string
+--ro receive? boolean
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/
rt:routing-protocol/ospf:ospf/ospf:instance/ospf:areas/
ospf:area/ospf:interfaces/ospf:interface:
+--ro segment-routing
+--ro adjacency-sid
+--ro advertise-adj-group-sid* [group-id]
| +--ro group-id uint32
+--ro advertise-protection? enumeration
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/
rt:routing-protocol/ospf:ospf/ospf:instance/ospf:areas/
ospf:area/ospf:interfaces/ospf:interface/ospf:database/
ospf:link-scope-lsa-type/ospf:link-scope-lsas/
ospf:link-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2/
ospf:body/ospf:opaque/ospf:extended-prefix-tlvs/
ospf:extended-prefix-tlv:
+--ro perfix-sid-sub-tlvs
| +--ro prefix-sid-sub-tlv*
| +--ro flags? bits
| +--ro mt-id? uint8
| +--ro algorithm? uint8
| +--ro sid? uint32
+--ro sid-binding-sub-tlvs
+--ro sid-binding-sub-tlv*
+--ro flags? bits
+--ro mt-id? uint8
+--ro weight? uint8
+--ro sid-sub-tlv
| +--ro sid? uint32
+--ro ero-metric-sub-tlv
| +--ro metric? uint32
+--ro ipv4-ero-sub-tlv
| +--ro flags? bits
| +--ro ipv4-address? inet:ipv4-address
+--ro unnumbered-ero-sub-tlv
| +--ro flags? bits
| +--ro router-id? yang:dotted-quad
| +--ro interface-id? uint32
+--ro ipv4-backup-ero-sub-tlv
| +--ro flags? bits
| +--ro ipv4-address? inet:ipv4-address
+--ro unnumbered-backup-ero-sub-tlv
+--ro flags? bits
+--ro router-id? yang:dotted-quad
+--ro interface-id? uint32
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/
rt:routing-protocol/ospf:ospf/ospf:instance/ospf:areas/
ospf:area/ospf:database/ospf:area-scope-lsa-type/
ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version/
ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque/
ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv:
+--ro perfix-sid-sub-tlvs
| +--ro prefix-sid-sub-tlv*
| +--ro flags? bits
| +--ro mt-id? uint8
| +--ro algorithm? uint8
| +--ro sid? uint32
+--ro sid-binding-sub-tlvs
+--ro sid-binding-sub-tlv*
+--ro flags? bits
+--ro mt-id? uint8
+--ro weight? uint8
+--ro sid-sub-tlv
| +--ro sid? uint32
+--ro ero-metric-sub-tlv
| +--ro metric? uint32
+--ro ipv4-ero-sub-tlv
| +--ro flags? bits
| +--ro ipv4-address? inet:ipv4-address
+--ro unnumbered-ero-sub-tlv
| +--ro flags? bits
| +--ro router-id? yang:dotted-quad
| +--ro interface-id? uint32
+--ro ipv4-backup-ero-sub-tlv
| +--ro flags? bits
| +--ro ipv4-address? inet:ipv4-address
+--ro unnumbered-backup-ero-sub-tlv
+--ro flags? bits
+--ro router-id? yang:dotted-quad
+--ro interface-id? uint32
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/
rt:routing-protocol/ospf:ospf/ospf:instance/ospf:database/
ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa/
ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque/
ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv:
+--ro perfix-sid-sub-tlvs
| +--ro prefix-sid-sub-tlv*
| +--ro flags? bits
| +--ro mt-id? uint8
| +--ro algorithm? uint8
| +--ro sid? uint32
+--ro sid-binding-sub-tlvs
+--ro sid-binding-sub-tlv*
+--ro flags? bits
+--ro mt-id? uint8
+--ro weight? uint8
+--ro sid-sub-tlv
| +--ro sid? uint32
+--ro ero-metric-sub-tlv
| +--ro metric? uint32
+--ro ipv4-ero-sub-tlv
| +--ro flags? bits
| +--ro ipv4-address? inet:ipv4-address
+--ro unnumbered-ero-sub-tlv
| +--ro flags? bits
| +--ro router-id? yang:dotted-quad
| +--ro interface-id? uint32
+--ro ipv4-backup-ero-sub-tlv
| +--ro flags? bits
| +--ro ipv4-address? inet:ipv4-address
+--ro unnumbered-backup-ero-sub-tlv
+--ro flags? bits
+--ro router-id? yang:dotted-quad
+--ro interface-id? uint32
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/
rt:routing-protocol/ospf:ospf/ospf:instance/ospf:areas/
ospf:area/ospf:database/ospf:area-scope-lsa-type/
ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version/
ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque/
ospf:extended-link-tlvs/ospf:extended-link-tlv:
+--ro adj-sid-sub-tlvs
| +--ro adj-sid-sub-tlv*
| +--ro flags? bits
| +--ro mt-id? uint8
| +--ro weight? uint8
| +--ro sid? uint32
+--ro lan-adj-sid-sub-tlvs
+--ro lan-adj-sid-sub-tlv*
+--ro flags? bits
+--ro mt-id? uint8
+--ro weight? uint8
+--ro neighbor-router-id? yang:dotted-quad
+--ro sid? uint32
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/
rt:routing-protocol/ospf:ospf/ospf:instance/
ospf:areas/ospf:area/ospf:interfaces/ospf:interface/
ospf:database/ospf:link-scope-lsa-type/
ospf:link-scope-lsas/ospf:link-scope-lsa/ospf:version/
ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque:
+--ro extended-prefix-range-tlvs
| +--ro extended-prefix-range-tlv*
| +--ro range-size? uint16
| +--ro flags? bits
| +--ro prefix? inet:ip-prefix
| +--ro perfix-sid-sub-tlvs
| | +--ro prefix-sid-sub-tlv*
| | +--ro flags? bits
| | +--ro mt-id? uint8
| | +--ro algorithm? uint8
| | +--ro sid? uint32
| +--ro sid-binding-sub-tlvs
| | +--ro sid-binding-sub-tlv*
| | +--ro flags? bits
| | +--ro mt-id? uint8
| | +--ro weight? uint8
| | +--ro sid-sub-tlv
| | | +--ro sid? uint32
| | +--ro ero-metric-sub-tlv
| | | +--ro metric? uint32
| | +--ro ipv4-ero-sub-tlv
| | | +--ro flags? bits
| | | +--ro ipv4-address? inet:ipv4-address
| | +--ro unnumbered-ero-sub-tlv
| | | +--ro flags? bits
| | | +--ro router-id? yang:dotted-quad
| | | +--ro interface-id? uint32
| | +--ro ipv4-backup-ero-sub-tlv
| | | +--ro flags? bits
| | | +--ro ipv4-address? inet:ipv4-address
| | +--ro unnumbered-backup-ero-sub-tlv
| | +--ro flags? bits
| | +--ro router-id? yang:dotted-quad
| | +--ro interface-id? uint32
| +--ro unknown-tlvs
| +--ro unknown-tlv*
| +--ro type? uint16
| +--ro length? uint16
| +--ro value? yang:hex-string
+--ro sr-algorithm-tlv
| +--ro sr-algorithm* uint8
+--ro sid-range-tlvs
+--ro sid-range-tlv*
+--ro range-size? ospf:uint24
+--ro sid-sub-tlv
+--ro sid? uint32
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/
rt:routing-protocol/ospf:ospf/ospf:instance/ospf:areas/
ospf:area/ospf:database/ospf:area-scope-lsa-type/
ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version/
ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque:
+--ro extended-prefix-range-tlvs
| +--ro extended-prefix-range-tlv*
| +--ro range-size? uint16
| +--ro flags? bits
| +--ro prefix? inet:ip-prefix
| +--ro perfix-sid-sub-tlvs
| | +--ro prefix-sid-sub-tlv*
| | +--ro flags? bits
| | +--ro mt-id? uint8
| | +--ro algorithm? uint8
| | +--ro sid? uint32
| +--ro sid-binding-sub-tlvs
| | +--ro sid-binding-sub-tlv*
| | +--ro flags? bits
| | +--ro mt-id? uint8
| | +--ro weight? uint8
| | +--ro sid-sub-tlv
| | | +--ro sid? uint32
| | +--ro ero-metric-sub-tlv
| | | +--ro metric? uint32
| | +--ro ipv4-ero-sub-tlv
| | | +--ro flags? bits
| | | +--ro ipv4-address? inet:ipv4-address
| | +--ro unnumbered-ero-sub-tlv
| | | +--ro flags? bits
| | | +--ro router-id? yang:dotted-quad
| | | +--ro interface-id? uint32
| | +--ro ipv4-backup-ero-sub-tlv
| | | +--ro flags? bits
| | | +--ro ipv4-address? inet:ipv4-address
| | +--ro unnumbered-backup-ero-sub-tlv
| | +--ro flags? bits
| | +--ro router-id? yang:dotted-quad
| | +--ro interface-id? uint32
| +--ro unknown-tlvs
| +--ro unknown-tlv*
| +--ro type? uint16
| +--ro length? uint16
| +--ro value? yang:hex-string
+--ro sr-algorithm-tlv
| +--ro sr-algorithm* uint8
+--ro sid-range-tlvs
+--ro sid-range-tlv*
+--ro range-size? ospf:uint24
+--ro sid-sub-tlv
+--ro sid? uint32
augment /rt:routing-state/rt:routing-instance/rt:routing-protocols/'
rt:routing-protocol/ospf:ospf/ospf:instance/ospf:database/
ospf:as-scope-lsa-type/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-tlv*
| +--ro range-size? uint16
| +--ro flags? bits
| +--ro prefix? inet:ip-prefix
| +--ro perfix-sid-sub-tlvs
| | +--ro prefix-sid-sub-tlv*
| | +--ro flags? bits
| | +--ro mt-id? uint8
| | +--ro algorithm? uint8
| | +--ro sid? uint32
| +--ro sid-binding-sub-tlvs
| | +--ro sid-binding-sub-tlv*
| | +--ro flags? bits
| | +--ro mt-id? uint8
| | +--ro weight? uint8
| | +--ro sid-sub-tlv
| | | +--ro sid? uint32
| | +--ro ero-metric-sub-tlv
| | | +--ro metric? uint32
| | +--ro ipv4-ero-sub-tlv
| | | +--ro flags? bits
| | | +--ro ipv4-address? inet:ipv4-address
| | +--ro unnumbered-ero-sub-tlv
| | | +--ro flags? bits
| | | +--ro router-id? yang:dotted-quad
| | | +--ro interface-id? uint32
| | +--ro ipv4-backup-ero-sub-tlv
| | | +--ro flags? bits
| | | +--ro ipv4-address? inet:ipv4-address
| | +--ro unnumbered-backup-ero-sub-tlv
| | +--ro flags? bits
| | +--ro router-id? yang:dotted-quad
| | +--ro interface-id? uint32
| +--ro unknown-tlvs
| +--ro unknown-tlv*
| +--ro type? uint16
| +--ro length? uint16
| +--ro value? yang:hex-string
+--ro sr-algorithm-tlv
| +--ro sr-algorithm* uint8
+--ro sid-range-tlvs
+--ro sid-range-tlv*
+--ro range-size? ospf:uint24
+--ro sid-sub-tlv
+--ro sid? uint32
4. OSPF Yang Module
<CODE BEGINS> file "ietf-ospf@2015-07-06.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";
} }
skipping to change at page 15, line 4 skipping to change at page 21, line 25
prefix "if"; prefix "if";
} }
import ietf-routing { import ietf-routing {
prefix "rt"; prefix "rt";
} }
import ietf-key-chain { import ietf-key-chain {
prefix "key-chain"; prefix "key-chain";
} }
organization organization
"Cisco Systems "Cisco Systems
170 West Tasman Drive 170 West Tasman Drive
San Jose, CA 95134-1706 San Jose, CA 95134-1706
USA"; USA";
contact contact
"Derek Yeung myeung@cisco.com "WG Web: <http://tools.ietf.org/wg/ospf/>
Yingzhen Qu yiqu@cisco.com WG List: <mailto:ospf@ietf.org>
Dean Bogdanovic deanb@juniper.net
Jeffrey Zhang zzhang@juniper.net WG Chair: Acee Lindem
Kiran Agrahara Sreenivasa kkoushik@Brocade.com"; <mailto:acee@cisco.com>
WG Chair: Abhay Roy
<mailto:akr@cisco.com>
Editor: Derek Yeung
<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: Dean Bogdanovic
<mailto:deanb@juniper.net>
Author: Kiran Agrahara Sreenivasa
<mailto:kkoushik@Brocade.com>";
description description
"This YANG module defines the generic configuration "This YANG module defines the generic configuration
data for OSPF, which is common across all of the vendor data for OSPF, which is common across all of the vendor
implementations of the protocol. It is intended that the module implementations of the protocol. It is intended that the module
will be extended by vendors to define vendor-specific will be extended by vendors to define vendor-specific
OSPF configuration parameters and policies, OSPF configuration parameters and policies,
for example route maps or route policies. for example route maps or route policies.
Terms and Acronyms Terms and Acronyms
skipping to change at page 15, line 38 skipping to change at page 22, line 29
IP (ip): Internet Protocol IP (ip): Internet Protocol
IPv4 (ipv4):Internet Protocol Version 4 IPv4 (ipv4):Internet Protocol Version 4
IPv6 (ipv6): Internet Protocol Version 6 IPv6 (ipv6): Internet Protocol Version 6
MTU (mtu) Maximum Transmission Unit MTU (mtu) Maximum Transmission Unit
"; ";
revision 2015-07-06 {
description
"* Remove support for protocol-centric config.
* Enclose list in container, except for instance.
* Replace protocol-shutdown with admin-control.
* Add IPFRR per-interface config.
* Reorganize max-path etc node.
* Add node-flag.
* Align config/operation hierarchy.
* Use relative path for reference to rib.
* Add ability to set single admin distance.
* Make unreserved bandwidth into list.
* Add F and T bit to OSPFv3 external LSA.
* Remove key statement inside LSA body.
* Add stub router support.
* Fix usage of af-area-config.
* Add statistics to operation data.
* Add local rib.
* Use dotted-quad for all router-id fields.
* Support more than one multi-area per interface.
* Use uint16 for LSA type.
* Update grouping notification-instance-hdr.
* Rework condition for opaque type and id in OSPFv2 LSA.
* Rename local-remote-ipv4-addr with remote-if-ipv4-addr.
* Add virtual-link/sham-link to operation state.
* Allow multiple link TLVs in one LSA.
* Fix bug in as-scope-lsas.
* Remove OSPFv3 restriction in link-scope-lsas.
* Editorial changes.";
reference
"RFC XXXX: A YANG Data Model for OSPF";
}
revision 2015-03-09 { revision 2015-03-09 {
description description
"Initial revision."; "Initial revision.";
reference reference
"RFC XXXX: A YANG Data Model for OSPF"; "RFC XXXX: A YANG Data Model for OSPF";
} }
identity ospf { identity ospf {
base "rt:routing-protocol"; base "rt:routing-protocol";
description "OSPF Protocol"; description "OSPF Protocol";
skipping to change at page 17, line 12 skipping to change at page 24, line 35
typedef area-id-type { typedef area-id-type {
type union { type union {
type uint32; type uint32;
type yang:dotted-quad; type yang:dotted-quad;
} }
description description
"Area ID type."; "Area ID type.";
} }
typedef route-type {
type enumeration {
enum intra-area {
description "OSPF intra-area route.";
}
enum inter-area {
description "OSPF inter-area route.";
}
enum external-1 {
description "OSPF external route type 1.";
}
enum external-2 {
description "OSPF External route type 2.";
}
enum nssa-1 {
description "OSPF NSSA external route type 1.";
}
enum nssa-2 {
description "OSPF NSSA external route type 2.";
}
}
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 { typedef restart-helper-status-type {
type enumeration { type enumeration {
enum Not-Helping { enum Not-Helping {
value "1"; value "1";
description description
"Restart helper status not helping."; "Restart helper status not helping.";
} }
enum Helping { enum Helping {
value "2"; value "2";
description description
skipping to change at page 22, line 40 skipping to change at page 30, line 40
feature nsr { feature nsr {
description description
"Non-Stop-Routing (NSR)."; "Non-Stop-Routing (NSR).";
} }
feature graceful-restart { feature graceful-restart {
description description
"Graceful OSPF Restart as defined in RFC3623 and RFC5187."; "Graceful OSPF Restart as defined in RFC3623 and RFC5187.";
} }
feature protocol-shutdown { feature admin-control {
description description
"Shutdown the protocol."; "Administrative control of the protocol state.";
} }
feature auto-cost { feature auto-cost {
description description
"Calculate OSPF interface cost according to "Calculate OSPF interface cost according to
reference bandwidth."; reference bandwidth.";
} }
feature max-ecmp { feature max-ecmp {
description description
skipping to change at page 23, line 28 skipping to change at page 31, line 28
feature ldp-igp-sync { feature ldp-igp-sync {
description description
"LDP IGP synchronization."; "LDP IGP synchronization.";
} }
feature ldp-igp-autoconfig { feature ldp-igp-autoconfig {
description description
"LDP IGP auto-config."; "LDP IGP auto-config.";
} }
feature protocol-if-shutdown { feature ospfv3-authentication-ipsec {
description description
"Shutdown the protocol over an interface."; "Use IPsec for OSPFv3 authentication.";
} }
feature ospfv3-authentication-ipsec { feature fast-reroute {
description
"Support of IPFRR.";
}
feature node-flag {
description
"Support of node flag.";
}
feature lfa {
description
"Support of Loop Free Alternates.";
}
feature remote-lfa {
description
"Support of remote Loop Free Alternates.";
}
feature stub-router {
description description
"Use IPsec for OSPFv3 authentication."; "Support of RFC6987 OSPF Stub Router Advertisement";
} }
feature instance-inheritance { feature instance-inheritance {
description description
"Support instance inheritance"; "Support instance inheritance";
} }
feature area-inheritance { feature area-inheritance {
description description
"Support area inheritance"; "Support area inheritance";
} }
feature interface-inheritance { feature interface-inheritance {
description description
"Support interface inheritance"; "Support interface inheritance";
} }
grouping instance-stat {
description "Per-instance statistics";
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 LS checksums.";
}
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 given type.";
}
leaf lsa-cksum-sum {
type int32;
description
"The sum of the LS checksums of the given type.";
}
}
}
}
grouping area-stat {
description "Per-area statistics.";
leaf spf-runs-count {
type yang:counter32;
description "The number of times that intra-area spf runs.";
}
leaf abr-count {
type yang:gauge32;
description "The total number of area border routers reachable
within this area.";
}
leaf asbr-count {
type yang:gauge32;
description "The total number of AS border routers.";
}
leaf ar-nssa-translator-event-count {
type yang:counter32;
description "The number of translator state changes.";
}
leaf area-scope-lsa-count {
type yang:gauge32;
description "The number of LSAs in this area, excluding
as-external LSAs.";
}
leaf area-scope-lsa-cksum-sum {
type int32;
description "The sum of the 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 given type.";
}
leaf lsa-cksum-sum {
type int32;
description
"The sum of the LS checksums of the given 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 LSAs.";
}
leaf link-scope-lsa-cksum-sum {
type uint32;
description "The sum of LSAs LS 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 given type.";
}
leaf lsa-cksum-sum {
type int32;
description
"The sum of the LS checksums of the given type.";
}
}
}
}
grouping neighbor-stat {
description "Per-instance statistics";
leaf nbr-event-count {
type yang:counter32;
description
"The number of times this neighbor has changed
state or an error has occurred.";
}
leaf nbr-retrans-qlen {
type yang:gauge32;
description
"The current length of the retransmission queue.";
}
}
grouping instance-fast-reroute-config {
description
"This group defines global configuration of IPFRR.";
container fast-reroute {
if-feature fast-reroute;
description
"This container may be augmented with global
parameters for IPFRR.";
container lfa {
if-feature lfa;
description
"This container may be augmented with
global parameters for LFA.
Creating the container has no effect on
LFA activation.";
}
}
}
grouping interface-fast-reroute-config {
description
"This group defines interface configuration of IPFRR.";
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.
This model assumes activation of per-prefix LFA.";
}
container remote-lfa {
if-feature remote-lfa;
leaf enabled {
type boolean;
description
"Activates remote LFA.";
}
description
"Remote LFA configuration.";
}
description
"LFA configuration.";
}
description
"Fast-reroute configuration.";
}
}
grouping interface-common-config { grouping interface-common-config {
description "Common configuration for all types of interfaces, description "Common configuration for all types of interfaces,
including virtual link and sham link"; including virtual link and sham link";
leaf cost { leaf cost {
type uint16 { type uint16 {
range "1..65535"; range "1..65535";
} }
description description
"Interface cost."; "Interface cost.";
skipping to change at page 26, line 8 skipping to change at page 38, line 32
} }
leaf hops { leaf hops {
type uint8 { type uint8 {
range "1..254"; range "1..254";
} }
description description
"Maximum number of hops that a OSPF packet may "Maximum number of hops that a OSPF packet may
have traveled."; have traveled.";
} }
} }
container protocol-shutdown { leaf enable {
if-feature protocol-if-shutdown; if-feature admin-control;
type boolean;
default true;
description description
"Protocol shutdown interface config state."; "Enable/disable protocol on the interface.";
leaf shutdown {
type boolean;
description
"Enable/Disable protocol shutdown on the interface.";
}
} }
container authentication { container authentication {
description "Authentication configuration."; description "Authentication configuration.";
choice auth-type-selection { choice auth-type-selection {
description description
"Options for expressing authentication setting"; "Options for expressing authentication setting.";
case auth-ipsec { case auth-ipsec {
when "../../../../../rt:type = 'ospfv3'" { when "../../../../../../../rt:type = 'ospfv3'" {
description "Applied to OSPFv3 only"; description "Applied to OSPFv3 only.";
} }
if-feature ospfv3-authentication-ipsec; if-feature ospfv3-authentication-ipsec;
leaf sa { leaf sa {
type string; type string;
description description
"SA name"; "SA name.";
} }
} }
case auth-trailer-key-chain { case auth-trailer-key-chain {
leaf key-chain { leaf key-chain {
type key-chain:key-chain-ref; type key-chain:key-chain-ref;
description description
"key-chain name"; "key-chain name.";
} }
} }
case auth-trailer-key { case auth-trailer-key {
leaf key { leaf key {
type string; type string;
description description
"Key string in ASCII format."; "Key string in ASCII format.";
} }
container crypto-algorithm { container crypto-algorithm {
uses key-chain:crypto-algorithm-types; uses key-chain:crypto-algorithm-types;
skipping to change at page 27, line 23 skipping to change at page 39, line 43
leaf network-type { leaf network-type {
type enumeration { type enumeration {
enum "broadcast" { enum "broadcast" {
description description
"Specify OSPF broadcast multi-access network."; "Specify OSPF broadcast multi-access network.";
} }
enum "non-broadcast" { enum "non-broadcast" {
description description
"Specify OSPF Non-Broadcast Multi-Access "Specify OSPF Non-Broadcast Multi-Access
(NBMA) network."; (NBMA) network.";
} }
enum "point-to-multipoint" { enum "point-to-multipoint" {
description description
"Specify OSPF point-to-multipoint network."; "Specify OSPF point-to-multipoint network.";
} }
enum "point-to-point" { enum "point-to-point" {
description description
"Specify OSPF point-to-point network."; "Specify OSPF point-to-point network.";
} }
} }
description description
"Network type."; "Network type.";
} }
leaf passive { leaf passive {
type boolean; type boolean;
description description
"Enable/Disable passive."; "Enable/Disable passive.";
skipping to change at page 27, line 51 skipping to change at page 40, line 24
"Enable/Disable passive."; "Enable/Disable passive.";
} }
leaf demand-circuit { leaf demand-circuit {
if-feature demand-circuit; if-feature demand-circuit;
type boolean; type boolean;
description description
"Enable/Disable demand circuit."; "Enable/Disable demand circuit.";
} }
container multi-area { container multi-areas {
if-feature multi-area-adj; description "Container for multi-area config.";
description list multi-area {
"Configure ospf multi-area."; if-feature multi-area-adj;
leaf multi-area-id { key multi-area-id;
type area-id-type;
description
"Multi-area ID";
}
leaf cost {
type uint16;
description description
"Interface cost for multi-area."; "Configure ospf multi-area.";
leaf multi-area-id {
type area-id-type;
description
"Multi-area ID";
}
leaf cost {
type uint16;
description
"Interface cost for multi-area.";
}
} }
} }
container static-neighbors { container static-neighbors {
description "Static configured neighbors."; description "Static configured neighbors.";
list neighbor { list neighbor {
key "address"; key "address";
description description
"Specify a neighbor router."; "Specify a neighbor router.";
skipping to change at page 29, line 4 skipping to change at page 41, line 29
description "Neighbor poll interval."; description "Neighbor poll interval.";
} }
leaf priority { leaf priority {
type uint8 { type uint8 {
range "1..255"; range "1..255";
} }
description "Neighbor priority for DR election."; description "Neighbor priority for DR election.";
} }
} }
} }
leaf node-flag {
if-feature node-flag;
type boolean;
default false;
description
"Set prefix as a node representative prefix.";
}
uses interface-fast-reroute-config;
uses interface-common-config; uses interface-common-config;
} // grouping interface-config } // grouping interface-config
grouping tlv { grouping tlv {
description description
"TLV"; "TLV";
leaf type { leaf type {
type uint16; type uint16;
description "TLV type."; description "TLV type.";
} }
leaf length { leaf length {
type uint16; type uint16;
description "TLV length."; description "TLV length.";
} }
leaf value { leaf value {
type yang:hex-string; type yang:hex-string;
description "TLV value."; description "TLV value.";
} }
} }
grouping unknown-tlvs {
description
"Unknown TLVs grouping.
Could be 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 { grouping ospfv2-lsa-body {
description "OSPFv2 LSA body."; description "OSPFv2 LSA body.";
container router { container router {
when "../../header/type = 1" { when "../../header/type = 1" {
description description
"Only apply to Router-LSA."; "Only apply to Router-LSA.";
} }
description description
"Router LSA."; "Router LSA.";
leaf flags { leaf flags {
type bits { type bits {
bit V { bit V {
description description
"When set, the router is an endpoint of one or "When set, the router is an endpoint of one or
more virtual links."; more virtual links.";
} }
bit E { bit E {
description description
"When set, the router is an AS Boundary Router "When set, the router is an AS Boundary Router
(ASBR)."; (ASBR).";
} }
bit B { bit B {
description description
"When set, the router is an Area Border Router (ABR)."; "When set, the router is an Area Border
Router (ABR).";
} }
} }
description "Flags"; description "Flags.";
} }
leaf num-of-links { leaf num-of-links {
type uint16; type uint16;
description "Number of links."; description "Number of links.";
} }
list link { container links {
key "link-id link-data"; description "All router Links.";
description "Router LSA link."; list link {
leaf link-id { description "Router LSA link.";
type union { uses ospfv2-router-link;
type inet:ipv4-address; container topologies {
type yang:dotted-quad; description "All topologies for the link.";
} list topology {
description "Link ID"; description
} "Topology specific information.";
leaf link-data { leaf mt-id {
type union { type uint8;
type inet:ipv4-address; description
type uint32; "The MT-ID for topology enabled on the link.";
} }
description "Link data."; leaf metric {
} type uint16;
leaf type { description "Metric for the topology.";
type uint8; }
description "Link type."; }
}
list topology {
key "mt-id";
description
"Topology specific information.";
leaf mt-id {
type uint8;
description
"The MT-ID for topology enabled on the link.";
}
leaf metric {
type uint16;
description "Metric for the topology.";
} }
} }
} }
} }
container network { container network {
when "../../header/type = 2" { when "../../header/type = 2" {
description description
"Only apply to network LSA."; "Only apply to network LSA.";
} }
description description
"Network LSA."; "Network LSA.";
leaf network-mask { leaf network-mask {
type inet:ipv4-address; type inet:ipv4-address;
description description
"The IP address mask for the network"; "The IP address mask for the network.";
} }
leaf-list attached-router { container attached-routers {
type yang:dotted-quad; description "All attached routers.";
description leaf-list attached-router {
"List of the routers attached to the network."; type yang:dotted-quad;
description
"List of the routers attached to the network.";
}
} }
} }
container summary { container summary {
when "../../header/type = 3 or " when "../../header/type = 3 or "
+ "../../header/type = 4" { + "../../header/type = 4" {
description description
"Only apply to Summary-LSA."; "Only apply to Summary-LSA.";
} }
description description
"Summary LSA."; "Summary LSA.";
leaf network-mask { leaf network-mask {
type inet:ipv4-address; type inet:ipv4-address;
description description
"The IP address mask for the network"; "The IP address mask for the network";
} }
list topology { container topologies {
key "mt-id"; description "All topologies for the summary.";
description list topology {
"Topology specific information.";
leaf mt-id {
type uint8;
description description
"The MT-ID for topology enabled on the link."; "Topology specific information.";
} leaf mt-id {
leaf metric { type uint8;
type uint24; description
description "Metric for the topology."; "The MT-ID for topology enabled on the link.";
}
leaf metric {
type uint24;
description "Metric for the topology.";
}
} }
} }
} }
container external { container external {
when "../../header/type = 5 or " when "../../header/type = 5 or "
+ "../../header/type = 7" { + "../../header/type = 7" {
description description
"Only apply to AS-external-LSA and NSSA-LSA."; "Only apply to AS-external-LSA and NSSA-LSA.";
} }
description description
"External LSA."; "External LSA.";
leaf network-mask { leaf network-mask {
type inet:ipv4-address; type inet:ipv4-address;
description description
"The IP address mask for the network"; "The IP address mask for the network";
} }
list topology { container topologies {
key "mt-id"; description "All topologies for the external.";
description list topology {
"Topology specific information.";
leaf mt-id {
type uint8;
description description
"The MT-ID for topology enabled on the link."; "Topology specific information.";
} leaf mt-id {
leaf flags { type uint8;
type bits { description
bit E { "The MT-ID for topology enabled on the link.";
description }
"When set, the metric specified is a Type 2 leaf flags {
external metric."; 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.";
} }
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.";
} }
} }
} }
container opaque { container opaque {
when "../../header/type = 9 or " when "../../header/type = 9 or "
+ "../../header/type = 10 or " + "../../header/type = 10 or "
+ "../../header/type = 11" { + "../../header/type = 11" {
description description
"Only apply to opaque LSA."; "Only apply to opaque LSA.";
} }
description description
"Opaque LSA."; "Opaque LSA.";
list unknown-tlv { uses unknown-tlvs;
key "type";
description "Unknown TLV.";
uses tlv;
}
container router-address-tlv { container router-address-tlv {
description
"Router address TLV.";
leaf router-address { leaf router-address {
type inet:ipv4-address; type inet:ipv4-address;
description description
"Router address."; "Router address.";
} }
description
"Router address TLV.";
} }
container link-tlv { container link-tlvs {
leaf link-type { description "All link TLVs in the LSA.";
type uint8; container link-tlv {
mandatory true; description "Link TLV.";
description "Link type."; leaf link-type {
} type uint8;
leaf link-id { mandatory true;
type union { description "Link type.";
type inet:ipv4-address;
type yang:dotted-quad;
} }
mandatory true; leaf link-id {
description "Link ID."; type union {
} type inet:ipv4-address;
leaf-list local-if-ipv4-addr { type yang:dotted-quad;
type inet:ipv4-address; }
description mandatory true;
"List of local interface IPv4 addresses."; description "Link ID.";
}
leaf-list local-remote-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."; container local-if-ipv4-addrs {
} description "All local interface IPv4 addresses.";
leaf max-reservable-bandwidth { leaf-list local-if-ipv4-addr {
type decimal64 { type inet:ipv4-address;
fraction-digits 2; description
"List of local interface IPv4 addresses.";
}
} }
description "Maximum reservable bandwidth."; container remote-if-ipv4-addrs {
} description "All remote interface IPv4 addresses.";
leaf unreserved-bandwidth { leaf-list remote-if-ipv4-addr {
type decimal64 { type inet:ipv4-address;
fraction-digits 2; description
"List of remote interface IPv4 addresses.";
}
} }
description "Unreserved bandwidth."; 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;
} }
leaf admin-group { }
type uint32;
description "Administrative group/Resource class/Color."; container extended-prefix-tlvs {
description "All extended prefix TLVs in the LSA.";
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.";
}
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;
} }
list unknown-subtlv { }
key "type";
description "Unknown sub-TLV."; container extended-link-tlvs {
uses tlv; description "All extended link TLVs in the LSA.";
list extended-link-tlv {
description "Extended link TLV.";
uses ospfv2-router-link;
uses unknown-tlvs;
} }
description
"Link TLV.";
} }
} }
} }
grouping ospfv3-lsa-options { grouping ospfv3-lsa-options {
description "OSPFv3 LSA options"; description "OSPFv3 LSA options";
leaf options { leaf options {
type bits { type bits {
bit DC { bit DC {
description description
skipping to change at page 35, line 4 skipping to change at page 49, line 47
description description
"When set, the originator is an active router."; "When set, the originator is an active router.";
} }
bit N { bit N {
description description
"If set, the router is attached to an NSSA"; "If set, the router is attached to an NSSA";
} }
bit E { bit E {
description description
"This bit describes the way AS-external-LSAs "This bit describes the way AS-external-LSAs
are flooded"; are flooded";
} }
bit V6 { bit V6 {
description description
"If clear, the router/link should be excluded "If clear, the router/link should be excluded
from IPv6 routing calculaton"; from IPv6 routing calculaton";
} }
} }
mandatory true; mandatory true;
description "OSPFv3 LSA options."; description "OSPFv3 LSA options.";
} }
} }
grouping ospfv3-lsa-prefix { grouping ospfv3-lsa-prefix {
description description
"OSPFv3 LSA prefix."; "OSPFv3 LSA prefix.";
skipping to change at page 35, line 24 skipping to change at page 50, line 19
} }
} }
grouping ospfv3-lsa-prefix { grouping ospfv3-lsa-prefix {
description description
"OSPFv3 LSA prefix."; "OSPFv3 LSA prefix.";
leaf prefix { leaf prefix {
type inet:ip-prefix; type inet:ip-prefix;
description description
"Prefix"; "Prefix.";
} }
leaf prefix-options { leaf prefix-options {
type bits { type bits {
bit NU { bit NU {
description description
"When set, the prefix should be excluded "When set, the prefix should be excluded
from IPv6 unicast calculations."; from IPv6 unicast calculations.";
} }
bit LA { bit LA {
description description
"When set, the prefix is actually an IPv6 interface "When set, the prefix is actually an IPv6 interface
address of the Advertising Router."; address of the Advertising Router.";
} }
bit P { bit P {
description description
"When set, the NSSA area prefix should be "When set, the NSSA area prefix should be
readvertised by the translating NSSA area border."; readvertised by the translating NSSA area border.";
} }
bit DN { bit DN {
description description
"When set, the inter-area-prefix-LSA or "When set, the inter-area-prefix-LSA or
AS-external-LSA prefix has been advertised in a VPN AS-external-LSA prefix has been advertised in a VPN
environment."; environment.";
} }
} }
mandatory true; mandatory true;
description "Prefix options."; description "Prefix options.";
} }
} }
grouping ospfv3-lsa-external { grouping ospfv3-lsa-external {
description description
"AS-External and NSSA LSA."; "AS-External and NSSA LSA.";
leaf metric { leaf metric {
type uint24; type uint24;
description "Metric"; description "Metric";
} }
leaf flags { leaf flags {
type bits { type bits {
bit E { bit E {
description description
"When set, the metric specified is a Type 2 "When set, the metric specified is a Type 2
skipping to change at page 36, line 21 skipping to change at page 51, line 15
leaf metric { leaf metric {
type uint24; type uint24;
description "Metric"; description "Metric";
} }
leaf flags { leaf flags {
type bits { type bits {
bit E { bit E {
description description
"When set, the metric specified is a Type 2 "When set, the metric specified is a Type 2
external metric."; 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."; description "Flags.";
} }
leaf referenced-ls-type { leaf referenced-ls-type {
type uint16; type uint16;
description "Referenced Link State type."; description "Referenced Link State type.";
} }
skipping to change at page 37, line 16 skipping to change at page 52, line 21
when "../../header/type = 8193" { // 0x2001 when "../../header/type = 8193" { // 0x2001
description description
"Only apply to Router-LSA."; "Only apply to Router-LSA.";
} }
description "Router LSA."; description "Router LSA.";
leaf flags { leaf flags {
type bits { type bits {
bit V { bit V {
description description
"When set, the router is an endpoint of one or "When set, the router is an endpoint of one or
more virtual links."; more virtual links.";
} }
bit E { bit E {
description description
"When set, the router is an AS Boundary Router "When set, the router is an AS Boundary Router
(ASBR)."; (ASBR).";
} }
bit B { bit B {
description description
"When set, the router is an Area Border Router (ABR)."; "When set, the router is an Area Border
Router (ABR).";
} }
bit Nt { bit Nt {
description description
"When set, the router is an NSSA border router "When set, the router is an NSSA border router
that is unconditionally translating NSSA-LSAs that is unconditionally translating NSSA-LSAs
into AS-external-LSAs."; into AS-external-LSAs.";
} }
} }
mandatory true; mandatory true;
description "LSA option."; description "LSA option.";
} }
uses ospfv3-lsa-options; uses ospfv3-lsa-options;
list link { container links {
key "interface-id neighbor-interface-id neighbor-router-id"; description "All router link.";
description "Router LSA link."; list link {
leaf interface-id { description "Router LSA link.";
type uint32; leaf interface-id {
description "Interface ID."; type uint32;
} description "Interface ID.";
leaf neighbor-interface-id {
type uint32; }
description "Neighbor Interface ID."; leaf neighbor-interface-id {
} type uint32;
leaf neighbor-router-id { description "Neighbor Interface ID.";
type yang:dotted-quad; }
description "Neighbor Router ID"; leaf neighbor-router-id {
} type yang:dotted-quad;
leaf type { description "Neighbor Router ID.";
type uint8; }
description "Link type."; leaf type {
} type uint8;
leaf metric { description "Link type.";
type uint16; }
description "Metric."; leaf metric {
type uint16;
description "Metric.";
}
} }
} }
} }
container network { container network {
when "../../header/type = 8194" { // 0x2002 when "../../header/type = 8194" { // 0x2002
description description
"Only apply to network LSA."; "Only apply to network LSA.";
} }
description "Network LSA."; description "Network LSA.";
uses ospfv3-lsa-options; uses ospfv3-lsa-options;
leaf-list attached-router { container attached-routers {
type yang:dotted-quad; description "All attached routers.";
description leaf-list attached-router {
"List of the routers attached to the network."; type yang:dotted-quad;
description
"List of the routers attached to the network.";
}
} }
} }
container inter-area-prefix { container inter-area-prefix {
when "../../header/type = 8195" { // 0x2003 when "../../header/type = 8195" { // 0x2003
description description
"Only apply to inter-area-prefix LSA."; "Only apply to inter-area-prefix LSA.";
} }
leaf metric { leaf metric {
type uint24; type uint24;
description "Metric"; description "Metric";
skipping to change at page 39, line 5 skipping to change at page 54, line 15
description "Inter-Area-Prefix LSA."; description "Inter-Area-Prefix LSA.";
} }
container inter-area-router { container inter-area-router {
when "../../header/type = 8196" { // 0x2004 when "../../header/type = 8196" { // 0x2004
description description
"Only apply to inter-area-router LSA."; "Only apply to inter-area-router LSA.";
} }
uses ospfv3-lsa-options; uses ospfv3-lsa-options;
leaf metric { leaf metric {
type uint24; type uint24;
description "Metric"; description "Metric.";
} }
leaf destination-router-id { leaf destination-router-id {
type yang:dotted-quad; type yang:dotted-quad;
description description
"The Router ID of the router being described by the LSA."; "The Router ID of the router being described by the LSA.";
} }
description "Inter-Area-Router LSA."; description "Inter-Area-Router LSA.";
} }
container as-external { container as-external {
when "../../header/type = 16389" { // 0x2007 when "../../header/type = 16389" { // 0x4005
description description
"Only apply to as-external LSA."; "Only apply to as-external LSA.";
} }
uses ospfv3-lsa-external; uses ospfv3-lsa-external;
description "AS-External LSA."; description "AS-External LSA.";
} }
container nssa { container nssa {
when "../../header/type = 8199" { // 0x2007 when "../../header/type = 8199" { // 0x2007
skipping to change at page 39, line 42 skipping to change at page 55, line 4
} }
container link { container link {
when "../../header/type = 8" { // 0x0008 when "../../header/type = 8" { // 0x0008
description description
"Only apply to link LSA."; "Only apply to link LSA.";
} }
leaf rtr-priority { leaf rtr-priority {
type uint8; type uint8;
description "Router Priority of the interface."; description "Router Priority of the interface.";
} }
uses ospfv3-lsa-options; uses ospfv3-lsa-options;
leaf link-local-interface-address { leaf link-local-interface-address {
type inet:ipv6-address; type inet:ipv6-address;
description description
"The originating router's link-local "The originating router's link-local
interface address on the link."; interface address on the link.";
} }
leaf num-of-prefixes { leaf num-of-prefixes {
type uint32; type uint32;
description "Number of prefixes."; description "Number of prefixes.";
} }
list prefix { container prefixes {
key "prefix"; description "All prefixes for the link.";
description "List of prefixes associated with the link."; list prefix {
uses ospfv3-lsa-prefix; description "List of prefixes associated with the link.";
uses ospfv3-lsa-prefix;
}
} }
description "Link LSA."; description "Link LSA.";
} }
container intra-area-prefix { container intra-area-prefix {
when "../../header/type = 8201" { // 0x2009 when "../../header/type = 8201" { // 0x2009
description description
"Only apply to intra-area-prefix LSA."; "Only apply to intra-area-prefix LSA.";
} }
description "Intra-Area-Prefix LSA."; description "Intra-Area-Prefix LSA.";
skipping to change at page 40, line 41 skipping to change at page 56, line 4
} }
leaf referenced-adv-router { leaf referenced-adv-router {
type inet:ipv4-address; type inet:ipv4-address;
description description
"Referenced Advertising Router."; "Referenced Advertising Router.";
} }
leaf num-of-prefixes { leaf num-of-prefixes {
type uint16; type uint16;
description "Number of prefixes."; description "Number of prefixes.";
} }
list prefix { container prefixes {
key "prefix"; description "All prefixes in this LSA.";
description "List of prefixes associated with the link."; list prefix {
uses ospfv3-lsa-prefix; description "List of prefixes in this LSA.";
leaf metric { uses ospfv3-lsa-prefix;
type uint24; leaf metric {
description "Metric"; type uint24;
description "Metric.";
}
} }
} }
} }
} }
grouping lsa-header { grouping lsa-header {
description description
"Common LSA for OSPFv2 and OSPFv3"; "Common LSA for OSPFv2 and OSPFv3";
leaf age { leaf age {
type uint16; type uint16;
mandatory true; mandatory true;
description "LSA age."; description "LSA age.";
} }
skipping to change at page 41, line 40 skipping to change at page 57, line 4
leaf checksum { leaf checksum {
type uint16; type uint16;
mandatory true; mandatory true;
description "LSA checksum."; description "LSA checksum.";
} }
leaf length { leaf length {
type uint16; type uint16;
mandatory true; mandatory true;
description "LSA length."; description "LSA length.";
} }
} }
grouping ospfv2-lsa { grouping ospfv2-lsa {
description description
"OSPFv2 LSA."; "OSPFv2 LSA.";
container header { container header {
must "(type = 9 or type = 10 or type = 11) and "
+ "opaque-id and opaque-type "
+ "or (type != 9 and type != 10 and type != 11) "
+ "and not(opaque-id) and "
+ "not(opaque-type)" {
description "Opaque type and id only apply to opaque LSA.";
}
description description
"Decoded OSPFv2 LSA header data."; "Decoded OSPFv2 LSA header data.";
leaf option { leaf option {
type bits { type bits {
bit DC { bit DC {
description description
"When set, the router support demand circuits."; "When set, the router support demand circuits.";
} }
bit P { bit P {
description description
"Only used in type-7 LSA. When set, the NSSA "Only used in type-7 LSA. When set, the NSSA
border router should translate the type-7 LSA border router should translate the type-7 LSA
to type-5 LSA."; to type-5 LSA.";
} }
bit MC { bit MC {
description description
"When set, the router support MOSPF."; "When set, the router support MOSPF.";
} }
bit E { bit E {
description description
"This bit describes the way AS-external-LSAs "This bit describes the way AS-external-LSAs
are flooded"; are flooded";
} }
} }
mandatory true; mandatory true;
description "LSA option."; description "LSA option.";
} }
leaf lsa-id { leaf lsa-id {
type inet:ipv4-address; type inet:ipv4-address;
mandatory true; mandatory true;
description "LSA ID."; description "LSA ID.";
} }
leaf opaque-type { leaf opaque-type {
when "../../header/type = 9 or "
+ "../../header/type = 10 or "
+ "../../header/type = 11" {
description
"Only apply to opaque LSA.";
}
type uint8; type uint8;
mandatory true;
description "Opaque type."; description "Opaque type.";
} }
leaf opaque-id { leaf opaque-id {
when "../../header/type = 9 or "
+ "../../header/type = 10 or "
+ "../../header/type = 11" {
description
"Only apply to opaque LSA.";
}
type uint24; type uint24;
mandatory true;
description "Opaque id."; description "Opaque id.";
} }
uses lsa-header; uses lsa-header;
} }
container body { container body {
description description
"Decoded OSPFv2 LSA body data."; "Decoded OSPFv2 LSA body data.";
uses ospfv2-lsa-body; uses ospfv2-lsa-body;
} }
} }
grouping ospfv3-lsa { grouping ospfv3-lsa {
skipping to change at page 43, line 47 skipping to change at page 59, line 5
"Common field for OSPF LSA represenation."; "Common field for OSPF LSA represenation.";
leaf decoded-completed { leaf decoded-completed {
type boolean; type boolean;
description description
"The OSPF LSA body is fully decoded."; "The OSPF LSA body is fully decoded.";
} }
leaf raw-data { leaf raw-data {
type yang:hex-string; type yang:hex-string;
description description
"The complete LSA in network byte "The complete LSA in network byte
order as received/sent over the wire."; order as received/sent over the wire.";
}
}
grouping link-scope-lsa {
description
"OSPF link-scope LSA.";
uses lsa-common;
choice version {
description
"OSPFv2 or OSPFv3 LSA body.";
container ospfv2 {
when "../../../../../../../rt:type = 'ospfv2'" {
description "Applied to OSPFv2 only";
}
description "OSPFv2 LSA";
uses ospfv2-lsa;
}
container ospfv3 {
when "../../../../../../../rt:type = 'ospfv3'" {
description "Applied to OSPFv3 only";
}
description "OSPFv3 LSA";
uses ospfv3-lsa;
}
}
}
grouping area-scope-lsa {
description
"OSPF area-scope LSA.";
uses lsa-common;
choice version {
description
"OSPFv2 or OSPFv3 LSA body.";
container ospfv2 {
when "../../../../../../rt:type = 'ospfv2'" {
description "Applied to OSPFv2 only";
}
description "OSPFv2 LSA";
uses ospfv2-lsa;
}
container ospfv3 {
when "../../../../../../rt:type = 'ospfv3'" {
description "Applied to OSPFv3 only";
}
description "OSPFv3 LSA";
uses ospfv3-lsa;
}
} }
} }
grouping as-scope-lsa { grouping lsa {
description description
"OSPF AS-scope LSA."; "OSPF LSA.";
uses lsa-common; uses lsa-common;
choice version { choice version {
description description
"OSPFv2 or OSPFv3 LSA body."; "OSPFv2 or OSPFv3 LSA body.";
container ospfv2 { container ospfv2 {
when "../../../../../rt:type = 'ospfv2'" {
description "Applied to OSPFv2 only";
}
description "OSPFv2 LSA"; description "OSPFv2 LSA";
uses ospfv2-lsa; uses ospfv2-lsa;
} }
container ospfv3 { container ospfv3 {
when "../../../../../rt:type = 'ospfv3'" {
description "Applied to OSPFv3 only";
}
description "OSPFv3 LSA"; description "OSPFv3 LSA";
uses ospfv3-lsa; uses ospfv3-lsa;
} }
} }
} }
grouping lsa-key { grouping lsa-key {
description description
"OSPF LSA key."; "OSPF LSA key.";
leaf lsa-id { leaf lsa-id {
skipping to change at page 45, line 47 skipping to change at page 59, line 48
leaf adv-router { leaf adv-router {
type inet:ipv4-address; type inet:ipv4-address;
description description
"Advertising router."; "Advertising router.";
} }
} }
grouping af-area-config { grouping af-area-config {
description description
"OSPF address-family specific area config state."; "OSPF address-family specific area config state.";
list range { container ranges {
key "prefix"; description "Container for summary ranges";
description list range {
"Summarize routes matching address/mask (border key "prefix";
routers only)";
leaf prefix {
type inet:ip-prefix;
description
"IPv4 or IPv6 prefix";
}
leaf advertise {
type boolean;
description description
"Advertise or hide."; "Summarize routes matching address/mask (border
} routers only)";
leaf cost { leaf prefix {
type uint24 { type inet:ip-prefix;
range "0..16777214"; description
"IPv4 or IPv6 prefix";
}
leaf advertise {
type boolean;
description
"Advertise or hide.";
}
leaf cost {
type uint24 {
range "0..16777214";
}
description
"Cost of summary route.";
} }
description
"Cost of summary route.";
} }
} }
} }
grouping area-config { grouping area-config {
description description
"OSPF area config state."; "OSPF area config state.";
leaf area-type { leaf area-type {
type identityref { type identityref {
base area-type; base area-type;
skipping to change at page 46, line 45 skipping to change at page 60, line 48
} }
leaf summary { leaf summary {
when "../area-type = 'stub' or ../area-type = 'nssa'" { when "../area-type = 'stub' or ../area-type = 'nssa'" {
description description
"Summary generation valid for stub/NSSA area."; "Summary generation valid for stub/NSSA area.";
} }
type boolean; type boolean;
description description
"Enable/Disable summary generation to the stub or "Enable/Disable summary generation to the stub or
NSSA area."; NSSA area.";
} }
leaf default-cost { leaf default-cost {
when "../area-type = 'stub' or ../area-type = 'nssa'" { when "../area-type = 'stub' or ../area-type = 'nssa'" {
description description
"Default cost for LSA advertised into stub or "Default cost for LSA advertised into stub or
NSSA area."; NSSA area.";
} }
type uint32 { type uint32 {
range "1..16777215"; range "1..16777215";
} }
description description
"Set the summary default-cost for a stub or NSSA area."; "Set the summary default-cost for a stub or NSSA area.";
} }
}
uses af-area-config { grouping local-rib {
when "../../operation-mode = 'ospf:ships-in-the-night'" { description "Local-rib grouping.";
description container local-rib {
"Ships in the night configuration."; description "Local-rib.";
list route {
key "prefix";
description "Routes";
leaf prefix {
type inet:ip-prefix;
description "Destination prefix.";
}
container next-hops {
description "All next hops for the route.";
list next-hop {
key "next-hop";
description "List of next hop for the route";
leaf outgoing-interface {
type if:interface-ref;
description
"Name of the outgoing interface.";
}
leaf next-hop {
type inet:ip-address;
description "Nexthop address.";
}
}
}
leaf metric {
type uint32;
description "Metric for this route.";
}
leaf route-type {
type route-type;
description "Route type for this route.";
}
leaf route-tag {
type uint32;
description "Route tag for this route.";
}
} }
} }
} }
grouping instance-config { grouping instance-config {
description description
"OSPF instance config state."; "OSPF instance config state.";
leaf router-id { leaf router-id {
if-feature router-id; if-feature router-id;
type yang:dotted-quad; type yang:dotted-quad;
description description
"Defined in RFC 2328. A 32-bit number "Defined in RFC 2328. A 32-bit number
that uniquely identifies the router."; that uniquely identifies the router.";
} }
container admin-distance { container admin-distance {
description "Admin distance config state."; description "Admin distance config state.";
choice granularity { choice scope {
description description
"Options for expressing admin distance "Options for expressing admin distance
for intra-area and inter-area route"; as single or multiple values.";
case detail { case single-value {
leaf intra-area { leaf all {
type uint8; type uint8;
description description
"Admin distance for intra-area route."; "Admin distance for intra-area, inter-area and
external route.";
} }
leaf inter-area { }
type uint8; case multi-values {
choice granularity {
description description
"Admin distance for inter-area route."; "Options for expressing admin distance
for intra-area and inter-area route.";
case detail {
leaf intra-area {
type uint8;
description
"Admin distance for intra-area route.";
}
leaf inter-area {
type uint8;
description
"Admin distance for inter-area route.";
}
}
case coarse {
leaf internal {
type uint8;
description
"Admin distance for both intra-area and
inter-area route.";
}
}
} }
} leaf external {
case coarse {
leaf internal {
type uint8; type uint8;
description description
"Admin distance for both intra-area and "Admin distance for both external route.";
inter-area route.";
} }
} }
} }
leaf external {
type uint8;
description
"Admin distance for both external route.";
}
} }
container nsr { container nsr {
if-feature nsr; if-feature nsr;
description description
"NSR config state."; "NSR config state.";
leaf enable { leaf enable {
type boolean; type boolean;
description description
"Enable/Disable NSR."; "Enable/Disable NSR.";
skipping to change at page 49, line 7 skipping to change at page 64, line 15
} }
units seconds; units seconds;
default "120"; // Default is defined in RFC 3623. default "120"; // Default is defined in RFC 3623.
description description
"RestartInterval option in RFC 3623 Section B.1."; "RestartInterval option in RFC 3623 Section B.1.";
} }
leaf helper-strict-lsa-checking { leaf helper-strict-lsa-checking {
type boolean; type boolean;
description description
"RestartHelperStrictLSAChecking option in RFC 3623 "RestartHelperStrictLSAChecking option in RFC 3623
Section B.2."; Section B.2.";
} }
} }
container protocol-shutdown { leaf enable {
if-feature protocol-shutdown; if-feature admin-control;
type boolean;
default true;
description description
"Protocol shutdown config state."; "Enable/Disable the protocol.";
leaf shutdown {
type boolean;
description
"Enable/Disable protocol shutdown.";
}
} }
container auto-cost { container auto-cost {
if-feature auto-cost; if-feature auto-cost;
description description
"Auto cost config state."; "Auto cost config state.";
leaf enable { leaf enable {
type boolean; type boolean;
description description
"Enable/Disable auto cost."; "Enable/Disable auto cost.";
} }
leaf reference-bandwidth { leaf reference-bandwidth {
when "../enable = 'true'" {
description "Only when auto cost is enabled";
}
type uint32 { type uint32 {
range "1..4294967"; range "1..4294967";
} }
units Mbits; units Mbits;
description description
"Configure reference bandwidth in term of Mbits"; "Configure reference bandwidth in term of Mbits";
} }
} }
container maximum { container spf-control {
description
"OSPF limits settings.";
leaf paths { leaf paths {
if-feature max-ecmp; if-feature max-ecmp;
type uint16 { type uint16 {
range "1..32"; range "1..32";
} }
description description
"Maximum number of ECMP paths."; "Maximum number of ECMP paths.";
} }
description "SPF calculation control.";
}
container database-control {
leaf max-lsa { leaf max-lsa {
if-feature max-lsa; if-feature max-lsa;
type uint32 { type uint32 {
range "1..4294967294"; range "1..4294967294";
} }
description description
"Maximum number of LSAs OSPF will receive."; "Maximum number of LSAs OSPF will receive.";
} }
description "Database maintenance control.";
}
container stub-router {
if-feature stub-router;
description "Set maximum metric configuration";
choice trigger {
description
"Specific different triggers to enable stub router.";
container always {
presence
"Enables maximum metric for non-stub router link";
description "Set maximum metric always configuration";
}
}
} }
container mpls { container mpls {
description description
"OSPF MPLS config state."; "OSPF MPLS config state.";
container te-rid { container te-rid {
if-feature te-rid; if-feature te-rid;
description description
"Traffic Engineering stable IP address for system."; "Traffic Engineering stable IP address for system.";
choice source { choice source {
description description
"Different options for specifying TE router ID."; "Different options for specifying TE router ID.";
case interface { case interface {
leaf interface { leaf interface {
type if:interface-ref; type if:interface-ref;
description description
"Take the interface's IPv4 address as TE router ID."; "Take the interface's IPv4 address as TE
router ID.";
} }
} }
case explicit { case explicit {
leaf router-id { leaf router-id {
type inet:ipv4-address; type inet:ipv4-address;
description description
"Explicitly configure the TE router ID."; "Explicitly configure the TE router ID.";
} }
} }
} }
skipping to change at page 51, line 9 skipping to change at page 66, line 35
"Enable LDP IGP synchronization."; "Enable LDP IGP synchronization.";
} }
leaf autoconfig { leaf autoconfig {
if-feature ldp-igp-autoconfig; if-feature ldp-igp-autoconfig;
type boolean; type boolean;
description description
"Enable LDP IGP interface auto-configuration."; "Enable LDP IGP interface auto-configuration.";
} }
} }
} }
uses instance-fast-reroute-config;
} }
grouping interface-operation { grouping interface-operation {
description description
"OSPF interface operation state."; "OSPF interface operation state.";
reference "RFC2328 Section 9"; reference "RFC2328 Section 9";
uses interface-config; uses interface-config;
leaf state { leaf state {
type if-state-type; type if-state-type;
skipping to change at page 51, line 43 skipping to change at page 67, line 22
leaf dr { leaf dr {
type inet:ipv4-address; type inet:ipv4-address;
description "DR."; description "DR.";
} }
leaf bdr { leaf bdr {
type inet:ipv4-address; type inet:ipv4-address;
description "BDR."; description "BDR.";
} }
container statistics {
description "Per interface statistics";
uses interface-stat;
}
} // interface-operation } // interface-operation
grouping neighbor-operation { grouping neighbor-operation {
description description
"OSPF neighbor operation data."; "OSPF neighbor operation data.";
leaf address { leaf address {
type inet:ip-address; type inet:ip-address;
description description
"Neighbor address."; "Neighbor address.";
} }
leaf dr { leaf dr {
type inet:ipv4-address; type yang:dotted-quad;
description description
"Designated Router."; "Designated Router.";
} }
leaf bdr { leaf bdr {
type inet:ipv4-address; type yang:dotted-quad;
description description
"Backup Designated Router."; "Backup Designated Router.";
} }
leaf state { leaf state {
type nbr-state-type; type nbr-state-type;
description description
"OSPF neighbor state."; "OSPF neighbor state.";
}
container statistics {
description "Per neighbor statistics";
uses neighbor-stat;
} }
} }
grouping instance-operation { grouping instance-operation {
description description
"OSPF Address Family operation state."; "OSPF Address Family operation state.";
leaf router-id { leaf router-id {
type yang:dotted-quad; type yang:dotted-quad;
description description
"Defined in RFC 2328. A 32-bit number "Defined in RFC 2328. A 32-bit number
that uniquely identifies the router."; that uniquely identifies the router.";
} }
uses local-rib;
container statistics {
description "Per instance statistics";
uses instance-stat;
}
} }
augment "/rt:routing/rt:routing-instance/rt:routing-protocols/" augment "/rt:routing/rt:routing-instance/rt:routing-protocols/"
+ "rt:routing-protocol" { + "rt:routing-protocol" {
when "rt:type = 'ospf:ospfv2' or rt:type = 'ospf:ospfv3'" { when "rt:type = 'ospf:ospfv2' or rt:type = 'ospf:ospfv3'" {
description description
"This augment is only valid for a routing protocol instance "This augment is only valid for a routing protocol instance
of OSPF (type 'ospfv2' or 'ospfv3')."; of OSPF (type 'ospfv2' or 'ospfv3').";
} }
description "OSPF augmentation."; description "OSPF augmentation.";
skipping to change at page 53, line 4 skipping to change at page 68, line 47
description "OSPF augmentation."; description "OSPF augmentation.";
container ospf { container ospf {
description description
"OSPF."; "OSPF.";
container all-instances-inherit { container all-instances-inherit {
if-feature instance-inheritance; if-feature instance-inheritance;
description description
"Inheritance support to all instances."; "Inheritance support to all instances.";
container area { container area {
description description
"Area config to be inherited by all areas in "Area config to be inherited by all areas in
all instances."; all instances.";
} }
container interface { container interface {
description description
"Interface config to be inherited by all interfaces "Interface config to be inherited by all interfaces
in all instances."; in all instances.";
} }
} }
leaf operation-mode { leaf operation-mode {
type identityref { type identityref {
base operation-mode; base operation-mode;
} }
default ospf:ships-in-the-night; default ospf:ships-in-the-night;
description description
"OSPF operation mode."; "OSPF operation mode.";
} }
list instance { list instance {
key "routing-instance af"; key "af";
description description
"An OSPF routing protocol instance."; "An OSPF routing protocol instance.";
leaf routing-instance {
type rt:routing-instance-ref;
description
"For protocol centric model, which is supported in
default-instance only, this could reference any layer 3
routing-instance.
For routing-instance centric model, must reference the
enclosing routing-instance.";
}
leaf af { leaf af {
type identityref { type identityref {
base rt:address-family; base rt:address-family;
} }
description description
"Address-family of the instance."; "Address-family of the instance.";
} }
uses instance-config; uses instance-config;
skipping to change at page 54, line 12 skipping to change at page 69, line 45
if-feature area-inheritance; if-feature area-inheritance;
description description
"Inheritance for all areas."; "Inheritance for all areas.";
container area { container area {
description description
"Area config to be inherited by all areas."; "Area config to be inherited by all areas.";
} }
container interface { container interface {
description description
"Interface config to be inherited by all interfaces "Interface config to be inherited by all interfaces
in all areas."; in all areas.";
} }
} }
list area { container areas {
key "area-id"; description "All areas.";
description list area {
"List of ospf areas"; key "area-id";
leaf area-id {
type area-id-type;
description
"Area ID.";
}
uses area-config;
container all-interfaces-inherit {
if-feature interface-inheritance;
description description
"Inheritance for all interfaces"; "List of ospf areas";
container interface { leaf area-id {
type area-id-type;
description description
"Interface config to be inherited by all "Area ID.";
interfaces.";
} }
}
list virtual-link { uses area-config;
when "../area-id != '0' and " uses af-area-config {
+ "../area-type = 'normal'" { when "../../operation-mode = "
description + "'ospf:ships-in-the-night'" {
"Transit area must be non-backbone normal area."; description
"Ships in the night configuration.";
}
} }
key "router-id"; container all-interfaces-inherit {
description if-feature interface-inheritance;
"OSPF virtual link";
leaf router-id {
type yang:dotted-quad;
description description
"Virtual link router ID."; "Inheritance for all interfaces";
container interface {
description
"Interface config to be inherited by all
interfaces.";
}
} }
uses interface-common-config; container virtual-links {
} description "All virtual links.";
list virtual-link {
when "../../area-id != '0' and "
+ "../../area-type = 'normal'" {
description
"Transit area must be non-backbone normal area.";
}
key "router-id";
description
"OSPF virtual link";
leaf router-id {
type yang:dotted-quad;
description
"Virtual link router ID.";
}
list sham-link { uses interface-common-config;
key "local-id remote-id"; }
description
"OSPF sham link";
leaf local-id {
type inet:ip-address;
description
"Address of the local end-point.";
} }
leaf remote-id { container sham-links {
type inet:ip-address; description "All sham links.";
description list sham-link {
"Address of the remote end-point."; key "local-id remote-id";
description
"OSPF sham link";
leaf local-id {
type inet:ip-address;
description
"Address of the local end-point.";
}
leaf remote-id {
type inet:ip-address;
description
"Address of the remote end-point.";
}
uses interface-common-config;
}
} }
uses interface-common-config; container interfaces {
} description "All interfaces.";
list interface {
list interface { key "interface";
key "interface"; description
description "List of OSPF interfaces.";
"List of OSPF interfaces."; leaf interface {
leaf interface { type if:interface-ref;
type if:interface-ref; description
description "Interface.";
"Interface."; }
uses interface-config;
} // list of interfaces
} }
uses interface-config; } // list of areas
} // list of interfaces }
} // list of areas
} // list of instance } // list of instance
} // container ospf } // container ospf
} }
augment "/rt:routing/rt:routing-instance/rt:routing-protocols/" augment "/rt:routing/rt:routing-instance/rt:routing-protocols/"
+ "rt:routing-protocol/ospf:ospf/ospf:instance" { + "rt:routing-protocol/ospf:ospf/ospf:instance" {
when "../../rt:type = 'ospf:ospfv2' or when "../../rt:type = 'ospf:ospfv2' or
../../rt:type = 'ospf:ospfv3'" { ../../rt:type = 'ospf:ospfv3'" {
description description
"This augment is only valid for OSPF "This augment is only valid for OSPF
(type 'ospfv2' or 'ospfv3')."; (type 'ospfv2' or 'ospfv3').";
} }
if-feature multi-topology; if-feature multi-topology;
description description
"OSPF multi-topology routing-protocol augmentation."; "OSPF multi-topology routing-protocol augmentation.";
list topology { container topologies {
// Topology must be in the same routing-instance description "All topologies.";
// and of same AF as the container. list topology {
key "name"; // Topology must be in the same routing-instance
description "OSPF topology."; // and of same AF as the container.
leaf name { key "name";
type rt:rib-ref; description "OSPF topology.";
description "RIB"; leaf name {
} type leafref {
list area { path "../../../../../../../rt:ribs/rt:rib/rt:name";
key "area-id"; }
description description "RIB";
"List of ospf areas"; }
leaf area-id { container areas {
type area-id-type; description "All areas of the topology.";
description list area {
"Area ID."; key "area-id";
description
"List of ospf areas";
leaf area-id {
type area-id-type;
description
"Area ID.";
}
uses area-config;
uses af-area-config {
when "../../../../operation-mode = "
+ "'ospf:ships-in-the-night'" {
description
"Ships in the night configuration.";
}
}
}
} }
uses area-config;
} }
} }
} }
augment "/rt:routing/rt:routing-instance/rt:routing-protocols/" augment "/rt:routing/rt:routing-instance/rt:routing-protocols/"
+ "rt:routing-protocol/ospf:ospf/ospf:instance/" + "rt:routing-protocol/ospf:ospf/ospf:instance/"
+ "ospf:area/ospf:interface" { + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" {
when "../../../../rt:type = 'ospf:ospfv2'" { when "../../../../../../rt:type = 'ospf:ospfv2'" {
description description
"This augment is only valid for OSPFv2."; "This augment is only valid for OSPFv2.";
} }
if-feature ospf:multi-topology; if-feature ospf:multi-topology;
description "OSPF multi-topology interface augmentation."; description "OSPF multi-topology interface augmentation.";
list topology { container topologies {
key "name"; description "All topologies for the interface.";
description "OSPF interface topology."; list topology {
leaf name { key "name";
type rt:rib-ref; description "OSPF interface topology.";
description leaf name {
"One of the topology enabled on this interface"; type leafref {
} path "../../../../../../../../../../../"
leaf cost { + "rt:ribs/rt:rib/rt:name";
type uint32; }
description description
"Interface cost for this topology"; "One of the topology enabled on this interface.";
}
leaf cost {
type uint32;
description
"Interface cost for this topology.";
}
} }
} }
} }
augment "/rt:routing-state/rt:routing-instance/" augment "/rt:routing-state/rt:routing-instance/"
+ "rt:routing-protocols/rt:routing-protocol" { + "rt:routing-protocols/rt:routing-protocol" {
when "rt:type = 'ospf:ospfv2' or rt:type = 'ospf:ospfv3'" { when "rt:type = 'ospf:ospfv2' or rt:type = 'ospf:ospfv3'" {
description description
"This augment is only valid for a routing protocol instance "This augment is only valid for a routing protocol instance
of type 'ospfv2' or 'ospfv3'."; of type 'ospfv2' or 'ospfv3'.";
} }
description description
skipping to change at page 57, line 15 skipping to change at page 73, line 35
} }
augment "/rt:routing-state/rt:routing-instance/" augment "/rt:routing-state/rt:routing-instance/"
+ "rt:routing-protocols/rt:routing-protocol" { + "rt:routing-protocols/rt:routing-protocol" {
when "rt:type = 'ospf:ospfv2' or rt:type = 'ospf:ospfv3'" { when "rt:type = 'ospf:ospfv2' or rt:type = 'ospf:ospfv3'" {
description description
"This augment is only valid for a routing protocol instance "This augment is only valid for a routing protocol instance
of type 'ospfv2' or 'ospfv3'."; of type 'ospfv2' or 'ospfv3'.";
} }
description description
"OSPF configuration."; "OSPF operation state.";
container ospf { container ospf {
description "OSPF"; description "OSPF";
leaf operation-mode { leaf operation-mode {
type identityref { type identityref {
base operation-mode; base operation-mode;
} }
description description
"OSPF operation mode."; "OSPF operation mode.";
} }
list instance { list instance {
key "routing-instance af"; key "af";
description description
"An OSPF routing protocol instance."; "An OSPF routing protocol instance.";
leaf routing-instance {
type rt:routing-instance-ref;
description
"For protocol centric model, which is supported in
default-instance only, this could reference any layer 3
routing-instance.
For routing-instance centric model, must reference the
enclosing routing-instance.";
}
leaf af { leaf af {
type identityref { type identityref {
base rt:address-family; base rt:address-family;
} }
description description
"Address-family of the instance."; "Address-family of the instance.";
} }
uses instance-operation; uses instance-operation;
list area { container areas {
key "area-id"; description "All areas";
description "List of OSPF areas"; list area {
leaf area-id { key "area-id";
type area-id-type; description "List of OSPF areas";
description "Area ID."; leaf area-id {
} type area-id-type;
list interface { description "Area ID.";
key "interface";
description
"List of OSPF interfaces.";
leaf interface {
// Should it refer to config state leaf?
type if:interface-ref;
description "Interface.";
} }
uses interface-operation; container statistics {
description "Per area statistics";
uses area-stat;
}
list neighbor { container virtual-links {
key "neighbor-id"; description "All virtual links.";
description list virtual-link {
"List of OSPF neighbors.";
leaf neighbor-id {
type inet:ipv4-address;
description description
"Neighbor ID."; "OSPF virtual link";
leaf router-id {
type yang:dotted-quad;
description
"Virtual link router ID.";
}
uses interface-operation;
} }
}
container sham-links {
description "All sham links.";
list sham-link {
description
"OSPF sham link";
leaf local-id {
type inet:ip-address;
description
"Address of the local end-point.";
uses neighbor-operation; }
} // list of OSPF neighbors leaf remote-id {
type inet:ip-address;
description
"Address of the remote end-point.";
}
uses interface-operation;
}
}
list link-scope-lsas { container interfaces {
when "../../../../../rt:type = 'ospfv3'" { description "All interfaces in the area.";
list interface {
key "interface";
description description
"Link scope LSA only exists in OSPFv3."; "List of OSPF interfaces.";
} leaf interface {
key "lsa-type"; // Should it refer to config state leaf?
description "List OSPF link scope LSA databases"; type if:interface-ref;
leaf lsa-type { description "Interface.";
type uint8; }
description "OSPF link scope LSA type.";
}
list link-scope-lsa {
key "lsa-id adv-router";
description "List of OSPF link scope LSAs";
uses lsa-key;
uses link-scope-lsa;
}
} // list link-scope-lsas uses interface-operation;
} // list of OSPF interfaces
list area-scope-lsas { container neighbors {
description "All neighbors on 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
}
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 = 'ospfv2'" {
description "OSPFv2 LSA.";
}
}
refine "version/ospfv3/ospfv3" {
must "../../../../../../../../../../../"
+ "rt:type = 'ospfv3'" {
description "OSPFv3 LSA.";
}
}
}
}
}
} // list link-scope-lsas
}
} // list of OSPF interfaces
}
container database {
description "Area scope LSA database.";
list area-scope-lsa-type {
key "lsa-type";
description "List OSPF area scope LSA databases.";
leaf lsa-type {
type uint16;
description "OSPF area scope LSA type.";
}
container area-scope-lsas {
description "All area scope LSA of this 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 = 'ospfv2'" {
description "OSPFv2 LSA.";
}
}
refine "version/ospfv3/ospfv3" {
must "../../../../../../../../../"
+ "rt:type = 'ospfv3'" {
description "OSPFv3 LSA.";
}
}
}
}
}
} // list area-scope-lsas
}
} // list of OSPF areas
}
container database {
description "AS scope LSA database.";
list as-scope-lsa-type {
key "lsa-type"; key "lsa-type";
description "List OSPF area scope LSA databases"; description "List OSPF AS scope LSA databases.";
leaf lsa-type { leaf lsa-type {
type uint8; type uint16;
description "OSPF area scope LSA type."; description "OSPF AS scope LSA type.";
} }
list area-scope-lsa { container as-scope-lsas {
key "lsa-id adv-router"; description "All AS scope of LSA of this LSA type.";
description "List of OSPF area scope LSAs"; list as-scope-lsa {
uses lsa-key; key "lsa-id adv-router";
uses area-scope-lsa; description "List of OSPF area scope LSAs";
uses lsa-key;
uses lsa {
refine "version/ospfv2/ospfv2" {
must "../../../../../../../rt:type = 'ospfv2'" {
description "OSPFv2 LSA.";
}
}
refine "version/ospfv3/ospfv3" {
must "../../../../../../../rt:type = 'ospfv3'" {
description "OSPFv3 LSA.";
}
}
}
}
} }
} // list area-scope-lsas } // list as-scope-lsas
} // list of OSPF areas }
list as-scope-lsas {
key "lsa-type";
description "List OSPF AS scope LSA databases";
leaf lsa-type {
type uint8;
description "OSPF AS scope LSA type.";
}
list as-scope-lsa {
key "lsa-id adv-router";
description "List of OSPF AS scope LSAs";
uses lsa-key;
uses as-scope-lsa;
}
} // list as-scope-lsas
} // list of instances } // list of instances
} // container ospf } // container ospf
} }
augment "/rt:routing-state/rt:routing-instance/" augment "/rt:routing-state/rt:routing-instance/"
+ "rt:routing-protocols/rt:routing-protocol/" + "rt:routing-protocols/rt:routing-protocol/"
+ "ospf:ospf/ospf:instance" { + "ospf:ospf/ospf:instance" {
when "../../rt:type = 'ospf:ospfv2'" { when "../../rt:type = 'ospf:ospfv2'" {
description description
"This augment is only valid for OSPFv2."; "This augment is only valid for OSPFv2.";
} }
if-feature multi-topology; if-feature multi-topology;
description description
"OSPF multi-topology routing-protocol augmentation."; "OSPF multi-topology routing-protocol augmentation.";
list topology { container topologies {
// Topology must be in the same routing-instance description "All topologies.";
// and of same AF as the container. list topology {
key "name"; // Topology must be in the same routing-instance
description "OSPF topology."; // and of same AF as the container.
leaf name { key "name";
type rt:rib-ref; description "OSPF topology.";
description "RIB"; leaf name {
} type leafref {
list area { path "../../../../../../../"
key "area-id"; + "rt:ribs/rt:rib/rt:name";
description }
"List of ospf areas"; description "RIB";
leaf area-id { }
type area-id-type;
description uses local-rib;
"Area ID.";
container areas {
description "All areas in the topology.";
list area {
key "area-id";
description
"List of ospf areas";
leaf area-id {
type area-id-type;
description
"Area ID.";
}
}
} }
} }
} }
} }
augment "/rt:routing-state/rt:routing-instance/" augment "/rt:routing-state/rt:routing-instance/"
+ "rt:routing-protocols/rt:routing-protocol/" + "rt:routing-protocols/rt:routing-protocol/"
+ "ospf:ospf/ospf:instance/ospf:area/ospf:interface" { + "ospf:ospf/ospf:instance/ospf:areas/ospf:area/"
when "../../../../rt:type = 'ospf:ospfv2'" { + "ospf:interfaces/ospf:interface" {
when "../../../../../../rt:type = 'ospf:ospfv2'" {
description description
"This augment is only valid for OSPFv2."; "This augment is only valid for OSPFv2.";
} }
if-feature ospf:multi-topology; if-feature ospf:multi-topology;
description "OSPF multi-topology interface augmentation."; description "OSPF multi-topology interface augmentation.";
list topology { container topologies {
key "name"; description "All topologies.";
description "OSPF interface topology."; list topology {
leaf name { key "name";
type rt:rib-ref; description "OSPF interface topology.";
description leaf name {
"One of the topology enabled on this interface"; type leafref {
path "../../../../../../../../../../../"
+ "rt:ribs/rt:rib/rt:name";
}
description
"One of the topology enabled on this interface.";
}
} }
} }
} }
grouping route-content { grouping route-content {
description description
"This grouping defines OSPF-specific route attributes."; "This grouping defines OSPF-specific route attributes.";
leaf metric { leaf metric {
type uint32; type uint32;
description "OSPF route metric."; description "OSPF route metric.";
} }
leaf tag { leaf tag {
type uint32; type uint32;
default "0"; default "0";
description "OSPF route tag."; description "OSPF route tag.";
} }
leaf route-type { leaf route-type {
type enumeration { type route-type;
enum intra-area {
description "OSPF intra-area route";
}
enum inter-area {
description "OSPF inter-area route";
}
enum external-1 {
description "OSPF external route type 1";
}
enum external-2 {
description "OSPF External route type 2";
}
enum nssa-1 {
description "OSPF NSSA external route type 1";
}
enum nssa-2 {
description "OSPF NSSA external route type 2";
}
}
description "OSPF route type"; description "OSPF route type";
} }
} }
augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { augment "/rt:routing-state/rt:routing-instance/"
+ "rt:ribs/rt:rib/rt:routes/rt:route" {
when "rt:source-protocol = 'ospf:ospfv2' or " when "rt:source-protocol = 'ospf:ospfv2' or "
+ "rt:source-protocol = 'ospf:ospfv3'" { + "rt:source-protocol = 'ospf:ospfv3'" {
description description
"This augment is only valid for a routes whose source "This augment is only valid for a routes whose source
protocol is OSPF."; protocol is OSPF.";
} }
description description
"OSPF-specific route attributes."; "OSPF-specific route attributes.";
uses route-content; uses route-content;
} }
skipping to change at page 62, line 28 skipping to change at page 80, line 44
description description
"This group describes common instance specific "This group describes common instance specific
data for notifications."; data for notifications.";
leaf routing-instance { leaf routing-instance {
type rt:routing-instance-ref; type rt:routing-instance-ref;
description description
"Describe the routing instance."; "Describe the routing instance.";
} }
leaf routing-protocol-type {
type leafref {
path "/rt:routing/rt:routing-instance"
+ "[rt:name=current()/../routing-instance]/"
+ "rt:routing-protocols/rt:routing-protocol/"
+ "rt:type";
}
must ". = 'ospf:ospfv2' or . = 'ospf:ospfv3'" {
description "Only interested in OSPF routing protocol";
}
description
"Describes the type of the OSPF routing protocol.";
}
leaf routing-protocol-name { leaf routing-protocol-name {
type string; type leafref {
path "/rt:routing/rt:routing-instance"
+ "[rt:name=current()/../routing-instance]/"
+ "rt:routing-protocols/rt:routing-protocol"
+ "[rt:type=current()/../routing-protocol-type]/"
+ "rt:name";
}
description description
"Describes the name of the OSPF routing protocol."; "Describes the name of the OSPF routing protocol.";
} }
container instance-af { leaf af {
leaf af { type leafref {
type identityref { path "/rt:routing/rt:routing-instance"
base rt:address-family; + "[rt:name=current()/../routing-instance]/"
} + "rt:routing-protocols/rt:routing-protocol"
description + "[rt:name=current()/../routing-protocol-name]"
"Address-family of the instance."; + "[rt:type=current()/../routing-protocol-type]/"
+ "ospf:ospf/ospf:instance/af";
} }
description description
"Describes the address family of the OSPF instance."; "Describes the address family of the OSPF instance.";
} }
} }
notification if-state-change { notification if-state-change {
uses notification-instance-hdr; uses notification-instance-hdr;
leaf link-type { leaf link-type {
type identityref { type identityref {
base if-link-type; base if-link-type;
} }
skipping to change at page 65, line 16 skipping to change at page 84, line 4
} }
leaf packet-type { leaf packet-type {
type packet-type; type packet-type;
description "OSPF packet type."; description "OSPF packet type.";
} }
leaf error { leaf error {
type enumeration { type enumeration {
enum "badVersion" { enum "badVersion" {
description "Bad version"; description "Bad version.";
} }
enum "areaMismatch" { enum "areaMismatch" {
description "Area mistmatch"; description "Area mistmatch.";
} }
enum "unknownNbmaNbr" { enum "unknownNbmaNbr" {
description "Unknown NBMA neighbor"; description "Unknown NBMA neighbor.";
} }
enum "unknownVirtualNbr" { enum "unknownVirtualNbr" {
description "Unknown virtual link neighbor"; description "Unknown virtual link neighbor.";
} }
enum "authTypeMismatch" { enum "authTypeMismatch" {
description "Auth type mismatch"; description "Auth type mismatch.";
} }
enum "authFailure" { enum "authFailure" {
description "Auth failure"; description "Auth failure.";
} }
enum "netMaskMismatch" { enum "netMaskMismatch" {
description "Network mask mismatch"; description "Network mask mismatch.";
} }
enum "helloIntervalMismatch" { enum "helloIntervalMismatch" {
description "Hello interval mismatch"; description "Hello interval mismatch.";
} }
enum "deadIntervalMismatch" { enum "deadIntervalMismatch" {
description "Dead interval mismatch"; description "Dead interval mismatch.";
} }
enum "optionMismatch" { enum "optionMismatch" {
description "Option mismatch"; description "Option mismatch.";
} }
enum "mtuMismatch" { enum "mtuMismatch" {
description "MTU mismatch"; description "MTU mismatch.";
} }
enum "duplicateRouterId" { enum "duplicateRouterId" {
description "Duplicate router ID"; description "Duplicate router ID.";
} }
enum "noError" { enum "noError" {
description "No error"; description "No error.";
} }
} }
description "Error code."; description "Error code.";
} }
description description
"This notification is sent when interface "This notification is sent when interface
config error is detected."; config error is detected.";
} }
notification nbr-state-change { notification nbr-state-change {
uses notification-instance-hdr; uses notification-instance-hdr;
leaf link-type { leaf link-type {
type identityref { type identityref {
base if-link-type; base if-link-type;
} }
description "Type of OSPF interface."; description "Type of OSPF interface.";
} }
container interface { container interface {
description "Normal interface."; description "Normal interface.";
leaf interface { leaf interface {
skipping to change at page 67, line 29 skipping to change at page 86, line 16
} }
} }
leaf state { leaf state {
type nbr-state-type; type nbr-state-type;
description "Neighbor state."; description "Neighbor state.";
} }
description description
"This notification is sent when neighbor "This notification is sent when neighbor
state change is detected."; state change is detected.";
} }
notification nbr-restart-helper-status-change { notification nbr-restart-helper-status-change {
uses notification-instance-hdr; uses notification-instance-hdr;
leaf link-type { leaf link-type {
type identityref { type identityref {
base if-link-type; base if-link-type;
} }
description "Type of OSPF interface."; description "Type of OSPF interface.";
skipping to change at page 68, line 31 skipping to change at page 87, line 18
leaf status { leaf status {
type restart-helper-status-type; type restart-helper-status-type;
description "Restart helper status."; description "Restart helper status.";
} }
leaf age { leaf age {
type uint32; type uint32;
units seconds; units seconds;
description description
"Remaining time in current OSPF graceful restart "Remaining time in current OSPF graceful restart
interval, if the router is acting as a restart interval, if the router is acting as a restart
helper for the neighbor."; helper for the neighbor.";
} }
leaf exit-reason { leaf exit-reason {
type restart-exit-reason-type; type restart-exit-reason-type;
description description
"Restart helper exit reason."; "Restart helper exit reason.";
} }
description description
"This notification is sent when neighbor restart "This notification is sent when neighbor restart
helper status change is detected."; helper status change is detected.";
} }
notification rx-bad-packet { notification rx-bad-packet {
uses notification-instance-hdr; uses notification-instance-hdr;
leaf link-type { leaf link-type {
type identityref { type identityref {
base if-link-type; base if-link-type;
} }
description "Type of OSPF interface."; description "Type of OSPF interface.";
skipping to change at page 70, line 4 skipping to change at page 88, line 39
leaf remote-ip-addr { leaf remote-ip-addr {
type inet:ip-address; type inet:ip-address;
description "Sham link remote address."; description "Sham link remote address.";
} }
} }
leaf packet-type { leaf packet-type {
type packet-type; type packet-type;
description "OSPF packet type."; description "OSPF packet type.";
} }
description description
"This notification is sent when an OSPF packet "This notification is sent when an OSPF packet
has been received on a interface that cannot be parsed."; has been received on a interface that cannot be parsed.";
} }
notification lsdb-approaching-overflow { notification lsdb-approaching-overflow {
uses notification-instance-hdr; uses notification-instance-hdr;
leaf ext-lsdb-limit { leaf ext-lsdb-limit {
type uint32; type uint32;
description description
"The maximum number of non-default AS-external LSAs "The maximum number of non-default AS-external LSAs
entries that can be stored in the link state database."; entries that can be stored in the link state database.";
} }
description description
"This notification is sent when the number of LSAs "This notification is sent when the number of LSAs
in the router's link state database has exceeded in the router's link state database has exceeded
ninety percent of the ext-lsdb-limit."; ninety percent of the ext-lsdb-limit.";
} }
notification lsdb-overflow { notification lsdb-overflow {
uses notification-instance-hdr; uses notification-instance-hdr;
leaf ext-lsdb-limit { leaf ext-lsdb-limit {
type uint32; type uint32;
description description
"The maximum number of non-default AS-external LSAs "The maximum number of non-default AS-external LSAs
entries that can be stored in the link state database."; entries that can be stored in the link state database.";
} }
description description
"This notification is sent when the number of LSAs "This notification is sent when the number of LSAs
in the router's link state database has exceeded in the router's link state database has exceeded
ext-lsdb-limit."; ext-lsdb-limit.";
} }
notification nssa-translator-status-change { notification nssa-translator-status-change {
uses notification-instance-hdr; uses notification-instance-hdr;
leaf area-id { leaf area-id {
type uint32; type uint32;
description "Area ID."; description "Area ID.";
} }
leaf status { leaf status {
type nssa-translator-state-type; type nssa-translator-state-type;
description description
"NSSA translator status."; "NSSA translator status.";
} }
description description
"This notification is sent when there is a change "This notification is sent when there is a change
in the router's ability to translate OSPF NSSA LSAs in the router's ability to translate OSPF NSSA LSAs
OSPF AS-External LSAs."; OSPF AS-External LSAs.";
} }
notification restart-status-change { notification restart-status-change {
uses notification-instance-hdr; uses notification-instance-hdr;
leaf status { leaf status {
type restart-status-type; type restart-status-type;
description description
"Restart status."; "Restart status.";
} }
skipping to change at page 71, line 40 skipping to change at page 90, line 27
} }
leaf exit-reason { leaf exit-reason {
type restart-exit-reason-type; type restart-exit-reason-type;
description description
"Restart exit reason."; "Restart exit reason.";
} }
description description
"This notification is sent when the graceful restart "This notification is sent when the graceful restart
state for the router has changed."; state for the router has changed.";
} }
} }
<CODE ENDS> <CODE ENDS>
4. Security Considerations 5. OSPF Segment Routing Yang Module
<CODE BEGINS> file "ietf-ospf-sr@2015-07-06.yang"
module ietf-ospf-sr {
namespace "urn:ietf:params:xml:ns:yang:ietf-ospf-sr";
prefix ospf-sr;
import ietf-inet-types {
prefix "inet";
}
import ietf-yang-types {
prefix "yang";
}
import ietf-routing {
prefix "rt";
}
import ietf-segment-routing {
prefix "sr";
}
import ietf-ospf {
prefix "ospf";
}
organization
"Cisco Systems
170 West Tasman Drive
San Jose, CA 95134-1706
USA";
contact
"WG Web: <http://tools.ietf.org/wg/ospf/>
WG List: <mailto:ospf@ietf.org>
WG Chair: Acee Lindem
<mailto:acee@cisco.com>
WG Chair: Abhay Roy
<mailto:akr@cisco.com>
Editor: Derek Yeung
<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: Greg Hankins
<mailto:greg.hankins@alcatel-lucent.com>";
description
"This YANG module defines the generic configuration
data for OSPF, which is common across all of the vendor
implementations of the protocol. It is intended that the module
will be extended by vendors to define vendor-specific
OSPF configuration parameters and policies,
for example route maps or route policies.
Terms and Acronyms
OSPF (ospf): Open Shortest Path First
IP (ip): Internet Protocol
IPv4 (ipv4):Internet Protocol Version 4
IPv6 (ipv6): Internet Protocol Version 6
MTU (mtu) Maximum Transmission Unit
";
revision 2015-07-06 {
description
"Initial revision.";
reference
"RFC XXXX: A YANG Data Model for OSPF Segment Routing";
}
feature ti-lfa {
description
"Enhance IPFRR with ti-lfa support";
}
/* Configuration */
augment "/rt:routing/rt:routing-instance/rt:routing-protocols"
+ "/rt:routing-protocol/ospf:ospf/ospf:instance" {
when "../../rt:type = 'ospf:ospfv2' or "
+ "../../rt:type = 'ospf:ospfv3'" {
description
"This augment OSPF routing protocol when used";
}
description
"This augments OSPF protocol configuration
with segment routing.";
uses sr:controlplane-cfg;
}
augment "/rt:routing/rt:routing-instance/rt:routing-protocols/"
+ "rt:routing-protocol/ospf:ospf/ospf:instance/"
+ "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" {
when "../../../../../../rt:type = 'ospf:ospfv2' or "
+ "../../../../../../rt:type = 'ospf:ospfv3'" {
description
"This augment OSPF routing protocol when used";
}
description
"This augments OSPF protocol configuration
with segment routing.";
uses sr:igp-interface-cfg;
}
augment "/rt:routing/rt:routing-instance/rt:routing-protocols/"
+ "rt:routing-protocol/ospf:ospf/ospf:instance/"
+ "ospf:areas/ospf:area/ospf:interfaces/ospf:interface/"
+ "ospf:fast-reroute" {
when "../../../../../../../rt:type = 'ospf:ospfv2' or "
+ "../../../../../../../rt:type = 'ospf:ospfv3'" {
description
"This augment OSPF routing protocol when used";
}
description
"This augments ISIS IP FRR with TILFA.";
container ti-lfa {
if-feature ti-lfa;
leaf enable {
type boolean;
description
"Enables TI-LFA computation.";
}
description
"TILFA configuration.";
}
}
/* Operational states */
augment "/rt:routing-state/rt:routing-instance/"
+ "rt:routing-protocols/rt:routing-protocol/"
+ "ospf:ospf/ospf:instance" {
when "../../rt:type = 'ospf:ospfv2' or "
+ "../../rt:type = 'ospf:ospfv3'" {
description
"This augment OSPF routing protocol when used";
}
description
"This augments OSPF protocol configuration
with segment routing.";
uses sr:controlplane-cfg;
}
augment "/rt:routing-state/rt:routing-instance/"
+ "rt:routing-protocols/rt:routing-protocol/"
+ "ospf:ospf/ospf:instance/ospf:areas/ospf:area/"
+ "ospf:interfaces/ospf:interface" {
when "../../../../../../rt:type = 'ospf:ospfv2' or "
+ "../../../../../../rt:type = 'ospf:ospfv3'" {
description
"This augment OSPF routing protocol when used";
}
description
"This augments OSPF protocol configuration
with segment routing.";
uses sr:igp-interface-cfg;
}
/* Database */
grouping sid-sub-tlv {
description "SID/Label sub-tlv grouping.";
container sid-sub-tlv {
description
"Used to advertise the SID/Label associated with a prefix or
adjacency.";
leaf sid {
type uint32;
description "A 20 bit label or 32 bit SID.";
}
}
}
grouping prefix-sid-sub-tlvs {
description "Prefix SID sub-tlvs";
container perfix-sid-sub-tlvs{
description "prefix sid sub-tlv.";
list prefix-sid-sub-tlv {
description "prefix sid sub-tlv.";
leaf flags {
type bits {
bit NP {
description
"No-PHP flag.";
}
bit M {
description
"Mapping server flag.";
}
bit E {
description
"Explicit-NULL flag.";
}
bit V {
description
"Value/Index flag.";
}
bit L {
description
"Local flag.";
}
}
description "Flags.";
}
leaf mt-id {
type uint8;
description "Multi-topology ID.";
}
leaf algorithm {
type uint8;
description
"The algorithm the prefix-sid is associated with.";
}
leaf sid {
type uint32;
description "An index or label.";
}
}
}
}
grouping sid-binding-sub-tlvs {
description "SID/Label binding sub-tlv grouping.";
container sid-binding-sub-tlvs {
description "sid binding sub-tlvs.";
list sid-binding-sub-tlv {
description "sid binding sub-tlv.";
leaf flags {
type bits {
bit M {
description
"Mirroring context flag.";
}
}
description "Flags.";
}
leaf mt-id {
type uint8;
description "Multi-topology ID.";
}
leaf weight {
type uint8;
description "Weight for load-balancing purposes.";
}
uses sid-sub-tlv;
container ero-metric-sub-tlv {
description "The cost of an ERO path.";
leaf metric {
type uint32;
description "The aggregate IGP or TE path cost.";
}
}
container ipv4-ero-sub-tlv {
description
"The ipv4 ERO sub-tlv describes a path segment
using ipv4 address.";
leaf flags {
type bits {
bit L {
description
"If set, then the segment path is designated as
'loose'. Otherwise as 'strict'.";
}
}
description "Flags.";
}
leaf ipv4-address {
type inet:ipv4-address;
description "The address of the explicit route hop.";
}
}
container unnumbered-ero-sub-tlv {
description "The unnumbered interface ID ERO sub-tlv
describes a path segment that includes an
unnumbered interface.";
leaf flags {
type bits {
bit L {
description
"If set, then the segment path is designated as
'loose'. Otherwise as 'strict'.";
}
}
description "Flags.";
}
leaf router-id {
type yang:dotted-quad;
description "Router-id of the next-hop.";
}
leaf interface-id {
type uint32;
description
"The identifier assigned to the link by the
router specified by the router-id.";
}
}
container ipv4-backup-ero-sub-tlv {
description
"The ipv4 backup ERO sub-tlv describes a path
segment using ipv4 address.";
leaf flags {
type bits {
bit L {
description
"If set, then the segment path is designated as
'loose'. Otherwise as 'strict'.";
}
}
description "Flags.";
}
leaf ipv4-address {
type inet:ipv4-address;
description "The address of the explicit route hop.";
}
}
container unnumbered-backup-ero-sub-tlv {
description "The unnumbered interface ID backup ERO sub-tlv
describes a path segment that includes an
unnumbered interface.";
leaf flags {
type bits {
bit L {
description
"If set, then the segment path is designated as
'loose'. Otherwise as 'strict'.";
}
}
description "Flags.";
}
leaf router-id {
type yang:dotted-quad;
description "Router-id of the next-hop.";
}
leaf interface-id {
type uint32;
description
"The identifier assigned to the link by the
router specified by the router-id.";
}
}
}
}
}
grouping extended-prefix-range-tlvs {
description "Extended prefix range TLV grouping.";
container extended-prefix-range-tlvs {
description "The list of range of prefixes.";
list extended-prefix-range-tlv { //type=2?
description "The range of prefixes.";
leaf range-size {
type uint16;
description "The number of prefixes covered by the
advertisement.";
}
leaf flags {
type bits {
bit IA {
description
"Inter-Area flag.";
}
}
description "Flags.";
}
leaf prefix {
type inet:ip-prefix;
description "Address prefix.";
}
uses prefix-sid-sub-tlvs;
uses sid-binding-sub-tlvs;
uses ospf:unknown-tlvs;
}
}
}
grouping sr-algorithm-tlv {
description "SR algorithm TLV grouping.";
container sr-algorithm-tlv {
description "All SR algorithm TLVs.";
leaf-list sr-algorithm {
type uint8;
description
"The algorithms that the router is currently using.";
}
}
}
grouping sid-range-tlvs {
description "sid-range-tlvs grouping.";
container sid-range-tlvs {
description "List of SID range TLVs.";
list sid-range-tlv {
description "SID range TLV.";
leaf range-size {
type ospf:uint24;
description "The SID range.";
}
uses sid-sub-tlv;
}
}
}
augment "/rt:routing-state/rt:routing-instance/"
+ "rt:routing-protocols/rt:routing-protocol/"
+ "ospf:ospf/ospf:instance/ospf:areas/ospf:area/"
+ "ospf:interfaces/ospf:interface/ospf:database/"
+ "ospf:link-scope-lsa-type/ospf:link-scope-lsas/"
+ "ospf:link-scope-lsa/ospf:version/ospf:ospfv2/"
+ "ospf:ospfv2/ospf:body/ospf:opaque/"
+ "ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv" {
when "../../../../../../../../../../../../../../../../../"
+ "rt:type = 'ospf:ospfv2'" {
description
"This augment is only valid for OSPFv2.";
}
description
"SR specific TLVs for OSPFv2 extended prefix TLV
in type 9 opaque LSA.";
uses prefix-sid-sub-tlvs;
uses sid-binding-sub-tlvs;
}
augment "/rt:routing-state/rt:routing-instance/"
+ "rt:routing-protocols/rt:routing-protocol/"
+ "ospf:ospf/ospf:instance/ospf:areas/"
+ "ospf:area/ospf:database/"
+ "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
+ "ospf:area-scope-lsa/ospf:version/ospf:ospfv2/"
+ "ospf:ospfv2/ospf:body/ospf:opaque/"
+ "ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv" {
when "../../../../../../../../../../../../../../../"
+ "rt:type = 'ospf:ospfv2'" {
description
"This augment is only valid for OSPFv2.";
}
description
"SR specific TLVs for OSPFv2 extended prefix TLV
in type 10 opaque LSA.";
uses prefix-sid-sub-tlvs;
uses sid-binding-sub-tlvs;
}
augment "/rt:routing-state/rt:routing-instance/"
+ "rt:routing-protocols/rt:routing-protocol/"
+ "ospf:ospf/ospf:instance/ospf:database/"
+ "ospf:as-scope-lsa-type/ospf:as-scope-lsas/"
+ "ospf:as-scope-lsa/ospf:version/ospf:ospfv2/"
+ "ospf:ospfv2/ospf:body/ospf:opaque/"
+ "ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv" {
when "../../../../../../../../../../../../../"
+ "rt:type = 'ospf:ospfv2'" {
description
"This augment is only valid for OSPFv2.";
}
description
"SR specific TLVs for OSPFv2 extended prefix TLV
in type 11 opaque LSA.";
uses prefix-sid-sub-tlvs;
uses sid-binding-sub-tlvs;
}
augment "/rt:routing-state/rt:routing-instance/"
+ "rt:routing-protocols/rt:routing-protocol/"
+ "ospf:ospf/ospf:instance/ospf:areas/"
+ "ospf:area/ospf:database/"
+ "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
+ "ospf:area-scope-lsa/ospf:version/ospf:ospfv2/"
+ "ospf:ospfv2/ospf:body/ospf:opaque/"
+ "ospf:extended-link-tlvs/ospf:extended-link-tlv" {
when "../../../../../../../../../../../../../../../"
+ "rt:type = 'ospf:ospfv2'" {
description
"This augment is only valid for OSPFv2.";
}
description
"SR specific TLVs for OSPFv2 extended link TLV
in type 10 opaque LSA.";
container adj-sid-sub-tlvs {
description "Adj-sid is optional sub-tlv.";
list adj-sid-sub-tlv {
description "List of adj-sid sub-tlv.";
leaf flags {
type bits {
bit B {
description
"Backup flag.";
}
bit V {
description
"Value/Index flag.";
}
bit L {
description
"Local/Global flag.";
}
bit S {
description
"Set flag.";
}
}
description "Flags.";
}
leaf mt-id {
type uint8;
description "Multi-topology ID.";
}
leaf weight {
type uint8;
description "Weight used for load-balancing.";
}
leaf sid {
type uint32;
description "sid index/label.";
}
}
}
container lan-adj-sid-sub-tlvs {
description "Lan adj-sid is optional sub-tlv.";
list lan-adj-sid-sub-tlv {
description "List of lan-adj-sid sub-tlv.";
leaf flags {
type bits {
bit B {
description
"Backup flag.";
}
bit V {
description
"Value/Index flag.";
}
bit L {
description
"Local/Global flag.";
}
bit S {
description
"Set flag.";
}
}
description "Flags.";
}
leaf mt-id {
type uint8;
description "Multi-topology ID.";
}
leaf weight {
type uint8;
description "Weight used for load-balancing.";
}
leaf neighbor-router-id {
type yang:dotted-quad;
description "Neighbor router ID.";
}
leaf sid {
type uint32;
description "sid index/label.";
}
}
}
}
augment "/rt:routing-state/rt:routing-instance/"
+ "rt:routing-protocols/rt:routing-protocol/"
+ "ospf:ospf/ospf:instance/ospf:areas/ospf:area/"
+ "ospf:interfaces/ospf:interface/ospf:database/"
+ "ospf:link-scope-lsa-type/ospf:link-scope-lsas/"
+ "ospf:link-scope-lsa/ospf:version/ospf:ospfv2/"
+ "ospf:ospfv2/ospf:body/ospf:opaque" {
when "../../../../../../../../../../../../../../../"
+ "rt:type = 'ospf:ospfv2'" {
description
"This augment is only valid for OSPFv2.";
}
description
"SR specific TLVs for OSPFv2 type 9 opaque LSA.";
uses extended-prefix-range-tlvs;
uses sr-algorithm-tlv;
uses sid-range-tlvs;
}
augment "/rt:routing-state/rt:routing-instance/"
+ "rt:routing-protocols/rt:routing-protocol/"
+ "ospf:ospf/ospf:instance/ospf:areas/"
+ "ospf:area/ospf:database/"
+ "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
+ "ospf:area-scope-lsa/ospf:version/ospf:ospfv2/"
+ "ospf:ospfv2/ospf:body/ospf:opaque" {
when "../../../../../../../../../../../../../"
+ "rt:type = 'ospf:ospfv2'" {
description
"This augment is only valid for OSPFv2.";
}
description
"SR specific TLVs for OSPFv2 type 10 opaque LSA.";
uses extended-prefix-range-tlvs;
uses sr-algorithm-tlv;
uses sid-range-tlvs;
}
augment "/rt:routing-state/rt:routing-instance/"
+ "rt:routing-protocols/rt:routing-protocol/"
+ "ospf:ospf/ospf:instance/ospf:database/"
+ "ospf:as-scope-lsa-type/ospf:as-scope-lsas/"
+ "ospf:as-scope-lsa/ospf:version/ospf:ospfv2/"
+ "ospf:ospfv2/ospf:body/ospf:opaque" {
when "../../../../../../../../../../../"
+ "rt:type = 'ospf:ospfv2'" {
description
"This augment is only valid for OSPFv2.";
}
description
"SR specific TLVs for OSPFv2 type 11 opaque LSA.";
uses extended-prefix-range-tlvs;
uses sr-algorithm-tlv;
uses sid-range-tlvs;
}
}
<CODE ENDS>
6. Security Considerations
The data model defined does not create any security implications. The data model defined does not create any security implications.
This draft does not change any underlying security issues inherent in This draft does not change any underlying security issues inherent in
[I-D.ietf-netmod-routing-cfg]. [I-D.ietf-netmod-routing-cfg].
5. Acknowledgements 7. Acknowledgements
The authors wish to thank Acee Lindem, Yi Yang, Alexander Clemm, The authors wish to thank Acee Lindem, Yi Yang, Alexander Clemm,
Gaurav Gupta, Ing-Wher Chen, Ladislav Lhotka, Stephane Litkowski and Gaurav Gupta, Ing-Wher Chen, Ladislav Lhotka, Stephane Litkowski,
Greg Hankins for their thorough reviews and helpful comments. Greg Hankins and Manish Gupta for their thorough reviews and helpful
comments.
This document was produced using Marshall Rose's xml2rfc tool. This document was produced using Marshall Rose's xml2rfc tool.
6. References 8. References
6.1. Normative References 8.1. Normative References
[RFC1793] Moy, J., "Extending OSPF to Support Demand Circuits", RFC [RFC1793] Moy, J., "Extending OSPF to Support Demand Circuits", RFC
1793, April 1995. 1793, April 1995.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2328] Moy, J., "OSPF Version 2", STD 54, RFC 2328, April 1998. [RFC2328] Moy, J., "OSPF Version 2", STD 54, RFC 2328, April 1998.
[RFC3101] Murphy, P., "The OSPF Not-So-Stubby Area (NSSA) Option", [RFC3101] Murphy, P., "The OSPF Not-So-Stubby Area (NSSA) Option",
skipping to change at page 73, line 20 skipping to change at page 105, line 26
Network Configuration Protocol (NETCONF)", RFC 6020, Network Configuration Protocol (NETCONF)", RFC 6020,
October 2010. October 2010.
[RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A. [RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A.
Bierman, "Network Configuration Protocol (NETCONF)", RFC Bierman, "Network Configuration Protocol (NETCONF)", RFC
6241, June 2011. 6241, June 2011.
[RFC7223] Bjorklund, M., "A YANG Data Model for Interface [RFC7223] Bjorklund, M., "A YANG Data Model for Interface
Management", RFC 7223, May 2014. Management", RFC 7223, May 2014.
6.2. Informative References 8.2. Informative References
[I-D.acee-rtg-yang-key-chain] [I-D.acee-rtg-yang-key-chain]
Lindem, A., Qu, Y., Yeung, D., Chen, H., Zhang, J., and Y. Lindem, A., Qu, Y., Yeung, D., Chen, H., Zhang, J., and Y.
Yang, "Key Chain YANG Data Model", draft-acee-rtg-yang- Yang, "Key Chain YANG Data Model", draft-acee-rtg-yang-
key-chain-03 (work in progress), March 2015. key-chain-07 (work in progress), July 2015.
[I-D.ietf-netmod-routing-cfg] [I-D.ietf-netmod-routing-cfg]
Lhotka, L. and A. Lindem, "A YANG Data Model for Routing Lhotka, L. and A. Lindem, "A YANG Data Model for Routing
Management", draft-ietf-netmod-routing-cfg-17 (work in Management", draft-ietf-netmod-routing-cfg-19 (work in
progress), March 2015. progress), May 2015.
[I-D.litkowski-spring-sr-yang]
Litkowski, S., Qu, Y., Sarkar, P., and J. Tantsura, "YANG
Data Model for Segment Routing", draft-litkowski-spring-
sr-yang-01 (work in progress), June 2015.
Authors' Addresses Authors' Addresses
Derek Yeung Derek Yeung
Cisco Systems Cisco Systems
170 West Tasman Drive 170 West Tasman Drive
San Jose, CA 95134 San Jose, CA 95134
USA USA
EMail: myeung@cisco.com EMail: myeung@cisco.com
 End of changes. 249 change blocks. 
914 lines changed or deleted 2515 lines changed or added

This html diff was produced by rfcdiff 1.42. The latest version is available from http://tools.ietf.org/tools/rfcdiff/