idnits 2.17.1 draft-ietf-ospf-yang-18.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (November 27, 2018) is 1977 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) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 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: May 31, 2019 Huawei 6 J. Zhang 7 Juniper Networks 8 I. Chen 9 The MITRE Corporation 10 A. Lindem 11 Cisco Systems 12 November 27, 2018 14 YANG Data Model for OSPF Protocol 15 draft-ietf-ospf-yang-18 17 Abstract 19 This document defines a YANG data model that can be used to configure 20 and manage OSPF. The model is based on YANG 1.1 as defined in RFC 21 7950 and conforms to the Network Management Datastore Architecture 22 (NDMA) as described in RFC 8342. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on May 31, 2019. 41 Copyright Notice 43 Copyright (c) 2018 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 2 59 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 60 1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 3 61 2. Design of Data Model . . . . . . . . . . . . . . . . . . . . 3 62 2.1. OSPF Operational State . . . . . . . . . . . . . . . . . 3 63 2.2. Overview . . . . . . . . . . . . . . . . . . . . . . . . 4 64 2.3. OSPFv2 and OSPFv3 . . . . . . . . . . . . . . . . . . . . 5 65 2.4. Optional Features . . . . . . . . . . . . . . . . . . . . 5 66 2.5. OSPF Router Configuration/Operational State . . . . . . . 7 67 2.6. OSPF Area Configuration/Operational State . . . . . . . . 10 68 2.7. OSPF Interface Configuration/Operational State . . . . . 15 69 2.8. OSPF notification . . . . . . . . . . . . . . . . . . . . 17 70 2.9. OSPF RPC Operations . . . . . . . . . . . . . . . . . . . 21 71 3. OSPF YANG Module . . . . . . . . . . . . . . . . . . . . . . 22 72 4. Security Considerations . . . . . . . . . . . . . . . . . . . 107 73 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 108 74 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 108 75 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 108 76 7.1. Normative References . . . . . . . . . . . . . . . . . . 109 77 7.2. Informative References . . . . . . . . . . . . . . . . . 113 78 Appendix A. Contributors' Addreses . . . . . . . . . . . . . . . 115 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 115 81 1. Overview 83 YANG [RFC6020][RFC7950] is a data definition language used to define 84 the contents of a conceptual data store that allows networked devices 85 to be managed using NETCONF [RFC6241]. YANG is proving relevant 86 beyond its initial confines, as bindings to other interfaces (e.g., 87 ReST) and encodings other than XML (e.g., JSON) are being defined. 88 Furthermore, YANG data models can be used as the basis for 89 implementation of other interfaces, such as CLI and programmatic 90 APIs. 92 This document defines a YANG data model that can be used to configure 93 and manage OSPF and it is an augmentation to the core routing data 94 model. If fully conforms to the Network Management Datastore 95 Architecture (NDMA) [RFC8342]. A core routing data model is defined 96 in [RFC8349], and it provides the basis for the development of data 97 models for routing protocols. The interface data model is defined in 98 [RFC8343] and is used for referencing interfaces from the routing 99 protocol. The key-chain data model used for OSPF authentication is 100 defined in [RFC8177] and provides both a reference to configured key- 101 chains and an enumeration of cryptographic algorithms. 103 Both OSPFv2 [RFC2328] and OSPFv3 [RFC5340] are supported. In 104 addition to the core OSPF protocol, features described in other OSPF 105 RFCs are also supported. These includes demand circuit [RFC1793], 106 traffic engineering [RFC3630], multiple address family [RFC5838], 107 graceful restart [RFC3623] [RFC5187], NSSA [RFC3101], and OSPF(v3) as 108 a PE-CE Protocol [RFC4577], [RFC6565]. These non-core features are 109 optional in the OSPF data model. 111 1.1. Requirements Language 113 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 114 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 115 "OPTIONAL" in this document are to be interpreted as described in BCP 116 14 [RFC2119] [RFC8174] when, and only when, they appear in all 117 capitals, as shown here. 119 1.2. Tree Diagrams 121 This document uses the graphical representation of data models 122 defined in [RFC8340]. 124 2. Design of Data Model 126 Although the basis of OSPF configuration elements like routers, 127 areas, and interfaces remains the same, the detailed configuration 128 model varies among router vendors. Differences are observed in terms 129 of how the protocol engine is tied to the routing domain, how 130 multiple protocol engines are be instantiated among others. 132 The goal of this document is to define a data model that provides a 133 common user interface to the OSPFv2 and OSPFv3 protocols. There is 134 very little information that is designated as "mandatory", providing 135 freedom for vendors to adapt this data model to their respective 136 product implementations. 138 2.1. OSPF Operational State 140 The OSPF operational state is included in the same tree as OSPF 141 configuration consistent with Network Management Datastore 142 Architecture [RFC8342]. Consequently, only the routing container in 143 the ietf-routing model [RFC8349] is augmented. The routing-state 144 container is not augmented. 146 2.2. Overview 148 The OSPF YANG module defined in this document has all the common 149 building blocks for the OSPF protocol. 151 The OSPF YANG module augments the /routing/control-plane-protocols/ 152 control-plane-protocol path defined in the ietf-routing module. 154 module: ietf-ospf 155 augment /rt:routing/rt:control-plane-protocols/ 156 rt:control-plane-protocol: 157 +--rw ospf 158 . 159 . 160 +--rw operation-mode? identityref 161 +--rw af? identityref 162 . 163 . 164 +--rw areas 165 | +--rw area* [area-id] 166 | +--rw area-id area-id-type 167 | . 168 | . 169 | +--rw virtual-links 170 | | +--rw virtual-link* [transit-area-id router-id] 171 | | . 172 | | . 173 | +--rw sham-links {pe-ce-protocol}? 174 | | +--rw sham-link* [local-id remote-id] 175 | | . 176 | | . 177 | +--rw interfaces 178 | +--rw interface* [name] 179 | . 180 | . 181 +--rw topologies {multi-topology}? 182 +--rw topology* [name] 183 . 184 . 186 The ospf module is intended to match to the vendor specific OSPF 187 configuration construct that is identified by the local identifier 188 'name'. The field 'version' allows support for OSPFv2 and OSPFv3. 190 The ospf container includes one OSPF protocol engine instance. The 191 instance includes OSPF router level configuration and operational 192 state. 194 The area and area/interface containers respectively define the OSPF 195 configuration and operational state for OSPF areas and interfaces. 197 The topologies container defines the OSPF configuration and 198 operational state for OSPF topologies when the multi-topology feature 199 is supported. 201 2.3. OSPFv2 and OSPFv3 203 The data model defined herein supports both OSPFv2 and OSPFv3. 205 The field 'version' is used to indicate the OSPF version and is 206 mandatory. Based on the configured version, the data model varies to 207 accommodate the differences between OSPFv2 and OSPFv3. 209 2.4. Optional Features 211 Optional features are beyond the basic OSPF configuration and it is 212 the responsibility of each vendor to decide whether to support a 213 given feature on a particular device. 215 This model defines the following optional features: 217 1. multi-topology: Support Multiple-Topolgy Routing (MTR) 218 [RFC4915]. 220 2. multi-area-adj: Support OSPF multi-area adjacency [RFC5185]. 222 3. explicit-router-id: Support explicit per-instance Router-ID 223 specification. 225 4. demand-circuit: Support OSPF demand circuits [RFC1793]. 227 5. mtu-ignore: Support disabling OSPF Database Description packet 228 MTU mismatch checking. 230 6. lls: Support OSPF link-local signaling (LLS) [RFC5613]. 232 7. prefix-suppression: Support OSPF prefix advertisement 233 suppression [RFC6860]. 235 8. ttl-security: Support OSPF Time to Live (TTL) security check 236 suppression [RFC5082]. 238 9. nsr: Support OSPF Non-Stop Routing (NSR). 240 10. graceful-restart: Support Graceful OSPF Restart [RFC3623], 241 [RFC5187]. 243 11. admin-control: Support Administrative control of the protocol 244 state. 246 12. auto-cost: Support OSPF interface cost calculation according to 247 reference bandwidth [RFC2328]. 249 13. max-ecmp: Support configuration of the maximum number of Equal- 250 Cost Multi-Path (ECMP) paths. 252 14. max-lsa: Support configuration of the maximum number of LSAs the 253 OSPF instance will accept [RFC1765]. 255 15. te-rid: Support configuration of the Traffic Engineering (TE) 256 Router-ID [RFC3630], [RFC5329]. 258 16. ldp-igp-sync: Support LDP IGP synchronization [RFC5443]. 260 17. ospfv3-authentication-ipsec: Support IPsec for OSPFv3 261 authentication [RFC4552]. 263 18. fast-reroute: Support IP Fast Reroute (IP-FRR) [RFC5714]. 265 19. node-flag: Support node-flag for OSPF prefixes. [RFC7684]. 267 20. node-tag: Support node admin tag for OSPF instances [RFC7777]. 269 21. lfa: Support Loop-Free Alternates (LFAs) [RFC5286]. 271 22. remote-lfa: Support Remote Loop-Free Alternates (R-LFA) 272 [RFC7490]. 274 23. stub-router: Support RFC 6987 OSPF Stub Router advertisement 275 [RFC6987]. 277 24. pe-ce-protocol: Support OSPF as a PE-CE protocol [RFC4577], 278 [RFC6565]. 280 25. ietf-spf-delay: Support IETF SPF delay algorithm [RFC8405]. 282 26. bfd: Support BFD detection of OSPF neighbor reachability 283 [RFC5880], [RFC5881], and [I-D.ietf-bfd-yang]. 285 It is expected that vendors will support additional features through 286 vendor-specific augmentations. 288 2.5. OSPF Router Configuration/Operational State 290 The ospf container is the top level container in this data model. It 291 represents an OSPF protocol engine instance and contains the router 292 level configuration and operational state. The operational state 293 includes the instance statistics, IETF SPF delay statistics, AS- 294 Scoped Link State Database, local RIB, SPF Log, and the LSA log. 296 module: ietf-ospf 297 augment /rt:routing/rt:control-plane-protocols/ 298 rt:control-plane-protocol: 299 +--rw ospf 300 . 301 . 302 +--rw af iana-rt-types:address-family 303 +--rw explicit-router-id? rt-types:router-id 304 | {explicit-router-id}? 305 +--rw preference 306 | +--rw (scope)? 307 | +--:(single-value) 308 | | +--rw all? uint8 309 | +--:(multi-values) 310 | +--rw (granularity)? 311 | | +--:(detail) 312 | | | +--rw intra-area? uint8 313 | | | +--rw inter-area? uint8 314 | | +--:(coarse) 315 | | +--rw internal? uint8 316 | +--rw external? uint8 317 +--rw nsr {nsr}? 318 | +--rw enable? boolean 319 +--rw graceful-restart {graceful-restart}? 320 | +--rw enable? boolean 321 | +--rw helper-enable? boolean 322 | +--rw restart-interval? uint16 323 | +--rw helper-strict-lsa-checking? boolean 324 +--rw enable? boolean {admin-control}? 325 +--rw auto-cost {auto-cost}? 326 | +--rw enable? boolean 327 | +--rw reference-bandwidth? uint32 328 +--rw spf-control 329 | +--rw paths? uint16 {max-ecmp}? 330 | +--rw ietf-spf-delay {ietf-spf-delay}? 331 | +--rw initial-delay? uint16 332 | +--rw short-delay? uint16 333 | +--rw long-delay? uint16 334 | +--rw hold-down? uint16 335 | +--rw time-to-learn? uint16 336 | +--ro current-state? enumeration 337 | +--ro remaining-time-to-learn? uint16 338 | +--ro remaining-hold-down? uint16 339 | +--ro last-event-received? yang:timestamp 340 | +--ro next-spf-time? yang:timestamp 341 | +--ro last-spf-time? yang:timestamp 342 +--rw database-control 343 | +--rw max-lsa? uint32 {max-lsa}? 344 +--rw stub-router {stub-router}? 345 | +--rw (trigger)? 346 | +--:(always) 347 | +--rw always! 348 +--rw mpls 349 | +--rw te-rid {te-rid}? 350 | | +--rw ipv4-router-id? inet:ipv4-address 351 | | +--rw ipv6-router-id? inet:ipv6-address 352 | +--rw ldp 353 | +--rw igp-sync? boolean {ldp-igp-sync}? 354 +--rw fast-reroute {fast-reroute}? 355 | +--rw lfa {lfa}? 356 +--ro protected-routes 357 | +--ro af-stats* [af prefix alternate] 358 | +--ro af iana-rt-types:address-family 359 | +--ro prefix string 360 | +--ro alternate string 361 | +--ro alternate-type? enumeration 362 | +--ro best? boolean 363 | +--ro non-best-reason? string 364 | +--ro protection-available? bits 365 | +--ro alternate-metric1? uint32 366 | +--ro alternate-metric2? uint32 367 | +--ro alternate-metric3? uint32 368 +--ro unprotected-routes 369 | +--ro af-stats* [af prefix] 370 | +--ro af iana-rt-types:address-family 371 | +--ro prefix string 372 +--ro protection-statistics* [frr-protection-method] 373 | +--ro frr-protection-method string 374 | +--ro af-stats* [af] 375 | +--ro af iana-rt-types:address-family 376 | +--ro total-routes? uint32 377 | +--ro unprotected-routes? uint32 378 | +--ro protected-routes? uint32 379 | +--ro linkprotected-routes? uint32 380 | +--ro nodeprotected-routes? uint32 381 +--rw node-tags {node-tag}? 382 | +--rw node-tag* [tag] 383 | +--rw tag uint32 384 +--ro router-id? 385 +--ro local-rib 386 | +--ro route* [prefix] 387 | +--ro prefix inet:ip-prefix 388 | +--ro next-hops 389 | | +--ro next-hop* [next-hop] 390 | | +--ro outgoing-interface? if:interface-ref 391 | | +--ro next-hop inet:ip-address 392 | +--ro metric? uint32 393 | +--ro route-type? route-type 394 | +--ro route-tag? uint32 395 +--ro statistics 396 | +--ro originate-new-lsa-count? yang:counter32 397 | +--ro rx-new-lsas-count? yang:counter32 398 | +--ro as-scope-lsa-count? yang:gauge32 399 | +--ro as-scope-lsa-chksum-sum? uint32 400 | +--ro database 401 | +--ro as-scope-lsa-type* 402 | +--ro lsa-type? uint16 403 | +--ro lsa-count? yang:gauge32 404 | +--ro lsa-cksum-sum? int32 405 +--ro database 406 | +--ro as-scope-lsa-type* [lsa-type] 407 | +--ro as-scope-lsas 408 | +--ro as-scope-lsa* [lsa-id adv-router] 409 | +--ro lsa-id union 410 | +--ro adv-router inet:ipv4-address 411 | +--ro decoded-completed? boolean 412 | +--ro raw-data? yang:hex-string 413 | +--ro (version)? 414 | +--:(ospfv2) 415 | | +--ro ospfv2 416 . . 417 . . 418 | +--:(ospfv3) 419 | +--ro ospfv3 420 . 421 . 422 +--ro spf-log 423 | +--ro event* [id] 424 | +--ro id uint32 425 | +--ro spf-type? enumeration 426 | +--ro schedule-timestamp? yang:timestamp 427 | +--ro start-timestamp? yang:timestamp 428 +--ro end-timestamp? yang:timestamp 429 | +--ro trigger-lsa* 430 | +--ro area-id? area-id-type 431 | +--ro link-id? union 432 | +--ro type? uint16 433 | +--ro lsa-id? yang:dotted-quad 434 | +--ro adv-router? yang:dotted-quad 435 | +--ro seq-num? uint32 436 +--ro lsa-log 437 | +--ro event* [id] 438 | +--ro id uint32 439 | +--ro lsa 440 | | +--ro area-id? area-id-type 441 | | +--ro link-id? union 442 | | +--ro type? uint16 443 | | +--ro lsa-id? yang:dotted-quad 444 | | +--ro adv-router? yang:dotted-quad 445 | | +--ro seq-num? uint32 446 | +--ro received-timestamp? yang:timestamp 447 | +--ro reason? identityref 448 . 449 . 451 2.6. OSPF Area Configuration/Operational State 453 The area container contains OSPF area configuration and the list of 454 interface containers representing all the OSPF interfaces in the 455 area. The area operational state includes the area statistics and 456 the Area Link State Database (LSDB). 458 module: ietf-ospf 459 augment /rt:routing/rt:control-plane-protocols/ 460 rt:control-plane-protocol: 461 +--rw ospf 462 . 463 . 464 +--rw areas 465 | +--rw area* [area-id] 466 | +--rw area-id area-id-type 467 | +--rw area-type? identityref 468 | +--rw summary? boolean 469 | +--rw default-cost? uint32 470 | +--rw ranges 471 | | +--rw range* [prefix] 472 | | +--rw prefix inet:ip-prefix 473 | | +--rw advertise? boolean 474 | | +--rw cost? uint24 475 | +--ro statistics 476 | | +--ro spf-runs-count? yang:counter32 477 | | +--ro abr-count? yang:gauge32 478 | | +--ro asbr-count? yang:gauge32 479 | | +--ro ar-nssa-translator-event-count? 480 | | yang:counter32 481 | | +--ro area-scope-lsa-count? yang:gauge32 482 | | +--ro area-scope-lsa-cksum-sum? int32 483 | | +--ro database 484 | | +--ro area-scope-lsa-type* 485 | | +--ro lsa-type? uint16 486 | | +--ro lsa-count? yang:gauge32 487 | | +--ro lsa-cksum-sum? int32 488 | +--ro database 489 | | +--ro area-scope-lsa-type* [lsa-type] 490 | | +--ro lsa-type uint16 491 | | +--ro area-scope-lsas 492 | | +--ro area-scope-lsa* [lsa-id adv-router] 493 | | +--ro lsa-id union 494 . . . 495 . . . 496 | | +--ro (version)? 497 | | +--:(ospfv2) 498 | | | +--ro ospfv2 499 | | | +--ro header 500 . . . . 501 . . . . 502 | | | +--ro body 503 | | | +--ro router 504 . . . . 505 . . . . 506 | | | +--ro network 507 . . . . 508 . . . . 509 | | | +--ro summary 510 . . . . 511 . . . . 512 | | | +--ro external 513 . . . . 514 . . . . 515 | | | +--ro opaque 516 . . . . 517 . . . . 518 | | +--:(ospfv3) 519 | | +--ro ospfv3 520 | | +--ro header 521 . . . 522 . . . 523 | | +--ro body 524 | | +--ro router 525 . . . 526 . . . 527 | | +--ro network 528 . . . 529 . . . 530 | | +--ro inter-area-prefix 531 . . . 532 . . . 533 | | +--ro inter-area-router 534 . . . 535 . . . 536 | | +--ro as-external 537 . . . 538 . . . 539 | | +--ro nssa 540 . . . 541 . . . 542 | | +--ro link 543 . . . 544 . . . 545 | | +--ro intra-area-prefix 546 . . . 547 . . . 548 | | +--ro router-information 549 . . . 550 . . . 551 | +--rw virtual-links 552 | | +--rw virtual-link* [transit-area-id router-id] 553 | | +--rw transit-area-id -> ../../../../ 554 | | area/area-id 555 | | +--rw router-id rt-types:router-id 556 | | +--rw hello-interval? uint16 557 | | +--rw dead-interval? uint32 558 | | +--rw retransmit-interval? uint16 559 | | +--rw transmit-delay? uint16 560 | | +--rw lls? boolean {lls}? 561 | | +--rw ttl-security {ttl-security}? 562 | | | +--rw enable? boolean 563 | | | +--rw hops? uint8 564 | | +--rw enable? boolean 565 | | {admin-control}? 566 | | +--rw authentication 567 | | +--rw (auth-type-selection)? 568 | | +--:(auth-ipsec) 569 | | {ospfv3-authentication-ipsec}? 570 | | | +--rw sa? string 571 | | +--:(auth-trailer-key-chain) 572 | | | +--rw key-chain? 573 | | key-chain:key-chain-ref 574 | | +--:(auth-trailer-key) 575 | | +--rw key? string 576 | | +--rw crypto-algorithm? identityref 577 | | +--ro cost? uint16 578 | | +--ro state? if-state-type 579 | | +--ro hello-timer? uint32 580 | | +--ro wait-timer? uint32 581 | | +--ro dr-router-id? rt-types:router-id 582 | | +--ro dr-ip-addr? inet:ip-address 583 | | +--ro bdr-router-id? rt-types:router-id 584 | | +--ro bdr-ip-addr? inet:ip-address 585 | | +--ro statistics 586 | | | +--ro if-event-count? yang:counter32 587 | | | +--ro link-scope-lsa-count? yang:gauge32 588 | | | +--ro link-scope-lsa-cksum-sum? 589 | | | uint32 590 | | | +--ro database 591 | | | +--ro link-scope-lsa-type* 592 | | | +--ro lsa-type? uint16 593 | | | +--ro lsa-count? yang:gauge32 594 | | | +--ro lsa-cksum-sum? int32 595 | | +--ro neighbors 596 | | | +--ro neighbor* [neighbor-router-id] 597 | | | +--ro neighbor-router-id 598 | | | rt-types:router-id 599 | | | +--ro address? inet:ip-address 600 | | | +--ro dr-router-id? rt-types:router-id 601 | | | +--ro dr-ip-addr? inet:ip-address 602 | | | +--ro bdr-router-id? rt-types:router-id 603 | | | +--ro bdr-ip-addr? inet:ip-address 604 | | | +--ro state? nbr-state-type 605 | | | +--ro dead-timer? uint32 606 | | | +--ro statistics 607 | | | +--ro nbr-event-count? 608 | | | yang:counter32 609 | | | +--ro nbr-retrans-qlen? 610 | | | yang:gauge32 611 | | +--ro database 612 | | +--ro link-scope-lsa-type* [lsa-type] 613 | | +--ro lsa-type uint16 614 | | +--ro link-scope-lsas 615 . . 616 . . 617 | +--rw sham-links {pe-ce-protocol}? 618 | | +--rw sham-link* [local-id remote-id] 619 | | +--rw local-id inet:ip-address 620 | | +--rw remote-id inet:ip-address 621 | | +--rw hello-interval? uint16 622 | | +--rw dead-interval? uint32 623 | | +--rw retransmit-interval? uint16 624 | | +--rw transmit-delay? uint16 625 | | +--rw lls? boolean {lls}? 626 | | +--rw ttl-security {ttl-security}? 627 | | | +--rw enable? boolean 628 | | | +--rw hops? uint8 629 | | +--rw enable? boolean 630 | | {admin-control}? 631 | | +--rw authentication 632 | | | +--rw (auth-type-selection)? 633 | | | +--:(auth-ipsec) 634 | | | {ospfv3-authentication-ipsec}? 635 | | | | +--rw sa? string 636 | | | +--:(auth-trailer-key-chain) 637 | | | | +--rw key-chain? 638 | | | key-chain:key-chain-ref 639 | | | +--:(auth-trailer-key) 640 | | | +--rw key? string 641 | | | +--rw crypto-algorithm? identityref 642 | | +--rw cost? uint16 643 | | +--rw mtu-ignore? boolean 644 | | {mtu-ignore}? 645 | | +--rw prefix-suppression? boolean 646 | | {prefix-suppression}? 647 | | +--ro state? if-state-type 648 | | +--ro hello-timer? uint32 649 | | +--ro wait-timer? uint32 650 | | +--ro dr-router-id? rt-types:router-id 651 | | +--ro dr-ip-addr? inet:ip-address 652 | | +--ro bdr-router-id? rt-types:router-id 653 | | +--ro bdr-ip-addr? inet:ip-address 654 | | +--ro statistics 655 | | | +--ro if-event-count? yang:counter32 656 | | | +--ro link-scope-lsa-count? yang:gauge32 657 | | | +--ro link-scope-lsa-cksum-sum? 658 | | | uint32 659 | | | +--ro database 660 | | | +--ro link-scope-lsa-type* 661 | | | +--ro lsa-type? uint16 662 | | | +--ro lsa-count? yang:gauge32 663 | | | +--ro lsa-cksum-sum? int32 664 | | +--ro neighbors 665 | | | +--ro neighbor* [neighbor-router-id] 666 | | | +--ro neighbor-router-id 667 | | | rt-types:router-id 668 | | | +--ro address? inet:ip-address 669 | | | +--ro dr-router-id? rt-types:router-id 670 | | | +--ro dr-ip-addr? inet:ip-address 671 | | | +--ro bdr-router-id? rt-types:router-id 672 | | | +--ro bdr-ip-addr? inet:ip-address 673 | | | +--ro state? nbr-state-type 674 | | | +--ro dead-timer? uint32 675 | | | +--ro statistics 676 | | | +--ro nbr-event-count? 677 | | | yang:counter32 678 | | | +--ro nbr-retrans-qlen? 679 | | | yang:gauge32 680 | | +--ro database 681 | | +--ro link-scope-lsa-type* [lsa-type] 682 | | +--ro lsa-type uint16 683 | | +--ro link-scope-lsas 684 . . 685 . . 687 2.7. OSPF Interface Configuration/Operational State 689 The interface container contains OSPF interface configuration and 690 operational state. The interface operational state includes the 691 statistics, list of neighbors, and Link-Local Link State Database 692 (LSDB). 694 module: ietf-ospf 695 augment /rt:routing/rt:control-plane-protocols/ 696 rt:control-plane-protocol: 697 +--rw ospf 698 . 699 . 700 +--rw areas 701 | +--rw area* [area-id] 702 | . 703 | . 704 | +--rw interfaces 705 | +--rw interface* [name] 706 | +--rw name if:interface-ref 707 | +--rw interface-type? enumeration 708 | +--rw passive? boolean 709 | +--rw demand-circuit? boolean 710 | {demand-circuit}? 711 | +--rw priority? uint8 712 | +--rw multi-areas {multi-area-adj}? 713 | | +--rw multi-area* [multi-area-id] 714 | | +--rw multi-area-id area-id-type 715 | | +--rw cost? uint16 716 | +--rw static-neighbors 717 | | +--rw neighbor* [identifier] 718 | | +--rw identifier inet:ip-address 719 | | +--rw cost? uint16 720 | | +--rw poll-interval? uint16 721 | | +--rw priority? uint8 722 | +--rw node-flag? boolean 723 | {node-flag}? 724 | +--rw bfd {bfd}? 725 | | +--rw enable? boolean 726 | +--rw fast-reroute {fast-reroute}? 727 | | +--rw lfa {lfa}? 728 | | +--rw candidate-enable? boolean 729 | | +--rw enable? boolean 730 | | +--rw remote-lfa {remote-lfa}? 731 | | +--rw enable? boolean 732 | +--rw hello-interval? uint16 733 | +--rw dead-interval? uint32 734 | +--rw retransmit-interval? uint16 735 | +--rw transmit-delay? uint16 736 | +--rw lls? boolean {lls}? 737 | +--rw ttl-security {ttl-security}? 738 | | +--rw enable? boolean 739 | | +--rw hops? uint8 740 | +--rw enable? boolean 741 | {admin-control}? 742 | +--rw authentication 743 | | +--rw (auth-type-selection)? 744 | | +--:(auth-ipsec) 745 | | | {ospfv3-authentication-ipsec}? 746 | | | +--rw sa? string 747 | | +--:(auth-trailer-key-chain) 748 | | | +--rw key-chain? 749 | | | key-chain:key-chain-ref 750 | | +--:(auth-trailer-key) 751 | | +--rw key? string 752 | | +--rw crypto-algorithm? identityref 753 | +--rw cost? uint16 754 | +--rw mtu-ignore? boolean 755 | | {mtu-ignore}? 756 | +--rw prefix-suppression? boolean 757 | | {prefix-suppression}? 758 | +--ro state? if-state-type 759 | +--ro hello-timer? uint32 760 | +--ro wait-timer? uint32 761 | +--ro dr-router-id? rt-types:router-id 762 | +--ro dr-ip-addr? inet:ip-address 763 | +--ro bdr-router-id? rt-types:router-id 764 | +--ro bdr-ip-addr? inet:ip-address 765 | +--ro statistics 766 | | +--ro if-event-count? yang:counter32 767 | | +--ro link-scope-lsa-count? yang:gauge32 768 | | +--ro link-scope-lsa-cksum-sum? 769 | | uint32 770 | | +--ro database 771 | | +--ro link-scope-lsa-type* 772 | | +--ro lsa-type? uint16 773 | | +--ro lsa-count? yang:gauge32 774 | | +--ro lsa-cksum-sum? int32 775 | +--ro neighbors 776 | | +--ro neighbor* [neighbor-router-id] 777 | | +--ro neighbor-router-id 778 | | rt-types:router-id 779 | | +--ro address? inet:ip-address 780 | | +--ro dr-router-id? rt-types:router-id 781 | | +--ro dr-ip-addr? inet:ip-address 782 | | +--ro bdr-router-id? rt-types:router-id 783 | | +--ro bdr-ip-addr? inet:ip-address 784 | | +--ro state? nbr-state-type 785 | | +--ro dead-timer? uint32 786 | | +--ro statistics 787 | | +--ro nbr-event-count? 788 | | yang:counter32 789 | | +--ro nbr-retrans-qlen? 790 | | yang:gauge32 791 | +--ro database 792 | . +--ro link-scope-lsa-type* [lsa-type] 793 | . +--ro lsa-type uint16 794 | . +--ro link-scope-lsas 795 . . 796 . . 797 | +--rw topologies {ospf:multi-topology}? 798 | | +--rw topology* [name] 799 | | +--rw name -> ../../../../../../../../ 800 | | ../../../rt:ribs/rib/name 801 | | +--rw cost? uint32 802 | +--rw instance-id? uint8 803 . 804 . 806 2.8. OSPF notification 808 This YANG model defines a list of notifications that inform YANG 809 clients of important events detected during protocol operation. The 810 defined notifications cover the common set of traps from the OSPFv2 811 MIB [RFC4750] and OSPFv3 MIB [RFC5643]. 813 notifications: 814 +---n if-state-change 815 | +--ro routing-protocol-name? 816 | + -> /rt:routing/control-plane-protocols/ 817 | + control-plane-protocol/name 818 | +--ro af? 819 | + -> /rt:routing/control-plane-protocols/ 820 | + control-plane-protocol 821 | + [rt:name=current()/../routing-protocol-name]/ 822 | + ospf:ospf/af 823 | +--ro (if-link-type-selection)? 824 | | +--:(interface) 825 | | | +--ro interface 826 | | | +--ro interface? if:interface-ref 827 | | +--:(virtual-link) 828 | | | +--ro virtual-link 829 | | | +--ro transit-area-id? area-id-type 830 | | | +--ro neighbor-router-id? rt-types:router-id 831 | | +--:(sham-link) 832 | | +--ro sham-link 833 | | +--ro area-id? area-id-type 834 | | +--ro local-ip-addr? inet:ip-address 835 | | +--ro remote-ip-addr? inet:ip-address 836 | +--ro state? if-state-type 837 +---n if-config-error 838 | +--ro routing-protocol-name? 839 | + -> /rt:routing/control-plane-protocols/ 840 | + control-plane-protocol/name 841 | +--ro af? 842 | + -> /rt:routing/control-plane-protocols/ 843 | + control-plane-protocol 844 | + [rt:name=current()/../routing-protocol-name]/ 845 | + ospf:ospf/af 846 | +--ro (if-link-type-selection)? 847 | | +--:(interface) 848 | | | +--ro interface 849 | | | +--ro interface? if:interface-ref 850 | | +--:(virtual-link) 851 | | | +--ro virtual-link 852 | | | +--ro transit-area-id? area-id-type 853 | | | +--ro neighbor-router-id? rt-types:router-id 854 | | +--:(sham-link) 855 | | +--ro sham-link 856 | | +--ro area-id? area-id-type 857 | | +--ro local-ip-addr? inet:ip-address 858 | | +--ro remote-ip-addr? inet:ip-address 859 | +--ro packet-source? yang:dotted-quad 860 | +--ro packet-type? packet-type 861 | +--ro error? enumeration 862 +---n nbr-state-change 863 | +--ro routing-protocol-name? 864 | + -> /rt:routing/control-plane-protocols/ 865 | + control-plane-protocol/name 866 | +--ro af? 867 | + -> /rt:routing/control-plane-protocols/ 868 | + control-plane-protocol 869 | + [rt:name=current()/../routing-protocol-name]/ 870 | + ospf:ospf/af 871 | +--ro (if-link-type-selection)? 872 | | +--:(interface) 873 | | | +--ro interface 874 | | | +--ro interface? if:interface-ref 875 | | +--:(virtual-link) 876 | | | +--ro virtual-link 877 | | | +--ro transit-area-id? area-id-type 878 | | | +--ro neighbor-router-id? rt-types:router-id 879 | | +--:(sham-link) 880 | | +--ro sham-link 881 | | +--ro area-id? area-id-type 882 | | +--ro local-ip-addr? inet:ip-address 883 | | +--ro remote-ip-addr? inet:ip-address 884 | +--ro neighbor-router-id? rt-types:router-id 885 | +--ro neighbor-ip-addr? yang:dotted-quad 886 | +--ro state? nbr-state-type 887 +---n nbr-restart-helper-status-change 888 | +--ro routing-protocol-name? 889 | + -> /rt:routing/control-plane-protocols/ 890 | + control-plane-protocol/name 891 | +--ro af? 892 | + -> /rt:routing/control-plane-protocols/ 893 | + control-plane-protocol 894 | + [rt:name=current()/../routing-protocol-name]/ 895 | + ospf:ospf/af 896 | +--ro (if-link-type-selection)? 897 | | +--:(interface) 898 | | | +--ro interface 899 | | | +--ro interface? if:interface-ref 900 | | +--:(virtual-link) 901 | | | +--ro virtual-link 902 | | | +--ro transit-area-id? area-id-type 903 | | | +--ro neighbor-router-id? rt-types:router-id 904 | | +--:(sham-link) 905 | | +--ro sham-link 906 | | +--ro area-id? area-id-type 907 | | +--ro local-ip-addr? inet:ip-address 908 | | +--ro remote-ip-addr? inet:ip-address 909 | +--ro neighbor-router-id? rt-types:router-id 910 | +--ro neighbor-ip-addr? yang:dotted-quad 911 | +--ro status? restart-helper-status-type 912 | +--ro age? uint32 913 | +--ro exit-reason? restart-exit-reason-type 914 +---n if-rx-bad-packet 915 | +--ro routing-protocol-name? 916 | + -> /rt:routing/control-plane-protocols/ 917 | + control-plane-protocol/name 918 | +--ro af? 919 | + -> /rt:routing/control-plane-protocols/ 920 | + control-plane-protocol 921 | + [rt:name=current()/../routing-protocol-name]/ 922 | + ospf:ospf/af 923 | +--ro (if-link-type-selection)? 924 | | +--:(interface) 925 | | | +--ro interface 926 | | | +--ro interface? if:interface-ref 927 | | +--:(virtual-link) 928 | | | +--ro virtual-link 929 | | | +--ro transit-area-id? area-id-type 930 | | | +--ro neighbor-router-id? rt-types:router-id 931 | | +--:(sham-link) 932 | | +--ro sham-link 933 | | +--ro area-id? area-id-type 934 | | +--ro local-ip-addr? inet:ip-address 935 | | +--ro remote-ip-addr? inet:ip-address 936 | +--ro packet-source? yang:dotted-quad 937 | +--ro packet-type? packet-type 938 +---n lsdb-approaching-overflow 939 | +--ro routing-protocol-name? 940 | + -> /rt:routing/control-plane-protocols/ 941 | + control-plane-protocol/name 942 | +--ro af? 943 | + -> /rt:routing/control-plane-protocols/ 944 | + control-plane-protocol 945 | + [rt:name=current()/../routing-protocol-name]/ 946 | + ospf:ospf/af 947 | +--ro ext-lsdb-limit? uint32 948 +---n lsdb-overflow 949 | +--ro routing-protocol-name? 950 | + -> /rt:routing/control-plane-protocols/ 951 | + control-plane-protocol/name 952 | +--ro af? 953 | + -> /rt:routing/control-plane-protocols/ 954 | + control-plane-protocol 955 | + [rt:name=current()/../routing-protocol-name]/ 956 | + ospf:ospf/af 957 | +--ro ext-lsdb-limit? uint32 958 +---n nssa-translator-status-change 959 | +--ro routing-protocol-name? 960 | + -> /rt:routing/control-plane-protocols/ 961 | + control-plane-protocol/name 962 | +--ro af? 963 | + -> /rt:routing/control-plane-protocols/ 964 | + control-plane-protocol 965 | + [rt:name=current()/../routing-protocol-name]/ 966 | + ospf:ospf/af 967 | +--ro area-id? area-id-type 968 | +--ro status? nssa-translator-state-type 969 +---n restart-status-change 970 +--ro routing-protocol-name? 971 + -> /rt:routing/control-plane-protocols/ 972 + control-plane-protocol/name 973 +--ro af? 974 + -> /rt:routing/control-plane-protocols/ 975 + control-plane-protocol 976 + [rt:name=current()/../routing-protocol-name]/ 977 + ospf:ospf/af 978 +--ro status? restart-status-type 979 +--ro restart-interval? uint16 980 +--ro exit-reason? restart-exit-reason-type 982 2.9. OSPF RPC Operations 984 The "ietf-ospf" module defines two RPC operations: 986 o clear-database: reset the content of a particular OSPF Link State 987 Database. 989 o clear-neighbor: restart a particular set of OSPF neighbor. 991 rpcs: 992 +---x clear-neighbor 993 | +---w input 994 | +---w routing-protocol-name 995 | + -> /rt:routing/control-plane-protocols/ 996 | + control-plane-protocol/name 997 | +---w interface? if:interface-ref 998 +---x clear-database 999 +---w input 1000 +---w routing-protocol-name 1001 -> /rt:routing/control-plane-protocols/ 1002 control-plane-protocol/name 1004 3. OSPF YANG Module 1006 The following RFCs and drafts are not referenced in the document text 1007 but are referenced in the ietf-ospf.yang module: [RFC0905], 1008 [RFC4576], [RFC5250], [RFC5881], [RFC6991], [RFC7770], and [RFC8294]. 1010 file "ietf-ospf@2018-11-27.yang" 1011 module ietf-ospf { 1012 yang-version 1.1; 1013 namespace "urn:ietf:params:xml:ns:yang:ietf-ospf"; 1015 prefix ospf; 1017 import ietf-inet-types { 1018 prefix "inet"; 1019 reference "RFC 6991 - Common YANG Data Types"; 1020 } 1022 import ietf-yang-types { 1023 prefix "yang"; 1024 reference "RFC 6991 - Common YANG Data Types"; 1025 } 1027 import ietf-interfaces { 1028 prefix "if"; 1029 reference "RFC 8343 - A YANG Data Model for Interface 1030 Management (NDMA Version)"; 1031 } 1033 import ietf-routing-types { 1034 prefix "rt-types"; 1035 reference "RFC 8294 - Common YANG Data Types for the 1036 Routing Area"; 1037 } 1039 import iana-routing-types { 1040 prefix "iana-rt-types"; 1041 reference "RFC 8294 - Common YANG Data Types for the 1042 Routing Area"; 1043 } 1045 import ietf-routing { 1046 prefix "rt"; 1047 reference "RFC 8349 - A YANG Data Model for Routing 1048 Management (NMDA Version)"; 1049 } 1051 import ietf-key-chain { 1052 prefix "key-chain"; 1053 reference "RFC 8177 - YANG Data Model for Key Chains"; 1054 } 1056 import ietf-bfd-types { 1057 prefix "bfd-types"; 1058 reference "RFC YYYY - YANG Data Model for Bidirectional 1059 Forwarding Detection (BFD). Please replace YYYY with 1060 published RFC number for draft-ietf-bfd-yang-17."; 1061 } 1063 organization 1064 "IETF LSR - Link State Routing Working Group"; 1066 contact 1067 "WG Web: 1068 WG List: 1070 Editor: Derek Yeung 1071 1072 Author: Acee Lindem 1073 1074 Author: Yingzhen Qu 1075 1076 Author: Jeffrey Zhang 1077 1078 Author: Ing-Wher Chen 1079 1080 Author: Dean Bogdanovic 1081 1082 Author: Kiran Agrahara Sreenivasa 1083 2636 tuple with the sequence number differentiating 2637 LSA instances."; 2638 container header { 2639 must "(derived-from(type, " 2640 + "'ospfv2-opaque-lsa-type') and " 2641 + "opaque-id and opaque-type) or " 2642 + "(not(derived-from(type, " 2643 + "'ospfv2-opaque-lsa-type')) " 2644 + "and not(opaque-id) and not(opaque-type))" { 2645 description 2646 "Opaque type and ID only apply to Opaque LSAs."; 2647 } 2648 description 2649 "Decoded OSPFv2 LSA header data."; 2650 leaf option { 2651 type bits { 2652 bit MT { 2653 description 2654 "When set, the router supports multi-topology as 2655 in RFC 4915."; 2656 } 2657 bit DC { 2658 description 2659 "When set, the router supports demand circuits."; 2660 } 2661 bit P { 2662 description 2663 "Only used in type-7 LSA. When set, an NSSA 2664 border router should translate the type-7 LSA 2665 to a type-5 LSA."; 2666 } 2667 bit MC { 2668 description 2669 "When set, the router supports MOSPF."; 2670 } 2671 bit E { 2672 description 2673 "This bit describes the way AS-external LSAs 2674 are flooded."; 2675 } 2676 bit O { 2677 description 2678 "When set, the router is opaque-capable as in 2679 RFC 5250."; 2680 } 2681 bit DN { 2682 description 2683 "When a type 3, 5 or 7 LSA is sent from a PE to a CE, 2684 the DN bit must be set. See RFC 4576."; 2685 } 2686 } 2687 mandatory true; 2688 description "LSA options."; 2689 } 2690 leaf lsa-id { 2691 type yang:dotted-quad; 2692 mandatory true; 2693 description "Link-State ID."; 2694 } 2696 leaf opaque-type { 2697 type uint8; 2698 description "Opaque type."; 2699 } 2701 leaf opaque-id { 2702 type opaque-id; 2703 description "Opaque ID."; 2704 } 2706 uses lsa-header; 2707 } 2708 container body { 2709 description 2710 "Decoded OSPFv2 LSA body data."; 2711 uses ospfv2-lsa-body; 2712 } 2713 } 2715 grouping ospfv3-lsa { 2716 description 2717 "Decoded OSPFv3 LSA."; 2718 container header { 2719 description 2720 "Decoded OSPFv3 LSA header data."; 2721 leaf lsa-id { 2722 type uint32; 2723 mandatory true; 2724 description "OSPFv3 LSA ID."; 2725 } 2726 uses lsa-header; 2727 } 2728 container body { 2729 description 2730 "Decoded OSPF LSA body data."; 2731 uses ospfv3-lsa-body; 2732 } 2733 } 2734 grouping lsa-common { 2735 description 2736 "Common fields for OSPF LSA represenation."; 2737 leaf decoded-completed { 2738 type boolean; 2739 description 2740 "The OSPF LSA body is fully decoded."; 2741 } 2742 leaf raw-data { 2743 type yang:hex-string; 2744 description 2745 "The complete LSA in network byte 2746 order hexadecimal as received or originated."; 2747 } 2748 } 2750 grouping lsa { 2751 description 2752 "OSPF LSA."; 2753 uses lsa-common; 2754 choice version { 2755 description 2756 "OSPFv2 or OSPFv3 LSA body."; 2757 container ospfv2 { 2758 description "OSPFv2 LSA"; 2759 uses ospfv2-lsa; 2760 } 2761 container ospfv3 { 2762 description "OSPFv3 LSA"; 2763 uses ospfv3-lsa; 2764 } 2765 } 2766 } 2768 grouping lsa-key { 2769 description 2770 "OSPF LSA key."; 2771 leaf lsa-id { 2772 type union { 2773 type yang:dotted-quad; 2774 type uint32; 2775 } 2776 description 2777 "Link-State ID."; 2778 } 2779 leaf adv-router { 2780 type rt-types:router-id; 2781 description 2782 "Advertising router."; 2783 } 2784 } 2786 grouping instance-stat { 2787 description "Per-instance statistics"; 2788 leaf originate-new-lsa-count { 2789 type yang:counter32; 2790 description "The number of new LSAs originated."; 2791 } 2792 leaf rx-new-lsas-count { 2793 type yang:counter32; 2794 description "The number of LSAs received."; 2795 } 2796 leaf as-scope-lsa-count { 2797 type yang:gauge32; 2798 description "The number of AS-scope LSAs."; 2799 } 2800 leaf as-scope-lsa-chksum-sum { 2801 type uint32; 2802 description 2803 "The sum of the LSA checksums for AS-scope LSAs."; 2804 } 2805 container database { 2806 description "Container for per AS-scope LSA statistics."; 2807 list as-scope-lsa-type { 2808 description "List of AS-scope LSA statistics"; 2809 leaf lsa-type { 2810 type uint16; 2811 description "AS-Scope LSA type."; 2812 } 2813 leaf lsa-count { 2814 type yang:gauge32; 2815 description "The number of LSAs of the LSA type."; 2816 } 2817 leaf lsa-cksum-sum { 2818 type uint32; 2819 description 2820 "The sum of the LSA checksums of the LSA type."; 2821 } 2822 } 2823 } 2824 uses instance-fast-reroute-state; 2825 } 2827 grouping area-stat { 2828 description "Per-area statistics."; 2829 leaf spf-runs-count { 2830 type yang:counter32; 2831 description 2832 "The number of times the intra-area SPF has run."; 2833 } 2834 leaf abr-count { 2835 type yang:gauge32; 2836 description 2837 "The total number of Area Border Routers (ABRs) 2838 reachable within this area."; 2839 } 2840 leaf asbr-count { 2841 type yang:gauge32; 2842 description 2843 "The total number of AS Boundary Routers (ASBRs)."; 2844 } 2845 leaf ar-nssa-translator-event-count { 2846 type yang:counter32; 2847 description 2848 "The number of NSSA translator-state changes."; 2849 } 2850 leaf area-scope-lsa-count { 2851 type yang:gauge32; 2852 description 2853 "The number of area-scope LSAs in the area."; 2854 } 2855 leaf area-scope-lsa-cksum-sum { 2856 type uint32; 2857 description "The sum of the area-scope LSAs checksums."; 2858 } 2859 container database { 2860 description "Container for area-scope LSA type statistics."; 2861 list area-scope-lsa-type { 2862 description "List of area-scope LSA statistics"; 2863 leaf lsa-type { 2864 type uint16; 2865 description "Area-scope LSA type."; 2866 } 2867 leaf lsa-count { 2868 type yang:gauge32; 2869 description "The number of LSAs of the LSA type."; 2870 } 2871 leaf lsa-cksum-sum { 2872 type uint32; 2873 description 2874 "The sum of the LSA checksums of the LSA type."; 2875 } 2876 } 2877 } 2878 } 2880 grouping interface-stat { 2881 description "Per-interface statistics"; 2882 leaf if-event-count { 2883 type yang:counter32; 2884 description 2885 "The number of times this interface has changed its 2886 state or an error has occurred."; 2887 } 2888 leaf link-scope-lsa-count { 2889 type yang:gauge32; 2890 description "The number of link-scope LSAs."; 2891 } 2892 leaf link-scope-lsa-cksum-sum { 2893 type uint32; 2894 description "The sum of link-scope LSA checksums."; 2895 } 2896 container database { 2897 description "Container for link-scope LSA type statistics."; 2898 list link-scope-lsa-type { 2899 description "List of link-scope LSA statistics"; 2900 leaf lsa-type { 2901 type uint16; 2902 description "Link scope LSA type."; 2903 } 2904 leaf lsa-count { 2905 type yang:gauge32; 2906 description "The number of LSAs of the LSA type."; 2907 } 2908 leaf lsa-cksum-sum { 2909 type uint32; 2910 description 2911 "The sum of the LSA checksums of the LSA type."; 2912 } 2913 } 2914 } 2915 } 2917 grouping neighbor-stat { 2918 description "Per-neighbor statistics."; 2919 leaf nbr-event-count { 2920 type yang:counter32; 2921 description 2922 "The number of times this neighbor has changed 2923 state or an error has occurred."; 2924 } 2925 leaf nbr-retrans-qlen { 2926 type yang:gauge32; 2927 description 2928 "The current length of the retransmission queue."; 2929 } 2930 } 2931 grouping instance-fast-reroute-config { 2932 description 2933 "This group defines global configuration of IP 2934 Fast ReRoute (FRR)."; 2935 container fast-reroute { 2936 if-feature fast-reroute; 2937 description 2938 "This container may be augmented with global 2939 parameters for IP-FRR."; 2940 container lfa { 2941 if-feature lfa; 2942 description 2943 "This container may be augmented with 2944 global parameters for Loop-Free Alternatives (LFA). 2945 Container creation has no effect on LFA activation."; 2946 } 2947 } 2948 } 2950 grouping instance-fast-reroute-state { 2951 description "IPFRR state data grouping"; 2953 container protected-routes { 2954 if-feature fast-reroute; 2955 config false; 2956 description "Instance protection statistics"; 2958 list address-family-stats { 2959 key "address-family prefix alternate"; 2960 description 2961 "Per Address Family protected prefix information"; 2963 leaf address-family { 2964 type iana-rt-types:address-family; 2965 description 2966 "Address-family"; 2967 } 2968 leaf prefix { 2969 type string; 2970 description 2971 "Protected prefix."; 2972 } 2973 leaf alternate { 2974 type string; 2975 description 2976 "Alternate nexthop for the prefix."; 2977 } 2978 leaf alternate-type { 2979 type enumeration { 2980 enum equal-cost { 2981 description 2982 "ECMP alternate."; 2983 } 2984 enum lfa { 2985 description 2986 "LFA alternate."; 2987 } 2988 enum remote-lfa { 2989 description 2990 "Remote LFA alternate."; 2991 } 2992 enum tunnel { 2993 description 2994 "Tunnel based alternate 2995 (like RSVP-TE or GRE)."; 2996 } 2997 enum ti-lfa { 2998 description 2999 "TI-LFA alternate."; 3000 } 3001 enum mrt { 3002 description 3003 "MRT alternate."; 3004 } 3005 enum other { 3006 description 3007 "Unknown alternate type."; 3008 } 3009 } 3010 description 3011 "Type of alternate."; 3012 } 3013 leaf best { 3014 type boolean; 3015 description 3016 "Indicates if the alternate is the preferred."; 3017 } 3018 leaf non-best-reason { 3019 type string; 3020 description 3021 "Information field to describe why the alternate 3022 is not best."; 3023 } 3024 leaf protection-available { 3025 type bits { 3026 bit node-protect { 3027 position 0; 3028 description 3029 "Node protection available."; 3030 } 3031 bit link-protect { 3032 position 1; 3033 description 3034 "Link protection available."; 3035 } 3036 bit srlg-protect { 3037 position 2; 3038 description 3039 "SRLG protection available."; 3040 } 3041 bit downstream-protect { 3042 position 3; 3043 description 3044 "Downstream protection available."; 3045 } 3046 bit other { 3047 position 4; 3048 description 3049 "Other protection available."; 3050 } 3051 } 3052 description "Protection provided by the alternate."; 3053 } 3054 leaf alternate-metric1 { 3055 type uint32; 3056 description 3057 "Metric from Point of Local Repair (PLR) to 3058 destination through the alternate path."; 3059 } 3060 leaf alternate-metric2 { 3061 type uint32; 3062 description 3063 "Metric from PLR to the alternate node"; 3064 } 3065 leaf alternate-metric3 { 3066 type uint32; 3067 description 3068 "Metric from alternate node to the destination"; 3069 } 3070 } 3071 } 3073 container unprotected-routes { 3074 if-feature fast-reroute; 3075 config false; 3076 description "List of prefixes that are not protected"; 3078 list address-family-stats { 3079 key "address-family prefix"; 3080 description 3081 "Per Address Family (AF) unprotected prefix statistics."; 3083 leaf address-family { 3084 type iana-rt-types:address-family; 3085 description "Address-family"; 3086 } 3087 leaf prefix { 3088 type string; 3089 description "Unprotected prefix."; 3090 } 3091 } 3092 } 3094 list protection-statistics { 3095 key frr-protection-method; 3096 config false; 3097 description "List protection method statistics"; 3099 leaf frr-protection-method { 3100 type string; 3101 description "Protection method used."; 3102 } 3103 list address-family-stats { 3104 key address-family; 3105 description "Per Address Family protection statistics."; 3107 leaf address-family { 3108 type iana-rt-types:address-family; 3109 description "Address-family"; 3110 } 3111 leaf total-routes { 3112 type uint32; 3113 description "Total prefixes."; 3114 } 3115 leaf unprotected-routes { 3116 type uint32; 3117 description 3118 "Total prefixes that are not protected."; 3119 } 3120 leaf protected-routes { 3121 type uint32; 3122 description 3123 "Total prefixes that are protected."; 3124 } 3125 leaf linkprotected-routes { 3126 type uint32; 3127 description 3128 "Total prefixes that are link protected."; 3129 } 3130 leaf nodeprotected-routes { 3131 type uint32; 3132 description 3133 "Total prefixes that are node protected."; 3134 } 3135 } 3136 } 3137 } 3139 grouping interface-fast-reroute-config { 3140 description 3141 "This group defines interface configuration of IP-FRR."; 3142 container fast-reroute { 3143 if-feature fast-reroute; 3144 container lfa { 3145 if-feature lfa; 3146 leaf candidate-enable { 3147 type boolean; 3148 default true; 3149 description 3150 "Enable the interface to be used as backup."; 3151 } 3152 leaf enable { 3153 type boolean; 3154 default false; 3155 description 3156 "Activates LFA - Per-prefix LFA computation 3157 is assumed."; 3158 } 3159 container remote-lfa { 3160 if-feature remote-lfa; 3161 leaf enable { 3162 type boolean; 3163 default false; 3164 description 3165 "Activates Remote LFA (R-LFA)."; 3166 } 3167 description 3168 "Remote LFA configuration."; 3169 } 3170 description 3171 "LFA configuration."; 3172 } 3173 description 3174 "Interface IP Fast-reroute configuration."; 3175 } 3176 } 3178 grouping interface-physical-link-config { 3179 description 3180 "Interface cost configuration that only applies to 3181 physical interfaces (non-virtual) and sham links."; 3182 leaf cost { 3183 type uint16 { 3184 range "1..65535"; 3185 } 3186 description 3187 "Interface cost."; 3188 } 3189 leaf mtu-ignore { 3190 if-feature mtu-ignore; 3191 type boolean; 3192 description 3193 "Enable/Disable bypassing the MTU mismatch check in 3194 Database Description packets."; 3195 } 3196 leaf prefix-suppression { 3197 if-feature prefix-suppression; 3198 type boolean; 3199 description 3200 "Suppress advertisement of the prefixes associated 3201 with the interface."; 3202 } 3203 } 3205 grouping interface-common-config { 3206 description 3207 "Common configuration for all types of interfaces, 3208 including virtual links and sham links."; 3210 leaf hello-interval { 3211 type uint16 { 3212 range "1..65535"; 3213 } 3214 description 3215 "Interval between hello packets (seconds)."; 3216 } 3218 leaf dead-interval { 3219 type uint32 { 3220 range "1..2147483647"; 3221 } 3222 units seconds; 3223 must "../dead-interval > ../hello-interval" { 3224 error-message "The dead interval must be " 3225 + "larger than the hello interval"; 3226 description 3227 "The value MUST be greater than 'hello-internval'."; 3228 } 3229 description 3230 "Interval after which a neighbor is declared down 3231 (seconds) if hello packets are not received."; 3232 } 3234 leaf retransmit-interval { 3235 type uint16 { 3236 range "1..3600"; 3237 } 3238 units seconds; 3239 description 3240 "Interval between retransmitting unacknowledged Link 3241 State Advertisements (LSAs) (seconds)."; 3242 } 3244 leaf transmit-delay { 3245 type uint16 { 3246 range "1..3600"; 3247 } 3248 units seconds; 3249 description 3250 "Estimated time needed to transmit Link State Update 3251 (LSU) packets on the interface (seconds)."; 3252 } 3254 leaf lls { 3255 if-feature lls; 3256 type boolean; 3257 description 3258 "Enable/Disable link-local signaling (LLS) support."; 3259 } 3261 container ttl-security { 3262 if-feature ttl-security; 3263 description "Time to Live (TTL) security check."; 3264 leaf enable { 3265 type boolean; 3266 description 3267 "Enable/Disable TTL security check."; 3268 } 3269 leaf hops { 3270 type uint8 { 3271 range "1..254"; 3272 } 3273 description 3274 "Maximum number of hops that an OSPF packet may 3275 have traversed before reception."; 3276 } 3277 } 3278 leaf enable { 3279 if-feature admin-control; 3280 type boolean; 3281 default true; 3282 description 3283 "Enable/disable OSPF protocol on the interface."; 3284 } 3286 container authentication { 3287 description "Authentication configuration."; 3288 choice auth-type-selection { 3289 description 3290 "Options for OSPFv3 authentication configuration."; 3291 case auth-ipsec { 3292 when "derived-from-or-self(../../../../../../rt:type, " 3293 + "'ospf:ospfv3')" { 3294 description "Applied to OSPFv3 only."; 3295 } 3296 if-feature ospfv3-authentication-ipsec; 3297 leaf sa { 3298 type string; 3299 description 3300 "Security Association (SA) name."; 3301 } 3302 } 3303 case auth-trailer-key-chain { 3304 if-feature key-chain; 3305 leaf key-chain { 3306 type key-chain:key-chain-ref; 3307 description 3308 "key-chain name."; 3309 } 3310 } 3311 case auth-trailer-key { 3312 leaf key { 3313 type string; 3314 description 3315 "Key string in ASCII format."; 3316 } 3317 leaf crypto-algorithm { 3318 type identityref { 3319 base key-chain:crypto-algorithm; 3320 } 3321 description 3322 "Cryptographic algorithm associated with key."; 3323 } 3324 } 3325 } 3326 } 3327 } 3329 grouping interface-config { 3330 description "Configuration for real interfaces."; 3332 leaf interface-type { 3333 type enumeration { 3334 enum "broadcast" { 3335 description 3336 "Specify OSPF broadcast multi-access network."; 3337 } 3338 enum "non-broadcast" { 3339 description 3340 "Specify OSPF Non-Broadcast Multi-Access 3341 (NBMA) network."; 3342 } 3343 enum "point-to-multipoint" { 3344 description 3345 "Specify OSPF point-to-multipoint network."; 3346 } 3347 enum "point-to-point" { 3348 description 3349 "Specify OSPF point-to-point network."; 3350 } 3351 } 3352 description 3353 "Interface type."; 3354 } 3356 leaf passive { 3357 type boolean; 3358 description 3359 "Enable/Disable passive interface - a passive interface's 3360 prefix will be advertised but no neighbor adjacencies 3361 will be formed on the interface."; 3362 } 3363 leaf demand-circuit { 3364 if-feature demand-circuit; 3365 type boolean; 3366 description 3367 "Enable/Disable demand circuit."; 3368 } 3370 leaf priority { 3371 type uint8; 3372 description 3373 "Configure OSPF router priority."; 3374 } 3376 container multi-areas { 3377 if-feature multi-area-adj; 3378 description "Container for multi-area config."; 3379 list multi-area { 3380 key multi-area-id; 3381 description 3382 "Configure OSPF multi-area adjacency."; 3383 leaf multi-area-id { 3384 type area-id-type; 3385 description 3386 "Multi-area adjacency area ID."; 3387 } 3388 leaf cost { 3389 type uint16; 3390 description 3391 "Interface cost for multi-area adjacency."; 3392 } 3393 } 3394 } 3396 container static-neighbors { 3397 description "Statically configured neighbors."; 3399 list neighbor { 3400 key "identifier"; 3401 description 3402 "Specify a static OSPF neighbor."; 3404 leaf identifier { 3405 type inet:ip-address; 3406 description 3407 "Neighbor Router ID, IPv4 address, or IPv6 address."; 3408 } 3410 leaf cost { 3411 type uint16 { 3412 range "1..65535"; 3413 } 3414 description "Neighbor cost."; 3415 } 3416 leaf poll-interval { 3417 type uint16 { 3418 range "1..65535"; 3419 } 3420 units seconds; 3421 description 3422 "Neighbor poll interval (seconds) for sending OSPF 3423 hello packets to discover the neighbor on NBMA 3424 networks."; 3425 } 3426 leaf priority { 3427 type uint8 { 3428 range "1..255"; 3429 } 3430 description "Neighbor priority for DR election."; 3431 } 3432 } 3433 } 3435 leaf node-flag { 3436 if-feature node-flag; 3437 type boolean; 3438 default false; 3439 description 3440 "Set prefix as identifying the advertising router."; 3441 reference "RFC 7684 - OSPFv2 Prefix/Link Attribute 3442 Advertisement"; 3443 } 3445 container bfd { 3446 if-feature bfd; 3447 description "BFD Client Configuration."; 3448 uses bfd-types:client-cfg-parms; 3449 reference "draft-ietf-bfd-yang-xx.txt: 3450 YANG Data Model for Bidirectional Forwarding 3451 Detection (BFD)"; 3452 } 3454 uses interface-fast-reroute-config; 3455 uses interface-common-config; 3456 uses interface-physical-link-config; 3457 } 3458 grouping neighbor-state { 3459 description 3460 "OSPF neighbor operational state."; 3462 leaf address { 3463 type inet:ip-address; 3464 config false; 3465 description 3466 "Neighbor address."; 3467 } 3468 leaf dr-router-id { 3469 type rt-types:router-id; 3470 config false; 3471 description "Neighbor's Designated Router (DR) Router ID."; 3472 } 3474 leaf dr-ip-addr { 3475 type inet:ip-address; 3476 config false; 3477 description "Neighbor's Designated Router (DR) IP address."; 3478 } 3480 leaf bdr-router-id { 3481 type rt-types:router-id; 3482 config false; 3483 description 3484 "Neighbor's Backup Designated Router (BDR) Router ID."; 3485 } 3487 leaf bdr-ip-addr { 3488 type inet:ip-address; 3489 config false; 3490 description 3491 "Neighbor's Backup Designated Router (BDR) IP Address."; 3492 } 3493 leaf state { 3494 type nbr-state-type; 3495 config false; 3496 description 3497 "OSPF neighbor state."; 3498 } 3499 leaf dead-timer { 3500 type uint32; 3501 units "seconds"; 3502 config false; 3503 description "This timer tracks the remaining time before 3504 the neighbor is declared dead."; 3505 } 3506 container statistics { 3507 config false; 3508 description "Per-neighbor statistics"; 3509 uses neighbor-stat; 3510 } 3511 } 3513 grouping interface-common-state { 3514 description 3515 "OSPF interface common operational state."; 3516 reference "RFC2328 Section 9"; 3518 leaf state { 3519 type if-state-type; 3520 config false; 3521 description "Interface state."; 3522 } 3524 leaf hello-timer { 3525 type uint32; 3526 units "seconds"; 3527 config false; 3528 description "This timer tracks the remaining time before 3529 the next hello packet is sent on the 3530 interface."; 3531 } 3533 leaf wait-timer { 3534 type uint32; 3535 units "seconds"; 3536 config false; 3537 description "This timer tracks the remaining time before 3538 the interface exits the Waiting state."; 3539 } 3541 leaf dr-router-id { 3542 type rt-types:router-id; 3543 config false; 3544 description "Designated Router (DR) Router ID."; 3545 } 3547 leaf dr-ip-addr { 3548 type inet:ip-address; 3549 config false; 3550 description "Designated Router (DR) IP address."; 3551 } 3553 leaf bdr-router-id { 3554 type rt-types:router-id; 3555 config false; 3556 description "Backup Designated Router (BDR) Router ID."; 3557 } 3559 leaf bdr-ip-addr { 3560 type inet:ip-address; 3561 config false; 3562 description "Backup Designated Router (BDR) IP Address."; 3563 } 3565 container statistics { 3566 config false; 3567 description "Per-interface statistics"; 3568 uses interface-stat; 3569 } 3571 container neighbors { 3572 config false; 3573 description "All neighbors for the interface."; 3574 list neighbor { 3575 key "neighbor-router-id"; 3576 description 3577 "List of interface OSPF neighbors."; 3578 leaf neighbor-router-id { 3579 type rt-types:router-id; 3580 description 3581 "Neighbor Router ID."; 3582 } 3583 uses neighbor-state; 3584 } 3585 } 3586 container database { 3587 config false; 3588 description "Link-scope Link State Database."; 3589 list link-scope-lsa-type { 3590 key "lsa-type"; 3591 description 3592 "List OSPF link-scope LSAs."; 3593 leaf lsa-type { 3594 type uint16; 3595 description "OSPF link-scope LSA type."; 3596 } 3597 container link-scope-lsas { 3598 description 3599 "All link-scope LSAs of this LSA type."; 3600 list link-scope-lsa { 3601 key "lsa-id adv-router"; 3602 description "List of OSPF link-scope LSAs"; 3603 uses lsa-key; 3604 uses lsa { 3605 refine "version/ospfv2/ospfv2" { 3606 must "derived-from-or-self( " 3607 + "../../../../../../../../../../" 3608 + "rt:type, 'ospf:ospfv2')" { 3609 description "OSPFv2 LSA."; 3610 } 3611 } 3612 refine "version/ospfv3/ospfv3" { 3613 must "derived-from-or-self( " 3614 + "../../../../../../../../../../" 3615 + "rt:type, 'ospf:ospfv3')" { 3616 description "OSPFv3 LSA."; 3617 } 3618 } 3619 } 3620 } 3621 } 3622 } 3623 } 3624 } 3626 grouping interface-state { 3627 description 3628 "OSPF interface operational state."; 3629 reference "RFC2328 Section 9"; 3631 uses interface-common-state; 3632 } 3634 grouping virtual-link-config { 3635 description 3636 "OSPF virtual link configuration state."; 3638 uses interface-common-config; 3639 } 3641 grouping virtual-link-state { 3642 description 3643 "OSPF virtual link operational state."; 3645 leaf cost { 3646 type uint16 { 3647 range "1..65535"; 3648 } 3649 config false; 3650 description 3651 "Virtual link interface cost."; 3652 } 3653 uses interface-common-state; 3654 } 3656 grouping sham-link-config { 3657 description 3658 "OSPF sham link configuration state."; 3660 uses interface-common-config; 3661 uses interface-physical-link-config; 3662 } 3664 grouping sham-link-state { 3665 description 3666 "OSPF sham link operational state."; 3667 uses interface-common-state; 3668 } 3670 grouping address-family-area-config { 3671 description 3672 "OSPF address-family specific area config state."; 3674 container ranges { 3675 description "Container for summary ranges"; 3677 list range { 3678 key "prefix"; 3679 description 3680 "Summarize routes matching address/mask - 3681 Applicable to Area Border Routers (ABRs) only."; 3682 leaf prefix { 3683 type inet:ip-prefix; 3684 description 3685 "IPv4 or IPv6 prefix"; 3686 } 3687 leaf advertise { 3688 type boolean; 3689 description 3690 "Advertise or hide."; 3691 } 3692 leaf cost { 3693 type ospf-metric { 3694 range "0..16777214"; 3695 } 3696 description 3697 "Advertised cost of summary route."; 3699 } 3700 } 3701 } 3702 } 3704 grouping area-common-config { 3705 description 3706 "OSPF area common configuration state."; 3708 leaf summary { 3709 when "derived-from(../area-type,'ospf:stub-nssa-area')" { 3710 description 3711 "Summary advertisement into the stub/NSSA area."; 3712 } 3713 type boolean; 3714 description 3715 "Enable/Disable summary advertisement into the stub or 3716 NSSA area."; 3717 } 3718 leaf default-cost { 3719 when "derived-from(../area-type,'ospf:stub-nssa-area')" { 3720 description 3721 "Cost for LSA default route advertised into the 3722 stub or NSSA area."; 3723 } 3724 type ospf-metric; 3725 description 3726 "Set the summary default route cost for a 3727 stub or NSSA area."; 3728 } 3729 } 3731 grouping area-config { 3732 description 3733 "OSPF area configuration state."; 3735 leaf area-type { 3736 type identityref { 3737 base area-type; 3738 } 3739 default normal-area; 3740 description 3741 "Area type."; 3742 } 3744 uses area-common-config; 3745 uses address-family-area-config; 3746 } 3747 grouping area-state { 3748 description 3749 "OSPF area operational state."; 3751 container statistics { 3752 config false; 3753 description "Per-area statistics"; 3754 uses area-stat; 3755 } 3757 container database { 3758 config false; 3759 description "Area-scope Link State Database."; 3760 list area-scope-lsa-type { 3761 key "lsa-type"; 3762 description "List OSPF area-scope LSAs."; 3763 leaf lsa-type { 3764 type uint16; 3765 description "OSPF area-scope LSA type."; 3766 } 3767 container area-scope-lsas { 3768 description 3769 "All area-scope LSAs of an area-scope 3770 LSA type."; 3771 list area-scope-lsa { 3772 key "lsa-id adv-router"; 3773 description "List of OSPF area-scope LSAs"; 3774 uses lsa-key; 3775 uses lsa { 3776 refine "version/ospfv2/ospfv2" { 3777 must "derived-from-or-self( " 3778 + "../../../../../../../../" 3779 + "rt:type, 'ospf:ospfv2')" { 3780 description "OSPFv2 LSA."; 3781 } 3782 } 3783 refine "version/ospfv3/ospfv3" { 3784 must "derived-from-or-self( " 3785 + "../../../../../../../../" 3786 + "rt:type, 'ospf:ospfv3')" { 3787 description "OSPFv3 LSA."; 3788 } 3789 } 3790 } 3791 } 3792 } 3793 } 3794 } 3796 } 3798 grouping local-rib { 3799 description "Local-rib - RIB for Routes computed by the local 3800 OSPF routing instance."; 3801 container local-rib { 3802 config false; 3803 description "Local-rib."; 3804 list route { 3805 key "prefix"; 3806 description "Routes"; 3807 leaf prefix { 3808 type inet:ip-prefix; 3809 description "Destination prefix."; 3810 } 3811 container next-hops { 3812 description "Next hops for the route."; 3813 list next-hop { 3814 key "next-hop"; 3815 description "List of next hops for the route"; 3816 leaf outgoing-interface { 3817 type if:interface-ref; 3818 description 3819 "Name of the outgoing interface."; 3820 } 3821 leaf next-hop { 3822 type inet:ip-address; 3823 description "Nexthop address."; 3824 } 3825 } 3826 } 3827 leaf metric { 3828 type uint32; 3829 description "Metric for this route."; 3830 } 3831 leaf route-type { 3832 type route-type; 3833 description "Route type for this route."; 3834 } 3835 leaf route-tag { 3836 type uint32; 3837 description "Route tag for this route."; 3838 } 3839 } 3840 } 3841 } 3843 grouping ietf-spf-delay { 3844 leaf initial-delay { 3845 type rt-types:timer-value-milliseconds; 3846 description 3847 "Delay used while in QUIET state (milliseconds)."; 3848 } 3849 leaf short-delay { 3850 type rt-types:timer-value-milliseconds; 3851 description 3852 "Delay used while in SHORT_WAIT state (milliseconds)."; 3853 } 3854 leaf long-delay { 3855 type rt-types:timer-value-milliseconds; 3856 description 3857 "Delay used while in LONG_WAIT state (milliseconds)."; 3858 } 3859 leaf hold-down { 3860 type rt-types:timer-value-milliseconds; 3861 description 3862 "Timer used to consider an IGP stability period 3863 (milliseconds)."; 3864 } 3865 leaf time-to-learn { 3866 type rt-types:timer-value-milliseconds; 3867 description 3868 "Duration used to learn all the IGP events 3869 related to a single component failure (milliseconds)."; 3870 } 3871 leaf current-state { 3872 type enumeration { 3873 enum "quiet" { 3874 description "QUIET state"; 3875 } 3876 enum "short-wait" { 3877 description "SHORT_WAIT state"; 3878 } 3879 enum "long-wait" { 3880 description "LONG_WAIT state"; 3881 } 3882 } 3883 config false; 3884 description 3885 "Current SPF backoff algorithm state."; 3886 } 3887 leaf remaining-time-to-learn { 3888 type rt-types:timer-value-seconds16; 3889 config false; 3890 description 3891 "Remaining time until time-to-learn timer fires."; 3893 } 3894 leaf remaining-hold-down { 3895 type rt-types:timer-value-seconds16; 3896 config false; 3897 description 3898 "Remaining time until hold-down timer fires."; 3899 } 3900 leaf last-event-received { 3901 type yang:timestamp; 3902 config false; 3903 description 3904 "Time of last SPF triggering event."; 3905 } 3906 leaf next-spf-time { 3907 type yang:timestamp; 3908 config false; 3909 description 3910 "Time when next SPF has been scheduled."; 3911 } 3912 leaf last-spf-time { 3913 type yang:timestamp; 3914 config false; 3915 description 3916 "Time of last SPF computation."; 3917 } 3918 description 3919 "Grouping for IETF SPF delay configuration and state"; 3920 } 3922 grouping node-tag-config { 3923 description 3924 "OSPF node tag config state."; 3925 container node-tags { 3926 if-feature node-tag; 3927 list node-tag { 3928 key tag; 3929 leaf tag { 3930 type uint32; 3931 description 3932 "Node tag value."; 3933 } 3934 description 3935 "List of tags."; 3936 } 3937 description 3938 "Container for node admin tags."; 3939 } 3940 } 3941 grouping instance-config { 3942 description 3943 "OSPF instance config state."; 3945 leaf explicit-router-id { 3946 if-feature explicit-router-id; 3947 type rt-types:router-id; 3948 description 3949 "Defined in RFC 2328. A 32-bit number 3950 that uniquely identifies the router."; 3951 } 3953 container preference { 3954 description "Route preference config state."; 3955 choice scope { 3956 description 3957 "Options for expressing preference 3958 as single or multiple values."; 3959 case single-value { 3960 leaf all { 3961 type uint8; 3962 description 3963 "Preference for intra-area, inter-area, and 3964 external routes."; 3965 } 3966 } 3967 case multi-values { 3968 choice granularity { 3969 description 3970 "Options for expressing preference 3971 for intra-area and inter-area routes."; 3972 case detail { 3973 leaf intra-area { 3974 type uint8; 3975 description 3976 "Preference for intra-area routes."; 3977 } 3978 leaf inter-area { 3979 type uint8; 3980 description 3981 "Preference for inter-area routes."; 3982 } 3983 } 3984 case coarse { 3985 leaf internal { 3986 type uint8; 3987 description 3988 "Preference for both intra-area and 3989 inter-area routes."; 3990 } 3991 } 3992 } 3993 leaf external { 3994 type uint8; 3995 description 3996 "Preference for AS external routes."; 3997 } 3998 } 3999 } 4000 } 4002 container nsr { 4003 if-feature nsr; 4004 description 4005 "Non-Stop Routing (NSR) config state."; 4006 leaf enable { 4007 type boolean; 4008 description 4009 "Enable/Disable NSR."; 4010 } 4011 } 4013 container graceful-restart { 4014 if-feature graceful-restart; 4015 description 4016 "Graceful restart config state."; 4017 reference "RFC 3623 - OSPF Graceful Restart 4018 RFC 5187 - OSPFv3 Graceful Restart"; 4019 leaf enable { 4020 type boolean; 4021 description 4022 "Enable/Disable graceful restart as defined in RFC 3623 4023 for OSPFv2 and RFC 5187 for OSPFv3."; 4024 } 4025 leaf helper-enable { 4026 type boolean; 4027 description 4028 "Enable graceful restart helper support for restarting 4029 routers (RFC 3623 Section 3)."; 4030 } 4031 leaf restart-interval { 4032 type uint16 { 4033 range "1..1800"; 4034 } 4035 units seconds; 4036 default "120"; 4037 description 4038 "Interval to attempt graceful restart prior 4039 to failing (RFC 3623 Section B.1) (seconds)"; 4040 } 4041 leaf helper-strict-lsa-checking { 4042 type boolean; 4043 description 4044 "Terminate graceful restart when an LSA topology change 4045 is detected (RFC 3623 Section B.2)."; 4046 } 4047 } 4049 leaf enable { 4050 if-feature admin-control; 4051 type boolean; 4052 default true; 4053 description 4054 "Enable/Disable the protocol."; 4055 } 4057 container auto-cost { 4058 if-feature auto-cost; 4059 description 4060 "Interface Auto-cost configuration state."; 4061 leaf enable { 4062 type boolean; 4063 description 4064 "Enable/Disable interface auto-cost."; 4065 } 4066 leaf reference-bandwidth { 4067 when "../enable = 'true'" { 4068 description "Only when auto cost is enabled"; 4069 } 4070 type uint32 { 4071 range "1..4294967"; 4072 } 4073 units Mbits; 4074 description 4075 "Configure reference bandwidth used to automatically 4076 determine interface cost (Mbits). The cost is the 4077 reference bandwidth divided by the interface speed 4078 with 1 being the minimum cost."; 4079 } 4080 } 4082 container spf-control { 4083 leaf paths { 4084 if-feature max-ecmp; 4085 type uint16 { 4086 range "1..32"; 4087 } 4088 description 4089 "Maximum number of Equal-Cost Multi-Path (ECMP) paths."; 4090 } 4091 container ietf-spf-delay { 4092 if-feature ietf-spf-delay; 4093 uses ietf-spf-delay; 4094 description 4095 "IETF SPF delay algorithm configuration."; 4096 } 4097 description "SPF calculation control."; 4098 } 4100 container database-control { 4101 leaf max-lsa { 4102 if-feature max-lsa; 4103 type uint32 { 4104 range "1..4294967294"; 4105 } 4106 description 4107 "Maximum number of LSAs OSPF the router will accept."; 4108 } 4109 description "Database maintenance control."; 4110 } 4112 container stub-router { 4113 if-feature stub-router; 4114 description "Set maximum metric configuration"; 4116 choice trigger { 4117 description 4118 "Specific triggers which will enable stub 4119 router state."; 4120 container always { 4121 presence 4122 "Enables unconditional stub router support"; 4123 description 4124 "Unconditional stub router state (advertise 4125 transit links with max metric"; 4126 } 4127 } 4128 } 4130 container mpls { 4131 description 4132 "OSPF MPLS config state."; 4134 container te-rid { 4135 if-feature te-rid; 4136 description 4137 "Stable OSPF Router IP Address used for Traffic 4138 Engineering (TE)"; 4139 leaf ipv4-router-id { 4140 type inet:ipv4-address; 4141 description 4142 "Explicitly configure the TE IPv4 Router ID."; 4143 } 4144 leaf ipv6-router-id { 4145 type inet:ipv6-address; 4146 description 4147 "Explicitly configure the TE IPv6 Router ID."; 4148 } 4149 } 4150 container ldp { 4151 description 4152 "OSPF MPLS LDP config state."; 4153 leaf igp-sync { 4154 if-feature ldp-igp-sync; 4155 type boolean; 4156 description 4157 "Enable LDP IGP synchronization."; 4158 } 4159 } 4160 } 4161 uses instance-fast-reroute-config; 4162 uses node-tag-config; 4163 } 4165 grouping instance-state { 4166 description 4167 "OSPF instance operational state."; 4169 leaf router-id { 4170 type rt-types:router-id; 4171 config false; 4172 description 4173 "Defined in RFC 2328. A 32-bit number 4174 that uniquely identifies the router."; 4175 } 4177 uses local-rib; 4179 container statistics { 4180 config false; 4181 description "Per-instance statistics"; 4182 uses instance-stat; 4183 } 4185 container database { 4186 config false; 4187 description "AS-scope Link State Database."; 4188 list as-scope-lsa-type { 4189 key "lsa-type"; 4190 description "List OSPF AS-scope LSAs."; 4191 leaf lsa-type { 4192 type uint16; 4193 description "OSPF AS scope LSA type."; 4194 } 4195 container as-scope-lsas { 4196 description "All AS-scope of LSA of this LSA type."; 4197 list as-scope-lsa { 4198 key "lsa-id adv-router"; 4199 description "List of OSPF AS-scope LSAs"; 4200 uses lsa-key; 4201 uses lsa { 4202 refine "version/ospfv2/ospfv2" { 4203 must "derived-from-or-self( " 4204 + "../../../../../../" 4205 + "rt:type, 'ospf:ospfv2')" { 4206 description "OSPFv2 LSA."; 4207 } 4208 } 4209 refine "version/ospfv3/ospfv3" { 4210 must "derived-from-or-self( " 4211 + "../../../../../../" 4212 + "rt:type, 'ospf:ospfv3')" { 4213 description "OSPFv3 LSA."; 4214 } 4215 } 4216 } 4217 } 4218 } 4219 } 4220 } 4221 uses spf-log; 4222 uses lsa-log; 4223 } 4225 grouping ospf-config { 4226 description 4227 "OSPF top configuration state - currently empty."; 4228 } 4229 grouping ospf-state { 4230 description 4231 "OSPF top operational state - currently empty."; 4232 } 4234 grouping multi-topology-area-common-config { 4235 description 4236 "OSPF multi-topology area common configuration state."; 4237 leaf summary { 4238 when "derived-from(" 4239 + "../../../../../areas/area[area-id=current()/../area-id]/" 4240 + "area-type, 'stub-nssa-area')" { 4241 description 4242 "Summary advertisement into the stub/NSSA area."; 4243 } 4244 type boolean; 4245 description 4246 "Enable/Disable summary advertisement into the 4247 topology in the stub or NSSA area."; 4248 } 4249 leaf default-cost { 4250 when "derived-from(" 4251 + "../../../../../areas/area[area-id=current()/../area-id]/" 4252 + "area-type, 'stub-nssa-area')" { 4253 description 4254 "Cost for LSA default route advertised into the 4255 topology into the stub or NSSA area."; 4256 } 4257 type ospf-metric; 4258 description 4259 "Set the summary default route cost for a 4260 stub or NSSA area."; 4261 } 4262 } 4264 grouping multi-topology-area-config { 4265 description 4266 "OSPF multi-topology area configuration state."; 4268 uses multi-topology-area-common-config; 4269 uses address-family-area-config; 4270 } 4272 grouping multi-topology-area-state { 4273 description 4274 "OSPF multi-topology area operational state."; 4275 } 4276 grouping multi-topology-config { 4277 description 4278 "OSPF multi-topology configuration state."; 4279 } 4281 grouping multi-topology-state { 4282 description 4283 "OSPF multi-topology operational state."; 4285 uses local-rib; 4286 } 4288 grouping multi-topology-interface-config { 4289 description 4290 "OSPF multi-topology configuration state."; 4292 leaf cost { 4293 type uint32; 4294 description 4295 "Interface cost for this topology."; 4296 } 4297 } 4299 grouping multi-topology-interface-state { 4300 description 4301 "OSPF multi-topology operational state."; 4302 } 4304 grouping ospfv3-interface-config { 4305 description 4306 "OSPFv3 interface specific configuration state."; 4308 leaf instance-id { 4309 type uint8 { 4310 range "0 .. 31"; 4311 } 4312 description 4313 "OSPFv3 instance ID."; 4314 } 4315 } 4317 grouping ospfv3-interface-state { 4318 description 4319 "OSPFv3 interface specific operational state."; 4321 leaf interface-id { 4322 type uint16; 4323 config false; 4324 description 4325 "OSPFv3 interface ID."; 4326 } 4327 } 4329 grouping lsa-identifiers { 4330 description 4331 "The parameters that uniquely identify an LSA."; 4332 leaf area-id { 4333 type area-id-type; 4334 description 4335 "Area ID"; 4336 } 4337 leaf type { 4338 type uint16; 4339 description 4340 "LSA type."; 4341 } 4342 leaf lsa-id { 4343 type yang:dotted-quad; 4344 description "Link-State ID."; 4345 } 4346 leaf adv-router { 4347 type rt-types:router-id; 4348 description 4349 "LSA advertising router."; 4350 } 4351 leaf seq-num { 4352 type uint32; 4353 description 4354 "LSA sequence number."; 4355 } 4356 } 4358 grouping spf-log { 4359 description 4360 "Grouping for SPF log."; 4361 container spf-log { 4362 config false; 4363 description 4364 "This container lists the SPF log."; 4365 list event { 4366 key id; 4367 description 4368 "List of SPF log entries represented 4369 as a wrapping buffer."; 4370 leaf id { 4371 type uint32; 4372 description 4373 "Event identifier - Ppurely internal value."; 4374 } 4375 leaf spf-type { 4376 type enumeration { 4377 enum full { 4378 description 4379 "SPF computation was a Full SPF."; 4380 } 4381 enum intra { 4382 description 4383 "SPF computation was only for intra-area routes."; 4384 } 4385 enum inter { 4386 description 4387 "SPF computation was only for inter-area 4388 summary routes."; 4389 } 4390 enum external { 4391 description 4392 "SPF computation was only for AS external routes."; 4393 } 4394 } 4395 description 4396 "The SPF computation type for the SPF log entry."; 4397 } 4398 leaf schedule-timestamp { 4399 type yang:timestamp; 4400 description 4401 "This is the timestamp when the computation was 4402 scheduled."; 4403 } 4404 leaf start-timestamp { 4405 type yang:timestamp; 4406 description 4407 "This is the timestamp when the computation was 4408 started."; 4409 } 4410 leaf end-timestamp { 4411 type yang:timestamp; 4412 description 4413 "This the timestamp when the computation was 4414 completed."; 4415 } 4416 list trigger-lsa { 4417 description 4418 "The list of LSAs that triggered the computation."; 4419 uses lsa-identifiers; 4421 } 4422 } 4423 } 4424 } 4426 grouping lsa-log { 4427 description 4428 "Grouping for the LSA log."; 4429 container lsa-log { 4430 config false; 4431 description 4432 "This container lists the LSA log. 4433 Local LSA modifications are also included 4434 in the list."; 4435 list event { 4436 key id; 4437 description 4438 "List of LSA log entries represented 4439 as a wrapping buffer."; 4440 leaf id { 4441 type uint32; 4442 description 4443 "Event identifier - purely internal value."; 4444 } 4445 container lsa { 4446 description 4447 "This container describes the logged LSA."; 4448 uses lsa-identifiers; 4449 } 4450 leaf received-timestamp { 4451 type yang:timestamp; 4452 description 4453 "This is the timestamp when the LSA was received. 4454 In case of local LSA update, the timestamp refers 4455 to the LSA origination time."; 4456 } 4457 leaf reason { 4458 type identityref { 4459 base lsa-log-reason; 4460 } 4461 description 4462 "This reason for the LSA log entry."; 4463 } 4464 } 4465 } 4466 } 4468 augment "/rt:routing/rt:control-plane-protocols/" 4469 + "rt:control-plane-protocol" { 4470 when "derived-from(rt:type, 'ospf:ospf-protocol')" { 4471 description 4472 "This augmentation is only valid for a routing protocol 4473 instance of OSPF (type 'ospfv2' or 'ospfv3')."; 4474 } 4475 description "OSPF protocol ietf-routing module 4476 control-plane-protocol augmentation."; 4478 container ospf { 4479 description 4480 "OSPF protocol Instance"; 4482 uses ospf-config; 4483 uses ospf-state; 4485 leaf address-family { 4486 type iana-rt-types:address-family; 4487 description 4488 "Address-family of the instance."; 4489 } 4491 uses instance-config; 4492 uses instance-state; 4494 container areas { 4495 description "All areas."; 4496 list area { 4497 key "area-id"; 4498 description 4499 "List of OSPF areas"; 4500 leaf area-id { 4501 type area-id-type; 4502 description 4503 "Area ID"; 4504 } 4506 uses area-config; 4507 uses area-state; 4509 container virtual-links { 4510 when "derived-from-or-self(../area-type, 'normal-area') " 4511 + "and ../area-id = '0.0.0.0'" { 4512 description 4513 "Virtual links must be in backbone area."; 4514 } 4515 description "All virtual links."; 4516 list virtual-link { 4517 key "transit-area-id router-id"; 4518 description 4519 "OSPF virtual link"; 4520 leaf transit-area-id { 4521 type leafref { 4522 path "../../../../area/area-id"; 4523 } 4524 must "derived-from-or-self(" 4525 + "../../../../area[area-id=current()]/area-type, " 4526 + "'normal-area') and " 4527 + "../../../../area[area-id=current()]/area-id != " 4528 + "'0.0.0.0'" { 4529 error-message "Virtual link transit area must " 4530 + "be non-zero."; 4531 description 4532 "Virtual-link trasit area must be 4533 non-zero area."; 4534 } 4535 description 4536 "Virtual link tranist area ID."; 4537 } 4538 leaf router-id { 4539 type rt-types:router-id; 4540 description 4541 "Virtual Link remote endpoint Router ID."; 4542 } 4544 uses virtual-link-config; 4545 uses virtual-link-state; 4546 } 4547 } 4548 container sham-links { 4549 if-feature pe-ce-protocol; 4550 description "All sham links."; 4551 list sham-link { 4552 key "local-id remote-id"; 4553 description 4554 "OSPF sham link"; 4555 leaf local-id { 4556 type inet:ip-address; 4557 description 4558 "Address of the local sham Link endpoint."; 4559 } 4560 leaf remote-id { 4561 type inet:ip-address; 4562 description 4563 "Address of the remote sham Link endpoint."; 4564 } 4565 uses sham-link-config; 4566 uses sham-link-state; 4567 } 4568 } 4569 container interfaces { 4570 description "All interfaces."; 4571 list interface { 4572 key "name"; 4573 description 4574 "List of OSPF interfaces."; 4575 leaf name { 4576 type if:interface-ref; 4577 description 4578 "Interface name reference."; 4579 } 4580 uses interface-config; 4581 uses interface-state; 4582 } 4583 } 4584 } 4585 } 4586 } 4587 } 4589 augment "/rt:routing/rt:control-plane-protocols/" 4590 + "rt:control-plane-protocol/ospf:ospf" { 4591 when "derived-from(../rt:type, 'ospf:ospf-protocol')" { 4592 description 4593 "This augmentation is only valid for OSPF 4594 (type 'ospfv2' or 'ospfv3')."; 4595 } 4596 if-feature multi-topology; 4597 description 4598 "OSPF multi-topology instance configuration 4599 state augmentation."; 4600 container topologies { 4601 description "All topologies."; 4602 list topology { 4603 key "name"; 4604 description 4605 "OSPF topology - The OSPF topology address-family 4606 must coincide with the routing-instance 4607 address-family."; 4608 leaf name { 4609 type leafref { 4610 path "../../../../../../rt:ribs/rt:rib/rt:name"; 4611 } 4612 description "RIB name corresponding to the OSPF 4613 topology."; 4614 } 4616 uses multi-topology-config; 4617 uses multi-topology-state; 4619 container areas { 4620 description "All areas in the topology."; 4621 list area { 4622 key "area-id"; 4623 description 4624 "List of OSPF areas"; 4625 leaf area-id { 4626 type area-id-type; 4627 description 4628 "Area ID."; 4629 } 4630 uses multi-topology-area-config; 4631 uses multi-topology-area-state; 4632 } 4633 } 4634 } 4635 } 4636 } 4638 augment "/rt:routing/rt:control-plane-protocols/" 4639 + "rt:control-plane-protocol/ospf:ospf/" 4640 + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" { 4641 when "derived-from-or-self(../../../../../rt:type, " 4642 + "'ospf:ospfv2')" { 4643 description 4644 "This augmentation is only valid for OSPFv2."; 4645 } 4646 if-feature ospf:multi-topology; 4647 description 4648 "OSPF multi-topology interface configuration state 4649 augmentation."; 4650 container topologies { 4651 description "All topologies for the interface."; 4652 list topology { 4653 key "name"; 4654 description "OSPF interface topology."; 4655 leaf name { 4656 type leafref { 4657 path "../../../../../../../../../../" 4658 + "rt:ribs/rt:rib/rt:name"; 4659 } 4660 description 4661 "Single topology enabled on this interface."; 4662 } 4664 uses multi-topology-interface-config; 4665 uses multi-topology-interface-state; 4666 } 4667 } 4668 } 4670 augment "/rt:routing/rt:control-plane-protocols/" 4671 + "rt:control-plane-protocol/ospf:ospf/" 4672 + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" { 4673 when "derived-from-or-self(../../../../../rt:type, " 4674 + "'ospf:ospfv3')" { 4675 description 4676 "This augmentation is only valid for OSPFv3."; 4677 } 4678 description 4679 "OSPFv3 interface specific configuration state 4680 augmentation."; 4681 uses ospfv3-interface-config; 4682 uses ospfv3-interface-state; 4683 } 4685 grouping route-content { 4686 description 4687 "This grouping defines OSPF-specific route attributes."; 4688 leaf metric { 4689 type uint32; 4690 description "OSPF route metric."; 4691 } 4692 leaf tag { 4693 type uint32; 4694 default "0"; 4695 description "OSPF route tag."; 4696 } 4697 leaf route-type { 4698 type route-type; 4699 description "OSPF route type"; 4700 } 4701 } 4703 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { 4704 when "derived-from(rt:source-protocol, 'ospf:ospf-protocol')" { 4705 description 4706 "This augmentation is only valid for a routes whose 4707 source protocol is OSPF."; 4708 } 4709 description 4710 "OSPF-specific route attributes."; 4711 uses route-content; 4712 } 4714 /* 4715 * RPCs 4716 */ 4718 rpc clear-neighbor { 4719 description 4720 "This RPC request clears a particular set of OSPF neighbors. 4721 If the operation fails for OSPF internal reason, then 4722 error-tag and error-app-tag should be set to a meaningful 4723 value."; 4724 input { 4725 leaf routing-protocol-name { 4726 type leafref { 4727 path "/rt:routing/rt:control-plane-protocols/" 4728 + "rt:control-plane-protocol/rt:name"; 4729 } 4730 mandatory "true"; 4731 description 4732 "OSPF protocol instance which information for neighbors 4733 are to be cleared. 4735 If the referenced OSPF instance doesn't exist, then 4736 this operation SHALL fail with error-tag 'data-missing' 4737 and error-app-tag 4738 'routing-protocol-instance-not-found'."; 4739 } 4741 leaf interface { 4742 type if:interface-ref; 4743 description 4744 "Name of the OSPF interface for which neighbors are to 4745 be cleared. 4747 If the referenced OSPF interface doesn't exist, then 4748 this operation SHALL fail with error-tag 4749 'data-missing' and error-app-tag 4750 'ospf-interface-not-found'."; 4751 } 4752 } 4753 } 4755 rpc clear-database { 4756 description 4757 "This RPC request clears a particular OSPF Link State 4758 Database. If the operation fails for OSPF internal reason, 4759 then error-tag and error-app-tag should be set to a 4760 meaningful value."; 4761 input { 4762 leaf routing-protocol-name { 4763 type leafref { 4764 path "/rt:routing/rt:control-plane-protocols/" 4765 + "rt:control-plane-protocol/rt:name"; 4766 } 4767 mandatory "true"; 4768 description 4769 "OSPF protocol instance whose Link State Database is to 4770 be cleared. 4772 If the referenced OSPF instance doesn't exist, then 4773 this operation SHALL fail with error-tag 'data-missing' 4774 and error-app-tag 4775 'routing-protocol-instance-not-found'."; 4776 } 4777 } 4778 } 4780 /* 4781 * Notifications 4782 */ 4784 grouping notification-instance-hdr { 4785 description 4786 "This grouping describes common instance specific 4787 data for OSPF notifications."; 4789 leaf routing-protocol-name { 4790 type leafref { 4791 path "/rt:routing/rt:control-plane-protocols/" 4792 + "rt:control-plane-protocol/rt:name"; 4793 } 4794 must "derived-from( " 4795 + "/rt:routing/rt:control-plane-protocols/" 4796 + "rt:control-plane-protocol[rt:name=current()]/" 4797 + "rt:type, 'ospf:ospf-protocol')"; 4798 description 4799 "OSPF routing protocol instance name."; 4800 } 4802 leaf address-family { 4803 type leafref { 4804 path "/rt:routing/" 4805 + "rt:control-plane-protocols/rt:control-plane-protocol" 4806 + "[rt:name=current()/../routing-protocol-name]/" 4807 + "ospf:ospf/address-family"; 4808 } 4809 description 4810 "Address family of the OSPF instance."; 4811 } 4812 } 4814 grouping notification-interface { 4815 description 4816 "This grouping provides interface information 4817 for the OSPF interface specific notification."; 4819 choice if-link-type-selection { 4820 description 4821 "Options for link type."; 4822 container interface { 4823 description "Normal interface."; 4824 leaf interface { 4825 type if:interface-ref; 4826 description "Interface."; 4827 } 4828 } 4829 container virtual-link { 4830 description "virtual-link."; 4831 leaf transit-area-id { 4832 type area-id-type; 4833 description "Area ID."; 4834 } 4835 leaf neighbor-router-id { 4836 type rt-types:router-id; 4837 description "Neighbor Router ID."; 4838 } 4839 } 4840 container sham-link { 4841 description "sham link."; 4842 leaf area-id { 4843 type area-id-type; 4844 description "Area ID."; 4845 } 4846 leaf local-ip-addr { 4847 type inet:ip-address; 4848 description "Sham link local address."; 4849 } 4850 leaf remote-ip-addr { 4851 type inet:ip-address; 4852 description "Sham link remote address."; 4854 } 4855 } 4856 } 4857 } 4859 grouping notification-neighbor { 4860 description 4861 "This grouping provides the neighbor information 4862 for neighbor specific notifications."; 4864 leaf neighbor-router-id { 4865 type rt-types:router-id; 4866 description "Neighbor Router ID."; 4867 } 4869 leaf neighbor-ip-addr { 4870 type yang:dotted-quad; 4871 description "Neighbor address."; 4872 } 4873 } 4875 notification if-state-change { 4876 uses notification-instance-hdr; 4877 uses notification-interface; 4879 leaf state { 4880 type if-state-type; 4881 description "Interface state."; 4882 } 4883 description 4884 "This notification is sent when an interface 4885 state change is detected."; 4886 } 4888 notification if-config-error { 4889 uses notification-instance-hdr; 4890 uses notification-interface; 4892 leaf packet-source { 4893 type yang:dotted-quad; 4894 description "Source address."; 4895 } 4897 leaf packet-type { 4898 type packet-type; 4899 description "OSPF packet type."; 4900 } 4901 leaf error { 4902 type enumeration { 4903 enum "bad-version" { 4904 description "Bad version."; 4905 } 4906 enum "area-mismatch" { 4907 description "Area mistmatch."; 4908 } 4909 enum "unknown-nbma-nbr" { 4910 description "Unknown NBMA neighbor."; 4911 } 4912 enum "unknown-virtual-nbr" { 4913 description "Unknown virtual link neighbor."; 4914 } 4915 enum "auth-type-mismatch" { 4916 description "Auth type mismatch."; 4917 } 4918 enum "auth-failure" { 4919 description "Auth failure."; 4920 } 4921 enum "net-mask-mismatch" { 4922 description "Network mask mismatch."; 4923 } 4924 enum "hello-interval-mismatch" { 4925 description "Hello interval mismatch."; 4926 } 4927 enum "dead-interval-mismatch" { 4928 description "Dead interval mismatch."; 4929 } 4930 enum "option-mismatch" { 4931 description "Option mismatch."; 4932 } 4933 enum "mtu-mismatch" { 4934 description "MTU mismatch."; 4935 } 4936 enum "duplicate-router-id" { 4937 description "Duplicate Router ID."; 4938 } 4939 enum "no-error" { 4940 description "No error."; 4941 } 4942 } 4943 description "Error code."; 4944 } 4945 description 4946 "This notification is sent when an interface 4947 config error is detected."; 4948 } 4949 notification nbr-state-change { 4950 uses notification-instance-hdr; 4951 uses notification-interface; 4952 uses notification-neighbor; 4954 leaf state { 4955 type nbr-state-type; 4956 description "Neighbor state."; 4957 } 4959 description 4960 "This notification is sent when aa neighbor 4961 state change is detected."; 4962 } 4964 notification nbr-restart-helper-status-change { 4965 uses notification-instance-hdr; 4966 uses notification-interface; 4967 uses notification-neighbor; 4969 leaf status { 4970 type restart-helper-status-type; 4971 description "Restart helper status."; 4972 } 4974 leaf age { 4975 type uint32; 4976 units seconds; 4977 description 4978 "Remaining time in current OSPF graceful restart 4979 interval when the router is acting as a restart 4980 helper for the neighbor."; 4981 } 4983 leaf exit-reason { 4984 type restart-exit-reason-type; 4985 description 4986 "Restart helper exit reason."; 4987 } 4988 description 4989 "This notification is sent when a neighbor restart 4990 helper status change is detected."; 4991 } 4993 notification if-rx-bad-packet { 4994 uses notification-instance-hdr; 4995 uses notification-interface; 4996 leaf packet-source { 4997 type yang:dotted-quad; 4998 description "Source address."; 4999 } 5001 leaf packet-type { 5002 type packet-type; 5003 description "OSPF packet type."; 5004 } 5006 description 5007 "This notification is sent when an OSPF packet that 5008 cannot be parsed is received on an OSPF interface."; 5009 } 5011 notification lsdb-approaching-overflow { 5012 uses notification-instance-hdr; 5014 leaf ext-lsdb-limit { 5015 type uint32; 5016 description 5017 "The maximum number of non-default AS-external LSAs 5018 entries that can be stored in the Link State Database."; 5019 } 5021 description 5022 "This notification is sent when the number of LSAs 5023 in the router's Link State Database has exceeded 5024 ninety percent of the AS-external limit (ext-lsdb-limit)."; 5025 } 5027 notification lsdb-overflow { 5028 uses notification-instance-hdr; 5030 leaf ext-lsdb-limit { 5031 type uint32; 5032 description 5033 "The maximum number of non-default AS-external LSAs 5034 entries that can be stored in the Link State Database."; 5035 } 5037 description 5038 "This notification is sent when the number of LSAs 5039 in the router's Link State Database has exceeded the 5040 AS-external limit (ext-lsdb-limit)."; 5041 } 5043 notification nssa-translator-status-change { 5044 uses notification-instance-hdr; 5046 leaf area-id { 5047 type area-id-type; 5048 description "Area ID."; 5049 } 5051 leaf status { 5052 type nssa-translator-state-type; 5053 description 5054 "NSSA translator status."; 5055 } 5057 description 5058 "This notification is sent when there is a change 5059 in the router's role in translating OSPF NSSA LSAs 5060 to OSPF AS-External LSAs."; 5061 } 5063 notification restart-status-change { 5064 uses notification-instance-hdr; 5066 leaf status { 5067 type restart-status-type; 5068 description 5069 "Restart status."; 5070 } 5072 leaf restart-interval { 5073 type uint16 { 5074 range "1..1800"; 5075 } 5076 units seconds; 5077 default "120"; 5078 description 5079 "Restart interval."; 5080 } 5082 leaf exit-reason { 5083 type restart-exit-reason-type; 5084 description 5085 "Restart exit reason."; 5086 } 5088 description 5089 "This notification is sent when the graceful restart 5090 state for the router has changed."; 5091 } 5093 } 5094 5096 4. Security Considerations 5098 The YANG modules specified in this document define a schema for data 5099 that is designed to be accessed via network management protocols such 5100 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 5101 is the secure transport layer, and the mandatory-to-implement secure 5102 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 5103 is HTTPS, and the mandatory-to-implement secure transport is TLS 5104 [RFC8446]. 5106 The NETCONF access control model [RFC8341] provides the means to 5107 restrict access for particular NETCONF or RESTCONF users to a pre- 5108 configured subset of all available NETCONF or RESTCONF protocol 5109 operations and content. 5111 There are a number of data nodes defined in ietf-ospf.yang module 5112 that are writable/creatable/deletable (i.e., config true, which is 5113 the default). These data nodes may be considered sensitive or 5114 vulnerable in some network environments. Write operations (e.g., 5115 edit-config) to these data nodes without proper protection can have a 5116 negative effect on network operations. For OSPF, the ability to 5117 modify OSPF configuration will allow the entire OSPF domain to be 5118 compromised including peering with unauthorized routers to misroute 5119 traffic or mount a massive Denial-of-Service (DoS) attack. The 5120 security considerations of OSPFv2 [RFC2328] and [RFC5340] apply to 5121 the ietf-ospf.yang module as well. 5123 Some of the readable data nodes in the ietf-ospf.yang module may be 5124 considered sensitive or vulnerable in some network environments. It 5125 is thus important to control read access (e.g., via get, get-config, 5126 or notification) to these data nodes. The exposure of the Link State 5127 Database (LSDB) will expose the detailed topology of the network. 5128 This may be undesirable since both due to the fact that exposure may 5129 facilitate other attacks. Additionally, network operators may 5130 consider their topologies to be sensitive confidential data. 5132 For OSPF authentication, configuration is supported via the 5133 specification of key-chains [RFC8177] or the direct specification of 5134 key and authentication algorithm. Hence, authentification 5135 configuration using the "auth-table-trailer" case in the 5136 "authentication" container inherits the security considerations of 5137 [RFC8177]. This includes the considerations with respect to the 5138 local storage and handling of authentication keys. 5140 Some of the RPC operations in this YANG module may be considered 5141 sensitive or vulnerable in some network environments. It is thus 5142 important to control access to these operations. The OSPF YANG 5143 module support the "clear-neighbor" and "clear-database" RPCs. If 5144 access too either of these is compromised, they can result in 5145 temporary network outages be employed to mount DoS attacks. 5147 5. IANA Considerations 5149 This document registers a URI in the IETF XML registry [RFC3688]. 5150 Following the format in [RFC3688], the following registration is 5151 requested to be made: 5153 URI: urn:ietf:params:xml:ns:yang:ietf-ospf 5154 Registrant Contact: The IESG. 5155 XML: N/A, the requested URI is an XML namespace. 5157 This document registers a YANG module in the YANG Module Names 5158 registry [RFC6020]. 5160 name: ietf-ospf 5161 namespace: urn:ietf:params:xml:ns:yang:ietf-ospf 5162 prefix: ospf 5163 reference: RFC XXXX 5165 6. Acknowledgements 5167 The authors wish to thank Yi Yang, Alexander Clemm, Gaurav Gupta, 5168 Ladislav Lhotka, Stephane Litkowski, Greg Hankins, Manish Gupta and 5169 Alan Davey for their thorough reviews and helpful comments. 5171 Thanks to Tom Petch for last call review and improvement of the 5172 document organization. 5174 This document was produced using Marshall Rose's xml2rfc tool. 5176 Author affiliation with The MITRE Corporation is provided for 5177 identification purposes only, and is not intended to convey or imply 5178 MITRE's concurrence with, or support for, the positions, opinions or 5179 viewpoints expressed. MITRE has approved this document for Public 5180 Release, Distribution Unlimited, with Public Release Case Number 5181 18-3194. 5183 7. References 5184 7.1. Normative References 5186 [I-D.ietf-bfd-yang] 5187 Rahman, R., Zheng, L., Jethanandani, M., Networks, J., and 5188 G. Mirsky, "YANG Data Model for Bidirectional Forwarding 5189 Detection (BFD)", draft-ietf-bfd-yang-17 (work in 5190 progress), August 2018. 5192 [RFC1793] Moy, J., "Extending OSPF to Support Demand Circuits", 5193 RFC 1793, DOI 10.17487/RFC1793, April 1995, 5194 . 5196 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 5197 Requirement Levels", BCP 14, RFC 2119, 5198 DOI 10.17487/RFC2119, March 1997, . 5201 [RFC2328] Moy, J., "OSPF Version 2", STD 54, RFC 2328, 5202 DOI 10.17487/RFC2328, April 1998, . 5205 [RFC3101] Murphy, P., "The OSPF Not-So-Stubby Area (NSSA) Option", 5206 RFC 3101, DOI 10.17487/RFC3101, January 2003, 5207 . 5209 [RFC3623] Moy, J., Pillay-Esnault, P., and A. Lindem, "Graceful OSPF 5210 Restart", RFC 3623, DOI 10.17487/RFC3623, November 2003, 5211 . 5213 [RFC3630] Katz, D., Kompella, K., and D. Yeung, "Traffic Engineering 5214 (TE) Extensions to OSPF Version 2", RFC 3630, 5215 DOI 10.17487/RFC3630, September 2003, . 5218 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 5219 DOI 10.17487/RFC3688, January 2004, . 5222 [RFC4552] Gupta, M. and N. Melam, "Authentication/Confidentiality 5223 for OSPFv3", RFC 4552, DOI 10.17487/RFC4552, June 2006, 5224 . 5226 [RFC4576] Rosen, E., Psenak, P., and P. Pillay-Esnault, "Using a 5227 Link State Advertisement (LSA) Options Bit to Prevent 5228 Looping in BGP/MPLS IP Virtual Private Networks (VPNs)", 5229 RFC 4576, DOI 10.17487/RFC4576, June 2006, 5230 . 5232 [RFC4577] Rosen, E., Psenak, P., and P. Pillay-Esnault, "OSPF as the 5233 Provider/Customer Edge Protocol for BGP/MPLS IP Virtual 5234 Private Networks (VPNs)", RFC 4577, DOI 10.17487/RFC4577, 5235 June 2006, . 5237 [RFC4750] Joyal, D., Ed., Galecki, P., Ed., Giacalone, S., Ed., 5238 Coltun, R., and F. Baker, "OSPF Version 2 Management 5239 Information Base", RFC 4750, DOI 10.17487/RFC4750, 5240 December 2006, . 5242 [RFC4915] Psenak, P., Mirtorabi, S., Roy, A., Nguyen, L., and P. 5243 Pillay-Esnault, "Multi-Topology (MT) Routing in OSPF", 5244 RFC 4915, DOI 10.17487/RFC4915, June 2007, 5245 . 5247 [RFC5082] Gill, V., Heasley, J., Meyer, D., Savola, P., Ed., and C. 5248 Pignataro, "The Generalized TTL Security Mechanism 5249 (GTSM)", RFC 5082, DOI 10.17487/RFC5082, October 2007, 5250 . 5252 [RFC5185] Mirtorabi, S., Psenak, P., Lindem, A., Ed., and A. Oswal, 5253 "OSPF Multi-Area Adjacency", RFC 5185, 5254 DOI 10.17487/RFC5185, May 2008, . 5257 [RFC5187] Pillay-Esnault, P. and A. Lindem, "OSPFv3 Graceful 5258 Restart", RFC 5187, DOI 10.17487/RFC5187, June 2008, 5259 . 5261 [RFC5250] Berger, L., Bryskin, I., Zinin, A., and R. Coltun, "The 5262 OSPF Opaque LSA Option", RFC 5250, DOI 10.17487/RFC5250, 5263 July 2008, . 5265 [RFC5286] Atlas, A., Ed. and A. Zinin, Ed., "Basic Specification for 5266 IP Fast Reroute: Loop-Free Alternates", RFC 5286, 5267 DOI 10.17487/RFC5286, September 2008, . 5270 [RFC5329] Ishiguro, K., Manral, V., Davey, A., and A. Lindem, Ed., 5271 "Traffic Engineering Extensions to OSPF Version 3", 5272 RFC 5329, DOI 10.17487/RFC5329, September 2008, 5273 . 5275 [RFC5340] Coltun, R., Ferguson, D., Moy, J., and A. Lindem, "OSPF 5276 for IPv6", RFC 5340, DOI 10.17487/RFC5340, July 2008, 5277 . 5279 [RFC5613] Zinin, A., Roy, A., Nguyen, L., Friedman, B., and D. 5280 Yeung, "OSPF Link-Local Signaling", RFC 5613, 5281 DOI 10.17487/RFC5613, August 2009, . 5284 [RFC5643] Joyal, D., Ed. and V. Manral, Ed., "Management Information 5285 Base for OSPFv3", RFC 5643, DOI 10.17487/RFC5643, August 5286 2009, . 5288 [RFC5838] Lindem, A., Ed., Mirtorabi, S., Roy, A., Barnes, M., and 5289 R. Aggarwal, "Support of Address Families in OSPFv3", 5290 RFC 5838, DOI 10.17487/RFC5838, April 2010, 5291 . 5293 [RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 5294 (BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010, 5295 . 5297 [RFC5881] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 5298 (BFD) for IPv4 and IPv6 (Single Hop)", RFC 5881, 5299 DOI 10.17487/RFC5881, June 2010, . 5302 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 5303 the Network Configuration Protocol (NETCONF)", RFC 6020, 5304 DOI 10.17487/RFC6020, October 2010, . 5307 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 5308 and A. Bierman, Ed., "Network Configuration Protocol 5309 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 5310 . 5312 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 5313 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 5314 . 5316 [RFC6565] Pillay-Esnault, P., Moyer, P., Doyle, J., Ertekin, E., and 5317 M. Lundberg, "OSPFv3 as a Provider Edge to Customer Edge 5318 (PE-CE) Routing Protocol", RFC 6565, DOI 10.17487/RFC6565, 5319 June 2012, . 5321 [RFC6860] Yang, Y., Retana, A., and A. Roy, "Hiding Transit-Only 5322 Networks in OSPF", RFC 6860, DOI 10.17487/RFC6860, January 5323 2013, . 5325 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 5326 RFC 6991, DOI 10.17487/RFC6991, July 2013, 5327 . 5329 [RFC7490] Bryant, S., Filsfils, C., Previdi, S., Shand, M., and N. 5330 So, "Remote Loop-Free Alternate (LFA) Fast Reroute (FRR)", 5331 RFC 7490, DOI 10.17487/RFC7490, April 2015, 5332 . 5334 [RFC7684] Psenak, P., Gredler, H., Shakir, R., Henderickx, W., 5335 Tantsura, J., and A. Lindem, "OSPFv2 Prefix/Link Attribute 5336 Advertisement", RFC 7684, DOI 10.17487/RFC7684, November 5337 2015, . 5339 [RFC7770] Lindem, A., Ed., Shen, N., Vasseur, JP., Aggarwal, R., and 5340 S. Shaffer, "Extensions to OSPF for Advertising Optional 5341 Router Capabilities", RFC 7770, DOI 10.17487/RFC7770, 5342 February 2016, . 5344 [RFC7777] Hegde, S., Shakir, R., Smirnov, A., Li, Z., and B. 5345 Decraene, "Advertising Node Administrative Tags in OSPF", 5346 RFC 7777, DOI 10.17487/RFC7777, March 2016, 5347 . 5349 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 5350 RFC 7950, DOI 10.17487/RFC7950, August 2016, 5351 . 5353 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 5354 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 5355 . 5357 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 5358 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 5359 May 2017, . 5361 [RFC8177] Lindem, A., Ed., Qu, Y., Yeung, D., Chen, I., and J. 5362 Zhang, "YANG Data Model for Key Chains", RFC 8177, 5363 DOI 10.17487/RFC8177, June 2017, . 5366 [RFC8294] Liu, X., Qu, Y., Lindem, A., Hopps, C., and L. Berger, 5367 "Common YANG Data Types for the Routing Area", RFC 8294, 5368 DOI 10.17487/RFC8294, December 2017, . 5371 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 5372 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 5373 . 5375 [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration 5376 Access Control Model", STD 91, RFC 8341, 5377 DOI 10.17487/RFC8341, March 2018, . 5380 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 5381 and R. Wilton, "Network Management Datastore Architecture 5382 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 5383 . 5385 [RFC8343] Bjorklund, M., "A YANG Data Model for Interface 5386 Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, 5387 . 5389 [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for 5390 Routing Management (NMDA Version)", RFC 8349, 5391 DOI 10.17487/RFC8349, March 2018, . 5394 [RFC8405] Decraene, B., Litkowski, S., Gredler, H., Lindem, A., 5395 Francois, P., and C. Bowers, "Shortest Path First (SPF) 5396 Back-Off Delay Algorithm for Link-State IGPs", RFC 8405, 5397 DOI 10.17487/RFC8405, June 2018, . 5400 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 5401 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 5402 . 5404 7.2. Informative References 5406 [RFC0905] "ISO Transport Protocol specification ISO DP 8073", 5407 RFC 905, DOI 10.17487/RFC0905, April 1984, 5408 . 5410 [RFC1765] Moy, J., "OSPF Database Overflow", RFC 1765, 5411 DOI 10.17487/RFC1765, March 1995, . 5414 [RFC5443] Jork, M., Atlas, A., and L. Fang, "LDP IGP 5415 Synchronization", RFC 5443, DOI 10.17487/RFC5443, March 5416 2009, . 5418 [RFC5714] Shand, M. and S. Bryant, "IP Fast Reroute Framework", 5419 RFC 5714, DOI 10.17487/RFC5714, January 2010, 5420 . 5422 [RFC6987] Retana, A., Nguyen, L., Zinin, A., White, R., and D. 5423 McPherson, "OSPF Stub Router Advertisement", RFC 6987, 5424 DOI 10.17487/RFC6987, September 2013, . 5427 Appendix A. Contributors' Addreses 5429 Dean Bogdanovic 5430 Volta Networks, Inc. 5432 EMail: dean@voltanet.io 5434 Kiran Koushik Agrahara Sreenivasa 5435 Verizon 5436 500 W Dove Rd 5437 Southlake, TX 76092 5438 USA 5440 EMail: kk@employees.org 5442 Authors' Addresses 5444 Derek Yeung 5445 Arrcus 5447 EMail: derek@arrcus.com 5449 Yingzhen Qu 5450 Huawei 5451 2330 Central Expressway 5452 Santa Clara, CA 95050 5453 USA 5455 EMail: yingzhen.qu@huawei.com 5457 Jeffrey Zhang 5458 Juniper Networks 5459 10 Technology Park Drive 5460 Westford, MA 01886 5461 USA 5463 EMail: zzhang@juniper.net 5465 Ing-Wher Chen 5466 The MITRE Corporation 5468 EMail: ingwherchen@mitre.org 5469 Acee Lindem 5470 Cisco Systems 5471 301 Midenhall Way 5472 Cary, NC 27513 5474 EMail: acee@cisco.com