idnits 2.17.1 draft-ietf-ospf-yang-08.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 296 has weird spacing: '...-rw tag uin...' == Line 644 has weird spacing: '...area-id are...' -- The document date (July 2, 2017) is 2489 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6536 (Obsoleted by RFC 8341) ** Obsolete normative reference: RFC 7223 (Obsoleted by RFC 8343) ** Obsolete normative reference: RFC 8022 (Obsoleted by RFC 8349) == Outdated reference: A later version (-10) exists of draft-ietf-netmod-revised-datastores-02 Summary: 5 errors (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet D. Yeung 3 Internet-Draft Arrcus 4 Intended status: Standards Track Y. Qu 5 Expires: January 3, 2018 Huawei 6 J. Zhang 7 Juniper Networks 8 I. Chen 9 Jabil 10 A. Lindem 11 Cisco Systems 12 July 2, 2017 14 Yang Data Model for OSPF Protocol 15 draft-ietf-ospf-yang-08 17 Abstract 19 This document defines a YANG data model that can be used to configure 20 and manage OSPF. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on January 3, 2018. 39 Copyright Notice 41 Copyright (c) 2017 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 2 57 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 58 2. Design of Data Model . . . . . . . . . . . . . . . . . . . . 3 59 2.1. OSPF Operational State . . . . . . . . . . . . . . . . . 3 60 2.2. Overview . . . . . . . . . . . . . . . . . . . . . . . . 3 61 2.3. OSPFv2 and OSPFv3 . . . . . . . . . . . . . . . . . . . . 5 62 2.4. Optional Features . . . . . . . . . . . . . . . . . . . . 5 63 2.5. OSPF Router Configuration/Operational State . . . . . . . 5 64 2.6. OSPF Instance Configuration/Operational State . . . . . . 5 65 2.7. OSPF Area Configuration/Operational State . . . . . . . . 8 66 2.8. OSPF Interface Configuration/Operational State . . . . . 13 67 2.9. OSPF notification . . . . . . . . . . . . . . . . . . . . 16 68 2.10. OSPF RPC Operations . . . . . . . . . . . . . . . . . . . 20 69 3. OSPF Yang Module . . . . . . . . . . . . . . . . . . . . . . 20 70 4. Security Considerations . . . . . . . . . . . . . . . . . . . 100 71 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 101 72 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 101 73 6.1. Normative References . . . . . . . . . . . . . . . . . . 101 74 6.2. Informative References . . . . . . . . . . . . . . . . . 103 75 Appendix A. Contributors' Addreses . . . . . . . . . . . . . . . 104 76 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 104 78 1. Overview 80 YANG [RFC6020] is a data definition language used to define the 81 contents of a conceptual data store that allows networked devices to 82 be managed using NETCONF [RFC6241]. YANG is proving relevant beyond 83 its initial confines, as bindings to other interfaces (e.g., ReST) 84 and encodings other than XML (e.g., JSON) are being defined. 85 Furthermore, YANG data models can be used as the basis for 86 implementation of other interfaces, such as CLI and programmatic 87 APIs. 89 This document defines a YANG data model that can be used to configure 90 and manage OSPF and it is an augmentation to the core routing data 91 model. A core routing data model is defined in [RFC8022], and it 92 provides the basis for the development of data models for routing 93 protocols. The interface data model is defined in [RFC7223] and is 94 used for referencing interfaces from the routing protocol. The key- 95 chain data model used for OSPF authentication is defined in [RFC8177] 96 and provides both a reference to configured key-chains and an 97 enumeration of cryptographic algorithms. 99 Both OSPFv2 [RFC2328] and OSPFv3 [RFC5340] are supported. In 100 addition to the core OSPF protocol, features described in other OSPF 101 RFCs are also supported. These includes demand circuit [RFC1793], 102 traffic engineering [RFC3630], multiple address family [RFC5838], 103 graceful restart [RFC3623] [RFC5187], NSSA [RFC3101], and OSPF(v3) as 104 a PE-CE Protocol [RFC4577], [RFC6565]. These non-core features are 105 optional in the OSPF data model. 107 1.1. Requirements Language 109 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 110 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 111 document are to be interpreted as described in [RFC2119]. 113 2. Design of Data Model 115 Although the basis of OSPF configuration elements like routers, 116 areas, and interfaces remains the same, the detailed configuration 117 model varies among router vendors. Differences are observed in terms 118 of how the protocol engine is tied to the routing domain, how 119 multiple protocol engines are be instantiated among others. 121 The goal of this document is to define a data model that provides a 122 common user interface to the OSPFv2 and OSPFv3 protocols. There is 123 very little information that is designated as "mandatory", providing 124 freedom for vendors to adapt this data model to their respective 125 product implementations. 127 2.1. OSPF Operational State 129 The OSPF operational state is included in the same tree as OSPF 130 configuration consistent with Network Management Datastore 131 Architecture [I-D.ietf-netmod-revised-datastores]. Consequently, 132 only the routing container in the ietf-routing model [RFC8022] is 133 augmented. The routing-state container is not augmented. 135 2.2. Overview 137 The OSPF YANG module defined in this document has all the common 138 building blocks for the OSPF protocol. 140 The OSPF YANG module augments the /routing/control-plane-protocols/ 141 control-plane-protocol path defined in the ietf-routing module. 143 module: ietf-ospf 144 augment /rt:routing/rt:control-plane-protocols/ 145 rt:control-plane-protocol: 146 +--rw ospf 147 . 148 . 149 +--rw operation-mode? identityref 150 +--rw instance* [af] 151 . 152 . 153 +--rw areas 154 | +--rw area* [area-id] 155 | +--rw area-id area-id-type 156 | . 157 | . 158 | +--rw virtual-links 159 | | +--rw virtual-link* [transit-area-id router-id] 160 | | . 161 | | . 162 | +--rw sham-links {pe-ce-protocol}? 163 | | +--rw sham-link* [local-id remote-id] 164 | | . 165 | | . 166 | +--rw interfaces 167 | +--rw interface* [name] 168 | . 169 | . 170 +--rw topologies {multi-topology}? 171 +--rw topology* [name] 172 . 173 . 175 The ospf module is intended to match to the vendor specific OSPF 176 configuration construct that is identified by the local identifier 177 'name'. The field 'version' allows support for OSPFv2 and OSPFv3. 179 The ospf container includes one or more OSPF protocol engines, each 180 enclosed in a separate instance entity. Each instance includes 181 information for the routing domain based on the [routing-instance af] 182 specification. There is no default routing domain assumed by the 183 data model. For example, to enable OSPF on a vendor's default IPv4 184 routing domain, an explicit instance entity with a specification like 185 ["default" "ipv4-unicast"] is required. The instance also contains 186 OSPF router level configuration and operational state. 188 The instance/area and instance/area/interface containers respectively 189 define the OSPF configuration and operational state for OSPF areas 190 and interfaces. 192 The instance/topology container defines the OSPF configuration and 193 operational state for OSPF topologies when the multi-topology feature 194 is supported. 196 2.3. OSPFv2 and OSPFv3 198 The data model defined herein supports both OSPFv2 and OSPFv3. 200 The field 'version' is used to indicate the OSPF version and is 201 mandatory. Based on the configured version, the data model varies to 202 accommodate the differences between OSPFv2 and OSPFv3. 204 2.4. Optional Features 206 Optional features are beyond the basic OSPF configuration and it is 207 the responsibility of each vendor to decide whether to support a 208 given feature on a particular device. 210 This model defines a number of features, such as NSR, max-LSA, etc. 211 It is expected that vendors will support additional features through 212 vendor-specific augmentations. 214 2.5. OSPF Router Configuration/Operational State 216 The ospf container is the top level container in this data model. It 217 contains shared information among the OSPF instances configured 218 within the container. 220 module: ietf-ospf 221 augment /rt:routing/rt:control-plane-protocols/ 222 rt:control-plane-protocol: 223 +--rw ospf 224 +--rw operation-mode? identityref 225 +--rw instance* [af] 226 . 227 . 229 2.6. OSPF Instance Configuration/Operational State 231 The instance container represents an OSPF protocol engine and 232 contains the router level configuration and operational state. The 233 routing domain for each instance is dictated through the 234 specification of [routing-instance af]. The instance level 235 operational state includes the instance level statistics, IETF SPF 236 delay statistics, AS-Scoped Link State Database, local RIB, SPF Log, 237 and the LSA log. 239 module: ietf-ospf 240 augment /rt:routing/rt:control-plane-protocols/ 241 rt:control-plane-protocol: 242 +--rw ospf 243 . 244 . 245 +--rw instance* [af] 246 +--rw af identityref 247 +--rw explicit-router-id? rt-types:router-id 248 | {explicit-router-id}? 249 +--rw preference 250 | +--rw (scope)? 251 | +--:(single-value) 252 | | +--rw all? uint8 253 | +--:(multi-values) 254 | +--rw (granularity)? 255 | | +--:(detail) 256 | | | +--rw intra-area? uint8 257 | | | +--rw inter-area? uint8 258 | | +--:(coarse) 259 | | +--rw internal? uint8 260 | +--rw external? uint8 261 +--rw nsr {nsr}? 262 | +--rw enable? boolean 263 +--rw graceful-restart {graceful-restart}? 264 | +--rw enable? boolean 265 | +--rw helper-enable? boolean 266 | +--rw restart-interval? uint16 267 | +--rw helper-strict-lsa-checking? boolean 268 +--rw enable? boolean {admin-control}? 269 +--rw auto-cost {auto-cost}? 270 | +--rw enable? boolean 271 | +--rw reference-bandwidth? uint32 272 +--rw spf-control 273 | +--rw paths? uint16 {max-ecmp}? 274 | +--rw ietf-spf-delay {ietf-spf-delay}? 275 | +--rw initial-delay? uint16 276 | +--rw short-delay? uint16 277 | +--rw long-delay? uint16 278 | +--rw hold-down? uint16 279 | +--rw time-to-learn? uint16 280 +--rw database-control 281 | +--rw max-lsa? uint32 {max-lsa}? 282 +--rw stub-router {stub-router}? 283 | +--rw (trigger)? 284 | +--:(always) 285 | +--rw always! 286 +--rw mpls 287 | +--rw te-rid {te-rid}? 288 | | +--rw ipv4-router-id? inet:ipv4-address 289 | | +--rw ipv6-router-id? inet:ipv6-address 290 | +--rw ldp 291 | +--rw igp-sync? boolean {ldp-igp-sync}? 292 +--rw fast-reroute {fast-reroute}? 293 | +--rw lfa {lfa}? 294 +--rw node-tags {node-tag}? 295 | +--rw node-tag* [tag] 296 | +--rw tag uint32 297 +--ro router-id? 298 +--ro local-rib 299 | +--ro route* [prefix] 300 | +--ro prefix inet:ip-prefix 301 | +--ro next-hops 302 | | +--ro next-hop* [next-hop] 303 | | +--ro outgoing-interface? if:interface-ref 304 | | +--ro next-hop inet:ip-address 305 | +--ro metric? uint32 306 | +--ro route-type? route-type 307 | +--ro route-tag? uint32 308 +--ro statistics 309 | +--ro originate-new-lsa-count? yang:counter32 310 | +--ro rx-new-lsas-count? yang:counter32 311 | +--ro as-scope-lsa-count? yang:gauge32 312 | +--ro as-scope-lsa-chksum-sum? uint32 313 | +--ro database 314 | +--ro as-scope-lsa-type* 315 | +--ro lsa-type? uint16 316 | +--ro lsa-count? yang:gauge32 317 | +--ro lsa-cksum-sum? int32 318 +--ro ietf-spf-delay 319 | +--ro initial-delay? uint16 320 | +--ro short-delay? uint16 321 | +--ro long-delay? uint16 322 | +--ro hold-down? uint16 323 | +--ro time-to-learn? uint16 324 | +--ro current-state? enumeration 325 | +--ro remaining-time-to-learn? uint16 326 | +--ro remaining-hold-down? uint16 327 | +--ro last-event-received? yang:timestamp 328 | +--ro next-spf-time? yang:timestamp 329 | +--ro last-spf-time? yang:timestamp 330 +--ro database 331 | +--ro as-scope-lsa-type* [lsa-type] 332 | +--ro as-scope-lsas 333 | +--ro as-scope-lsa* [lsa-id adv-router] 334 | +--ro lsa-id union 335 | +--ro adv-router inet:ipv4-address 336 | +--ro decoded-completed? boolean 337 | +--ro raw-data? yang:hex-string 338 | +--ro (version)? 339 | +--:(ospfv2) 340 | | +--ro ospfv2 341 . . 342 . . 343 | +--:(ospfv3) 344 | +--ro ospfv3 345 . 346 . 347 +--ro spf-log 348 | +--ro event* [id] 349 | +--ro id uint32 350 | +--ro spf-type? enumeration 351 | +--ro schedule-timestamp? yang:timestamp 352 | +--ro start-timestamp? yang:timestamp 353 | +--ro end-timestamp? yang:timestamp 354 | +--ro trigger-lsa* 355 | +--ro area-id? area-id-type 356 | +--ro link-id? union 357 | +--ro type? uint16 358 | +--ro lsa-id? yang:dotted-quad 359 | +--ro adv-router? yang:dotted-quad 360 | +--ro seq-num? uint32 361 +--ro lsa-log 362 | +--ro event* [id] 363 | +--ro id uint32 364 | +--ro lsa 365 | | +--ro area-id? area-id-type 366 | | +--ro link-id? union 367 | | +--ro type? uint16 368 | | +--ro lsa-id? yang:dotted-quad 369 | | +--ro adv-router? yang:dotted-quad 370 | | +--ro seq-num? uint32 371 | +--ro received-timestamp? yang:timestamp 372 | +--ro reason? identityref 373 . 374 . 376 2.7. OSPF Area Configuration/Operational State 378 The area container contains OSPF area configuration and the list of 379 interface containers representing all the OSPF interfaces in the 380 area. The area operational state includes the area statistics and 381 the area Link State Database (LSDB). 383 module: ietf-ospf 384 augment /rt:routing/rt:control-plane-protocols/ 385 rt:control-plane-protocol: 386 +--rw ospf 387 . 388 . 389 +--rw instance* [af] 390 +--rw areas 391 | +--rw area* [area-id] 392 | +--rw area-id area-id-type 393 | +--rw area-type? identityref 394 | +--rw summary? boolean 395 | +--rw default-cost? uint32 396 | +--rw ranges 397 | | +--rw range* [prefix] 398 | | +--rw prefix inet:ip-prefix 399 | | +--rw advertise? boolean 400 | | +--rw cost? uint24 401 | +--ro statistics 402 | | +--ro spf-runs-count? yang:counter32 403 | | +--ro abr-count? yang:gauge32 404 | | +--ro asbr-count? yang:gauge32 405 | | +--ro ar-nssa-translator-event-count? 406 | | yang:counter32 407 | | +--ro area-scope-lsa-count? yang:gauge32 408 | | +--ro area-scope-lsa-cksum-sum? int32 409 | | +--ro database 410 | | +--ro area-scope-lsa-type* 411 | | +--ro lsa-type? uint16 412 | | +--ro lsa-count? yang:gauge32 413 | | +--ro lsa-cksum-sum? int32 414 | +--ro database 415 | | +--ro area-scope-lsa-type* [lsa-type] 416 | | +--ro lsa-type uint16 417 | | +--ro area-scope-lsas 418 | | +--ro area-scope-lsa* [lsa-id adv-router] 419 | | +--ro lsa-id union 420 . . . 421 . . . 422 | | +--ro (version)? 423 | | +--:(ospfv2) 424 | | | +--ro ospfv2 425 | | | +--ro header 426 . . . . 427 . . . . 428 | | | +--ro body 429 | | | +--ro router 430 . . . . 431 . . . . 433 | | | +--ro network 434 . . . . 435 . . . . 436 | | | +--ro summary 437 . . . . 438 . . . . 439 | | | +--ro external 440 . . . . 441 . . . . 442 | | | +--ro opaque 443 . . . . 444 . . . . 445 | | +--:(ospfv3) 446 | | +--ro ospfv3 447 | | +--ro header 448 . . . 449 . . . 450 | | +--ro body 451 | | +--ro router 452 . . . 453 . . . 454 | | +--ro network 455 . . . 456 . . . 457 | | +--ro inter-area-prefix 458 . . . 459 . . . 460 | | +--ro inter-area-router 461 . . . 462 . . . 463 | | +--ro as-external 464 . . . 465 . . . 466 | | +--ro nssa 467 . . . 468 . . . 469 | | +--ro link 470 . . . 471 . . . 472 | | +--ro intra-area-prefix 473 . . . 474 . . . 475 | | +--ro router-information 476 . . . 477 . . . 478 | +--rw virtual-links 479 | | +--rw virtual-link* [transit-area-id router-id] 480 | | +--rw transit-area-id -> ../../../../ 481 | | area/area-id 482 | | +--rw router-id rt-types:router-id 483 | | +--rw hello-interval? uint16 484 | | +--rw dead-interval? uint32 485 | | +--rw retransmit-interval? uint16 486 | | +--rw transmit-delay? uint16 487 | | +--rw lls? boolean {lls}? 488 | | +--rw ttl-security {ttl-security}? 489 | | | +--rw enable? boolean 490 | | | +--rw hops? uint8 491 | | +--rw enable? boolean 492 | | {admin-control}? 493 | | +--rw authentication 494 | | +--rw (auth-type-selection)? 495 | | +--:(auth-ipsec) 496 | | {ospfv3-authentication-ipsec}? 497 | | | +--rw sa? string 498 | | +--:(auth-trailer-key-chain) 499 | | | +--rw key-chain? 500 | | key-chain:key-chain-ref 501 | | +--:(auth-trailer-key) 502 | | +--rw key? string 503 | | +--rw crypto-algorithm? identityref 504 | | +--ro cost? uint16 505 | | +--ro state? if-state-type 506 | | +--ro hello-timer? uint32 507 | | +--ro wait-timer? uint32 508 | | +--ro dr-router-id? rt-types:router-id 509 | | +--ro dr-ip-addr? inet:ip-address 510 | | +--ro bdr-router-id? rt-types:router-id 511 | | +--ro bdr-ip-addr? inet:ip-address 512 | | +--ro statistics 513 | | | +--ro if-event-count? yang:counter32 514 | | | +--ro link-scope-lsa-count? yang:gauge32 515 | | | +--ro link-scope-lsa-cksum-sum? 516 | | | uint32 517 | | | +--ro database 518 | | | +--ro link-scope-lsa-type* 519 | | | +--ro lsa-type? uint16 520 | | | +--ro lsa-count? yang:gauge32 521 | | | +--ro lsa-cksum-sum? int32 522 | | +--ro neighbors 523 | | | +--ro neighbor* [neighbor-router-id] 524 | | | +--ro neighbor-router-id 525 | | | rt-types:router-id 526 | | | +--ro address? inet:ip-address 527 | | | +--ro dr-router-id? rt-types:router-id 528 | | | +--ro dr-ip-addr? inet:ip-address 529 | | | +--ro bdr-router-id? rt-types:router-id 530 | | | +--ro bdr-ip-addr? inet:ip-address 531 | | | +--ro state? nbr-state-type 532 | | | +--ro dead-timer? uint32 533 | | | +--ro statistics 534 | | | +--ro nbr-event-count? 535 | | | yang:counter32 536 | | | +--ro nbr-retrans-qlen? 537 | | | yang:gauge32 538 | | +--ro database 539 | | +--ro link-scope-lsa-type* [lsa-type] 540 | | +--ro lsa-type uint16 541 | | +--ro link-scope-lsas 542 . . 543 . . 544 | +--rw sham-links {pe-ce-protocol}? 545 | | +--rw sham-link* [local-id remote-id] 546 | | +--rw local-id inet:ip-address 547 | | +--rw remote-id inet:ip-address 548 | | +--rw hello-interval? uint16 549 | | +--rw dead-interval? uint32 550 | | +--rw retransmit-interval? uint16 551 | | +--rw transmit-delay? uint16 552 | | +--rw lls? boolean {lls}? 553 | | +--rw ttl-security {ttl-security}? 554 | | | +--rw enable? boolean 555 | | | +--rw hops? uint8 556 | | +--rw enable? boolean 557 | | {admin-control}? 558 | | +--rw authentication 559 | | | +--rw (auth-type-selection)? 560 | | | +--:(auth-ipsec) 561 | | | {ospfv3-authentication-ipsec}? 562 | | | | +--rw sa? string 563 | | | +--:(auth-trailer-key-chain) 564 | | | | +--rw key-chain? 565 | | | key-chain:key-chain-ref 566 | | | +--:(auth-trailer-key) 567 | | | +--rw key? string 568 | | | +--rw crypto-algorithm? identityref 569 | | +--rw cost? uint16 570 | | +--rw mtu-ignore? boolean 571 | | {mtu-ignore}? 572 | | +--rw prefix-suppression? boolean 573 | | {prefix-suppression}? 574 | | +--ro state? if-state-type 575 | | +--ro hello-timer? uint32 576 | | +--ro wait-timer? uint32 577 | | +--ro dr-router-id? rt-types:router-id 578 | | +--ro dr-ip-addr? inet:ip-address 579 | | +--ro bdr-router-id? rt-types:router-id 580 | | +--ro bdr-ip-addr? inet:ip-address 581 | | +--ro statistics 582 | | | +--ro if-event-count? yang:counter32 583 | | | +--ro link-scope-lsa-count? yang:gauge32 584 | | | +--ro link-scope-lsa-cksum-sum? 585 | | | uint32 586 | | | +--ro database 587 | | | +--ro link-scope-lsa-type* 588 | | | +--ro lsa-type? uint16 589 | | | +--ro lsa-count? yang:gauge32 590 | | | +--ro lsa-cksum-sum? int32 591 | | +--ro neighbors 592 | | | +--ro neighbor* [neighbor-router-id] 593 | | | +--ro neighbor-router-id 594 | | | rt-types:router-id 595 | | | +--ro address? inet:ip-address 596 | | | +--ro dr-router-id? rt-types:router-id 597 | | | +--ro dr-ip-addr? inet:ip-address 598 | | | +--ro bdr-router-id? rt-types:router-id 599 | | | +--ro bdr-ip-addr? inet:ip-address 600 | | | +--ro state? nbr-state-type 601 | | | +--ro dead-timer? uint32 602 | | | +--ro statistics 603 | | | +--ro nbr-event-count? 604 | | | yang:counter32 605 | | | +--ro nbr-retrans-qlen? 606 | | | yang:gauge32 607 | | +--ro database 608 | | +--ro link-scope-lsa-type* [lsa-type] 609 | | +--ro lsa-type uint16 610 | | +--ro link-scope-lsas 611 . . 612 . . 614 2.8. OSPF Interface Configuration/Operational State 616 The interface container contains OSPF interface configuration and 617 operational state. The interface operational state includes the 618 statistics, list of neighbors, and link-local Link State database 619 (LSDB). 621 module: ietf-ospf 622 augment /rt:routing/rt:control-plane-protocols/ 623 rt:control-plane-protocol: 624 +--rw ospf 625 . 626 . 627 +--rw instance* [af] 628 . 629 . 630 +--rw areas 631 | +--rw area* [area-id] 632 | . 633 | . 634 | +--rw interfaces 635 | +--rw interface* [name] 636 | +--rw name if:interface-ref 637 | +--rw interface-type? enumeration 638 | +--rw passive? boolean 639 | +--rw demand-circuit? boolean 640 | {demand-circuit}? 641 | +--rw priority? uint8 642 | +--rw multi-areas {multi-area-adj}? 643 | | +--rw multi-area* [multi-area-id] 644 | | +--rw multi-area-id area-id-type 645 | | +--rw cost? uint16 646 | +--rw static-neighbors 647 | | +--rw neighbor* [identifier] 648 | | +--rw identifier inet:ip-address 649 | | +--rw cost? uint16 650 | | +--rw poll-interval? uint16 651 | | +--rw priority? uint8 652 | +--rw node-flag? boolean 653 | {node-flag}? 654 | +--rw bfd {bfd}? 655 | | +--rw enable? boolean 656 | +--rw fast-reroute {fast-reroute}? 657 | | +--rw lfa {lfa}? 658 | | +--rw candidate-enable? boolean 659 | | +--rw enable? boolean 660 | | +--rw remote-lfa {remote-lfa}? 661 | | +--rw enable? boolean 662 | +--rw hello-interval? uint16 663 | +--rw dead-interval? uint32 664 | +--rw retransmit-interval? uint16 665 | +--rw transmit-delay? uint16 666 | +--rw lls? boolean {lls}? 667 | +--rw ttl-security {ttl-security}? 668 | | +--rw enable? boolean 669 | | +--rw hops? uint8 670 | +--rw enable? boolean 671 | {admin-control}? 672 | +--rw authentication 673 | | +--rw (auth-type-selection)? 674 | | +--:(auth-ipsec) 675 | | | {ospfv3-authentication-ipsec}? 676 | | | +--rw sa? string 677 | | +--:(auth-trailer-key-chain) 678 | | | +--rw key-chain? 679 | | | key-chain:key-chain-ref 680 | | +--:(auth-trailer-key) 681 | | +--rw key? string 682 | | +--rw crypto-algorithm? identityref 683 | +--rw cost? uint16 684 | +--rw mtu-ignore? boolean 685 | | {mtu-ignore}? 686 | +--rw prefix-suppression? boolean 687 | | {prefix-suppression}? 688 | +--ro state? if-state-type 689 | +--ro hello-timer? uint32 690 | +--ro wait-timer? uint32 691 | +--ro dr-router-id? rt-types:router-id 692 | +--ro dr-ip-addr? inet:ip-address 693 | +--ro bdr-router-id? rt-types:router-id 694 | +--ro bdr-ip-addr? inet:ip-address 695 | +--ro statistics 696 | | +--ro if-event-count? yang:counter32 697 | | +--ro link-scope-lsa-count? yang:gauge32 698 | | +--ro link-scope-lsa-cksum-sum? 699 | | uint32 700 | | +--ro database 701 | | +--ro link-scope-lsa-type* 702 | | +--ro lsa-type? uint16 703 | | +--ro lsa-count? yang:gauge32 704 | | +--ro lsa-cksum-sum? int32 705 | +--ro neighbors 706 | | +--ro neighbor* [neighbor-router-id] 707 | | +--ro neighbor-router-id 708 | | rt-types:router-id 709 | | +--ro address? inet:ip-address 710 | | +--ro dr-router-id? rt-types:router-id 711 | | +--ro dr-ip-addr? inet:ip-address 712 | | +--ro bdr-router-id? rt-types:router-id 713 | | +--ro bdr-ip-addr? inet:ip-address 714 | | +--ro state? nbr-state-type 715 | | +--ro dead-timer? uint32 716 | | +--ro statistics 717 | | +--ro nbr-event-count? 718 | | yang:counter32 719 | | +--ro nbr-retrans-qlen? 720 | | yang:gauge32 721 | +--ro database 722 | . +--ro link-scope-lsa-type* [lsa-type] 723 | . +--ro lsa-type uint16 724 | . +--ro link-scope-lsas 725 . . 726 . . 727 | +--rw topologies {ospf:multi-topology}? 728 | | +--rw topology* [name] 729 | | +--rw name -> ../../../../../../../../ 730 | | ../../../rt:ribs/rib/name 731 | | +--rw cost? uint32 732 | +--rw instance-id? uint8 733 . 734 . 736 2.9. OSPF notification 738 This YANG model defines a list of notifications that inform YANG 739 clients of important events detected during protocol operation. The 740 defined notifications cover the common set of traps from the OSPFv2 741 MIB [RFC4750] and OSPFv3 MIB [RFC5643]. 743 notifications: 744 +---n if-state-change 745 | +--ro routing-protocol-name? 746 | + -> /rt:routing/control-plane-protocols/ 747 | + control-plane-protocol/name 748 | +--ro af? 749 | + -> /rt:routing/control-plane-protocols/ 750 | + control-plane-protocol 751 | + [rt:name=current()/../routing-protocol-name]/ 752 | + ospf:ospf/instance/af 753 | +--ro (if-link-type-selection)? 754 | | +--:(interface) 755 | | | +--ro interface 756 | | | +--ro interface? if:interface-ref 757 | | +--:(virtual-link) 758 | | | +--ro virtual-link 759 | | | +--ro transit-area-id? area-id-type 760 | | | +--ro neighbor-router-id? rt-types:router-id 761 | | +--:(sham-link) 762 | | +--ro sham-link 763 | | +--ro area-id? area-id-type 764 | | +--ro local-ip-addr? inet:ip-address 765 | | +--ro remote-ip-addr? inet:ip-address 766 | +--ro state? if-state-type 767 +---n if-config-error 768 | +--ro routing-protocol-name? 769 | + -> /rt:routing/control-plane-protocols/ 770 | + control-plane-protocol/name 771 | +--ro af? 772 | + -> /rt:routing/control-plane-protocols/ 773 | + control-plane-protocol 774 | + [rt:name=current()/../routing-protocol-name]/ 775 | + ospf:ospf/instance/af 776 | +--ro (if-link-type-selection)? 777 | | +--:(interface) 778 | | | +--ro interface 779 | | | +--ro interface? if:interface-ref 780 | | +--:(virtual-link) 781 | | | +--ro virtual-link 782 | | | +--ro transit-area-id? area-id-type 783 | | | +--ro neighbor-router-id? rt-types:router-id 784 | | +--:(sham-link) 785 | | +--ro sham-link 786 | | +--ro area-id? area-id-type 787 | | +--ro local-ip-addr? inet:ip-address 788 | | +--ro remote-ip-addr? inet:ip-address 789 | +--ro packet-source? yang:dotted-quad 790 | +--ro packet-type? packet-type 791 | +--ro error? enumeration 792 +---n nbr-state-change 793 | +--ro routing-protocol-name? 794 | + -> /rt:routing/control-plane-protocols/ 795 | + control-plane-protocol/name 796 | +--ro af? 797 | + -> /rt:routing/control-plane-protocols/ 798 | + control-plane-protocol 799 | + [rt:name=current()/../routing-protocol-name]/ 800 | + ospf:ospf/instance/af 801 | +--ro (if-link-type-selection)? 802 | | +--:(interface) 803 | | | +--ro interface 804 | | | +--ro interface? if:interface-ref 805 | | +--:(virtual-link) 806 | | | +--ro virtual-link 807 | | | +--ro transit-area-id? area-id-type 808 | | | +--ro neighbor-router-id? rt-types:router-id 809 | | +--:(sham-link) 810 | | +--ro sham-link 811 | | +--ro area-id? area-id-type 812 | | +--ro local-ip-addr? inet:ip-address 813 | | +--ro remote-ip-addr? inet:ip-address 814 | +--ro neighbor-router-id? rt-types:router-id 815 | +--ro neighbor-ip-addr? yang:dotted-quad 816 | +--ro state? nbr-state-type 817 +---n nbr-restart-helper-status-change 818 | +--ro routing-protocol-name? 819 | + -> /rt:routing/control-plane-protocols/ 820 | + control-plane-protocol/name 821 | +--ro af? 822 | + -> /rt:routing/control-plane-protocols/ 823 | + control-plane-protocol 824 | + [rt:name=current()/../routing-protocol-name]/ 825 | + ospf:ospf/instance/af 826 | +--ro (if-link-type-selection)? 827 | | +--:(interface) 828 | | | +--ro interface 829 | | | +--ro interface? if:interface-ref 830 | | +--:(virtual-link) 831 | | | +--ro virtual-link 832 | | | +--ro transit-area-id? area-id-type 833 | | | +--ro neighbor-router-id? rt-types:router-id 834 | | +--:(sham-link) 835 | | +--ro sham-link 836 | | +--ro area-id? area-id-type 837 | | +--ro local-ip-addr? inet:ip-address 838 | | +--ro remote-ip-addr? inet:ip-address 839 | +--ro neighbor-router-id? rt-types:router-id 840 | +--ro neighbor-ip-addr? yang:dotted-quad 841 | +--ro status? restart-helper-status-type 842 | +--ro age? uint32 843 | +--ro exit-reason? restart-exit-reason-type 844 +---n if-rx-bad-packet 845 | +--ro routing-protocol-name? 846 | + -> /rt:routing/control-plane-protocols/ 847 | + control-plane-protocol/name 848 | +--ro af? 849 | + -> /rt:routing/control-plane-protocols/ 850 | + control-plane-protocol 851 | + [rt:name=current()/../routing-protocol-name]/ 852 | + ospf:ospf/instance/af 853 | +--ro (if-link-type-selection)? 854 | | +--:(interface) 855 | | | +--ro interface 856 | | | +--ro interface? if:interface-ref 857 | | +--:(virtual-link) 858 | | | +--ro virtual-link 859 | | | +--ro transit-area-id? area-id-type 860 | | | +--ro neighbor-router-id? rt-types:router-id 861 | | +--:(sham-link) 862 | | +--ro sham-link 863 | | +--ro area-id? area-id-type 864 | | +--ro local-ip-addr? inet:ip-address 865 | | +--ro remote-ip-addr? inet:ip-address 866 | +--ro packet-source? yang:dotted-quad 867 | +--ro packet-type? packet-type 868 +---n lsdb-approaching-overflow 869 | +--ro routing-protocol-name? 870 | + -> /rt:routing/control-plane-protocols/ 871 | + control-plane-protocol/name 872 | +--ro af? 873 | + -> /rt:routing/control-plane-protocols/ 874 | + control-plane-protocol 875 | + [rt:name=current()/../routing-protocol-name]/ 876 | + ospf:ospf/instance/af 877 | +--ro ext-lsdb-limit? uint32 878 +---n lsdb-overflow 879 | +--ro routing-protocol-name? 880 | + -> /rt:routing/control-plane-protocols/ 881 | + control-plane-protocol/name 882 | +--ro af? 883 | + -> /rt:routing/control-plane-protocols/ 884 | + control-plane-protocol 885 | + [rt:name=current()/../routing-protocol-name]/ 886 | + ospf:ospf/instance/af 887 | +--ro ext-lsdb-limit? uint32 888 +---n nssa-translator-status-change 889 | +--ro routing-protocol-name? 890 | + -> /rt:routing/control-plane-protocols/ 891 | + control-plane-protocol/name 892 | +--ro af? 893 | + -> /rt:routing/control-plane-protocols/ 894 | + control-plane-protocol 895 | + [rt:name=current()/../routing-protocol-name]/ 896 | + ospf:ospf/instance/af 897 | +--ro area-id? area-id-type 898 | +--ro status? nssa-translator-state-type 899 +---n restart-status-change 900 +--ro routing-protocol-name? 901 + -> /rt:routing/control-plane-protocols/ 902 + control-plane-protocol/name 903 +--ro af? 904 + -> /rt:routing/control-plane-protocols/ 905 + control-plane-protocol 906 + [rt:name=current()/../routing-protocol-name]/ 907 + ospf:ospf/instance/af 908 +--ro status? restart-status-type 909 +--ro restart-interval? uint16 910 +--ro exit-reason? restart-exit-reason-type 912 2.10. OSPF RPC Operations 914 The "ietf-ospf" module defines two RPC operations: 916 o clear-database: reset the content of a particular OSPF database. 918 o clear-neighbor: restart a particular set of OSPF neighbor. 920 rpcs: 921 +---x clear-neighbor 922 | +---w input 923 | +---w routing-protocol-name 924 | + -> /rt:routing/control-plane-protocols/ 925 | + control-plane-protocol/name 926 | +---w interface? if:interface-ref 927 +---x clear-database 928 +---w input 929 +---w routing-protocol-name 930 -> /rt:routing/control-plane-protocols/ 931 control-plane-protocol/name 933 3. OSPF Yang Module 935 file "ietf-ospf@2017-07-01.yang" 936 module ietf-ospf { 937 namespace "urn:ietf:params:xml:ns:yang:ietf-ospf"; 939 prefix ospf; 941 import ietf-inet-types { 942 prefix "inet"; 943 } 945 import ietf-yang-types { 946 prefix "yang"; 947 } 949 import ietf-interfaces { 950 prefix "if"; 951 } 953 import ietf-routing-types { 954 prefix "rt-types"; 955 } 957 import iana-routing-types { 958 prefix "iana-rt-types"; 959 } 960 import ietf-routing { 961 prefix "rt"; 962 } 964 import ietf-key-chain { 965 prefix "key-chain"; 966 } 968 organization 969 "IETF OSPF - OSPF Working Group"; 971 contact 972 "WG Web: 973 WG List: 975 Editor: Derek Yeung 976 977 Author: Acee Lindem 978 979 Author: Yingzhen Qu 980 981 Author: Jeffrey Zhang 982 983 Author: Ing-Wher Chen 984 985 Author: Dean Bogdanovic 986 987 Author: Kiran Agrahara Sreenivasa 988 "; 990 description 991 "This YANG module defines the generic configuration and 992 operational state for the OSPF protocol common to all 993 vendor implementations. It is intended that the module 994 will be extended by vendors to define vendor-specific 995 OSPF configuration parameters and policies, 996 for example route maps or route policies. 998 Copyright (c) 2017 IETF Trust and the persons identified as 999 authors of the code. All rights reserved. 1001 Redistribution and use in source and binary forms, with or 1002 without modification, is permitted pursuant to, and subject 1003 to the license terms contained in, the Simplified BSD License 1004 set forth in Section 4.c of the IETF Trust's Legal Provisions 1005 Relating to IETF Documents 1006 (http://trustee.ietf.org/license-info). 1007 This version of this YANG module is part of RFC XXXX; 1008 see the RFC itself for full legal notices."; 1010 reference "RFC XXXX"; 1012 revision 2017-07-01 { 1013 description 1014 "* Restructure model to conform to NMDA. 1015 * Remove features for instance, area and interface 1016 inheritance. 1017 * Update static neighbor identifier description to 1018 allow for router-id, ipv4-address, and ipv6-address. 1019 * Added spf-log and lsa-log. 1020 * Use dotted-quad for OSPFv2 LSA ID. 1021 * Fix virtual-link transit-area-id leafref path and 1022 must statement. 1023 "; 1024 reference 1025 "RFC XXXX: A YANG Data Model for OSPF."; 1026 } 1028 revision 2017-03-12 { 1029 description 1030 "* Update authors information. 1031 * Rename admin distance to preference. 1032 * Rename network type to interface type. 1033 * Add ietf-spf-delay as a feature. 1034 * Add node-tag as a feature and update LSA 1035 definition accordingly. 1036 * Remove LDP IGP autoconfig. 1037 * Add BFD as a feature instead of a separate module. 1038 * Change TE router ID to support IPv4 and IPv6 router ID. 1039 * Replace key-chain:crypto-algorithm-types with 1040 key-chain:crypto-algorithm. 1041 * Remove type ieee-bandwidth. 1042 * Import ietf-routing-types and make use of 1043 router-id, address-family and bandwidth-ieee-float32 1044 type definitions. 1045 * Simplify notification header. 1046 * Fix compilation issue in multiple must statements. 1047 "; 1048 reference 1049 "RFC XXXX: A YANG Data Model for OSPF."; 1050 } 1052 revision 2016-10-31 { 1053 description 1054 "* Update authors information. 1056 * Rename candidate-disabled to candidiate-enable 1057 and set the default value to TRUE. 1058 * Rename node identifiers that end with 1059 'enabled' to 'enable'. 1060 * Set the default value of 1061 ospf/instance/areas/area/interfaces/interface/ 1062 fast-reroute/lfa/enable (previously named 'enabled') 1063 to FALSE. 1064 * Set the default value of 1065 ospf/instance/areas/area/interfaces/interface/ 1066 fast-reroute/remote-lfa/enable (previously named 'enabled') 1067 to FALSE. 1068 * Rename 1069 ospf/instance/areas/area/interfaces/interface/ 1070 static-neighbors/neighbor/address to 'identifier' 1071 with type inet:ip-address 1072 * Add 'dead-timer' to 1073 ospf-state/instance/areas/area/interfaces/interface/ 1074 neighbors/neighbor. 1075 * Remove 'mtu-ignore' and 'prefix-suppression' from 1076 virtual-link configuration. 1077 * Adjust range specifications from 'transmit-delay', 1078 'dead-interval', and 'retransmit-interval' in 1079 ospf/instance/areas/area/interfaces/interface. 1080 * Change the type of 1081 ospf/instance/areas/area/interface/interface/dead-interval 1082 to uint32 to match RFC2328 Appendix A.3.2. 1083 * Change hello-timer and wait-timer unit to seconds. 1084 * Update hello-timer, dead-timer and wait-timer descriptions. 1085 * Add IEEE bandwidth type and update all TE bandwidth fields 1086 to use it. 1087 * Add Nt-bit to OSPFv2 router LSA. 1088 * Remove L-bit from OSPFv2 router LSA. 1089 "; 1090 reference 1091 "RFC XXXX: A YANG Data Model for OSPF."; 1092 } 1094 revision 2016-07-07 { 1095 description 1096 "* Add ospfv3 AF bit. 1097 * Add ospfv2 MT, L, O, DN bit. 1098 * Add interface priority config. 1099 * Change bdr-ip-address to type ip-address. 1100 * Rename leaf interface to name. 1101 * Rename rx-bad-packet to if-rx-bad-packet. 1102 * Move virtual link placement to backbone area. 1103 * Remove cost configuration from virtual link. 1105 * Move if-feature multi-area-adj statement. 1106 * Add type checksum16-type. 1107 * Change LSA header checksum to use checksum16-type. 1108 * Change routing-protocol to control-plane-protocol. 1109 * Change import module name to ietf-key-chain."; 1110 reference 1111 "RFC XXXX: A YANG Data Model for OSPF."; 1112 } 1114 revision 2016-03-20 { 1115 description 1116 "* Reorganize *-config and *-operation groupings. 1117 * Use *-config under state tree for applied config. 1118 * Rename config router-id to explicit-router-id. 1119 * Rename feature router-id to explicit-router-id. 1120 * Add OSPFv3 instance ID. 1121 * Add OSPFv3 interface ID. 1122 * Add ip-address for DR and BDR. 1123 * Remove routing-instance. 1124 * Change import module name to ietf-routing-key-chain."; 1125 reference 1126 "RFC XXXX: A YANG Data Model for OSPF."; 1127 } 1129 revision 2015-10-19 { 1130 description 1131 "* Remove the abstract identity ospf. 1132 * Make area-id-type dotted-quad only. 1133 * Use area-id-type for all area-id leafs. 1134 * Restructure notifications. 1135 * Move BFD support to the new ietf-ospf-bfd module. 1136 * Update author information. 1137 * Editorial changes."; 1138 reference 1139 "RFC XXXX: A YANG Data Model for OSPF."; 1140 } 1142 revision 2015-09-02 { 1143 description 1144 "* Author information update. 1145 * Editorial changes"; 1146 reference 1147 "RFC XXXX: A YANG Data Model for OSPF."; 1148 } 1150 revision 2015-07-06 { 1151 description 1152 "* Remove support for protocol-centric config. 1154 * Enclose list in container, except for instance. 1155 * Replace protocol-shutdown with admin-control. 1156 * Add IP-FRR per-interface config. 1157 * Reorganize max-path etc node. 1158 * Add node-flag. 1159 * Align config/operation hierarchy. 1160 * Use relative path for reference to rib. 1161 * Add ability to set single admin distance. 1162 * Make unreserved bandwidth into list. 1163 * Add F and T bit to OSPFv3 external LSA. 1164 * Remove key statement inside LSA body. 1165 * Add stub router support. 1166 * Fix usage of af-area-config. 1167 * Add statistics to operation data. 1168 * Add local rib. 1169 * Use dotted-quad for all router-id fields. 1170 * Support more than one multi-area per interface. 1171 * Use uint16 for LSA type. 1172 * Update grouping notification-instance-hdr. 1173 * Rework condition for opaque type and id in OSPFv2 LSA. 1174 * Rename local-remote-ipv4-addr with remote-if-ipv4-addr. 1175 * Add virtual-link/sham-link to operation state. 1176 * Allow multiple link TLVs in one LSA. 1177 * Fix bug in as-scope-lsas. 1178 * Remove OSPFv3 restriction in link-scope-lsas. 1179 * Editorial changes."; 1180 reference 1181 "RFC XXXX: A YANG Data Model for OSPF."; 1182 } 1184 revision 2015-03-09 { 1185 description 1186 "Initial revision."; 1187 reference 1188 "RFC XXXX: A YANG Data Model for OSPF."; 1189 } 1191 feature multi-topology { 1192 description 1193 "Support Multiple-Topolgy Routing (MTR)."; 1194 } 1196 feature multi-area-adj { 1197 description 1198 "OSPF multi-area adjacency support as in RFC 5185."; 1199 } 1200 feature explicit-router-id { 1201 description 1202 "Set Router-ID per instance explicitly."; 1203 } 1205 feature demand-circuit { 1206 description 1207 "OSPF demand circuit support as in RFC 1793."; 1208 } 1210 feature mtu-ignore { 1211 description 1212 "Disable OSPF Database Description packet MTU 1213 mismatch checking."; 1214 } 1216 feature lls { 1217 description 1218 "OSPF link-local signaling (LLS) as in RFC 5613."; 1219 } 1221 feature prefix-suppression { 1222 description 1223 "OSPF prefix suppression support as in RFC 6860."; 1224 } 1226 feature ttl-security { 1227 description 1228 "OSPF TTL security check."; 1229 } 1231 feature nsr { 1232 description 1233 "Non-Stop-Routing (NSR)."; 1234 } 1236 feature graceful-restart { 1237 description 1238 "Graceful OSPF Restart as defined in RFC 3623 and 1239 RFC 5187."; 1240 } 1242 feature admin-control { 1243 description 1244 "Administrative control of the protocol state."; 1245 } 1247 feature auto-cost { 1248 description 1249 "Calculate OSPF interface cost according to 1250 reference bandwidth."; 1251 } 1253 feature max-ecmp { 1254 description 1255 "Setting maximum number of ECMP paths."; 1256 } 1258 feature max-lsa { 1259 description 1260 "Setting maximum number of LSAs the OSPF instance 1261 will accept."; 1262 } 1264 feature te-rid { 1265 description 1266 "TE Router-ID."; 1267 } 1269 feature ldp-igp-sync { 1270 description 1271 "LDP IGP synchronization."; 1272 } 1274 feature ospfv3-authentication-ipsec { 1275 description 1276 "Use IPsec for OSPFv3 authentication."; 1277 } 1279 feature fast-reroute { 1280 description 1281 "Support of IP Fast Reroute (IP-FRR)."; 1282 } 1284 feature node-flag { 1285 description 1286 "Support of node flag."; 1287 } 1289 feature node-tag { 1290 description 1291 "Support of node tag."; 1292 } 1294 feature lfa { 1295 description 1296 "Support of Loop Free Alternates (LFAs)."; 1297 } 1298 feature remote-lfa { 1299 description 1300 "Support of Remote Loop Free Alternates (R-LFA)."; 1301 } 1303 feature stub-router { 1304 description 1305 "Support of RFC 6987 OSPF Stub Router Advertisement."; 1306 } 1308 feature pe-ce-protocol { 1309 description 1310 "Support PE-CE protocol"; 1311 } 1313 feature ietf-spf-delay { 1314 description 1315 "Support of IETF SPF delay algorithm."; 1316 } 1318 feature bfd { 1319 description 1320 "Support of BFD."; 1321 } 1323 identity ospfv2 { 1324 base "rt:routing-protocol"; 1325 description "OSPFv2"; 1326 } 1328 identity ospfv3 { 1329 base "rt:routing-protocol"; 1330 description "OSPFv3"; 1331 } 1333 identity operation-mode { 1334 description 1335 "OSPF operation mode."; 1336 } 1338 identity ships-in-the-night { 1339 base operation-mode; 1340 description 1341 "Ships-in-the-night operation mode in which 1342 each OSPF instance carries only one address family"; 1343 } 1345 identity area-type { 1346 description "Base identity for OSPF area type."; 1347 } 1349 identity normal { 1350 base area-type; 1351 description "OSPF normal area."; 1352 } 1354 identity stub { 1355 base area-type; 1356 description "OSPF stub area."; 1357 } 1359 identity nssa { 1360 base area-type; 1361 description "OSPF NSSA area."; 1362 } 1364 identity lsa-log-reason { 1365 description 1366 "Base identity for an LSA log reason."; 1367 } 1369 identity lsa-refresh { 1370 base lsa-log-reason; 1371 description 1372 "Identity used when the LSA is logged 1373 as a result of receiving a refresh LSA."; 1374 } 1376 identity lsa-content-change { 1377 base lsa-log-reason; 1378 description 1379 "Identity used when the LSA is logged 1380 as a result of a change in the content 1381 of the LSA."; 1382 } 1384 identity lsa-purge { 1385 base lsa-log-reason; 1386 description 1387 "Identity used when the LSA is logged 1388 as a result of being purged."; 1389 } 1391 typedef uint24 { 1392 type uint32 { 1393 range "0 .. 16777215"; 1395 } 1396 description 1397 "24-bit unsigned integer."; 1398 } 1400 typedef area-id-type { 1401 type yang:dotted-quad; 1402 description 1403 "Area ID type."; 1404 } 1406 typedef route-type { 1407 type enumeration { 1408 enum intra-area { 1409 description "OSPF intra-area route."; 1410 } 1411 enum inter-area { 1412 description "OSPF inter-area route."; 1413 } 1414 enum external-1 { 1415 description "OSPF type 1 external route."; 1416 } 1417 enum external-2 { 1418 description "OSPF type 2 external route."; 1419 } 1420 enum nssa-1 { 1421 description "OSPF type 1 NSSA route."; 1422 } 1423 enum nssa-2 { 1424 description "OSPF type 2 NSSA route."; 1425 } 1426 } 1427 description "OSPF route type."; 1428 } 1430 typedef if-state-type { 1431 type enumeration { 1432 enum Down { 1433 value "1"; 1434 description 1435 "Interface down state."; 1436 } 1437 enum Loopback { 1438 value "2"; 1439 description 1440 "Interface loopback state."; 1441 } 1442 enum Waiting { 1443 value "3"; 1444 description 1445 "Interface waiting state."; 1446 } 1447 enum Point-to-Point { 1448 value "4"; 1449 description 1450 "Interface point-to-point state."; 1451 } 1452 enum DR { 1453 value "5"; 1454 description 1455 "Interface Designated Router (DR) state."; 1456 } 1457 enum BDR { 1458 value "6"; 1459 description 1460 "Interface Backup Designated Router (BDR) state."; 1461 } 1462 enum DR-Other { 1463 value "7"; 1464 description 1465 "Interface Other Designated Router state."; 1466 } 1467 } 1468 description 1469 "OSPF interface state type."; 1470 } 1472 typedef nbr-state-type { 1473 type enumeration { 1474 enum Down { 1475 value "1"; 1476 description 1477 "Neighbor down state."; 1478 } 1479 enum Attempt { 1480 value "2"; 1481 description 1482 "Neighbor attempt state."; 1483 } 1484 enum Init { 1485 value "3"; 1486 description 1487 "Neighbor init state."; 1488 } 1489 enum 2-Way { 1490 value "4"; 1491 description 1492 "Neighbor 2-Way state."; 1493 } 1494 enum ExStart { 1495 value "5"; 1496 description 1497 "Neighbor exchange start state."; 1498 } 1499 enum Exchange { 1500 value "6"; 1501 description 1502 "Neighbor exchange state."; 1503 } 1504 enum Loading { 1505 value "7"; 1506 description 1507 "Neighbor loading state."; 1508 } 1509 enum Full { 1510 value "8"; 1511 description 1512 "Neighbor full state."; 1513 } 1514 } 1515 description 1516 "OSPF neighbor state type."; 1517 } 1519 typedef restart-helper-status-type { 1520 type enumeration { 1521 enum Not-Helping { 1522 value "1"; 1523 description 1524 "Restart helper status not helping."; 1525 } 1526 enum Helping { 1527 value "2"; 1528 description 1529 "Restart helper status helping."; 1530 } 1531 } 1532 description 1533 "Restart helper status type."; 1534 } 1536 typedef restart-exit-reason-type { 1537 type enumeration { 1538 enum None { 1539 value "1"; 1540 description 1541 "Not attempted."; 1542 } 1543 enum InProgress { 1544 value "2"; 1545 description 1546 "Restart in progress."; 1547 } 1548 enum Completed { 1549 value "3"; 1550 description 1551 "Successfully completed."; 1552 } 1553 enum TimedOut { 1554 value "4"; 1555 description 1556 "Timed out."; 1557 } 1558 enum TopologyChanged { 1559 value "5"; 1560 description 1561 "Aborted due to topology change."; 1562 } 1563 } 1564 description 1565 "Describes the outcome of the last attempt at a 1566 graceful restart, either by itself or acting 1567 as a helper."; 1568 } 1570 typedef packet-type { 1571 type enumeration { 1572 enum Hello { 1573 value "1"; 1574 description 1575 "OSPF hello packet."; 1576 } 1577 enum Database-Descripton { 1578 value "2"; 1579 description 1580 "OSPF database description packet."; 1581 } 1582 enum Link-State-Request { 1583 value "3"; 1584 description 1585 "OSPF link state request packet."; 1586 } 1587 enum Link-State-Update { 1588 value "4"; 1589 description 1590 "OSPF link state update packet."; 1591 } 1592 enum Link-State-Ack { 1593 value "5"; 1594 description 1595 "OSPF link state acknowlegement packet."; 1596 } 1597 } 1598 description 1599 "OSPF packet type."; 1600 } 1602 typedef nssa-translator-state-type { 1603 type enumeration { 1604 enum Enabled { 1605 value "1"; 1606 description 1607 "NSSA translator enabled state."; 1608 } 1609 enum Elected { 1610 description 1611 "NSSA translator elected state."; 1612 } 1613 enum Disabled { 1614 value "3"; 1615 description 1616 "NSSA translator disabled state."; 1617 } 1618 } 1619 description 1620 "OSPF NSSA translator state type."; 1621 } 1623 typedef restart-status-type { 1624 type enumeration { 1625 enum Not-Restarting { 1626 value "1"; 1627 description 1628 "Router is not restarting."; 1629 } 1630 enum Planned-Restart { 1631 description 1632 "Router is going through planned restart."; 1633 } 1634 enum Unplanned-Restart { 1635 value "3"; 1636 description 1637 "Router is going through unplanned restart."; 1638 } 1639 } 1640 description 1641 "OSPF graceful restart status type."; 1642 } 1644 typedef checksum16-type { 1645 type string { 1646 pattern '(0x)?[0-9a-fA-F]{4}'; 1647 } 1648 description 1649 "16-bit checksum in hex-string format 0xXXXX."; 1650 } 1652 grouping tlv { 1653 description 1654 "TLV"; 1655 leaf type { 1656 type uint16; 1657 description "TLV type."; 1658 } 1659 leaf length { 1660 type uint16; 1661 description "TLV length."; 1662 } 1663 leaf value { 1664 type yang:hex-string; 1665 description "TLV value."; 1666 } 1667 } 1669 grouping unknown-tlvs { 1670 description 1671 "Unknown TLVs grouping - Used for unknown TLVs or 1672 unknown sub-TLVs."; 1673 container unknown-tlvs { 1674 description "All unknown TLVs."; 1675 list unknown-tlv { 1676 description "Unknown TLV."; 1677 uses tlv; 1678 } 1679 } 1680 } 1682 grouping node-tag-tlv { 1683 description "OSPF Node Admin Tag TLV grouping."; 1684 list node-tag { 1685 leaf tag { 1686 type uint32; 1687 description 1688 "Node tag value."; 1689 } 1690 description 1691 "List of tags."; 1692 } 1693 } 1695 grouping ospfv2-router-link { 1696 description "OSPFv2 router link."; 1697 leaf link-id { 1698 type union { 1699 type inet:ipv4-address; 1700 type yang:dotted-quad; 1701 } 1702 description "Link ID."; 1703 } 1704 leaf link-data { 1705 type union { 1706 type inet:ipv4-address; 1707 type uint32; 1708 } 1709 description "Link data."; 1710 } 1711 leaf type { 1712 type uint8; 1713 description "Link type."; 1714 } 1715 } 1717 grouping ospfv2-lsa-body { 1718 description "OSPFv2 LSA body."; 1719 container router { 1720 when "../../header/type = 1" { 1721 description 1722 "Only applies to Router LSAs."; 1723 } 1724 description 1725 "Router LSA."; 1726 leaf flags { 1727 type bits { 1728 bit V { 1729 description 1730 "When set, the router is an endpoint of one or 1731 more virtual links."; 1732 } 1733 bit E { 1734 description 1735 "When set, the router is an AS Boundary Router 1736 (ASBR)."; 1737 } 1738 bit B { 1739 description 1740 "When set, the router is an Area Border 1741 Router (ABR)."; 1742 } 1743 bit Nt { 1744 description 1745 "When set, the router is an NSSA border router 1746 that is unconditionally translating NSSA LSAs 1747 into AS-external LSAs."; 1748 } 1749 } 1750 description "Flags."; 1751 } 1752 leaf num-of-links { 1753 type uint16; 1754 description "Number of links."; 1755 } 1756 container links { 1757 description "All router Links."; 1758 list link { 1759 description "Router LSA link."; 1760 uses ospfv2-router-link; 1761 container topologies { 1762 description "All topologies for the link."; 1763 list topology { 1764 description 1765 "Topology specific information."; 1766 leaf mt-id { 1767 type uint8; 1768 description 1769 "The MT-ID for the topology enabled on 1770 the link."; 1771 } 1772 leaf metric { 1773 type uint16; 1774 description "Metric for the topology."; 1775 } 1776 } 1777 } 1778 } 1780 } 1781 } 1782 container network { 1783 when "../../header/type = 2" { 1784 description 1785 "Only applies to Network LSAs."; 1786 } 1787 description 1788 "Network LSA."; 1789 leaf network-mask { 1790 type inet:ipv4-address; 1791 description 1792 "The IP address mask for the network."; 1793 } 1794 container attached-routers { 1795 description "All attached routers."; 1796 leaf-list attached-router { 1797 type yang:dotted-quad; 1798 description 1799 "List of the routers attached to the network."; 1800 } 1801 } 1802 } 1803 container summary { 1804 when "../../header/type = 3 or " 1805 + "../../header/type = 4" { 1806 description 1807 "Only applies to Summary LSAs."; 1808 } 1809 description 1810 "Summary LSA."; 1811 leaf network-mask { 1812 type inet:ipv4-address; 1813 description 1814 "The IP address mask for the network"; 1815 } 1816 container topologies { 1817 description "All topologies for the summary LSA."; 1818 list topology { 1819 description 1820 "Topology specific information."; 1821 leaf mt-id { 1822 type uint8; 1823 description 1824 "The MT-ID for the topology enabled for 1825 the summary."; 1826 } 1827 leaf metric { 1828 type uint24; 1829 description "Metric for the topology."; 1830 } 1831 } 1832 } 1833 } 1834 container external { 1835 when "../../header/type = 5 or " 1836 + "../../header/type = 7" { 1837 description 1838 "Only applies to AS-external LSAs and NSSA LSAs."; 1839 } 1840 description 1841 "External LSA."; 1842 leaf network-mask { 1843 type inet:ipv4-address; 1844 description 1845 "The IP address mask for the network"; 1846 } 1847 container topologies { 1848 description "All topologies for the external."; 1849 list topology { 1850 description 1851 "Topology specific information."; 1852 leaf mt-id { 1853 type uint8; 1854 description 1855 "The MT-ID for the topology enabled for the 1856 external or NSSA prefix."; 1857 } 1858 leaf flags { 1859 type bits { 1860 bit E { 1861 description 1862 "When set, the metric specified is a Type 2 1863 external metric."; 1864 } 1865 } 1866 description "Flags."; 1867 } 1868 leaf metric { 1869 type uint24; 1870 description "Metric for the topology."; 1871 } 1872 leaf forwarding-address { 1873 type inet:ipv4-address; 1874 description 1875 "Forwarding address."; 1877 } 1878 leaf external-route-tag { 1879 type uint32; 1880 description 1881 "Route tag for the topology."; 1882 } 1883 } 1884 } 1885 } 1886 container opaque { 1887 when "../../header/type = 9 or " 1888 + "../../header/type = 10 or " 1889 + "../../header/type = 11" { 1890 description 1891 "Only applies to Opaque LSAs."; 1892 } 1893 description 1894 "Opaque LSA."; 1896 uses unknown-tlvs; 1898 container node-tag-tlvs { 1899 description 1900 "All node tag tlvs."; 1901 list node-tag-tlv { 1902 description 1903 "Node tag tlv."; 1904 uses node-tag-tlv; 1905 } 1906 } 1908 container router-address-tlv { 1909 description 1910 "Router address TLV."; 1911 leaf router-address { 1912 type inet:ipv4-address; 1913 description 1914 "Router address."; 1915 } 1916 } 1918 container link-tlvs { 1919 description "All link TLVs in the LSA."; 1920 list link-tlv { 1921 description "Link TLV."; 1922 leaf link-type { 1923 type uint8; 1924 mandatory true; 1925 description "Link type."; 1926 } 1927 leaf link-id { 1928 type union { 1929 type inet:ipv4-address; 1930 type yang:dotted-quad; 1931 } 1932 mandatory true; 1933 description "Link ID."; 1934 } 1935 container local-if-ipv4-addrs { 1936 description "All local interface IPv4 addresses."; 1937 leaf-list local-if-ipv4-addr { 1938 type inet:ipv4-address; 1939 description 1940 "List of local interface IPv4 addresses."; 1941 } 1942 } 1943 container remote-if-ipv4-addrs { 1944 description "All remote interface IPv4 addresses."; 1945 leaf-list remote-if-ipv4-addr { 1946 type inet:ipv4-address; 1947 description 1948 "List of remote interface IPv4 addresses."; 1949 } 1950 } 1951 leaf te-metric { 1952 type uint32; 1953 description "TE metric."; 1954 } 1955 leaf max-bandwidth { 1956 type rt-types:bandwidth-ieee-float32; 1957 description "Maximum bandwidth."; 1958 } 1959 leaf max-reservable-bandwidth { 1960 type rt-types:bandwidth-ieee-float32; 1961 description "Maximum reservable bandwidth."; 1962 } 1963 container unreserved-bandwidths { 1964 description "All unreserved bandwidths."; 1965 list unreserved-bandwidth { 1966 leaf priority { 1967 type uint8 { 1968 range "0 .. 7"; 1969 } 1970 description "Priority from 0 to 7."; 1971 } 1972 leaf unreserved-bandwidth { 1973 type rt-types:bandwidth-ieee-float32; 1974 description "Unreserved bandwidth."; 1975 } 1976 description 1977 "List of unreserved bandwidths for different 1978 priorities."; 1979 } 1980 } 1981 leaf admin-group { 1982 type uint32; 1983 description 1984 "Administrative group/Resource Class/Color."; 1985 } 1986 uses unknown-tlvs; 1987 } 1988 } 1990 container extended-prefix-tlvs { 1991 description "All extended prefix TLVs in the LSA."; 1992 list extended-prefix-tlv { 1993 description "Extended prefix TLV."; 1994 leaf route-type { 1995 type enumeration { 1996 enum unspecified { 1997 value "0"; 1998 description "Unspecified."; 1999 } 2000 enum intra-area { 2001 value "1"; 2002 description "OSPF intra-area route."; 2003 } 2004 enum inter-area { 2005 value "3"; 2006 description "OSPF inter-area route."; 2007 } 2008 enum external { 2009 value "5"; 2010 description "OSPF External route."; 2011 } 2012 enum nssa { 2013 value "7"; 2014 description "OSPF NSSA external route."; 2015 } 2016 } 2017 description "Route type."; 2018 } 2019 leaf flags { 2020 type bits { 2021 bit A { 2022 description 2023 "Attach flag."; 2024 } 2025 bit N { 2026 description 2027 "Node flag."; 2028 } 2029 } 2030 description "Flags."; 2031 } 2032 leaf prefix { 2033 type inet:ip-prefix; 2034 description "Address prefix."; 2035 } 2036 uses unknown-tlvs; 2037 } 2038 } 2040 container extended-link-tlvs { 2041 description "All extended link TLVs in the LSA."; 2042 list extended-link-tlv { 2043 description "Extended link TLV."; 2044 uses ospfv2-router-link; 2045 uses unknown-tlvs; 2046 } 2047 } 2048 } 2049 } 2051 grouping ospfv3-lsa-options { 2052 description "OSPFv3 LSA options"; 2053 leaf options { 2054 type bits { 2055 bit AF { 2056 description 2057 "When set, the router supprts OSPFv3 AFs as in RFC5838."; 2058 } 2059 bit DC { 2060 description 2061 "When set, the router supports demand circuits."; 2062 } 2063 bit R { 2064 description 2065 "When set, the originator is an active router."; 2066 } 2067 bit N { 2068 description 2069 "If set, the router is attached to an NSSA"; 2070 } 2071 bit E { 2072 description 2073 "This bit describes the way AS-external LSAs 2074 are flooded"; 2075 } 2076 bit V6 { 2077 description 2078 "If clear, the router/link should be excluded 2079 from IPv6 routing calculaton"; 2080 } 2081 } 2082 mandatory true; 2083 description "OSPFv3 LSA options."; 2084 } 2085 } 2087 grouping ospfv3-lsa-prefix { 2088 description 2089 "OSPFv3 LSA prefix."; 2091 leaf prefix { 2092 type inet:ip-prefix; 2093 description 2094 "Prefix."; 2095 } 2096 leaf prefix-options { 2097 type bits { 2098 bit NU { 2099 description 2100 "When set, the prefix should be excluded 2101 from IPv6 unicast calculations."; 2102 } 2103 bit LA { 2104 description 2105 "When set, the prefix is actually an IPv6 interface 2106 address of the Advertising Router."; 2107 } 2108 bit P { 2109 description 2110 "When set, the NSSA area prefix should be 2111 translated to an AS External LSA and readvertised 2112 by the translating NSSA Border Router."; 2113 } 2114 bit DN { 2115 description 2116 "When set, the inter-area-prefix LSA or 2117 AS-external LSA prefix has been advertised as an 2118 L3VPN prefix."; 2119 } 2120 } 2121 mandatory true; 2122 description "Prefix options."; 2123 } 2124 } 2126 grouping ospfv3-lsa-external { 2127 description 2128 "AS-External and NSSA LSA."; 2129 leaf metric { 2130 type uint24; 2131 description "Metric"; 2132 } 2134 leaf flags { 2135 type bits { 2136 bit E { 2137 description 2138 "When set, the metric specified is a Type 2 2139 external metric."; 2140 } 2141 bit F { 2142 description 2143 "When set, a Forwarding Address is included 2144 in the LSA."; 2145 } 2146 bit T { 2147 description 2148 "When set, an External Route Tag is included 2149 in the LSA."; 2150 } 2151 } 2152 description "Flags."; 2153 } 2155 leaf referenced-ls-type { 2156 type uint16; 2157 description "Referenced Link State type."; 2158 } 2160 uses ospfv3-lsa-prefix; 2162 leaf forwarding-address { 2163 type inet:ipv6-address; 2164 description 2165 "Forwarding address."; 2166 } 2168 leaf external-route-tag { 2169 type uint32; 2170 description 2171 "Route tag."; 2172 } 2173 leaf referenced-link-state-id { 2174 type uint32; 2175 description 2176 "Referenced Link State ID."; 2177 } 2178 } 2180 grouping ospfv3-lsa-body { 2181 description "OSPFv3 LSA body."; 2182 container router { 2183 when "../../header/type = 8193" { // 0x2001 2184 description 2185 "Only applies to Router LSAs."; 2186 } 2187 description "Router LSA."; 2188 leaf flags { 2189 type bits { 2190 bit V { 2191 description 2192 "When set, the router is an endpoint of one or 2193 more virtual links."; 2194 } 2195 bit E { 2196 description 2197 "When set, the router is an AS Boundary Router 2198 (ASBR)."; 2199 } 2200 bit B { 2201 description 2202 "When set, the router is an Area Border 2203 Router (ABR)."; 2204 } 2205 bit Nt { 2206 description 2207 "When set, the router is an NSSA border router 2208 that is unconditionally translating NSSA LSAs 2209 into AS-external LSAs."; 2210 } 2211 } 2212 mandatory true; 2213 description "Router LSA flags."; 2214 } 2216 uses ospfv3-lsa-options; 2218 container links { 2219 description "All router link."; 2220 list link { 2221 description "Router LSA link."; 2222 leaf interface-id { 2223 type uint32; 2224 description "Interface ID."; 2225 } 2226 leaf neighbor-interface-id { 2227 type uint32; 2228 description "Neighbor Interface ID."; 2229 } 2230 leaf neighbor-router-id { 2231 type rt-types:router-id; 2232 description "Neighbor Router ID."; 2233 } 2234 leaf type { 2235 type uint8; 2236 description "Link type."; 2237 } 2238 leaf metric { 2239 type uint16; 2240 description "Metric."; 2241 } 2242 } 2243 } 2244 } 2245 container network { 2246 when "../../header/type = 8194" { // 0x2002 2247 description 2248 "Only applies to Network LSA."; 2249 } 2250 description "Network LSA."; 2252 uses ospfv3-lsa-options; 2254 container attached-routers { 2255 description "All attached routers."; 2256 leaf-list attached-router { 2257 type yang:dotted-quad; 2258 description 2259 "List of the routers attached to the network."; 2260 } 2262 } 2263 } 2264 container inter-area-prefix { 2265 when "../../header/type = 8195" { // 0x2003 2266 description 2267 "Only applies to Inter-Area-Prefix LSAs."; 2268 } 2269 leaf metric { 2270 type uint24; 2271 description "Metric"; 2272 } 2273 uses ospfv3-lsa-prefix; 2274 description "Inter-Area-Prefix LSA."; 2275 } 2276 container inter-area-router { 2277 when "../../header/type = 8196" { // 0x2004 2278 description 2279 "Only applies to Inter-Area-Router LSAs."; 2280 } 2281 uses ospfv3-lsa-options; 2282 leaf metric { 2283 type uint24; 2284 description "Metric."; 2285 } 2286 leaf destination-router-id { 2287 type rt-types:router-id; 2288 description 2289 "The Router ID of the router being described by the LSA."; 2290 } 2291 description "Inter-Area-Router LSA."; 2292 } 2293 container as-external { 2294 when "../../header/type = 16389" { // 0x4005 2295 description 2296 "Only applies to AS-external LSAs."; 2297 } 2299 uses ospfv3-lsa-external; 2301 description "AS-External LSA."; 2302 } 2303 container nssa { 2304 when "../../header/type = 8199" { // 0x2007 2305 description 2306 "Only applies to NSSA LSAs."; 2307 } 2308 uses ospfv3-lsa-external; 2309 description "NSSA LSA."; 2310 } 2311 container link { 2312 when "../../header/type = 8" { // 0x0008 2313 description 2314 "Only applies to Link LSAs."; 2315 } 2316 leaf rtr-priority { 2317 type uint8; 2318 description "Router Priority for the interface."; 2319 } 2320 uses ospfv3-lsa-options; 2322 leaf link-local-interface-address { 2323 type inet:ipv6-address; 2324 description 2325 "The originating router's link-local 2326 interface address for the link."; 2327 } 2329 leaf num-of-prefixes { 2330 type uint32; 2331 description "Number of prefixes."; 2332 } 2334 container prefixes { 2335 description "All prefixes for the link."; 2336 list prefix { 2337 description 2338 "List of prefixes associated with the link."; 2339 uses ospfv3-lsa-prefix; 2340 } 2341 } 2342 description "Link LSA."; 2343 } 2344 container intra-area-prefix { 2345 when "../../header/type = 8201" { // 0x2009 2346 description 2347 "Only applies to Intra-Area-Prefix LSA."; 2348 } 2349 description "Intra-Area-Prefix LSA."; 2351 leaf referenced-ls-type { 2352 type uint16; 2353 description "Referenced Link State type."; 2354 } 2355 leaf referenced-link-state-id { 2356 type uint32; 2357 description 2358 "Referenced Link State ID."; 2359 } 2360 leaf referenced-adv-router { 2361 type inet:ipv4-address; 2362 description 2363 "Referenced Advertising Router."; 2364 } 2366 leaf num-of-prefixes { 2367 type uint16; 2368 description "Number of prefixes."; 2369 } 2370 container prefixes { 2371 description "All prefixes in this LSA."; 2372 list prefix { 2373 description "List of prefixes in this LSA."; 2374 uses ospfv3-lsa-prefix; 2375 leaf metric { 2376 type uint24; 2377 description "Prefix Metric."; 2378 } 2379 } 2380 } 2381 } 2382 container router-information { 2383 when "../../header/type = 32780 or " // 0x800C 2384 + "../../header/type = 40972 or " // 0xA00C 2385 + "../../header/type = 49164 or " // 0xC00C 2386 + "../../header/type = 57356" { // 0xE00C 2387 description 2388 "Only applies to Router Information LSAs (RFC7770)."; 2389 } 2390 container node-tag-tlvs { 2391 description 2392 "All node tag tlvs."; 2393 list node-tag-tlv { 2394 description 2395 "Node tag tlv."; 2396 uses node-tag-tlv; 2397 } 2398 } 2399 description "Router Information LSA."; 2400 } 2401 } 2403 grouping lsa-header { 2404 description 2405 "Common LSA for OSPFv2 and OSPFv3"; 2406 leaf age { 2407 type uint16; 2408 mandatory true; 2409 description "LSA age."; 2410 } 2411 leaf type { 2412 type uint16; 2413 mandatory true; 2414 description "LSA type."; 2415 } 2416 leaf adv-router { 2417 type yang:dotted-quad; 2418 mandatory true; 2419 description "LSA advertising router."; 2420 } 2421 leaf seq-num { 2422 type uint32; 2423 mandatory true; 2424 description "LSA sequence number."; 2425 } 2426 leaf checksum { 2427 type checksum16-type; 2428 mandatory true; 2429 description "LSA checksum."; 2430 } 2431 leaf length { 2432 type uint16; 2433 mandatory true; 2434 description "LSA length."; 2435 } 2436 } 2438 grouping ospfv2-lsa { 2439 description 2440 "OSPFv2 LSA."; 2441 container header { 2442 must "(type = 9 or type = 10 or type = 11) and " 2443 + "opaque-id and opaque-type " 2444 + "or (type != 9 and type != 10 and type != 11) " 2445 + "and not(opaque-id) and " 2446 + "not(opaque-type)" { 2447 description 2448 "Opaque type and ID only apply to Opaque LSAs."; 2449 } 2450 description 2451 "Decoded OSPFv2 LSA header data."; 2452 leaf option { 2453 type bits { 2454 bit MT { 2455 description 2456 "When set, the router supports multi-topology as 2457 in RFC 4915."; 2458 } 2459 bit DC { 2460 description 2461 "When set, the router supports demand circuits."; 2462 } 2463 bit P { 2464 description 2465 "Only used in type-7 LSA. When set, an NSSA 2466 border router should translate the type-7 LSA 2467 to a type-5 LSA."; 2468 } 2469 bit MC { 2470 description 2471 "When set, the router supports MOSPF."; 2472 } 2473 bit E { 2474 description 2475 "This bit describes the way AS-external LSAs 2476 are flooded."; 2477 } 2478 bit O { 2479 description 2480 "When set, the router is opaque-capable as in 2481 RFC 5250."; 2482 } 2483 bit DN { 2484 description 2485 "When a type 3, 5 or 7 LSA is sent from a PE to a CE, 2486 the DN bit must be set. See RFC 4576."; 2487 } 2488 } 2489 mandatory true; 2490 description "LSA options."; 2491 } 2492 leaf lsa-id { 2493 type yang:dotted-quad; 2494 mandatory true; 2495 description "LSA ID."; 2496 } 2498 leaf opaque-type { 2499 type uint8; 2500 description "Opaque type."; 2502 } 2504 leaf opaque-id { 2505 type uint24; 2506 description "Opaque ID."; 2507 } 2509 uses lsa-header; 2510 } 2511 container body { 2512 description 2513 "Decoded OSPFv2 LSA body data."; 2514 uses ospfv2-lsa-body; 2515 } 2516 } 2518 grouping ospfv3-lsa { 2519 description 2520 "Decoded OSPFv3 LSA."; 2521 container header { 2522 description 2523 "Decoded OSPFv3 LSA header data."; 2524 leaf lsa-id { 2525 type uint32; 2526 mandatory true; 2527 description "LSA ID."; 2528 } 2529 uses lsa-header; 2530 } 2531 container body { 2532 description 2533 "Decoded OSPF LSA body data."; 2534 uses ospfv3-lsa-body; 2535 } 2536 } 2537 grouping lsa-common { 2538 description 2539 "Common field for OSPF LSA represenation."; 2540 leaf decoded-completed { 2541 type boolean; 2542 description 2543 "The OSPF LSA body is fully decoded."; 2544 } 2545 leaf raw-data { 2546 type yang:hex-string; 2547 description 2548 "The complete LSA in network byte 2549 order hexadecimal as received or originated."; 2551 } 2552 } 2554 grouping lsa { 2555 description 2556 "OSPF LSA."; 2557 uses lsa-common; 2558 choice version { 2559 description 2560 "OSPFv2 or OSPFv3 LSA body."; 2561 container ospfv2 { 2562 description "OSPFv2 LSA"; 2563 uses ospfv2-lsa; 2564 } 2565 container ospfv3 { 2566 description "OSPFv3 LSA"; 2567 uses ospfv3-lsa; 2568 } 2569 } 2570 } 2572 grouping lsa-key { 2573 description 2574 "OSPF LSA key."; 2575 leaf lsa-id { 2576 type union { 2577 type yang:dotted-quad; 2578 type uint32; 2579 } 2580 description 2581 "LSA ID."; 2582 } 2583 leaf adv-router { 2584 type inet:ipv4-address; 2585 description 2586 "Advertising router."; 2587 } 2588 } 2590 grouping instance-stat { 2591 description "Per-instance statistics"; 2592 leaf originate-new-lsa-count { 2593 type yang:counter32; 2594 description "The number of new LSAs originated."; 2595 } 2596 leaf rx-new-lsas-count { 2597 type yang:counter32; 2598 description "The number of LSAs received."; 2600 } 2601 leaf as-scope-lsa-count { 2602 type yang:gauge32; 2603 description "The number of AS Scope LSAs."; 2604 } 2605 leaf as-scope-lsa-chksum-sum { 2606 type uint32; 2607 description 2608 "The sum of the LSA checksums for AS Scope LSAs."; 2609 } 2610 container database { 2611 description "Container for per AS-scope LSA statistics."; 2612 list as-scope-lsa-type { 2613 description "List of AS-scope LSA statistics"; 2614 leaf lsa-type { 2615 type uint16; 2616 description "AS-scope LSA type."; 2617 } 2618 leaf lsa-count { 2619 type yang:gauge32; 2620 description "The number of LSAs of the LSA type."; 2621 } 2622 leaf lsa-cksum-sum { 2623 type int32; 2624 description 2625 "The sum of the LSA checksums of the LSA type."; 2626 } 2627 } 2628 } 2629 } 2631 grouping area-stat { 2632 description "Per-area statistics."; 2633 leaf spf-runs-count { 2634 type yang:counter32; 2635 description 2636 "The number of times the intra-area SPF has run."; 2637 } 2638 leaf abr-count { 2639 type yang:gauge32; 2640 description 2641 "The total number of Area Border Routers (ABRs) 2642 reachable within this area."; 2643 } 2644 leaf asbr-count { 2645 type yang:gauge32; 2646 description 2647 "The total number of AS Border Routers (ASBRs)."; 2649 } 2650 leaf ar-nssa-translator-event-count { 2651 type yang:counter32; 2652 description 2653 "The number of NSSA translator-state changes."; 2654 } 2655 leaf area-scope-lsa-count { 2656 type yang:gauge32; 2657 description 2658 "The number of area scope LSAs in the area."; 2659 } 2660 leaf area-scope-lsa-cksum-sum { 2661 type int32; 2662 description "The sum of the area scope LSAs checksums."; 2663 } 2664 container database { 2665 description "Container for area scope LSA type statistics."; 2666 list area-scope-lsa-type { 2667 description "List of area scope LSA statistics"; 2668 leaf lsa-type { 2669 type uint16; 2670 description "Area scope LSA type."; 2671 } 2672 leaf lsa-count { 2673 type yang:gauge32; 2674 description "The number of LSAs of the LSA type."; 2675 } 2676 leaf lsa-cksum-sum { 2677 type int32; 2678 description 2679 "The sum of the LSA checksums of the LSA type."; 2680 } 2681 } 2682 } 2683 } 2685 grouping interface-stat { 2686 description "Per-interface statistics"; 2687 leaf if-event-count { 2688 type yang:counter32; 2689 description 2690 "The number of times this interface has changed its 2691 state or an error has occurred."; 2692 } 2693 leaf link-scope-lsa-count { 2694 type yang:gauge32; 2695 description "The number of link scope LSAs."; 2696 } 2697 leaf link-scope-lsa-cksum-sum { 2698 type uint32; 2699 description "The sum of link scope LSA checksums."; 2700 } 2701 container database { 2702 description "Container for link scope LSA type statistics."; 2703 list link-scope-lsa-type { 2704 description "List of link scope LSA statistics"; 2705 leaf lsa-type { 2706 type uint16; 2707 description "Link scope LSA type."; 2708 } 2709 leaf lsa-count { 2710 type yang:gauge32; 2711 description "The number of LSAs of the LSA type."; 2712 } 2713 leaf lsa-cksum-sum { 2714 type int32; 2715 description 2716 "The sum of the LSA checksums of the LSA type."; 2717 } 2718 } 2719 } 2720 } 2722 grouping neighbor-stat { 2723 description "Per-neighbor statistics."; 2724 leaf nbr-event-count { 2725 type yang:counter32; 2726 description 2727 "The number of times this neighbor has changed 2728 state or an error has occurred."; 2729 } 2730 leaf nbr-retrans-qlen { 2731 type yang:gauge32; 2732 description 2733 "The current length of the retransmission queue."; 2734 } 2735 } 2737 grouping instance-fast-reroute-config { 2738 description 2739 "This group defines global configuration of IP-FRR."; 2740 container fast-reroute { 2741 if-feature fast-reroute; 2742 description 2743 "This container may be augmented with global 2744 parameters for IP-FRR."; 2746 container lfa { 2747 if-feature lfa; 2748 description 2749 "This container may be augmented with 2750 global parameters for LFA. Container creation 2751 has no effect on LFA activation."; 2752 } 2753 } 2754 } 2756 grouping interface-fast-reroute-config { 2757 description 2758 "This group defines interface configuration of IP-FRR."; 2759 container fast-reroute { 2760 if-feature fast-reroute; 2761 container lfa { 2762 if-feature lfa; 2763 leaf candidate-enable { 2764 type boolean; 2765 default true; 2766 description 2767 "Enable the interface to be used as backup."; 2768 } 2769 leaf enable { 2770 type boolean; 2771 default false; 2772 description 2773 "Activates LFA - Per-prefix LFA computation 2774 is assumed."; 2775 } 2776 container remote-lfa { 2777 if-feature remote-lfa; 2778 leaf enable { 2779 type boolean; 2780 default false; 2781 description 2782 "Activates Remote LFA (R-LFA)."; 2783 } 2784 description 2785 "Remote LFA configuration."; 2786 } 2787 description 2788 "LFA configuration."; 2789 } 2790 description 2791 "IP Fast-reroute configuration."; 2792 } 2793 } 2794 grouping interface-physical-link-config { 2795 description 2796 "Interface cost configuration that only applies to 2797 physical interfaces and sham links."; 2798 leaf cost { 2799 type uint16 { 2800 range "1..65535"; 2801 } 2802 description 2803 "Interface cost."; 2804 } 2805 leaf mtu-ignore { 2806 if-feature mtu-ignore; 2807 type boolean; 2808 description 2809 "Enable/Disable bypassing the MTU mismatch check in 2810 Database Description packets."; 2811 } 2812 leaf prefix-suppression { 2813 if-feature prefix-suppression; 2814 type boolean; 2815 description 2816 "Suppress advertisement of the prefixes associated 2817 with the interface."; 2818 } 2819 } 2821 grouping interface-common-config { 2822 description 2823 "Common configuration for all types of interfaces, 2824 including virtual links and sham links."; 2826 leaf hello-interval { 2827 type uint16 { 2828 range "1..65535"; 2829 } 2830 units seconds; 2831 description 2832 "Interval between hello packets in seconds."; 2833 } 2835 leaf dead-interval { 2836 type uint32 { 2837 range "1..2147483647"; 2838 } 2839 units seconds; 2840 must "../dead-interval > ../hello-interval" { 2841 error-message "The dead interval must be " 2842 + "larger than the hello interval"; 2843 description 2844 "The value MUST be greater than 'hello-internval'."; 2845 } 2846 description 2847 "Interval after which a neighbor is 2848 declared down in seconds."; 2849 } 2851 leaf retransmit-interval { 2852 type uint16 { 2853 range "1..3600"; 2854 } 2855 units seconds; 2856 description 2857 "Interval between retransmitting unacknowledged Link 2858 State Advertisements (LSAs) in seconds."; 2859 } 2861 leaf transmit-delay { 2862 type uint16 { 2863 range "1..3600"; 2864 } 2865 units seconds; 2866 description 2867 "Estimated time needed to transmit Link State Update 2868 packets on the interface in seconds."; 2869 } 2871 leaf lls { 2872 if-feature lls; 2873 type boolean; 2874 description 2875 "Enable/Disable link-local signaling (LLS) support."; 2876 } 2878 container ttl-security { 2879 if-feature ttl-security; 2880 description "TTL security check."; 2881 leaf enable { 2882 type boolean; 2883 description 2884 "Enable/Disable TTL security check."; 2885 } 2886 leaf hops { 2887 type uint8 { 2888 range "1..254"; 2889 } 2890 description 2891 "Maximum number of hops that an OSPF packet may 2892 have traversed before reception."; 2893 } 2894 } 2895 leaf enable { 2896 if-feature admin-control; 2897 type boolean; 2898 default true; 2899 description 2900 "Enable/disable protocol on the interface."; 2901 } 2903 container authentication { 2904 description "Authentication configuration."; 2905 choice auth-type-selection { 2906 description 2907 "Options for expressing authentication setting."; 2908 case auth-ipsec { 2909 when "../../../../../../../rt:type = 'ospf:ospfv3'" { 2910 description "Applied to OSPFv3 only."; 2911 } 2912 if-feature ospfv3-authentication-ipsec; 2913 leaf sa { 2914 type string; 2915 description 2916 "Security Association name."; 2917 } 2918 } 2919 case auth-trailer-key-chain { 2920 leaf key-chain { 2921 type key-chain:key-chain-ref; 2922 description 2923 "key-chain name."; 2924 } 2925 } 2926 case auth-trailer-key { 2927 leaf key { 2928 type string; 2929 description 2930 "Key string in ASCII format."; 2931 } 2932 leaf crypto-algorithm { 2933 type identityref { 2934 base key-chain:crypto-algorithm; 2935 } 2936 description 2937 "Cryptographic algorithm associated with key."; 2939 } 2940 } 2941 } 2942 } 2943 } // interface-common-config 2945 grouping interface-config { 2946 description "Configuration for real interfaces."; 2948 leaf interface-type { 2949 type enumeration { 2950 enum "broadcast" { 2951 description 2952 "Specify OSPF broadcast multi-access network."; 2953 } 2954 enum "non-broadcast" { 2955 description 2956 "Specify OSPF Non-Broadcast Multi-Access 2957 (NBMA) network."; 2958 } 2959 enum "point-to-multipoint" { 2960 description 2961 "Specify OSPF point-to-multipoint network."; 2962 } 2963 enum "point-to-point" { 2964 description 2965 "Specify OSPF point-to-point network."; 2966 } 2967 } 2968 description 2969 "Interface type."; 2970 } 2972 leaf passive { 2973 type boolean; 2974 description 2975 "Enable/Disable passive interface - a passive interface's 2976 prefix will be advertised but no neighbor adjacencies 2977 will be formed on the interface."; 2978 } 2980 leaf demand-circuit { 2981 if-feature demand-circuit; 2982 type boolean; 2983 description 2984 "Enable/Disable demand circuit."; 2985 } 2986 leaf priority { 2987 type uint8; 2988 description 2989 "Configure OSPF router priority."; 2990 } 2992 container multi-areas { 2993 if-feature multi-area-adj; 2994 description "Container for multi-area config."; 2995 list multi-area { 2996 key multi-area-id; 2997 description 2998 "Configure OSPF multi-area adjacency."; 2999 leaf multi-area-id { 3000 type area-id-type; 3001 description 3002 "Multi-area adjacency area ID."; 3003 } 3004 leaf cost { 3005 type uint16; 3006 description 3007 "Interface cost for multi-area adjacency."; 3008 } 3009 } 3010 } 3012 container static-neighbors { 3013 description "Statically configured neighbors."; 3015 list neighbor { 3016 key "identifier"; 3017 description 3018 "Specify a static OSPF neighbor."; 3020 leaf identifier { 3021 type inet:ip-address; 3022 description 3023 "Neighbor router ID, IPv4 address, or IPv6 address."; 3024 } 3026 leaf cost { 3027 type uint16 { 3028 range "1..65535"; 3029 } 3030 description "Neighbor cost."; 3031 } 3032 leaf poll-interval { 3033 type uint16 { 3034 range "1..65535"; 3035 } 3036 units seconds; 3037 description "Neighbor poll interval in seconds."; 3038 } 3039 leaf priority { 3040 type uint8 { 3041 range "1..255"; 3042 } 3043 description "Neighbor priority for DR election."; 3044 } 3045 } 3046 } 3048 leaf node-flag { 3049 if-feature node-flag; 3050 type boolean; 3051 default false; 3052 description 3053 "Set prefix as a node representative prefix."; 3054 } 3056 container bfd { 3057 if-feature bfd; 3058 description "BFD configuration."; 3059 leaf enable { 3060 type boolean; 3061 default false; 3062 description 3063 "True if BFD is enabled for the OSPF interface."; 3064 } 3065 } 3067 uses interface-fast-reroute-config; 3068 uses interface-common-config; 3069 uses interface-physical-link-config; 3070 } // grouping interface-config 3072 grouping neighbor-state { 3073 description 3074 "OSPF neighbor operational state."; 3076 leaf address { 3077 type inet:ip-address; 3078 config false; 3079 description 3080 "Neighbor address."; 3081 } 3082 leaf dr-router-id { 3083 type rt-types:router-id; 3084 config false; 3085 description "Neighbor's Designated Router (DR) router ID."; 3086 } 3088 leaf dr-ip-addr { 3089 type inet:ip-address; 3090 config false; 3091 description "Neighbor's Designated Router (DR) IP address."; 3092 } 3094 leaf bdr-router-id { 3095 type rt-types:router-id; 3096 config false; 3097 description 3098 "Neighbor's Backup Designated Router (BDR) router ID."; 3099 } 3101 leaf bdr-ip-addr { 3102 type inet:ip-address; 3103 config false; 3104 description 3105 "Neighbor's Backup Designated Router (BDR) IP Address."; 3106 } 3107 leaf state { 3108 type nbr-state-type; 3109 config false; 3110 description 3111 "OSPF neighbor state."; 3112 } 3113 leaf dead-timer { 3114 type uint32; 3115 units "seconds"; 3116 config false; 3117 description "This timer tracks the remaining time before 3118 the neighbor is declared dead."; 3119 } 3120 container statistics { 3121 config false; 3122 description "Per neighbor statistics"; 3123 uses neighbor-stat; 3124 } 3125 } 3127 grouping interface-common-state { 3128 description 3129 "OSPF interface common operational state."; 3131 reference "RFC2328 Section 9"; 3133 leaf state { 3134 type if-state-type; 3135 config false; 3136 description "Interface state."; 3137 } 3139 leaf hello-timer { 3140 type uint32; 3141 units "seconds"; 3142 config false; 3143 description "This timer tracks the remaining time before 3144 the next hello packet is sent."; 3145 } 3147 leaf wait-timer { 3148 type uint32; 3149 units "seconds"; 3150 config false; 3151 description "This timer tracks the remaining time before 3152 the interface exits the Waiting state."; 3153 } 3155 leaf dr-router-id { 3156 type rt-types:router-id; 3157 config false; 3158 description "Designated Router (DR) router ID."; 3159 } 3161 leaf dr-ip-addr { 3162 type inet:ip-address; 3163 config false; 3164 description "Designated Router (DR) IP address."; 3165 } 3167 leaf bdr-router-id { 3168 type rt-types:router-id; 3169 config false; 3170 description "Backup Designated Router (BDR) router ID."; 3171 } 3173 leaf bdr-ip-addr { 3174 type inet:ip-address; 3175 config false; 3176 description "Backup Designated Router (BDR) IP Address."; 3177 } 3178 container statistics { 3179 config false; 3180 description "Per interface statistics"; 3181 uses interface-stat; 3182 } 3184 container neighbors { 3185 config false; 3186 description "All neighbors for the interface."; 3187 list neighbor { 3188 key "neighbor-router-id"; 3189 description 3190 "List of OSPF neighbors."; 3191 leaf neighbor-router-id { 3192 type rt-types:router-id; 3193 description 3194 "Neighbor router ID."; 3195 } 3196 uses neighbor-state; 3197 } // list of OSPF neighbors 3198 } 3199 container database { 3200 config false; 3201 description "Link scope LSA database."; 3202 list link-scope-lsa-type { 3203 key "lsa-type"; 3204 description 3205 "List OSPF link scope LSA databases."; 3206 leaf lsa-type { 3207 type uint16; 3208 description "OSPF link scope LSA type."; 3209 } 3210 container link-scope-lsas { 3211 description 3212 "All link scope LSAs of this LSA type."; 3213 list link-scope-lsa { 3214 key "lsa-id adv-router"; 3215 description "List of OSPF link scope LSAs"; 3216 uses lsa-key; 3217 uses lsa { 3218 refine "version/ospfv2/ospfv2" { 3219 must "../../../../../../../../../../../" 3220 + "rt:type = 'ospf:ospfv2'" { 3221 description "OSPFv2 LSA."; 3222 } 3223 } 3224 refine "version/ospfv3/ospfv3" { 3225 must "../../../../../../../../../../../" 3226 + "rt:type = 'ospf:ospfv3'" { 3227 description "OSPFv3 LSA."; 3228 } 3229 } 3230 } 3231 } 3232 } 3233 } // list link-scope-lsas 3234 } 3235 } // interface-common-state 3237 grouping interface-state { 3238 description 3239 "OSPF interface operational state."; 3240 reference "RFC2328 Section 9"; 3242 uses interface-common-state; 3243 } 3245 grouping virtual-link-config { 3246 description 3247 "OSPF virtual link configuration state."; 3249 uses interface-common-config; 3250 } 3252 grouping virtual-link-state { 3253 description 3254 "OSPF virtual link operational state."; 3256 leaf cost { 3257 type uint16 { 3258 range "1..65535"; 3259 } 3260 config false; 3261 description 3262 "Virtual link interface cost."; 3263 } 3264 uses interface-common-state; 3265 } 3267 grouping sham-link-config { 3268 description 3269 "OSPF sham link configuration state."; 3271 uses interface-common-config; 3272 uses interface-physical-link-config; 3273 } 3274 grouping sham-link-state { 3275 description 3276 "OSPF sham link operational state."; 3277 /* All container/leaf should be config false. */ 3278 uses interface-common-state; 3279 } 3281 grouping af-area-config { 3282 description 3283 "OSPF address-family specific area config state."; 3285 container ranges { 3286 description "Container for summary ranges"; 3288 list range { 3289 key "prefix"; 3290 description 3291 "Summarize routes matching address/mask 3292 (Area Border Routers (ABRs) only)"; 3293 leaf prefix { 3294 type inet:ip-prefix; 3295 description 3296 "IPv4 or IPv6 prefix"; 3297 } 3298 leaf advertise { 3299 type boolean; 3300 description 3301 "Advertise or hide."; 3302 } 3303 leaf cost { 3304 type uint24 { 3305 range "0..16777214"; 3306 } 3307 description 3308 "Advertised cost of summary route."; 3309 } 3310 } 3311 } 3312 } 3314 grouping area-common-config { 3315 description 3316 "OSPF area common configuration state."; 3318 leaf summary { 3319 when "../area-type = 'ospf:stub' or " 3320 + "../area-type = 'ospf:nssa'" { 3321 description 3322 "Summary advertisement into the stub/NSSA area."; 3323 } 3324 type boolean; 3325 description 3326 "Enable/Disable summary advertisement into the stub or 3327 NSSA area."; 3328 } 3329 leaf default-cost { 3330 when "../area-type = 'ospf:stub' or " 3331 + "../area-type = 'ospf:nssa'" { 3332 description 3333 "Cost for LSA default route advertised into the 3334 stub or NSSA area."; 3335 } 3336 type uint32 { 3337 range "1..16777215"; 3338 } 3339 description 3340 "Set the summary default route cost for a 3341 stub or NSSA area."; 3342 } 3343 } 3345 grouping area-config { 3346 description 3347 "OSPF area configuration state."; 3349 leaf area-type { 3350 type identityref { 3351 base area-type; 3352 } 3353 default normal; 3354 description 3355 "Area type."; 3356 } 3358 uses area-common-config; 3360 uses af-area-config { 3361 when "../../../operation-mode = " 3362 + "'ospf:ships-in-the-night'" { 3363 description 3364 "Ships in the night configuration."; 3365 } 3366 } 3367 } 3369 grouping area-state { 3370 description 3371 "OSPF area operational state."; 3373 container statistics { 3374 config false; 3375 description "Per area statistics"; 3376 uses area-stat; 3377 } 3379 container database { 3380 config false; 3381 description "Area scope LSA database."; 3382 list area-scope-lsa-type { 3383 key "lsa-type"; 3384 description "List OSPF area scope LSA databases."; 3385 leaf lsa-type { 3386 type uint16; 3387 description "OSPF area scope LSA type."; 3388 } 3389 container area-scope-lsas { 3390 description 3391 "All area scope LSAs of an area scope 3392 LSA type."; 3393 list area-scope-lsa { 3394 key "lsa-id adv-router"; 3395 description "List of OSPF area scope LSAs"; 3396 uses lsa-key; 3397 uses lsa { 3398 refine "version/ospfv2/ospfv2" { 3399 must "../../../../../../../../../" 3400 + "rt:type = 'ospf:ospfv2'" { 3401 description "OSPFv2 LSA."; 3402 } 3403 } 3404 refine "version/ospfv3/ospfv3" { 3405 must "../../../../../../../../../" 3406 + "rt:type = 'ospf:ospfv3'" { 3407 description "OSPFv3 LSA."; 3408 } 3409 } 3410 } 3411 } 3412 } 3413 } // list area-scope-lsas 3414 } 3415 } 3417 grouping local-rib { 3418 description "Local-rib grouping."; 3419 container local-rib { 3420 config false; 3421 description "Local-rib."; 3422 list route { 3423 key "prefix"; 3424 description "Routes"; 3425 leaf prefix { 3426 type inet:ip-prefix; 3427 description "Destination prefix."; 3428 } 3429 container next-hops { 3430 description "All next hops for the route."; 3431 list next-hop { 3432 key "next-hop"; 3433 description "List of next hop for the route"; 3434 leaf outgoing-interface { 3435 type if:interface-ref; 3436 description 3437 "Name of the outgoing interface."; 3438 } 3439 leaf next-hop { 3440 type inet:ip-address; 3441 description "Nexthop address."; 3442 } 3443 } 3444 } 3445 leaf metric { 3446 type uint32; 3447 description "Metric for this route."; 3448 } 3449 leaf route-type { 3450 type route-type; 3451 description "Route type for this route."; 3452 } 3453 leaf route-tag { 3454 type uint32; 3455 description "Route tag for this route."; 3456 } 3457 } 3458 } 3459 } 3461 grouping ietf-spf-delay-config { 3462 leaf initial-delay { 3463 type uint16; 3464 units msec; 3465 description 3466 "Delay used while in QUIET state."; 3467 } 3468 leaf short-delay { 3469 type uint16; 3470 units msec; 3471 description 3472 "Delay used while in SHORT_WAIT state."; 3473 } 3474 leaf long-delay { 3475 type uint16; 3476 units msec; 3477 description 3478 "Delay used while in LONG_WAIT state."; 3479 } 3480 leaf hold-down { 3481 type uint16; 3482 units msec; 3483 description 3484 "Timer used to consider an IGP stability period."; 3485 } 3486 leaf time-to-learn { 3487 type uint16; 3488 units msec; 3489 description 3490 "Duration used to learn all the IGP events 3491 related to a single component failure."; 3492 } 3493 description 3494 "Grouping for IETF SPF delay configuration."; 3495 } 3497 grouping ietf-spf-delay-state { 3498 leaf current-state { 3499 type enumeration { 3500 enum "QUIET" { 3501 description "QUIET state"; 3502 } 3503 enum "SHORT_WAIT" { 3504 description "SHORT_WAIT state"; 3505 } 3506 enum "LONG_WAIT" { 3507 description "LONG_WAIT state"; 3508 } 3509 } 3510 config false; 3511 description 3512 "Current state of the algorithm."; 3513 } 3514 leaf remaining-time-to-learn { 3515 type uint16; 3516 units "seconds"; 3517 config false; 3518 description 3519 "Remaining time until time-to-learn timer fires."; 3520 } 3521 leaf remaining-hold-down { 3522 type uint16; 3523 units "seconds"; 3524 config false; 3525 description 3526 "Remaining time until hold-down timer fires."; 3527 } 3528 leaf last-event-received { 3529 type yang:timestamp; 3530 config false; 3531 description 3532 "Time of last IGP event received"; 3533 } 3534 leaf next-spf-time { 3535 type yang:timestamp; 3536 config false; 3537 description 3538 "Time when next SPF has been scheduled."; 3539 } 3540 leaf last-spf-time { 3541 type yang:timestamp; 3542 config false; 3543 description 3544 "Time of last SPF computation."; 3545 } 3546 description 3547 "Grouping for IETF SPF delay operational states."; 3548 } 3550 grouping node-tag-config { 3551 description 3552 "OSPF node tag config state."; 3553 container node-tags { 3554 if-feature node-tag; 3555 list node-tag { 3556 key tag; 3557 leaf tag { 3558 type uint32; 3559 description 3560 "Node tag value."; 3561 } 3562 description 3563 "List of tags."; 3564 } 3565 description 3566 "Container for node tags."; 3567 } 3568 } 3570 grouping instance-config { 3571 description 3572 "OSPF instance config state."; 3574 leaf explicit-router-id { 3575 if-feature explicit-router-id; 3576 type rt-types:router-id; 3577 description 3578 "Defined in RFC 2328. A 32-bit number 3579 that uniquely identifies the router."; 3580 } 3582 container preference { 3583 description "Route preference config state."; 3584 choice scope { 3585 description 3586 "Options for expressing preference 3587 as single or multiple values."; 3588 case single-value { 3589 leaf all { 3590 type uint8; 3591 description 3592 "Preference for intra-area, inter-area and 3593 external routes."; 3594 } 3595 } 3596 case multi-values { 3597 choice granularity { 3598 description 3599 "Options for expressing preference 3600 for intra-area and inter-area routes."; 3601 case detail { 3602 leaf intra-area { 3603 type uint8; 3604 description 3605 "Preference for intra-area routes."; 3606 } 3607 leaf inter-area { 3608 type uint8; 3609 description 3610 "Preference for inter-area routes."; 3611 } 3612 } 3613 case coarse { 3614 leaf internal { 3615 type uint8; 3616 description 3617 "Preference for both intra-area and 3618 inter-area routes."; 3619 } 3620 } 3621 } 3622 leaf external { 3623 type uint8; 3624 description 3625 "Preference for external routes."; 3626 } 3627 } 3628 } 3629 } 3631 container nsr { 3632 if-feature nsr; 3633 description 3634 "Non-Stop Routing (NSR) config state."; 3635 leaf enable { 3636 type boolean; 3637 description 3638 "Enable/Disable NSR."; 3639 } 3640 } 3642 container graceful-restart { 3643 if-feature graceful-restart; 3644 description 3645 "Graceful restart config state."; 3646 leaf enable { 3647 type boolean; 3648 description 3649 "Enable/Disable graceful restart as defined in RFC 3623 3650 for OSPFv2 and RFC 5187 for OSPFv3."; 3651 } 3652 leaf helper-enable { 3653 type boolean; 3654 description 3655 "Enable graceful restart helper support for restarting 3656 routers (RFC 3623 Section 3)."; 3657 } 3658 leaf restart-interval { 3659 type uint16 { 3660 range "1..1800"; // Range is defined in RFC 3623. 3661 } 3662 units seconds; 3663 default "120"; // Default is defined in RFC 3623. 3664 description 3665 "Interval in seconds to attempt graceful restart prior 3666 to failing (RFC 3623 Section B.1)"; 3667 } 3668 leaf helper-strict-lsa-checking { 3669 type boolean; 3670 description 3671 "Terminate graceful restart when an LSA topology change 3672 is detected (RFC 3623 Section B.2)."; 3673 } 3674 } 3676 leaf enable { 3677 if-feature admin-control; 3678 type boolean; 3679 default true; 3680 description 3681 "Enable/Disable the protocol."; 3682 } 3684 container auto-cost { 3685 if-feature auto-cost; 3686 description 3687 "Interface Auto-cost configuration state."; 3688 leaf enable { 3689 type boolean; 3690 description 3691 "Enable/Disable interface auto-cost."; 3692 } 3693 leaf reference-bandwidth { 3694 when "../enable = 'true'" { 3695 description "Only when auto cost is enabled"; 3696 } 3697 type uint32 { 3698 range "1..4294967"; 3699 } 3700 units Mbits; 3701 description 3702 "Configure reference bandwidth used to automatically 3703 determine interface cost (Mbits). The cost is the 3704 reference bandwidth divided by the interface speed 3705 with 1 being the minimum cost."; 3707 } 3708 } 3710 container spf-control { 3711 leaf paths { 3712 if-feature max-ecmp; 3713 type uint16 { 3714 range "1..32"; 3715 } 3716 description 3717 "Maximum number of Equal-Cost Multi-Path (ECMP) paths."; 3718 } 3719 container ietf-spf-delay { 3720 if-feature ietf-spf-delay; 3721 uses ietf-spf-delay-config; 3722 description 3723 "IETF spf delay algorithm configuration."; 3724 } 3725 description "SPF calculation control."; 3726 } 3728 container database-control { 3729 leaf max-lsa { 3730 if-feature max-lsa; 3731 type uint32 { 3732 range "1..4294967294"; 3733 } 3734 description 3735 "Maximum number of LSAs OSPF the router will accept."; 3736 } 3737 description "Database maintenance control."; 3738 } 3740 container stub-router { 3741 if-feature stub-router; 3742 description "Set maximum metric configuration"; 3744 choice trigger { 3745 description 3746 "Specific triggers which will enable stub 3747 router state."; 3748 container always { 3749 presence 3750 "Enables unconditional stub router support"; 3751 description 3752 "Unconditional stub router state (advertise 3753 transit links with max metric"; 3754 } 3756 } 3757 } 3759 container mpls { 3760 description 3761 "OSPF MPLS config state."; 3762 container te-rid { 3763 if-feature te-rid; 3764 description 3765 "Stable OSPF Router IP Address used for Traffic 3766 Engineering (TE)"; 3767 leaf ipv4-router-id { 3768 type inet:ipv4-address; 3769 description 3770 "Explicitly configure the TE IPv4 router ID."; 3771 } 3772 leaf ipv6-router-id { 3773 type inet:ipv6-address; 3774 description 3775 "Explicitly configure the TE IPv6 router ID."; 3776 } 3777 } 3778 container ldp { 3779 description 3780 "OSPF MPLS LDP config state."; 3781 leaf igp-sync { 3782 if-feature ldp-igp-sync; 3783 type boolean; 3784 description 3785 "Enable LDP IGP synchronization."; 3786 } 3787 } 3788 } 3789 uses instance-fast-reroute-config; 3790 uses node-tag-config; 3791 } 3793 grouping instance-state { 3794 description 3795 "OSPF instance operational state."; 3797 leaf router-id { 3798 type rt-types:router-id; 3799 config false; 3800 description 3801 "Defined in RFC 2328. A 32-bit number 3802 that uniquely identifies the router."; 3803 } 3804 uses local-rib; 3806 container statistics { 3807 config false; 3808 description "Per instance statistics"; 3809 uses instance-stat; 3810 } 3812 container ietf-spf-delay { 3813 if-feature ietf-spf-delay; 3814 config false; 3815 uses ietf-spf-delay-config; 3816 uses ietf-spf-delay-state; 3817 description 3818 "IETF SPF delay operational states."; 3819 } 3821 container database { 3822 config false; 3823 description "AS scope LSA database."; 3824 list as-scope-lsa-type { 3825 key "lsa-type"; 3826 description "List OSPF AS scope LSA databases."; 3827 leaf lsa-type { 3828 type uint16; 3829 description "OSPF AS scope LSA type."; 3830 } 3831 container as-scope-lsas { 3832 description "All AS scope of LSA of this LSA type."; 3833 list as-scope-lsa { 3834 key "lsa-id adv-router"; 3835 description "List of OSPF area scope LSAs"; 3836 uses lsa-key; 3837 uses lsa { 3838 refine "version/ospfv2/ospfv2" { 3839 must "../../../../../../../rt:type = " 3840 + "'ospf:ospfv2'" { 3841 description "OSPFv2 LSA."; 3842 } 3843 } 3844 refine "version/ospfv3/ospfv3" { 3845 must "../../../../../../../rt:type = " 3846 + "'ospf:ospfv3'" { 3847 description "OSPFv3 LSA."; 3848 } 3849 } 3850 } 3851 } 3853 } 3854 } // list as-scope-lsas 3855 } 3856 uses spf-log; 3857 uses lsa-log; 3858 } 3860 grouping ospf-config { 3861 description 3862 "OSPF top configuration state."; 3864 leaf operation-mode { 3865 type identityref { 3866 base operation-mode; 3867 } 3868 default ospf:ships-in-the-night; 3869 description 3870 "OSPF operation mode."; 3871 } 3872 } 3874 grouping ospf-state { 3875 /* All leaf/container must be config false. */ 3876 description 3877 "OSPF top operational state."; 3878 } 3880 grouping multi-topology-area-common-config { 3881 description 3882 "OSPF multi-topology area common configuration state."; 3883 leaf summary { 3884 when "../../../../../areas/area[area-id=current()/../area-id]/" 3885 + "area-type = 'ospf:stub' or " 3886 + "../../../../../areas/area[area-id=current()/../area-id]/" 3887 + "area-type = 'ospf:nssa'" { 3888 description 3889 "Summary advertisement into the stub/NSSA area."; 3890 } 3891 type boolean; 3892 description 3893 "Enable/Disable summary advertisement into the 3894 topology in the stub or NSSA area."; 3895 } 3896 leaf default-cost { 3897 when "../../../../../areas/area[area-id=current()/../area-id]/" 3898 + "area-type = 'ospf:stub' or " 3899 + "../../../../../areas/area[area-id=current()/../area-id]/" 3900 + "area-type = 'ospf:nssa'" { 3902 description 3903 "Cost for LSA default route advertised into the 3904 topology into the stub or NSSA area."; 3905 } 3906 type uint32 { 3907 range "1..16777215"; 3908 } 3909 description 3910 "Set the summary default route cost for a 3911 stub or NSSA area."; 3912 } 3913 } 3915 grouping multi-topology-area-config { 3916 description 3917 "OSPF multi-topology area configuration state."; 3919 uses multi-topology-area-common-config; 3921 uses af-area-config { 3922 when "../../../../../operation-mode = " 3923 + "'ospf:ships-in-the-night'" { 3924 description 3925 "Ships in the night configuration."; 3926 } 3927 } 3928 } 3930 grouping multi-topology-area-state { 3931 /* All leaf/container must be config false. */ 3932 description 3933 "OSPF multi-topology area operational state."; 3934 } 3936 grouping multi-topology-config { 3937 description 3938 "OSPF multi-topology configuration state."; 3939 } 3941 grouping multi-topology-state { 3942 /* All leaf/container must be config false. */ 3943 description 3944 "OSPF multi-topology operational state."; 3946 uses local-rib; 3947 } 3949 grouping multi-topology-interface-config { 3950 description 3951 "OSPF multi-topology configuration state."; 3953 leaf cost { 3954 type uint32; 3955 description 3956 "Interface cost for this topology."; 3957 } 3958 } 3960 grouping multi-topology-interface-state { 3961 /* All leaf/container must be config false. */ 3962 description 3963 "OSPF multi-topology operational state."; 3964 } 3966 grouping ospfv3-interface-config { 3967 description 3968 "OSPFv3 interface specific configuration state."; 3970 leaf instance-id { 3971 type uint8 { 3972 range "0 .. 31"; 3973 } 3974 description 3975 "OSPFv3 instance ID."; 3976 } 3977 } 3979 grouping ospfv3-interface-state { 3980 description 3981 "OSPFv3 interface specific operational state."; 3983 leaf interface-id { 3984 type uint16; 3985 config false; 3986 description 3987 "OSPFv3 interface ID."; 3988 } 3989 } 3991 grouping lsa-identifiers { 3992 description 3993 "The parameters that uniquely identify an LSA."; 3994 leaf area-id { 3995 type area-id-type; 3996 description 3997 "Area ID"; 3999 } 4000 leaf link-id { 4001 type union { 4002 type inet:ipv4-address; 4003 type yang:dotted-quad; 4004 } 4005 description "Link ID."; 4006 } 4007 leaf type { 4008 type uint16; 4009 description 4010 "LSA type."; 4011 } 4012 leaf lsa-id { 4013 type yang:dotted-quad; 4014 description "LSA ID."; 4015 } 4016 leaf adv-router { 4017 type yang:dotted-quad; 4018 description 4019 "LSA advertising router."; 4020 } 4021 leaf seq-num { 4022 type uint32; 4023 description 4024 "LSA sequence number."; 4025 } 4026 } 4028 grouping spf-log { 4029 description 4030 "Grouping for SPF log."; 4031 container spf-log { 4032 config false; 4033 description 4034 "This container lists the SPF log."; 4035 list event { 4036 key id; 4037 description 4038 "List of SPF logs. 4039 It is used as a wrapping buffer."; 4040 leaf id { 4041 type uint32; 4042 description 4043 "This leaf defines the event identifier. 4044 This is a purely internal value."; 4045 } 4046 leaf spf-type { 4047 type enumeration { 4048 enum full { 4049 description 4050 "Computation done is a Full SPF."; 4051 } 4052 enum intra { 4053 description 4054 "Computation done is only for intra-area routes."; 4055 } 4056 enum inter { 4057 description 4058 "Computation done is only for inter-area 4059 summary routes."; 4060 } 4061 enum external { 4062 description 4063 "Computation done is only for AS external routes."; 4064 } 4065 } 4066 description 4067 "The SPF computation type."; 4068 } 4069 leaf schedule-timestamp { 4070 type yang:timestamp; 4071 description 4072 "This leaf describes the timestamp 4073 when the computation was scheduled."; 4074 } 4075 leaf start-timestamp { 4076 type yang:timestamp; 4077 description 4078 "This leaf describes the timestamp 4079 when the computation was started."; 4080 } 4081 leaf end-timestamp { 4082 type yang:timestamp; 4083 description 4084 "This leaf describes the timestamp 4085 when the computation was completed."; 4086 } 4087 list trigger-lsa { 4088 description 4089 "The list of LSAs that triggered the computation."; 4090 uses lsa-identifiers; 4091 } 4092 } 4093 } 4094 } 4095 grouping lsa-log { 4096 description 4097 "Grouping for LSA log."; 4098 container lsa-log { 4099 config false; 4100 description 4101 "This conatiner lists the LSA log. 4102 Local LSA modifications are also included 4103 in the list."; 4104 list event { 4105 key id; 4106 description 4107 "List of LSA logs. 4108 It is used as a wrapping buffer."; 4109 leaf id { 4110 type uint32; 4111 description 4112 "This leaf defines the event identifier. 4113 This is a purely internal value."; 4114 } 4115 container lsa { 4116 description 4117 "This container describes the logged LSA."; 4118 uses lsa-identifiers; 4119 } 4120 leaf received-timestamp { 4121 type yang:timestamp; 4122 description 4123 "This leaf describes the timestamp 4124 when the LSA was received. In case of 4125 local LSA update, the timestamp refers 4126 to the local LSA update time."; 4127 } 4128 leaf reason { 4129 type identityref { 4130 base lsa-log-reason; 4131 } 4132 description 4133 "This leaf describes the reason 4134 that resulted in this LSA log."; 4135 } 4136 } 4137 } 4138 } 4140 augment "/rt:routing/rt:control-plane-protocols/" 4141 + "rt:control-plane-protocol" { 4142 when "rt:type = 'ospf:ospfv2' or rt:type = 'ospf:ospfv3'" { 4143 description 4144 "This augmentation is only valid for a routing protocol 4145 instance of OSPF (type 'ospfv2' or 'ospfv3')."; 4146 } 4147 description "OSPF augmentation."; 4149 container ospf { 4150 description 4151 "OSPF."; 4153 uses ospf-config; 4154 uses ospf-state; 4156 list instance { 4157 key "af"; 4158 description 4159 "An OSPF routing protocol instance."; 4161 leaf af { 4162 type identityref { 4163 base iana-rt-types:address-family; 4164 } 4165 description 4166 "Address-family of the instance."; 4167 } 4169 uses instance-config; 4170 uses instance-state; 4172 container areas { 4173 description "All areas."; 4174 list area { 4175 key "area-id"; 4176 description 4177 "List of OSPF areas"; 4178 leaf area-id { 4179 type area-id-type; 4180 description 4181 "Area ID."; 4182 } 4184 uses area-config; 4185 uses area-state; 4187 container virtual-links { 4188 when "../area-id = '0.0.0.0' and " 4189 + "../area-type = 'ospf:normal'" { 4190 description 4191 "Virtual links must be in backbone area."; 4192 } 4193 description "All virtual links."; 4194 list virtual-link { 4195 key "transit-area-id router-id"; 4196 description 4197 "OSPF virtual link"; 4198 leaf transit-area-id { 4199 type leafref { 4200 path "../../../../area/area-id"; 4201 } 4202 must "../../../../area[area-id=current()]/" 4203 + "area-id != '0.0.0.0' and " 4204 + "../../../../area[area-id=current()]/" 4205 + "area-type = 'ospf:normal'" { 4206 error-message "Virtual link transit area must " 4207 + "be non-zero."; 4208 description 4209 "Virtual-link trasit area must be 4210 non-zero area."; 4211 } 4212 description 4213 "Virtual link tranist area ID."; 4214 } 4215 leaf router-id { 4216 type rt-types:router-id; 4217 description 4218 "Virtual Link remote endpoint router ID."; 4219 } 4221 uses virtual-link-config; 4222 uses virtual-link-state; 4223 } 4224 } 4225 container sham-links { 4226 if-feature pe-ce-protocol; 4227 description "All sham links."; 4228 list sham-link { 4229 key "local-id remote-id"; 4230 description 4231 "OSPF sham link"; 4232 leaf local-id { 4233 type inet:ip-address; 4234 description 4235 "Address of the local Sham Link endpoint."; 4236 } 4237 leaf remote-id { 4238 type inet:ip-address; 4239 description 4240 "Address of the remote Sham Link endpoint."; 4241 } 4242 uses sham-link-config; 4243 uses sham-link-state; 4244 } 4245 } 4246 container interfaces { 4247 description "All interfaces."; 4248 list interface { 4249 key "name"; 4250 description 4251 "List of OSPF interfaces."; 4252 leaf name { 4253 type if:interface-ref; 4254 description 4255 "Interface name."; 4256 } 4257 uses interface-config; 4258 uses interface-state; 4259 } // list of interfaces 4260 } 4261 } // list of areas 4262 } 4263 } // list of instance 4264 } // container ospf 4265 } 4267 augment "/rt:routing/rt:control-plane-protocols/" 4268 + "rt:control-plane-protocol/ospf:ospf/ospf:instance" { 4269 when "../../rt:type = 'ospf:ospfv2' or 4270 ../../rt:type = 'ospf:ospfv3'" { 4271 description 4272 "This augmentation is only valid for OSPF 4273 (type 'ospfv2' or 'ospfv3')."; 4274 } 4275 if-feature multi-topology; 4276 description 4277 "OSPF multi-topology instance configuration 4278 state augmentation."; 4279 container topologies { 4280 description "All topologies."; 4281 list topology { 4282 // Topology must be in the same routing-instance 4283 // and of same AF as the container. 4284 key "name"; 4285 description "OSPF topology."; 4286 leaf name { 4287 type leafref { 4288 path "../../../../../../../rt:ribs/rt:rib/rt:name"; 4289 } 4290 description "RIB"; 4291 } 4293 uses multi-topology-config; 4294 uses multi-topology-state; 4296 container areas { 4297 description "All areas in the topology."; 4298 list area { 4299 key "area-id"; 4300 description 4301 "List of OSPF areas"; 4302 leaf area-id { 4303 type area-id-type; 4304 description 4305 "Area ID."; 4306 } 4307 uses multi-topology-area-config; 4308 uses multi-topology-area-state; 4309 } 4310 } 4311 } 4312 } 4313 } 4315 augment "/rt:routing/rt:control-plane-protocols/" 4316 + "rt:control-plane-protocol/ospf:ospf/ospf:instance/" 4317 + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" { 4318 when "../../../../../../rt:type = 'ospf:ospfv2'" { 4319 description 4320 "This augmentation is only valid for OSPFv2."; 4321 } 4322 if-feature ospf:multi-topology; 4323 description 4324 "OSPF multi-topology interface configuration state 4325 augmentation."; 4326 container topologies { 4327 description "All topologies for the interface."; 4328 list topology { 4329 key "name"; 4330 description "OSPF interface topology."; 4331 leaf name { 4332 type leafref { 4333 path "../../../../../../../../../../../" 4334 + "rt:ribs/rt:rib/rt:name"; 4336 } 4337 description 4338 "One of the topologies enabled on this interface."; 4339 } 4341 uses multi-topology-interface-config; 4342 uses multi-topology-interface-state; 4343 } 4344 } 4345 } 4347 augment "/rt:routing/rt:control-plane-protocols/" 4348 + "rt:control-plane-protocol/ospf:ospf/ospf:instance/" 4349 + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" { 4350 when "../../../../../../rt:type = 'ospf:ospfv3'" { 4351 description 4352 "This augmentation is only valid for OSPFv3."; 4353 } 4354 description 4355 "OSPFv3 interface specific configuration state 4356 augmentation."; 4357 uses ospfv3-interface-config; 4358 uses ospfv3-interface-state; 4359 } 4361 grouping route-content { 4362 description 4363 "This grouping defines OSPF-specific route attributes."; 4364 leaf metric { 4365 type uint32; 4366 description "OSPF route metric."; 4367 } 4368 leaf tag { 4369 type uint32; 4370 default "0"; 4371 description "OSPF route tag."; 4372 } 4373 leaf route-type { 4374 type route-type; 4375 description "OSPF route type"; 4376 } 4377 } 4379 augment "/rt:routing-state/" 4380 + "rt:ribs/rt:rib/rt:routes/rt:route" { 4381 when "rt:source-protocol = 'ospf:ospfv2' or " 4382 + "rt:source-protocol = 'ospf:ospfv3'" { 4383 description 4384 "This augmentation is only valid for a routes whose 4385 source protocol is OSPF."; 4386 } 4387 description 4388 "OSPF-specific route attributes."; 4389 uses route-content; 4390 } 4392 /* 4393 * RPCs 4394 */ 4396 rpc clear-neighbor { 4397 description 4398 "This RPC request clears a particular 4399 set of OSPF neighbors. If the operation 4400 fails for OSPF internal reason, then 4401 error-tag and error-app-tag should be set 4402 to a meaningful value."; 4403 input { 4404 leaf routing-protocol-name { 4405 type leafref { 4406 path "/rt:routing/rt:control-plane-protocols/" 4407 + "rt:control-plane-protocol/rt:name"; 4408 } 4409 mandatory "true"; 4410 description 4411 "Name of the OSPF protocol instance which information 4412 is being queried. 4414 If the OSPF instance with name equal to the 4415 value of this parameter doesn't exist, then this 4416 operation SHALL fail with error-tag 'data-missing' 4417 and error-app-tag 4418 'routing-protocol-instance-not-found'."; 4419 } 4421 leaf interface { 4422 type if:interface-ref; 4423 description 4424 "Name of the OSPF interface. 4426 If the OSPF interface with name equal to the 4427 value of this parameter doesn't exist, then this 4428 operation SHALL fail with error-tag 'data-missing' 4429 and error-app-tag 4430 'ospf-interface-not-found'."; 4431 } 4433 } 4434 } 4436 rpc clear-database { 4437 description 4438 "This RPC request clears a particular 4439 OSPF database. If the operation 4440 fails for OSPF internal reason, then 4441 error-tag and error-app-tag should be set 4442 to a meaningful value."; 4443 input { 4444 leaf routing-protocol-name { 4445 type leafref { 4446 path "/rt:routing/rt:control-plane-protocols/" 4447 + "rt:control-plane-protocol/rt:name"; 4448 } 4449 mandatory "true"; 4450 description 4451 "Name of the OSPF protocol instance whose 4452 information is being queried. 4454 If the OSPF instance with name equal to the 4455 value of this parameter doesn't exist, then this 4456 operation SHALL fail with error-tag 'data-missing' 4457 and error-app-tag 4458 'routing-protocol-instance-not-found'."; 4459 } 4460 } 4461 } 4463 /* 4464 * Notifications 4465 */ 4467 grouping notification-instance-hdr { 4468 description 4469 "This group describes common instance specific 4470 data for notifications."; 4472 leaf routing-protocol-name { 4473 type leafref { 4474 path "/rt:routing/rt:control-plane-protocols/" 4475 + "rt:control-plane-protocol/rt:name"; 4476 } 4477 must "/rt:routing/rt:control-plane-protocols/" 4478 + "rt:control-plane-protocol[rt:name=current()]/" 4479 + "rt:type = 'ospf:ospfv2' or " 4480 + "/rt:routing/rt:control-plane-protocols/" 4481 + "rt:control-plane-protocol[rt:name=current()]/" 4482 + "rt:type = 'ospf:ospfv3'"; 4483 description 4484 "OSPF routing protocol instance name."; 4485 } 4487 leaf af { 4488 type leafref { 4489 path "/rt:routing/" 4490 + "rt:control-plane-protocols/rt:control-plane-protocol" 4491 + "[rt:name=current()/../routing-protocol-name]/" 4492 + "ospf:ospf/ospf:instance/af"; 4493 } 4494 description 4495 "Address family of the OSPF instance."; 4496 } 4497 } 4499 grouping notification-interface { 4500 description 4501 "This grouping provides the interface information 4502 for the notifications."; 4504 choice if-link-type-selection { 4505 description 4506 "Options for link type."; 4507 container interface { 4508 description "Normal interface."; 4509 leaf interface { 4510 type if:interface-ref; 4511 description "Interface."; 4512 } 4513 } 4514 container virtual-link { 4515 description "virtual-link."; 4516 leaf transit-area-id { 4517 type area-id-type; 4518 description "Area ID."; 4519 } 4520 leaf neighbor-router-id { 4521 type rt-types:router-id; 4522 description "Neighbor Router ID."; 4523 } 4524 } 4525 container sham-link { 4526 description "sham-link."; 4527 leaf area-id { 4528 type area-id-type; 4529 description "Area ID."; 4530 } 4531 leaf local-ip-addr { 4532 type inet:ip-address; 4533 description "Sham link local address."; 4534 } 4535 leaf remote-ip-addr { 4536 type inet:ip-address; 4537 description "Sham link remote address."; 4538 } 4539 } 4540 } 4541 } 4543 grouping notification-neighbor { 4544 description 4545 "This grouping provides the neighbor information 4546 for the notifications."; 4548 leaf neighbor-router-id { 4549 type rt-types:router-id; 4550 description "Neighbor Router ID."; 4551 } 4553 leaf neighbor-ip-addr { 4554 type yang:dotted-quad; 4555 description "Neighbor address."; 4556 } 4557 } 4559 notification if-state-change { 4560 uses notification-instance-hdr; 4561 uses notification-interface; 4563 leaf state { 4564 type if-state-type; 4565 description "Interface state."; 4566 } 4567 description 4568 "This notification is sent when an interface 4569 state change is detected."; 4570 } 4572 notification if-config-error { 4573 uses notification-instance-hdr; 4574 uses notification-interface; 4576 leaf packet-source { 4577 type yang:dotted-quad; 4578 description "Source address."; 4579 } 4581 leaf packet-type { 4582 type packet-type; 4583 description "OSPF packet type."; 4584 } 4586 leaf error { 4587 type enumeration { 4588 enum "badVersion" { 4589 description "Bad version."; 4590 } 4591 enum "areaMismatch" { 4592 description "Area mistmatch."; 4593 } 4594 enum "unknownNbmaNbr" { 4595 description "Unknown NBMA neighbor."; 4596 } 4597 enum "unknownVirtualNbr" { 4598 description "Unknown virtual link neighbor."; 4599 } 4600 enum "authTypeMismatch" { 4601 description "Auth type mismatch."; 4602 } 4603 enum "authFailure" { 4604 description "Auth failure."; 4605 } 4606 enum "netMaskMismatch" { 4607 description "Network mask mismatch."; 4608 } 4609 enum "helloIntervalMismatch" { 4610 description "Hello interval mismatch."; 4611 } 4612 enum "deadIntervalMismatch" { 4613 description "Dead interval mismatch."; 4614 } 4615 enum "optionMismatch" { 4616 description "Option mismatch."; 4617 } 4618 enum "mtuMismatch" { 4619 description "MTU mismatch."; 4620 } 4621 enum "duplicateRouterId" { 4622 description "Duplicate router ID."; 4623 } 4624 enum "noError" { 4625 description "No error."; 4626 } 4627 } 4628 description "Error code."; 4629 } 4630 description 4631 "This notification is sent when interface 4632 config error is detected."; 4633 } 4635 notification nbr-state-change { 4636 uses notification-instance-hdr; 4637 uses notification-interface; 4638 uses notification-neighbor; 4640 leaf state { 4641 type nbr-state-type; 4642 description "Neighbor state."; 4643 } 4645 description 4646 "This notification is sent when neighbor 4647 state change is detected."; 4648 } 4650 notification nbr-restart-helper-status-change { 4651 uses notification-instance-hdr; 4652 uses notification-interface; 4653 uses notification-neighbor; 4655 leaf status { 4656 type restart-helper-status-type; 4657 description "Restart helper status."; 4658 } 4660 leaf age { 4661 type uint32; 4662 units seconds; 4663 description 4664 "Remaining time in current OSPF graceful restart 4665 interval, if the router is acting as a restart 4666 helper for the neighbor."; 4667 } 4669 leaf exit-reason { 4670 type restart-exit-reason-type; 4671 description 4672 "Restart helper exit reason."; 4674 } 4675 description 4676 "This notification is sent when a neighbor restart 4677 helper status change is detected."; 4678 } 4680 notification if-rx-bad-packet { 4681 uses notification-instance-hdr; 4682 uses notification-interface; 4684 leaf packet-source { 4685 type yang:dotted-quad; 4686 description "Source address."; 4687 } 4689 leaf packet-type { 4690 type packet-type; 4691 description "OSPF packet type."; 4692 } 4694 description 4695 "This notification is sent when an OSPF packet that 4696 cannot be parsed is received on an OSPF interface."; 4697 } 4699 notification lsdb-approaching-overflow { 4700 uses notification-instance-hdr; 4702 leaf ext-lsdb-limit { 4703 type uint32; 4704 description 4705 "The maximum number of non-default AS-external LSAs 4706 entries that can be stored in the link state database."; 4707 } 4709 description 4710 "This notification is sent when the number of LSAs 4711 in the router's link state database has exceeded 4712 ninety percent of the ext-lsdb-limit."; 4713 } 4715 notification lsdb-overflow { 4716 uses notification-instance-hdr; 4718 leaf ext-lsdb-limit { 4719 type uint32; 4720 description 4721 "The maximum number of non-default AS-external LSAs 4722 entries that can be stored in the link state database."; 4723 } 4725 description 4726 "This notification is sent when the number of LSAs 4727 in the router's link state database has exceeded 4728 ext-lsdb-limit."; 4729 } 4731 notification nssa-translator-status-change { 4732 uses notification-instance-hdr; 4734 leaf area-id { 4735 type area-id-type; 4736 description "Area ID."; 4737 } 4739 leaf status { 4740 type nssa-translator-state-type; 4741 description 4742 "NSSA translator status."; 4743 } 4745 description 4746 "This notification is sent when there is a change 4747 in the router's role in translating OSPF NSSA LSAs 4748 to OSPF AS-External LSAs."; 4749 } 4751 notification restart-status-change { 4752 uses notification-instance-hdr; 4754 leaf status { 4755 type restart-status-type; 4756 description 4757 "Restart status."; 4758 } 4760 leaf restart-interval { 4761 type uint16 { 4762 range "1..1800"; 4763 } 4764 units seconds; 4765 default "120"; 4766 description 4767 "Restart interval."; 4768 } 4769 leaf exit-reason { 4770 type restart-exit-reason-type; 4771 description 4772 "Restart exit reason."; 4773 } 4775 description 4776 "This notification is sent when the graceful restart 4777 state for the router has changed."; 4778 } 4779 } 4780 4782 4. Security Considerations 4784 The YANG module defined in this document is designed to be accessed 4785 via network management protocols such as NETCONF [RFC6241] or 4786 RESTCONF [RFC8040]. The lowest NETCONF layer is the secure transport 4787 layer, and the mandatory-to-implement secure transport is Secure 4788 Shell (SSH) [RFC6242]. The lowest RESTCONF layer is HTTPS, and the 4789 mandatory-to-implement secure transport is TLS [RFC5246]. 4791 The NETCONF access control model [RFC6536] provides the means to 4792 restrict access for particular NETCONF or RESTCONF users to a pre- 4793 configured subset of all available NETCONF or RESTCONF protocol 4794 operations and content. 4796 There are a number of data nodes defined in this YANG module that are 4797 writable/creatable/deletable (i.e., config true, which is the 4798 default). These data nodes may be considered sensitive or vulnerable 4799 in some network environments. Write operations (e.g., edit-config) 4800 to these data nodes without proper protection can have a negative 4801 effect on network operations. For OSPF, the ability to modify OSPF 4802 configuration will allow the entire OSPF domain to be compromised 4803 including peering with unauthorized routers to misroute traffic or 4804 mount a massive Denial-of-Service (DoS) attack. The security 4805 considerations of OSPFv2 [RFC2328] and [RFC5340]. 4807 Some of the readable data nodes in this YANG module may be considered 4808 sensitive or vulnerable in some network environments. It is thus 4809 important to control read access (e.g., via get, get-config, or 4810 notification) to these data nodes. The exposure of the Link State 4811 Database (LSDB) will expose the detailed topology of the network. 4812 This may be undesirable since both due to the fact that exposure may 4813 facilitate other attacks. Additionally, network operators may 4814 consider their topologies to be propritary. 4816 For OSPF authentication, configuration is supported via the 4817 specification of key-chains [RFC8177] or the direct specification of 4818 key and authentication algorithm. Hence, authentification 4819 configuration using the "auth-table-trailer" case in the 4820 "authentication" container inherits the security considerations of 4821 [RFC8177]. This includes the considerations with respect to the 4822 local storage and handling of authentication keys. 4824 Some of the RPC operations in this YANG module may be considered 4825 sensitive or vulnerable in some network environments. It is thus 4826 important to control access to these operations. The OSPF Yang 4827 module support the "clear-neighbor" and "clear-database" RPCs. If 4828 access too either of these is compromised, they can result in 4829 temporary network outages be employed to mount DoS attacks. 4831 5. Acknowledgements 4833 The authors wish to thank Yi Yang, Alexander Clemm, Gaurav Gupta, 4834 Ladislav Lhotka, Stephane Litkowski, Greg Hankins, Manish Gupta and 4835 Alan Davey for their thorough reviews and helpful comments. 4837 This document was produced using Marshall Rose's xml2rfc tool. 4839 6. References 4841 6.1. Normative References 4843 [RFC1793] Moy, J., "Extending OSPF to Support Demand Circuits", 4844 RFC 1793, DOI 10.17487/RFC1793, April 1995, 4845 . 4847 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 4848 Requirement Levels", BCP 14, RFC 2119, 4849 DOI 10.17487/RFC2119, March 1997, 4850 . 4852 [RFC2328] Moy, J., "OSPF Version 2", STD 54, RFC 2328, 4853 DOI 10.17487/RFC2328, April 1998, 4854 . 4856 [RFC3101] Murphy, P., "The OSPF Not-So-Stubby Area (NSSA) Option", 4857 RFC 3101, DOI 10.17487/RFC3101, January 2003, 4858 . 4860 [RFC3623] Moy, J., Pillay-Esnault, P., and A. Lindem, "Graceful OSPF 4861 Restart", RFC 3623, DOI 10.17487/RFC3623, November 2003, 4862 . 4864 [RFC3630] Katz, D., Kompella, K., and D. Yeung, "Traffic Engineering 4865 (TE) Extensions to OSPF Version 2", RFC 3630, 4866 DOI 10.17487/RFC3630, September 2003, 4867 . 4869 [RFC4577] Rosen, E., Psenak, P., and P. Pillay-Esnault, "OSPF as the 4870 Provider/Customer Edge Protocol for BGP/MPLS IP Virtual 4871 Private Networks (VPNs)", RFC 4577, DOI 10.17487/RFC4577, 4872 June 2006, . 4874 [RFC4750] Joyal, D., Ed., Galecki, P., Ed., Giacalone, S., Ed., 4875 Coltun, R., and F. Baker, "OSPF Version 2 Management 4876 Information Base", RFC 4750, DOI 10.17487/RFC4750, 4877 December 2006, . 4879 [RFC5187] Pillay-Esnault, P. and A. Lindem, "OSPFv3 Graceful 4880 Restart", RFC 5187, DOI 10.17487/RFC5187, June 2008, 4881 . 4883 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 4884 (TLS) Protocol Version 1.2", RFC 5246, 4885 DOI 10.17487/RFC5246, August 2008, 4886 . 4888 [RFC5340] Coltun, R., Ferguson, D., Moy, J., and A. Lindem, "OSPF 4889 for IPv6", RFC 5340, DOI 10.17487/RFC5340, July 2008, 4890 . 4892 [RFC5643] Joyal, D., Ed. and V. Manral, Ed., "Management Information 4893 Base for OSPFv3", RFC 5643, DOI 10.17487/RFC5643, August 4894 2009, . 4896 [RFC5838] Lindem, A., Ed., Mirtorabi, S., Roy, A., Barnes, M., and 4897 R. Aggarwal, "Support of Address Families in OSPFv3", 4898 RFC 5838, DOI 10.17487/RFC5838, April 2010, 4899 . 4901 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 4902 the Network Configuration Protocol (NETCONF)", RFC 6020, 4903 DOI 10.17487/RFC6020, October 2010, 4904 . 4906 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 4907 and A. Bierman, Ed., "Network Configuration Protocol 4908 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 4909 . 4911 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 4912 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 4913 . 4915 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration 4916 Protocol (NETCONF) Access Control Model", RFC 6536, 4917 DOI 10.17487/RFC6536, March 2012, 4918 . 4920 [RFC6565] Pillay-Esnault, P., Moyer, P., Doyle, J., Ertekin, E., and 4921 M. Lundberg, "OSPFv3 as a Provider Edge to Customer Edge 4922 (PE-CE) Routing Protocol", RFC 6565, DOI 10.17487/RFC6565, 4923 June 2012, . 4925 [RFC7223] Bjorklund, M., "A YANG Data Model for Interface 4926 Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, 4927 . 4929 [RFC8022] Lhotka, L. and A. Lindem, "A YANG Data Model for Routing 4930 Management", RFC 8022, DOI 10.17487/RFC8022, November 4931 2016, . 4933 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 4934 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 4935 . 4937 [RFC8177] Lindem, A., Ed., Qu, Y., Yeung, D., Chen, I., and J. 4938 Zhang, "YANG Data Model for Key Chains", RFC 8177, 4939 DOI 10.17487/RFC8177, June 2017, 4940 . 4942 6.2. Informative References 4944 [I-D.ietf-netmod-revised-datastores] 4945 Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 4946 and R. Wilton, "Network Management Datastore 4947 Architecture", draft-ietf-netmod-revised-datastores-02 4948 (work in progress), May 2017. 4950 Appendix A. Contributors' Addreses 4952 Dean Bogdanovic 4953 Volta Networks, Inc. 4955 EMail: dean@voltanet.io 4957 Kiran Koushik Agrahara Sreenivasa 4958 Cisco Systems 4959 12515 Research Blvd, Bldg 4 4960 Austin, TX 78681 4961 USA 4963 EMail: kkoushik@cisco.com 4965 Authors' Addresses 4967 Derek Yeung 4968 Arrcus 4970 EMail: derek@arrcus.com 4972 Yingzhen Qu 4973 Huawei 4974 2330 Central Expressway 4975 Santa Clara, CA 95050 4976 USA 4978 EMail: yingzhen.qu@huawei.com 4980 Jeffrey Zhang 4981 Juniper Networks 4982 10 Technology Park Drive 4983 Westford, MA 01886 4984 USA 4986 EMail: zzhang@juniper.net 4988 Ing-Wher Chen 4989 Jabil 4991 EMail: ing-wher_chen@jabil.com 4992 Acee Lindem 4993 Cisco Systems 4994 301 Midenhall Way 4995 Cary, NC 27513 4997 EMail: acee@cisco.com