idnits 2.17.1 draft-ietf-ospf-yang-29.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 == Line 1266 has weird spacing: '... allows a rou...' -- The document date (October 17, 2019) is 1653 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) ** Downref: Normative reference to an Experimental RFC: RFC 1765 ** Downref: Normative reference to an Experimental RFC: RFC 4973 ** Downref: Normative reference to an Informational RFC: RFC 5309 ** Downref: Normative reference to an Informational RFC: RFC 5714 ** Downref: Normative reference to an Informational RFC: RFC 6987 Summary: 5 errors (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet D. Yeung 3 Internet-Draft Arrcus 4 Intended status: Standards Track Y. Qu 5 Expires: April 19, 2020 Futurewei 6 J. Zhang 7 Juniper Networks 8 I. Chen 9 The MITRE Corporation 10 A. Lindem 11 Cisco Systems 12 October 17, 2019 14 YANG Data Model for OSPF Protocol 15 draft-ietf-ospf-yang-29 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 (NMDA) 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 https://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 April 19, 2020. 41 Copyright Notice 43 Copyright (c) 2019 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 (https://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 . . . . . 16 69 2.8. OSPF Notifications . . . . . . . . . . . . . . . . . . . 19 70 2.9. OSPF RPC Operations . . . . . . . . . . . . . . . . . . . 23 71 3. OSPF YANG Module . . . . . . . . . . . . . . . . . . . . . . 23 72 4. Security Considerations . . . . . . . . . . . . . . . . . . . 120 73 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 123 74 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 123 75 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 124 76 7.1. Normative References . . . . . . . . . . . . . . . . . . 124 77 7.2. Informative References . . . . . . . . . . . . . . . . . 129 78 Appendix A. Contributors' Addresses . . . . . . . . . . . . . . 131 79 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 131 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], RESTCONF [RFC8040], and other 86 Network Management protocols. Furthermore, YANG data models can be 87 used as the basis for implementation of other interfaces, such as CLI 88 and programmatic APIs. 90 This document defines a YANG data model that can be used to configure 91 and manage OSPF and it is an augmentation to the core routing data 92 model. It fully conforms to the Network Management Datastore 93 Architecture (NMDA) [RFC8342]. A core routing data model is defined 94 in [RFC8349], and it provides the basis for the development of data 95 models for routing protocols. The interface data model is defined in 96 [RFC8343] and is used for referencing interfaces from the routing 97 protocol. The key-chain data model used for OSPF authentication is 98 defined in [RFC8177] and provides both a reference to configured key- 99 chains and an enumeration of cryptographic algorithms. 101 Both OSPFv2 [RFC2328] and OSPFv3 [RFC5340] are supported. In 102 addition to the core OSPF protocol, features described in other OSPF 103 RFCs are also supported. These includes demand circuit [RFC1793], 104 traffic engineering [RFC3630], multiple address family [RFC5838], 105 graceful restart [RFC3623] [RFC5187], NSSA [RFC3101], and OSPFv2 or 106 OSPFv3 as a PE-CE Protocol [RFC4577], [RFC6565]. These non-core 107 features are optional in the OSPF data model. 109 1.1. Requirements Language 111 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 112 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 113 "OPTIONAL" in this document are to be interpreted as described in BCP 114 14 [RFC2119] [RFC8174] when, and only when, they appear in all 115 capitals, as shown here. 117 1.2. Tree Diagrams 119 This document uses the graphical representation of data models 120 defined in [RFC8340]. 122 2. Design of Data Model 124 Although the basis of OSPF configuration elements like routers, 125 areas, and interfaces remains the same, the detailed configuration 126 model varies among router vendors. Differences are observed in terms 127 of how the protocol instance is tied to the routing domain and how 128 multiple protocol instances are be instantiated among others. 130 The goal of this document is to define a data model that provides a 131 common user interface to the OSPFv2 and OSPFv3 protocols. There is 132 very little information that is designated as "mandatory", providing 133 freedom for vendors to adapt this data model to their respective 134 product implementations. 136 2.1. OSPF Operational State 138 The OSPF operational state is included in the same tree as OSPF 139 configuration consistent with the Network Management Datastore 140 Architecture [RFC8342]. Consequently, only the routing container in 141 the ietf-routing model [RFC8349] is augmented. The routing-state 142 container is not augmented. 144 2.2. Overview 146 The OSPF YANG module defined in this document has all the common 147 building blocks for the OSPF protocol. 149 The OSPF YANG module augments the /routing/control-plane-protocols/ 150 control-plane-protocol path defined in the ietf-routing module. The 151 ietf-ospf model defines a single instance of OSPF which may be 152 instantiated as an OSPFv2 or OSPFv3 instance. Multiple instances are 153 instantiated as multiple control-plane protocols instances. 155 module: ietf-ospf 156 augment /rt:routing/rt:control-plane-protocols/ 157 rt:control-plane-protocol: 158 +--rw ospf 159 . 160 . 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 container includes one OSPF protocol instance. The instance 187 includes OSPF router level configuration and operational state. Each 188 OSPF instance maps to a control-plane-protcol instance as defined in 189 [RFC8349]. 191 The area and area/interface containers define the OSPF configuration 192 and operational state for OSPF areas and interfaces respectively. 194 The topologies container defines the OSPF configuration and 195 operational state for OSPF topologies when the multi-topology feature 196 is supported. 198 2.3. OSPFv2 and OSPFv3 200 The data model defined herein supports both OSPFv2 and OSPFv3. 202 The field 'version' is used to indicate the OSPF version and is 203 mandatory. Based on the configured version, the data model varies to 204 accommodate the differences between OSPFv2 and OSPFv3. 206 2.4. Optional Features 208 Optional features are beyond the basic OSPF configuration and it is 209 the responsibility of each vendor to decide whether to support a 210 given feature on a particular device. 212 This model defines the following optional features: 214 1. multi-topology: Support Multi-Topology Routing (MTR) [RFC4915]. 216 2. multi-area-adj: Support OSPF multi-area adjacency [RFC5185]. 218 3. explicit-router-id: Support explicit per-instance Router-ID 219 specification. 221 4. demand-circuit: Support OSPF demand circuits [RFC1793]. 223 5. mtu-ignore: Support disabling OSPF Database Description packet 224 MTU mismatch checking specified in section 10.6 of [RFC2328]. 226 6. lls: Support OSPF link-local signaling (LLS) [RFC5613]. 228 7. prefix-suppression: Support OSPF prefix advertisement 229 suppression [RFC6860]. 231 8. ttl-security: Support OSPF Time to Live (TTL) security check 232 support [RFC5082]. 234 9. nsr: Support OSPF Non-Stop Routing (NSR). The OSPF NSR feature 235 allows a router with redundant control-plane capability (e.g., 236 dual Route-Processor (RP) cards) to maintain its state and 237 adjacencies during planned and unplanned control-plane 238 processing restarts. It differs from graceful-restart or Non- 239 Stop Forwarding (NSF) in that no protocol signaling or 240 assistance from adjacent OSPF neighbors is required to recover 241 control-plane state. 243 10. graceful-restart: Support Graceful OSPF Restart [RFC3623], 244 [RFC5187]. 246 11. auto-cost: Support OSPF interface cost calculation according to 247 reference bandwidth [RFC2328]. 249 12. max-ecmp: Support configuration of the maximum number of Equal- 250 Cost Multi-Path (ECMP) paths. 252 13. max-lsa: Support configuration of the maximum number of LSAs the 253 OSPF instance will accept [RFC1765]. 255 14. te-rid: Support configuration of the Traffic Engineering (TE) 256 Router-ID, i.e., the Router Address described in Section 2.4.1 257 of [RFC3630] or the Router IPv6 Address TLV described in 258 Section 3 of [RFC5329]. 260 15. ldp-igp-sync: Support LDP IGP synchronization [RFC5443]. 262 16. ospfv2-authentication-trailer: Support OSPFv2 Authentication 263 trailer as specified in [RFC5709] or [RFC7474]. 265 17. ospfv3-authentication-ipsec: Support IPsec for OSPFv3 266 authentication [RFC4552]. 268 18. ospfv3-authentication-trailer: Support OSPFv3 Authentication 269 trailer as specified in [RFC7166]. 271 19. fast-reroute: Support IP Fast Reroute (IP-FRR) [RFC5714]. 273 20. node-flag: Support node-flag for OSPF prefixes. [RFC7684]. 275 21. node-tag: Support node admin tag for OSPF instances [RFC7777]. 277 22. lfa: Support Loop-Free Alternates (LFAs) [RFC5286]. 279 23. remote-lfa: Support Remote Loop-Free Alternates (R-LFA) 280 [RFC7490]. 282 24. stub-router: Support RFC 6987 OSPF Stub Router advertisement 283 [RFC6987]. 285 25. pe-ce-protocol: Support OSPF as a PE-CE protocol [RFC4577], 286 [RFC6565]. 288 26. ietf-spf-delay: Support IETF SPF delay algorithm [RFC8405]. 290 27. bfd: Support BFD detection of OSPF neighbor reachability 291 [RFC5880], [RFC5881], and [I-D.ietf-bfd-yang]. 293 28. hybrid-interface: Support OSPF Hybrid Broadcast and Point-to- 294 Point Interfaces [RFC6845]. 296 It is expected that vendors will support additional features through 297 vendor-specific augmentations. 299 2.5. OSPF Router Configuration/Operational State 301 The ospf container is the top-level container in this data model. It 302 represents an OSPF protocol instance and contains the router level 303 configuration and operational state. The operational state includes 304 the instance statistics, IETF SPF delay statistics, AS-Scoped Link 305 State Database, local RIB, SPF Log, and the LSA log. 307 module: ietf-ospf 308 augment /rt:routing/rt:control-plane-protocols/ 309 rt:control-plane-protocol: 310 +--rw ospf 311 . 312 . 313 +--rw af iana-rt-types:address-family 314 +--rw enable? boolean 315 +--rw explicit-router-id? rt-types:router-id 316 | {explicit-router-id}? 317 +--rw preference 318 | +--rw (scope)? 319 | +--:(single-value) 320 | | +--rw all? uint8 321 | +--:(multi-values) 322 | +--rw (granularity)? 323 | | +--:(detail) 324 | | | +--rw intra-area? uint8 325 | | | +--rw inter-area? uint8 326 | | +--:(coarse) 327 | | +--rw internal? uint8 328 | +--rw external? uint8 329 +--rw nsr {nsr}? 330 | +--rw enable? boolean 331 +--rw graceful-restart {graceful-restart}? 332 | +--rw enable? boolean 333 | +--rw helper-enable? boolean 334 | +--rw restart-interval? uint16 335 | +--rw helper-strict-lsa-checking? boolean 336 +--rw auto-cost {auto-cost}? 337 | +--rw enable? boolean 338 | +--rw reference-bandwidth? uint32 339 +--rw spf-control 340 | +--rw paths? uint16 {max-ecmp}? 341 | +--rw ietf-spf-delay {ietf-spf-delay}? 342 | +--rw initial-delay? uint16 343 | +--rw short-delay? uint16 344 | +--rw long-delay? uint16 345 | +--rw hold-down? uint16 346 | +--rw time-to-learn? uint16 347 | +--ro current-state? enumeration 348 | +--ro remaining-time-to-learn? uint16 349 | +--ro remaining-hold-down? uint16 350 | +--ro last-event-received? yang:timestamp 351 | +--ro next-spf-time? yang:timestamp 352 | +--ro last-spf-time? yang:timestamp 353 +--rw database-control 354 | +--rw max-lsa? uint32 {max-lsa}? 355 +--rw stub-router {stub-router}? 356 | +--rw (trigger)? 357 | +--:(always) 358 | +--rw always! 359 +--rw mpls 360 | +--rw te-rid {te-rid}? 361 | | +--rw ipv4-router-id? inet:ipv4-address 362 | | +--rw ipv6-router-id? inet:ipv6-address 363 | +--rw ldp 364 | +--rw igp-sync? boolean {ldp-igp-sync}? 365 +--rw fast-reroute {fast-reroute}? 366 | +--rw lfa {lfa}? 367 +--ro protected-routes 368 | +--ro af-stats* [af prefix alternate] 369 | +--ro af iana-rt-types:address-family 370 | +--ro prefix string 371 | +--ro alternate string 372 | +--ro alternate-type? enumeration 373 | +--ro best? boolean 374 | +--ro non-best-reason? string 375 | +--ro protection-available? bits 376 | +--ro alternate-metric1? uint32 377 | +--ro alternate-metric2? uint32 378 | +--ro alternate-metric3? uint32 379 +--ro unprotected-routes 380 | +--ro af-stats* [af prefix] 381 | +--ro af iana-rt-types:address-family 382 | +--ro prefix string 383 +--ro protection-statistics* [frr-protection-method] 384 | +--ro frr-protection-method string 385 | +--ro af-stats* [af] 386 | +--ro af iana-rt-types:address-family 387 | +--ro total-routes? uint32 388 | +--ro unprotected-routes? uint32 389 | +--ro protected-routes? uint32 390 | +--ro linkprotected-routes? uint32 391 | +--ro nodeprotected-routes? uint32 392 +--rw node-tags {node-tag}? 393 | +--rw node-tag* [tag] 394 | +--rw tag uint32 395 +--ro router-id? 396 +--ro local-rib 397 | +--ro route* [prefix] 398 | +--ro prefix inet:ip-prefix 399 | +--ro next-hops 400 | | +--ro next-hop* [next-hop] 401 | | +--ro outgoing-interface? if:interface-ref 402 | | +--ro next-hop inet:ip-address 403 | +--ro metric? uint32 404 | +--ro route-type? route-type 405 | +--ro route-tag? uint32 406 +--ro statistics 407 | +--ro discontinuity-time yang:date-and-time 408 | +--ro originate-new-lsa-count? yang:counter32 409 | +--ro rx-new-lsas-count? yang:counter32 410 | +--ro as-scope-lsa-count? yang:gauge32 411 | +--ro as-scope-lsa-chksum-sum? uint32 412 | +--ro database 413 | +--ro as-scope-lsa-type* 414 | +--ro lsa-type? uint16 415 | +--ro lsa-count? yang:gauge32 416 | +--ro lsa-cksum-sum? int32 417 +--ro database 418 | +--ro as-scope-lsa-type* [lsa-type] 419 | +--ro as-scope-lsas 420 | +--ro as-scope-lsa* [lsa-id adv-router] 421 | +--ro lsa-id union 422 | +--ro adv-router inet:ipv4-address 423 | +--ro decoded-completed? boolean 424 | +--ro raw-data? yang:hex-string 425 | +--ro (version)? 426 | +--:(ospfv2) 427 | | +--ro ospfv2 428 . . 429 . . 430 | +--:(ospfv3) 431 | +--ro ospfv3 432 . 433 . 434 +--ro spf-log 435 | +--ro event* [id] 436 | +--ro id uint32 437 | +--ro spf-type? enumeration 438 | +--ro schedule-timestamp? yang:timestamp 439 | +--ro start-timestamp? yang:timestamp 440 +--ro end-timestamp? yang:timestamp 441 | +--ro trigger-lsa* 442 | +--ro area-id? area-id-type 443 | +--ro link-id? union 444 | +--ro type? uint16 445 | +--ro lsa-id? yang:dotted-quad 446 | +--ro adv-router? yang:dotted-quad 447 | +--ro seq-num? uint32 448 +--ro lsa-log 449 | +--ro event* [id] 450 | +--ro id uint32 451 | +--ro lsa 452 | | +--ro area-id? area-id-type 453 | | +--ro link-id? union 454 | | +--ro type? uint16 455 | | +--ro lsa-id? yang:dotted-quad 456 | | +--ro adv-router? yang:dotted-quad 457 | | +--ro seq-num? uint32 458 | +--ro received-timestamp? yang:timestamp 459 | +--ro reason? identityref 460 . 461 . 463 2.6. OSPF Area Configuration/Operational State 465 The area container contains OSPF area configuration and the list of 466 interface containers representing all the OSPF interfaces in the 467 area. The area operational state includes the area statistics and 468 the Area Link State Database (LSDB). 470 module: ietf-ospf 471 augment /rt:routing/rt:control-plane-protocols/ 472 rt:control-plane-protocol: 473 +--rw ospf 474 . 475 . 476 +--rw areas 477 | +--rw area* [area-id] 478 | +--rw area-id area-id-type 479 | +--rw area-type? identityref 480 | +--rw summary? boolean 481 | +--rw default-cost? uint32 482 | +--rw ranges 483 | | +--rw range* [prefix] 484 | | +--rw prefix inet:ip-prefix 485 | | +--rw advertise? boolean 486 | | +--rw cost? uint24 487 | +--rw topologies {ospf:multi-topology}? 488 | | +--rw topology* [name] 489 | | +--rw name -> ../../../../../../../../ 490 | | ../../../rt:ribs/rib/name 491 | | +--rw summary? boolean 492 | | +--rw default-cost? ospf-metric 493 | | +--rw ranges 494 | | +--rw range* [prefix] 495 | | +--rw prefix inet:ip-prefix 496 | | +--rw advertise? boolean 497 | | +--rw cost? ospf-metric 498 | +--ro statistics 499 | | +--ro discontinuity-time yang:date-and-time 500 | | +--ro spf-runs-count? yang:counter32 501 | | +--ro abr-count? yang:gauge32 502 | | +--ro asbr-count? yang:gauge32 503 | | +--ro ar-nssa-translator-event-count? 504 | | yang:counter32 505 | | +--ro area-scope-lsa-count? yang:gauge32 506 | | +--ro area-scope-lsa-cksum-sum? int32 507 | | +--ro database 508 | | +--ro area-scope-lsa-type* 509 | | +--ro lsa-type? uint16 510 | | +--ro lsa-count? yang:gauge32 511 | | +--ro lsa-cksum-sum? int32 512 | +--ro database 513 | | +--ro area-scope-lsa-type* [lsa-type] 514 | | +--ro lsa-type uint16 515 | | +--ro area-scope-lsas 516 | | +--ro area-scope-lsa* [lsa-id adv-router] 517 | | +--ro lsa-id union 518 . . . 519 . . . 520 | | +--ro (version)? 521 | | +--:(ospfv2) 522 | | | +--ro ospfv2 523 | | | +--ro header 524 . . . . 525 . . . . 526 | | | +--ro body 527 | | | +--ro router 528 . . . . 529 . . . . 530 | | | +--ro network 531 . . . . 532 . . . . 533 | | | +--ro summary 534 . . . . 535 . . . . 536 | | | +--ro external 537 . . . . 538 . . . . 539 | | | +--ro opaque 540 . . . . 541 . . . . 542 | | +--:(ospfv3) 543 | | +--ro ospfv3 544 | | +--ro header 545 . . . 546 . . . 547 | | +--ro body 548 | | +--ro router 549 . . . 550 . . . 551 | | +--ro network 552 . . . 553 . . . 554 | | +--ro inter-area-prefix 555 . . . 556 . . . 557 | | +--ro inter-area-router 558 . . . 559 . . . 560 | | +--ro as-external 561 . . . 562 . . . 563 | | +--ro nssa 564 . . . 565 . . . 566 | | +--ro link 567 . . . 568 . . . 569 | | +--ro intra-area-prefix 570 . . . 571 . . . 572 | | +--ro router-information 573 . . . 574 . . . 575 | +--rw virtual-links 576 | | +--rw virtual-link* [transit-area-id router-id] 577 | | +--rw transit-area-id -> ../../../../ 578 | | area/area-id 579 | | +--rw router-id rt-types:router-id 580 | | +--rw hello-interval? uint16 581 | | +--rw dead-interval? uint32 582 | | +--rw retransmit-interval? uint16 583 | | +--rw transmit-delay? uint16 584 | | +--rw lls? boolean {lls}? 585 | | +--rw ttl-security {ttl-security}? 586 | | | +--rw enable? boolean 587 | | | +--rw hops? uint8 588 | | +--rw enable? boolean 589 | | +--rw authentication 590 | | | +--rw (auth-type-selection)? 591 | | | +--:(ospfv2-auth) 592 | | | | +--rw ospfv2-auth-trailer-rfc? 593 | | | | | ospfv2-auth-trailer-rfc-version 594 | | | | | {ospfv2-authentication-trailer}? 595 | | | | +--rw (ospfv2-auth-specification)? 596 | | | | +--:(auth-key-chain) {key-chain}? 597 | | | | | +--rw ospfv2-key-chain? 598 | | | | | key-chain:key-chain-ref 599 | | | | +--:(auth-key-explicit) 600 | | | | +--rw ospfv2-key-id? uint32 601 | | | | +--rw ospfv2-key? string 602 | | | | +--rw ospfv2-crypto-algorithm? 603 | | | | identityref 604 | | | +--:(ospfv3-auth-ipsec) 605 | | | | {ospfv3-authentication-ipsec}? 606 | | | | +--rw sa? string 607 | | | +--:(ospfv3-auth-trailer) 608 | | | | {ospfv3-authentication-trailer}? 609 | | | +--rw (ospfv3-auth-specification)? 610 | | | +--:(auth-key-chain) {key-chain}? 611 | | | | +--rw ospfv3-key-chain? 612 | | | | key-chain:key-chain-ref 613 | | | +--:(auth-key-explicit) 614 | | | +--rw ospfv3-sa-id? uint16 615 | | | +--rw ospfv3-key? string 616 | | | +--rw ospfv3-crypto-algorithm? 617 | | | identityref 618 | | +--ro cost? uint16 619 | | +--ro state? if-state-type 620 | | +--ro hello-timer? rt-types: 621 | | | rtimer-value-seconds16 622 | | +--ro wait-timer? rt-types: 623 | | | rtimer-value-seconds16 624 | | +--ro dr-router-id? rt-types:router-id 625 | | +--ro dr-ip-addr? inet:ip-address 626 | | +--ro bdr-router-id? rt-types:router-id 627 | | +--ro bdr-ip-addr? inet:ip-address 628 | | +--ro statistics 629 | | | +--ro discontinuity-time yang:date-and-time 630 | | | +--ro if-event-count? yang:counter32 631 | | | +--ro link-scope-lsa-count? yang:gauge32 632 | | | +--ro link-scope-lsa-cksum-sum? 633 | | | uint32 634 | | | +--ro database 635 | | | +--ro link-scope-lsa-type* 636 | | | +--ro lsa-type? uint16 637 | | | +--ro lsa-count? yang:gauge32 638 | | | +--ro lsa-cksum-sum? int32 639 | | +--ro neighbors 640 | | | +--ro neighbor* [neighbor-router-id] 641 | | | +--ro neighbor-router-id 642 | | | rt-types:router-id 643 | | | +--ro address? inet:ip-address 644 | | | +--ro dr-router-id? rt-types:router-id 645 | | | +--ro dr-ip-addr? inet:ip-address 646 | | | +--ro bdr-router-id? rt-types:router-id 647 | | | +--ro bdr-ip-addr? inet:ip-address 648 | | | +--ro state? nbr-state-type 649 | | | +--ro dead-timer? rt-types: 650 | | | | rtimer-value-seconds16 651 | | | +--ro statistics 652 | | | +--ro discontinuity-time 653 | | | yang:date-and-time 654 | | | +--ro nbr-event-count? 655 | | | yang:counter32 656 | | | +--ro nbr-retrans-qlen? 657 | | | yang:gauge32 658 | | +--ro database 659 | | +--ro link-scope-lsa-type* [lsa-type] 660 | | +--ro lsa-type uint16 661 | | +--ro link-scope-lsas 662 . . 663 . . 664 | +--rw sham-links {pe-ce-protocol}? 665 | | +--rw sham-link* [local-id remote-id] 666 | | +--rw local-id inet:ip-address 667 | | +--rw remote-id inet:ip-address 668 | | +--rw hello-interval? uint16 669 | | +--rw dead-interval? uint32 670 | | +--rw retransmit-interval? uint16 671 | | +--rw transmit-delay? uint16 672 | | +--rw lls? boolean {lls}? 673 | | +--rw ttl-security {ttl-security}? 674 | | | +--rw enable? boolean 675 | | | +--rw hops? uint8 676 | | +--rw enable? boolean 677 | | +--rw authentication 678 | | | +--rw (auth-type-selection)? 679 | | | +--:(ospfv2-auth) 680 | | | | +--rw ospfv2-auth-trailer-rfc? 681 | | | | | ospfv2-auth-trailer-rfc-version 682 | | | | | {ospfv2-authentication-trailer}? 683 | | | | +--rw (ospfv2-auth-specification)? 684 | | | | +--:(auth-key-chain) {key-chain}? 685 | | | | | +--rw ospfv2-key-chain? 686 | | | | | key-chain:key-chain-ref 687 | | | | +--:(auth-key-explicit) 688 | | | | +--rw ospfv2-key-id? uint32 689 | | | | +--rw ospfv2-key? string 690 | | | | +--rw ospfv2-crypto-algorithm? 691 | | | | identityref 692 | | | +--:(ospfv3-auth-ipsec) 693 | | | | {ospfv3-authentication-ipsec}? 694 | | | | +--rw sa? string 695 | | | +--:(ospfv3-auth-trailer) 696 | | | | {ospfv3-authentication-trailer}? 697 | | | +--rw (ospfv3-auth-specification)? 698 | | | +--:(auth-key-chain) {key-chain}? 699 | | | | +--rw ospfv3-key-chain? 700 | | | | key-chain:key-chain-ref 701 | | | +--:(auth-key-explicit) 702 | | | +--rw ospfv3-sa-id? uint16 703 | | | +--rw ospfv3-key? string 704 | | | +--rw ospfv3-crypto-algorithm? 705 | | | identityref 706 | | +--rw cost? uint16 707 | | +--rw mtu-ignore? boolean 708 | | {mtu-ignore}? 709 | | +--rw prefix-suppression? boolean 710 | | {prefix-suppression}? 711 | | +--ro state? if-state-type 712 | | +--ro hello-timer? rt-types: 713 | | | rtimer-value-seconds16 714 | | +--ro wait-timer? rt-types: 715 | | | rtimer-value-seconds16 716 | | +--ro dr-router-id? rt-types:router-id 717 | | +--ro dr-ip-addr? inet:ip-address 718 | | +--ro bdr-router-id? rt-types:router-id 719 | | +--ro bdr-ip-addr? inet:ip-address 720 | | +--ro statistics 721 | | | +--ro discontinuity-time yang:date-and-time 722 | | | +--ro if-event-count? yang:counter32 723 | | | +--ro link-scope-lsa-count? yang:gauge32 724 | | | +--ro link-scope-lsa-cksum-sum? 725 | | | uint32 726 | | | +--ro database 727 | | | +--ro link-scope-lsa-type* 728 | | | +--ro lsa-type? uint16 729 | | | +--ro lsa-count? yang:gauge32 730 | | | +--ro lsa-cksum-sum? int32 731 | | +--ro neighbors 732 | | | +--ro neighbor* [neighbor-router-id] 733 | | | +--ro neighbor-router-id 734 | | | rt-types:router-id 735 | | | +--ro address? inet:ip-address 736 | | | +--ro dr-router-id? rt-types:router-id 737 | | | +--ro dr-ip-addr? inet:ip-address 738 | | | +--ro bdr-router-id? rt-types:router-id 739 | | | +--ro bdr-ip-addr? inet:ip-address 740 | | | +--ro state? nbr-state-type 741 | | | +--ro cost? uint32 742 | | | +--ro dead-timer? rt-types: 743 | | | | rtimer-value-seconds16 744 | | | +--ro statistics 745 | | | +--ro nbr-event-count? 746 | | | yang:counter32 747 | | | +--ro nbr-retrans-qlen? 748 | | | yang:gauge32 749 | | +--ro database 750 | | +--ro link-scope-lsa-type* [lsa-type] 751 | | +--ro lsa-type uint16 752 | | +--ro link-scope-lsas 753 . . 754 . . 756 2.7. OSPF Interface Configuration/Operational State 758 The interface container contains OSPF interface configuration and 759 operational state. The interface operational state includes the 760 statistics, list of neighbors, and Link-Local Link State Database 761 (LSDB). 763 module: ietf-ospf 764 augment /rt:routing/rt:control-plane-protocols/ 765 rt:control-plane-protocol: 766 +--rw ospf 767 . 769 . 770 +--rw areas 771 | +--rw area* [area-id] 772 | . 773 | . 774 | +--rw interfaces 775 | +--rw interface* [name] 776 | +--rw name if:interface-ref 777 | +--rw interface-type? enumeration 778 | +--rw passive? boolean 779 | +--rw demand-circuit? boolean 780 | {demand-circuit}? 781 | +--rw priority? uint8 782 | +--rw multi-areas {multi-area-adj}? 783 | | +--rw multi-area* [multi-area-id] 784 | | +--rw multi-area-id area-id-type 785 | | +--rw cost? uint16 786 | +--rw static-neighbors 787 | | +--rw neighbor* [identifier] 788 | | +--rw identifier inet:ip-address 789 | | +--rw cost? uint16 790 | | +--rw poll-interval? uint16 791 | | +--rw priority? uint8 792 | +--rw node-flag? boolean 793 | {node-flag}? 794 | +--rw bfd {bfd}? 795 | | +--rw enable? boolean 796 | +--rw fast-reroute {fast-reroute}? 797 | | +--rw lfa {lfa}? 798 | | +--rw candidate-enable? boolean 799 | | +--rw enable? boolean 800 | | +--rw remote-lfa {remote-lfa}? 801 | | +--rw enable? boolean 802 | +--rw hello-interval? uint16 803 | +--rw dead-interval? uint32 804 | +--rw retransmit-interval? uint16 805 | +--rw transmit-delay? uint16 806 | +--rw lls? boolean {lls}? 807 | +--rw ttl-security {ttl-security}? 808 | | +--rw enable? boolean 809 | | +--rw hops? uint8 810 | +--rw enable? boolean 811 | +--rw authentication 812 | | +--rw (auth-type-selection)? 813 | | +--:(ospfv2-auth) 814 | | | +--rw ospfv2-auth-trailer-rfc? 815 | | | | ospfv2-auth-trailer-rfc-version 816 | | | | {ospfv2-authentication-trailer}? 817 | | | +--rw (ospfv2-auth-specification)? 818 | | | +--:(auth-key-chain) {key-chain}? 819 | | | | +--rw ospfv2-key-chain? 820 | | | | key-chain:key-chain-ref 821 | | | +--:(auth-key-explicit) 822 | | | +--rw ospfv2-key-id? uint32 823 | | | +--rw ospfv2-key? string 824 | | | +--rw ospfv2-crypto-algorithm? 825 | | | identityref 826 | | +--:(ospfv3-auth-ipsec) 827 | | | {ospfv3-authentication-ipsec}? 828 | | | +--rw sa? string 829 | | +--:(ospfv3-auth-trailer) 830 | | | {ospfv3-authentication-trailer}? 831 | | +--rw (ospfv3-auth-specification)? 832 | | +--:(auth-key-chain) {key-chain}? 833 | | | +--rw ospfv3-key-chain? 834 | | | key-chain:key-chain-ref 835 | | +--:(auth-key-explicit) 836 | | +--rw ospfv3-sa-id? uint16 837 | | +--rw ospfv3-key? string 838 | | +--rw ospfv3-crypto-algorithm? 839 | | identityref 840 | +--rw cost? uint16 841 | +--rw mtu-ignore? boolean 842 | | {mtu-ignore}? 843 | +--rw prefix-suppression? boolean 844 | | {prefix-suppression}? 845 | +--ro state? if-state-type 846 | +--ro hello-timer? rt-types: 847 | | rtimer-value-seconds16 848 | +--ro wait-timer? rt-types: 849 | | rtimer-value-seconds16 850 | +--ro dr-router-id? rt-types:router-id 851 | +--ro dr-ip-addr? inet:ip-address 852 | +--ro bdr-router-id? rt-types:router-id 853 | +--ro bdr-ip-addr? inet:ip-address 854 | +--ro statistics 855 | | +--ro if-event-count? yang:counter32 856 | | +--ro link-scope-lsa-count? yang:gauge32 857 | | +--ro link-scope-lsa-cksum-sum? 858 | | uint32 859 | | +--ro database 860 | | +--ro link-scope-lsa-type* 861 | | +--ro lsa-type? uint16 862 | | +--ro lsa-count? yang:gauge32 863 | | +--ro lsa-cksum-sum? int32 864 | +--ro neighbors 865 | | +--ro neighbor* [neighbor-router-id] 866 | | +--ro neighbor-router-id 867 | | rt-types:router-id 868 | | +--ro address? inet:ip-address 869 | | +--ro dr-router-id? rt-types:router-id 870 | | +--ro dr-ip-addr? inet:ip-address 871 | | +--ro bdr-router-id? rt-types:router-id 872 | | +--ro bdr-ip-addr? inet:ip-address 873 | | +--ro state? nbr-state-type 874 | | +--ro dead-timer? rt-types: 875 | | | rtimer-value-seconds16 876 | | +--ro statistics 877 | | +--ro nbr-event-count? 878 | | yang:counter32 879 | | +--ro nbr-retrans-qlen? 880 | | yang:gauge32 881 | +--ro database 882 | . +--ro link-scope-lsa-type* [lsa-type] 883 | . +--ro lsa-type uint16 884 | . +--ro link-scope-lsas 885 . . 886 . . 887 | +--rw topologies {ospf:multi-topology}? 888 | | +--rw topology* [name] 889 | | +--rw name -> ../../../../../../../../ 890 | | ../../../rt:ribs/rib/name 891 | | +--rw cost? uint32 892 | +--rw instance-id? uint8 893 . 894 . 896 2.8. OSPF Notifications 898 This YANG model defines a list of notifications that inform YANG 899 clients of important events detected during protocol operation. The 900 defined notifications cover the common set of traps from the OSPFv2 901 MIB [RFC4750] and OSPFv3 MIB [RFC5643]. 903 notifications: 904 +---n if-state-change 905 | +--ro routing-protocol-name? 906 | + -> /rt:routing/control-plane-protocols/ 907 | + control-plane-protocol/name 908 | +--ro af? 909 | + -> /rt:routing/control-plane-protocols/ 910 | + control-plane-protocol 911 | + [rt:name=current()/../routing-protocol-name]/ 912 | + ospf:ospf/af 913 | +--ro (if-link-type-selection)? 914 | | +--:(interface) 915 | | | +--ro interface 916 | | | +--ro interface? if:interface-ref 917 | | +--:(virtual-link) 918 | | | +--ro virtual-link 919 | | | +--ro transit-area-id? area-id-type 920 | | | +--ro neighbor-router-id? rt-types:router-id 921 | | +--:(sham-link) 922 | | +--ro sham-link 923 | | +--ro area-id? area-id-type 924 | | +--ro local-ip-addr? inet:ip-address 925 | | +--ro remote-ip-addr? inet:ip-address 926 | +--ro state? if-state-type 927 +---n if-config-error 928 | +--ro routing-protocol-name? 929 | + -> /rt:routing/control-plane-protocols/ 930 | + control-plane-protocol/name 931 | +--ro af? 932 | + -> /rt:routing/control-plane-protocols/ 933 | + control-plane-protocol 934 | + [rt:name=current()/../routing-protocol-name]/ 935 | + ospf:ospf/af 936 | +--ro (if-link-type-selection)? 937 | | +--:(interface) 938 | | | +--ro interface 939 | | | +--ro interface? if:interface-ref 940 | | +--:(virtual-link) 941 | | | +--ro virtual-link 942 | | | +--ro transit-area-id? area-id-type 943 | | | +--ro neighbor-router-id? rt-types:router-id 944 | | +--:(sham-link) 945 | | +--ro sham-link 946 | | +--ro area-id? area-id-type 947 | | +--ro local-ip-addr? inet:ip-address 948 | | +--ro remote-ip-addr? inet:ip-address 949 | +--ro packet-source? yang:dotted-quad 950 | +--ro packet-type? packet-type 951 | +--ro error? enumeration 952 +---n nbr-state-change 953 | +--ro routing-protocol-name? 954 | + -> /rt:routing/control-plane-protocols/ 955 | + control-plane-protocol/name 956 | +--ro af? 957 | + -> /rt:routing/control-plane-protocols/ 958 | + control-plane-protocol 959 | + [rt:name=current()/../routing-protocol-name]/ 960 | + ospf:ospf/af 961 | +--ro (if-link-type-selection)? 962 | | +--:(interface) 963 | | | +--ro interface 964 | | | +--ro interface? if:interface-ref 965 | | +--:(virtual-link) 966 | | | +--ro virtual-link 967 | | | +--ro transit-area-id? area-id-type 968 | | | +--ro neighbor-router-id? rt-types:router-id 969 | | +--:(sham-link) 970 | | +--ro sham-link 971 | | +--ro area-id? area-id-type 972 | | +--ro local-ip-addr? inet:ip-address 973 | | +--ro remote-ip-addr? inet:ip-address 974 | +--ro neighbor-router-id? rt-types:router-id 975 | +--ro neighbor-ip-addr? yang:dotted-quad 976 | +--ro state? nbr-state-type 977 +---n nbr-restart-helper-status-change 978 | +--ro routing-protocol-name? 979 | + -> /rt:routing/control-plane-protocols/ 980 | + control-plane-protocol/name 981 | +--ro af? 982 | + -> /rt:routing/control-plane-protocols/ 983 | + control-plane-protocol 984 | + [rt:name=current()/../routing-protocol-name]/ 985 | + ospf:ospf/af 986 | +--ro (if-link-type-selection)? 987 | | +--:(interface) 988 | | | +--ro interface 989 | | | +--ro interface? if:interface-ref 990 | | +--:(virtual-link) 991 | | | +--ro virtual-link 992 | | | +--ro transit-area-id? area-id-type 993 | | | +--ro neighbor-router-id? rt-types:router-id 994 | | +--:(sham-link) 995 | | +--ro sham-link 996 | | +--ro area-id? area-id-type 997 | | +--ro local-ip-addr? inet:ip-address 998 | | +--ro remote-ip-addr? inet:ip-address 999 | +--ro neighbor-router-id? rt-types:router-id 1000 | +--ro neighbor-ip-addr? yang:dotted-quad 1001 | +--ro status? restart-helper-status-type 1002 | +--ro age? uint32 1003 | +--ro exit-reason? restart-exit-reason-type 1004 +---n if-rx-bad-packet 1005 | +--ro routing-protocol-name? 1006 | + -> /rt:routing/control-plane-protocols/ 1007 | + control-plane-protocol/name 1008 | +--ro af? 1009 | + -> /rt:routing/control-plane-protocols/ 1010 | + control-plane-protocol 1011 | + [rt:name=current()/../routing-protocol-name]/ 1012 | + ospf:ospf/af 1013 | +--ro (if-link-type-selection)? 1014 | | +--:(interface) 1015 | | | +--ro interface 1016 | | | +--ro interface? if:interface-ref 1017 | | +--:(virtual-link) 1018 | | | +--ro virtual-link 1019 | | | +--ro transit-area-id? area-id-type 1020 | | | +--ro neighbor-router-id? rt-types:router-id 1021 | | +--:(sham-link) 1022 | | +--ro sham-link 1023 | | +--ro area-id? area-id-type 1024 | | +--ro local-ip-addr? inet:ip-address 1025 | | +--ro remote-ip-addr? inet:ip-address 1026 | +--ro packet-source? yang:dotted-quad 1027 | +--ro packet-type? packet-type 1028 +---n lsdb-approaching-overflow 1029 | +--ro routing-protocol-name? 1030 | + -> /rt:routing/control-plane-protocols/ 1031 | + control-plane-protocol/name 1032 | +--ro af? 1033 | + -> /rt:routing/control-plane-protocols/ 1034 | + control-plane-protocol 1035 | + [rt:name=current()/../routing-protocol-name]/ 1036 | + ospf:ospf/af 1037 | +--ro ext-lsdb-limit? uint32 1038 +---n lsdb-overflow 1039 | +--ro routing-protocol-name? 1040 | + -> /rt:routing/control-plane-protocols/ 1041 | + control-plane-protocol/name 1042 | +--ro af? 1043 | + -> /rt:routing/control-plane-protocols/ 1044 | + control-plane-protocol 1045 | + [rt:name=current()/../routing-protocol-name]/ 1046 | + ospf:ospf/af 1047 | +--ro ext-lsdb-limit? uint32 1048 +---n nssa-translator-status-change 1049 | +--ro routing-protocol-name? 1050 | + -> /rt:routing/control-plane-protocols/ 1051 | + control-plane-protocol/name 1052 | +--ro af? 1053 | + -> /rt:routing/control-plane-protocols/ 1054 | + control-plane-protocol 1055 | + [rt:name=current()/../routing-protocol-name]/ 1056 | + ospf:ospf/af 1057 | +--ro area-id? area-id-type 1058 | +--ro status? nssa-translator-state-type 1059 +---n restart-status-change 1060 +--ro routing-protocol-name? 1061 + -> /rt:routing/control-plane-protocols/ 1062 + control-plane-protocol/name 1063 +--ro af? 1064 + -> /rt:routing/control-plane-protocols/ 1065 + control-plane-protocol 1066 + [rt:name=current()/../routing-protocol-name]/ 1067 + ospf:ospf/af 1068 +--ro status? restart-status-type 1069 +--ro restart-interval? uint16 1070 +--ro exit-reason? restart-exit-reason-type 1072 2.9. OSPF RPC Operations 1074 The "ietf-ospf" module defines two RPC operations: 1076 o clear-database: reset the content of a particular OSPF Link State 1077 Database. 1079 o clear-neighbor: Reset a particular OSPF neighbor or group of 1080 neighbors associated with an OSPF interface. 1082 rpcs: 1083 +---x clear-neighbor 1084 | +---w input 1085 | +---w routing-protocol-name 1086 | + -> /rt:routing/control-plane-protocols/ 1087 | + control-plane-protocol/name 1088 | +---w interface? if:interface-ref 1089 +---x clear-database 1090 +---w input 1091 +---w routing-protocol-name 1092 -> /rt:routing/control-plane-protocols/ 1093 control-plane-protocol/name 1095 3. OSPF YANG Module 1097 The following RFCs and drafts are not referenced in the document text 1098 but are referenced in the ietf-ospf.yang module: [RFC0905], 1099 [RFC4576], [RFC4973], [RFC5250], [RFC5309], [RFC5642], [RFC5881], 1100 [RFC6991], [RFC7770], [RFC7884], [RFC8294], and [RFC8476]. 1102 file "ietf-ospf@2019-10-17.yang" 1103 module ietf-ospf { 1104 yang-version 1.1; 1105 namespace "urn:ietf:params:xml:ns:yang:ietf-ospf"; 1107 prefix ospf; 1109 import ietf-inet-types { 1110 prefix "inet"; 1111 reference "RFC 6991: Common YANG Data Types"; 1112 } 1114 import ietf-yang-types { 1115 prefix "yang"; 1116 reference "RFC 6991: Common YANG Data Types"; 1117 } 1119 import ietf-interfaces { 1120 prefix "if"; 1121 reference "RFC 8343: A YANG Data Model for Interface 1122 Management (NMDA Version)"; 1123 } 1125 import ietf-routing-types { 1126 prefix "rt-types"; 1127 reference "RFC 8294: Common YANG Data Types for the 1128 Routing Area"; 1129 } 1131 import iana-routing-types { 1132 prefix "iana-rt-types"; 1133 reference "RFC 8294: Common YANG Data Types for the 1134 Routing Area"; 1135 } 1137 import ietf-routing { 1138 prefix "rt"; 1139 reference "RFC 8349: A YANG Data Model for Routing 1140 Management (NMDA Version)"; 1141 } 1143 import ietf-key-chain { 1144 prefix "key-chain"; 1145 reference "RFC 8177: YANG Data Model for Key Chains"; 1146 } 1148 import ietf-bfd-types { 1149 prefix "bfd-types"; 1150 reference "RFC YYYY: YANG Data Model for Bidirectional 1151 Forwarding Detection (BFD). Please replace YYYY with 1152 published RFC number for draft-ietf-bfd-yang."; 1154 } 1156 organization 1157 "IETF LSR - Link State Routing Working Group"; 1159 contact 1160 "WG Web: 1161 WG List: 1163 Editor: Derek Yeung 1164 1165 Author: Acee Lindem 1166 1167 Author: Yingzhen Qu 1168 1169 Author: Salih K A 1170 1171 Author: Ing-Wher Chen 1172 "; 1174 description 1175 "This YANG module defines the generic configuration and 1176 operational state for the OSPF protocol common to all 1177 vendor implementations. It is intended that the module 1178 will be extended by vendors to define vendor-specific 1179 OSPF configuration parameters and policies, 1180 for example, route maps or route policies. 1182 This YANG model conforms to the Network Management 1183 Datastore Architecture (NMDA) as described in RFC 8242. 1185 Copyright (c) 2018 IETF Trust and the persons identified as 1186 authors of the code. All rights reserved. 1188 Redistribution and use in source and binary forms, with or 1189 without modification, is permitted pursuant to, and subject to 1190 the license terms contained in, the Simplified BSD License set 1191 forth in Section 4.c of the IETF Trust's Legal Provisions 1192 Relating to IETF Documents 1193 (https://trustee.ietf.org/license-info). 1195 This version of this YANG module is part of RFC XXXX 1196 (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself 1197 for full legal notices. 1199 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL 1200 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED', 1201 'MAY', and 'OPTIONAL' in this document are to be interpreted as 1202 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when, 1203 they appear in all capitals, as shown here. 1205 This version of this YANG module is part of RFC XXXX; 1206 see the RFC itself for full legal notices."; 1208 revision 2019-10-17 { 1209 description 1210 "Initial revision."; 1211 reference 1212 "RFC XXXX: A YANG Data Model for OSPF."; 1213 } 1215 feature multi-topology { 1216 description 1217 "Support Multiple-Topology Routing (MTR)."; 1218 reference "RFC 4915: Multi-Topology Routing"; 1219 } 1221 feature multi-area-adj { 1222 description 1223 "OSPF multi-area adjacency support as in RFC 5185."; 1224 reference "RFC 5185: Multi-Area Adjacency"; 1225 } 1226 feature explicit-router-id { 1227 description 1228 "Set Router-ID per instance explicitly."; 1229 } 1231 feature demand-circuit { 1232 description 1233 "OSPF demand circuit support as in RFC 1793."; 1234 reference "RFC 1793: OSPF Demand Circuits"; 1235 } 1237 feature mtu-ignore { 1238 description 1239 "Disable OSPF Database Description packet MTU 1240 mismatch checking specified in the OSPF 1241 protocol specification."; 1242 reference "RFC 2328: OSPF Version 2, section 10.6"; 1243 } 1245 feature lls { 1246 description 1247 "OSPF link-local signaling (LLS) as in RFC 5613."; 1248 reference "RFC 5613: OSPF Link-Local Signaling"; 1249 } 1250 feature prefix-suppression { 1251 description 1252 "OSPF prefix suppression support as in RFC 6860."; 1253 reference "RFC 6860: Hide Transit-Only Networks in OSPF"; 1254 } 1256 feature ttl-security { 1257 description 1258 "OSPF Time to Live (TTL) security check support."; 1259 reference "RFC 5082: The Generalized TTL Security 1260 Mechanism (GTSM)"; 1261 } 1263 feature nsr { 1264 description 1265 "Non-Stop-Routing (NSR) support. The OSPF NSR feature 1266 allows a router with redundant control-plane capability 1267 (e.g., dual Route-Processor (RP) cards) to maintain its 1268 state and adjacencies during planned and unplanned 1269 OSPF instance restarts. It differs from graceful-restart 1270 or Non-Stop Forwarding (NSF) in that no protocol signaling 1271 or assistance from adjacent OSPF neighbors is required to 1272 recover control-plane state."; 1273 } 1275 feature graceful-restart { 1276 description 1277 "Graceful OSPF Restart as defined in RFC 3623 and 1278 RFC 5187."; 1279 reference "RFC 3623: Graceful OSPF Restart 1280 RFC 5187: OSPFv3 Graceful Restart"; 1281 } 1283 feature auto-cost { 1284 description 1285 "Calculate OSPF interface cost according to 1286 reference bandwidth."; 1287 reference "RFC 2328: OSPF Version 2"; 1288 } 1290 feature max-ecmp { 1291 description 1292 "Setting maximum number of ECMP paths."; 1293 } 1295 feature max-lsa { 1296 description 1297 "Setting the maximum number of LSAs the OSPF instance 1298 will accept."; 1299 reference "RFC 1765: OSPF Database Overload"; 1300 } 1302 feature te-rid { 1303 description 1304 "Support configuration of the Traffic Engineering (TE) 1305 Router-ID, i.e., the Router Address described in Section 1306 2.4.1 of RFC3630 or the Router IPv6 Address TLV described 1307 in Section 3 of RFC5329."; 1308 reference "RFC 3630: Traffic Engineering (TE) Extensions 1309 to OSPF Version 2 1310 RFC 5329: Traffic Engineering (TE) Extensions 1311 to OSPF Version 3"; 1312 } 1314 feature ldp-igp-sync { 1315 description 1316 "LDP IGP synchronization."; 1317 reference "RFC 5443: LDP IGP Synchronization"; 1318 } 1320 feature ospfv2-authentication-trailer { 1321 description 1322 "Support OSPFv2 authentication trailer for OSPFv2 1323 authentication."; 1324 reference "RFC 5709: Supporting Authentication 1325 Trailer for OSPFv2 1326 RFC 7474: Security Extension for OSPFv2 When 1327 Using Manual Key Management"; 1328 } 1330 feature ospfv3-authentication-ipsec { 1331 description 1332 "Support IPsec for OSPFv3 authentication."; 1333 reference "RFC 4552: Authentication/Confidentiality 1334 for OSPFv3"; 1335 } 1337 feature ospfv3-authentication-trailer { 1338 description 1339 "Support OSPFv3 authentication trailer for OSPFv3 1340 authentication."; 1341 reference "RFC 7166: Supporting Authentication 1342 Trailer for OSPFv3"; 1343 } 1345 feature fast-reroute { 1346 description 1347 "Support for IP Fast Reroute (IP-FRR)."; 1348 reference "RFC 5714: IP Fast Reroute Framework"; 1349 } 1351 feature key-chain { 1352 description 1353 "Support of keychain for authentication."; 1354 reference "RFC8177: YANG Data Model for Key Chains"; 1355 } 1357 feature node-flag { 1358 description 1359 "Support for node-flag for OSPF prefixes."; 1360 reference "RFC 7684: OSPFv2 Prefix/Link Advertisement"; 1361 } 1363 feature node-tag { 1364 description 1365 "Support for node admin tag for OSPF routing instances."; 1366 reference "RFC 7777: Advertising Node Administrative 1367 Tags in OSPF"; 1368 } 1370 feature lfa { 1371 description 1372 "Support for Loop-Free Alternates (LFAs)."; 1373 reference "RFC 5286: Basic Specification for IP Fast 1374 Reroute: Loop-Free Alternates"; 1375 } 1377 feature remote-lfa { 1378 description 1379 "Support for Remote Loop-Free Alternates (R-LFA)."; 1380 reference "RFC 7490: Remote Loop-Free Alternate (LFA) 1381 Fast Reroute (FRR)"; 1382 } 1384 feature stub-router { 1385 description 1386 "Support for RFC 6987 OSPF Stub Router Advertisement."; 1387 reference "RFC 6987: OSPF Stub Router Advertisement"; 1388 } 1390 feature pe-ce-protocol { 1391 description 1392 "Support for OSPF as a PE-CE protocol"; 1393 reference "RFC 4577: OSPF as the Provider/Customer Edge 1394 Protocol for BGP/MPLS IP Virtual Private 1395 Networks (VPNs) 1396 RFC 6565: OSPFv3 as a Provider Edge to Customer 1397 Edge (PE-CE) Routing Protocol"; 1398 } 1400 feature ietf-spf-delay { 1401 description 1402 "Support for IETF SPF delay algorithm."; 1403 reference "RFC 8405: SPF Back-off algorithm for link 1404 state IGPs"; 1405 } 1407 feature bfd { 1408 description 1409 "Support for BFD detection of OSPF neighbor reachability."; 1410 reference "RFC 5880: Bidirectional Forwarding Detection (BFD) 1411 RFC 5881: Bidirectional Forwarding Detection 1412 (BFD) for IPv4 and IPv6 (Single Hop)"; 1413 } 1415 feature hybrid-interface { 1416 description 1417 "Support for OSPF Hybrid interface type."; 1418 reference "RFC 6845: OSPF Hybrid Broadcast and 1419 Point-to-Multipoint Interface Type"; 1420 } 1422 identity ospf { 1423 base "rt:routing-protocol"; 1424 description "Any OSPF protocol version"; 1425 } 1427 identity ospfv2 { 1428 base "ospf"; 1429 description "OSPFv2 protocol"; 1430 } 1432 identity ospfv3 { 1433 base "ospf"; 1434 description "OSPFv3 protocol"; 1435 } 1437 identity area-type { 1438 description "Base identity for OSPF area type."; 1439 } 1441 identity normal-area { 1442 base area-type; 1443 description "OSPF normal area."; 1444 } 1446 identity stub-nssa-area { 1447 base area-type; 1448 description "OSPF stub or NSSA area."; 1449 } 1451 identity stub-area { 1452 base stub-nssa-area; 1453 description "OSPF stub area."; 1454 } 1456 identity nssa-area { 1457 base stub-nssa-area; 1458 description "OSPF Not-So-Stubby Area (NSSA)."; 1459 reference "RFC 3101: The OSPF Not-So-Stubby Area 1460 (NSSA) Option"; 1461 } 1463 identity ospf-lsa-type { 1464 description 1465 "Base identity for OSPFv2 and OSPFv3 1466 Link State Advertisement (LSA) types"; 1467 } 1469 identity ospfv2-lsa-type { 1470 base ospf-lsa-type; 1471 description 1472 "OSPFv2 LSA types"; 1473 } 1475 identity ospfv2-router-lsa { 1476 base ospfv2-lsa-type; 1477 description 1478 "OSPFv2 Router LSA - Type 1"; 1479 } 1481 identity ospfv2-network-lsa { 1482 base ospfv2-lsa-type; 1483 description 1484 "OSPFv2 Network LSA - Type 2"; 1485 } 1487 identity ospfv2-summary-lsa-type { 1488 base ospfv2-lsa-type; 1489 description 1490 "OSPFv2 Summary LSA types"; 1491 } 1493 identity ospfv2-network-summary-lsa { 1494 base ospfv2-summary-lsa-type; 1495 description 1496 "OSPFv2 Network Summary LSA - Type 3"; 1497 } 1499 identity ospfv2-asbr-summary-lsa { 1500 base ospfv2-summary-lsa-type; 1501 description 1502 "OSPFv2 AS Boundary Router (ASBR) Summary LSA - Type 4"; 1503 } 1505 identity ospfv2-external-lsa-type { 1506 base ospfv2-lsa-type; 1507 description 1508 "OSPFv2 External LSA types"; 1509 } 1511 identity ospfv2-as-external-lsa { 1512 base ospfv2-external-lsa-type; 1513 description 1514 "OSPFv2 AS External LSA - Type 5"; 1515 } 1517 identity ospfv2-nssa-lsa { 1518 base ospfv2-external-lsa-type; 1519 description 1520 "OSPFv2 Not-So-Stubby-Area (NSSA) LSA - Type 7"; 1521 } 1523 identity ospfv2-opaque-lsa-type { 1524 base ospfv2-lsa-type; 1525 description 1526 "OSPFv2 Opaque LSA types"; 1527 } 1529 identity ospfv2-link-scope-opaque-lsa { 1530 base ospfv2-opaque-lsa-type; 1531 description 1532 "OSPFv2 Link-Scoped Opaque LSA - Type 9"; 1533 } 1535 identity ospfv2-area-scope-opaque-lsa { 1536 base ospfv2-opaque-lsa-type; 1537 description 1538 "OSPFv2 Area-Scoped Opaque LSA - Type 10"; 1539 } 1541 identity ospfv2-as-scope-opaque-lsa { 1542 base ospfv2-opaque-lsa-type; 1543 description 1544 "OSPFv2 AS-Scoped Opaque LSA - Type 11"; 1545 } 1547 identity ospfv2-unknown-lsa-type { 1548 base ospfv2-lsa-type; 1549 description 1550 "OSPFv2 Unknown LSA type"; 1551 } 1553 identity ospfv3-lsa-type { 1554 base ospf-lsa-type; 1555 description 1556 "OSPFv3 LSA types."; 1557 } 1559 identity ospfv3-router-lsa { 1560 base ospfv3-lsa-type; 1561 description 1562 "OSPFv3 Router LSA - Type 0x2001"; 1563 } 1565 identity ospfv3-network-lsa { 1566 base ospfv3-lsa-type; 1567 description 1568 "OSPFv3 Network LSA - Type 0x2002"; 1569 } 1571 identity ospfv3-summary-lsa-type { 1572 base ospfv3-lsa-type; 1573 description 1574 "OSPFv3 Summary LSA types"; 1575 } 1577 identity ospfv3-inter-area-prefix-lsa { 1578 base ospfv3-summary-lsa-type; 1579 description 1580 "OSPFv3 Inter-area Prefix LSA - Type 0x2003"; 1581 } 1583 identity ospfv3-inter-area-router-lsa { 1584 base ospfv3-summary-lsa-type; 1585 description 1586 "OSPFv3 Inter-area Router LSA - Type 0x2004"; 1587 } 1589 identity ospfv3-external-lsa-type { 1590 base ospfv3-lsa-type; 1591 description 1592 "OSPFv3 External LSA types"; 1593 } 1595 identity ospfv3-as-external-lsa { 1596 base ospfv3-external-lsa-type; 1597 description 1598 "OSPFv3 AS-External LSA - Type 0x4005"; 1599 } 1601 identity ospfv3-nssa-lsa { 1602 base ospfv3-external-lsa-type; 1603 description 1604 "OSPFv3 Not-So-Stubby-Area (NSSA) LSA - Type 0x2007"; 1605 } 1607 identity ospfv3-link-lsa { 1608 base ospfv3-lsa-type; 1609 description 1610 "OSPFv3 Link LSA - Type 0x0008"; 1611 } 1613 identity ospfv3-intra-area-prefix-lsa { 1614 base ospfv3-lsa-type; 1615 description 1616 "OSPFv3 Intra-area Prefix LSA - Type 0x2009"; 1617 } 1619 identity ospfv3-router-information-lsa { 1620 base ospfv3-lsa-type; 1621 description 1622 "OSPFv3 Router Information LSA - Types 0x800C, 1623 0xA00C, and 0xC00C"; 1624 } 1626 identity ospfv3-unknown-lsa-type { 1627 base ospfv3-lsa-type; 1628 description 1629 "OSPFv3 Unknown LSA type"; 1630 } 1632 identity lsa-log-reason { 1633 description 1634 "Base identity for an LSA log reason."; 1635 } 1637 identity lsa-refresh { 1638 base lsa-log-reason; 1639 description 1640 "Identity used when the LSA is logged 1641 as a result of receiving a refresh LSA."; 1642 } 1644 identity lsa-content-change { 1645 base lsa-log-reason; 1646 description 1647 "Identity used when the LSA is logged 1648 as a result of a change in the content 1649 of the LSA."; 1650 } 1652 identity lsa-purge { 1653 base lsa-log-reason; 1654 description 1655 "Identity used when the LSA is logged 1656 as a result of being purged."; 1657 } 1659 identity informational-capability { 1660 description 1661 "Base identity for router informational capabilities."; 1662 } 1664 identity graceful-restart { 1665 base informational-capability; 1666 description 1667 "When set, the router is capable of restarting 1668 gracefully."; 1669 reference "RFC 3623: Graceful OSPF Restart 1670 RFC 5187: OSPFv3 Graceful Restart"; 1671 } 1673 identity graceful-restart-helper { 1674 base informational-capability; 1675 description 1676 "When set, the router is capable of acting as 1677 a graceful restart helper."; 1678 reference "RFC 3623: Graceful OSPF Restart 1679 RFC 5187: OSPFv3 Graceful Restart"; 1680 } 1681 identity stub-router { 1682 base informational-capability; 1683 description 1684 "When set, the router is capable of acting as 1685 an OSPF Stub Router."; 1686 reference "RFC 6987: OSPF Stub Router Advertisement"; 1687 } 1689 identity traffic-engineering { 1690 base informational-capability; 1691 description 1692 "When set, the router is capable of OSPF traffic 1693 engineering."; 1694 reference "RFC 3630: Traffic Engineering (TE) Extensions 1695 to OSPF Version 2 1696 RFC 5329: Traffic Engineering (TE) Extensions 1697 to OSPF Version 3"; 1698 } 1700 identity p2p-over-lan { 1701 base informational-capability; 1702 description 1703 "When set, the router is capable of OSPF Point-to-Point 1704 over LAN."; 1705 reference "RFC 5309: Point-to-Point Operation over LAN 1706 in Link State Routing Protocols"; 1707 } 1709 identity experimental-te { 1710 base informational-capability; 1711 description 1712 "When set, the router is capable of OSPF experimental 1713 traffic engineering."; 1714 reference 1715 "RFC 4973: OSPF-xTE OSPF Experimental Traffic 1716 Engineering"; 1717 } 1719 identity router-lsa-bit { 1720 description 1721 "Base identity for Router-LSA bits."; 1722 } 1724 identity vlink-end-bit { 1725 base router-lsa-bit; 1726 description 1727 "V bit, when set, the router is an endpoint of one or 1728 more virtual links."; 1730 } 1732 identity asbr-bit { 1733 base router-lsa-bit; 1734 description 1735 "E bit, when set, the router is an AS Boundary 1736 Router (ASBR)."; 1737 } 1739 identity abr-bit { 1740 base router-lsa-bit; 1741 description 1742 "B bit, when set, the router is an Area Border 1743 Router (ABR)."; 1744 } 1746 identity nssa-bit { 1747 base router-lsa-bit; 1748 description 1749 "Nt bit, when set, the router is an NSSA border router 1750 that is unconditionally translating NSSA LSAs into 1751 AS-external LSAs."; 1752 } 1754 identity ospfv3-lsa-option { 1755 description 1756 "Base identity for OSPF LSA options flags."; 1757 } 1759 identity af-bit { 1760 base ospfv3-lsa-option; 1761 description 1762 "AF bit, when set, the router supports OSPFv3 Address 1763 Families as in RFC5838."; 1764 } 1766 identity dc-bit { 1767 base ospfv3-lsa-option; 1768 description 1769 "DC bit, when set, the router supports demand circuits."; 1770 } 1772 identity r-bit { 1773 base ospfv3-lsa-option; 1774 description 1775 "R bit, when set, the originator is an active router."; 1776 } 1777 identity n-bit { 1778 base ospfv3-lsa-option; 1779 description 1780 "N bit, when set, the router is attached to an NSSA"; 1781 } 1783 identity e-bit { 1784 base ospfv3-lsa-option; 1785 description 1786 "E bit, this bit describes the way AS-external LSAs 1787 are flooded"; 1788 } 1790 identity v6-bit { 1791 base ospfv3-lsa-option; 1792 description 1793 "V6 bit, if clear, the router/link should be excluded 1794 from IPv6 routing calculation"; 1795 } 1797 identity ospfv3-prefix-option { 1798 description 1799 "Base identity for OSPFv3 Prefix Options."; 1800 } 1802 identity nu-bit { 1803 base ospfv3-prefix-option; 1804 description 1805 "NU Bit, when set, the prefix should be excluded 1806 from IPv6 unicast calculations."; 1807 } 1809 identity la-bit { 1810 base ospfv3-prefix-option; 1811 description 1812 "LA bit, when set, the prefix is actually an IPv6 1813 interface address of the Advertising Router."; 1814 } 1816 identity p-bit { 1817 base ospfv3-prefix-option; 1818 description 1819 "P bit, when set, the NSSA area prefix should be 1820 translated to an AS External LSA and advertised 1821 by the translating NSSA Border Router."; 1822 } 1824 identity dn-bit { 1825 base ospfv3-prefix-option; 1826 description 1827 "DN bit, when set, the inter-area-prefix LSA or 1828 AS-external LSA prefix has been advertised as an 1829 L3VPN prefix."; 1830 } 1832 identity ospfv2-lsa-option { 1833 description 1834 "Base identity for OSPFv2 LSA option flags."; 1835 } 1837 identity mt-bit { 1838 base ospfv2-lsa-option; 1839 description 1840 "MT bit, When set, the router supports multi-topology as 1841 in RFC 4915."; 1842 } 1844 identity v2-dc-bit { 1845 base ospfv2-lsa-option; 1846 description 1847 "DC bit, When set, the router supports demand circuits."; 1848 } 1850 identity v2-p-bit { 1851 base ospfv2-lsa-option; 1852 description 1853 "P bit, wnly used in type-7 LSA. When set, an NSSA 1854 border router should translate the type-7 LSA 1855 to a type-5 LSA."; 1856 } 1858 identity mc-flag { 1859 base ospfv2-lsa-option; 1860 description 1861 "MC Bit, when set, the router supports MOSPF."; 1862 } 1864 identity v2-e-flag { 1865 base ospfv2-lsa-option; 1866 description 1867 "E Bit, this bit describes the way AS-external LSAs 1868 are flooded."; 1869 } 1871 identity o-bit { 1872 base ospfv2-lsa-option; 1873 description 1874 "O bit, when set, the router is opaque-capable as in 1875 RFC 5250."; 1876 } 1878 identity v2-dn-bit { 1879 base ospfv2-lsa-option; 1880 description 1881 "DN bit, when a type 3, 5 or 7 LSA is sent from a PE 1882 to a CE, the DN bit must be set. See RFC 4576."; 1883 } 1885 identity ospfv2-extended-prefix-flag { 1886 description 1887 "Base identity for extended prefix TLV flag."; 1888 } 1890 identity a-flag { 1891 base ospfv2-extended-prefix-flag; 1892 description 1893 "Attach flag, when set it indicates that the prefix 1894 corresponds and a route what is directly connected to 1895 the advertising router.."; 1896 } 1898 identity node-flag { 1899 base ospfv2-extended-prefix-flag; 1900 description 1901 "Node flag, when set, it indicates that the prefix is 1902 used to represent the advertising node, e.g., a loopback 1903 address."; 1904 } 1906 typedef ospf-metric { 1907 type uint32 { 1908 range "0 .. 16777215"; 1909 } 1910 description 1911 "OSPF Metric - 24-bit unsigned integer."; 1912 } 1914 typedef ospf-link-metric { 1915 type uint16 { 1916 range "0 .. 65535"; 1917 } 1918 description 1919 "OSPF Link Metric - 16-bit unsigned integer."; 1920 } 1921 typedef opaque-id { 1922 type uint32 { 1923 range "0 .. 16777215"; 1924 } 1925 description 1926 "Opaque ID - 24-bit unsigned integer."; 1927 } 1929 typedef area-id-type { 1930 type yang:dotted-quad; 1931 description 1932 "Area ID type."; 1933 } 1935 typedef route-type { 1936 type enumeration { 1937 enum intra-area { 1938 description "OSPF intra-area route."; 1939 } 1940 enum inter-area { 1941 description "OSPF inter-area route."; 1942 } 1943 enum external-1 { 1944 description "OSPF type 1 external route."; 1945 } 1946 enum external-2 { 1947 description "OSPF type 2 external route."; 1948 } 1949 enum nssa-1 { 1950 description "OSPF type 1 NSSA route."; 1951 } 1952 enum nssa-2 { 1953 description "OSPF type 2 NSSA route."; 1954 } 1955 } 1956 description "OSPF route type."; 1957 } 1959 typedef if-state-type { 1960 type enumeration { 1961 enum down { 1962 value "1"; 1963 description 1964 "Interface down state."; 1965 } 1966 enum loopback { 1967 value "2"; 1968 description 1969 "Interface loopback state."; 1970 } 1971 enum waiting { 1972 value "3"; 1973 description 1974 "Interface waiting state."; 1975 } 1976 enum point-to-point { 1977 value "4"; 1978 description 1979 "Interface point-to-point state."; 1980 } 1981 enum dr { 1982 value "5"; 1983 description 1984 "Interface Designated Router (DR) state."; 1985 } 1986 enum bdr { 1987 value "6"; 1988 description 1989 "Interface Backup Designated Router (BDR) state."; 1990 } 1991 enum dr-other { 1992 value "7"; 1993 description 1994 "Interface Other Designated Router state."; 1995 } 1996 } 1997 description 1998 "OSPF interface state type."; 1999 } 2001 typedef router-link-type { 2002 type enumeration { 2003 enum point-to-point-link { 2004 value "1"; 2005 description 2006 "Point-to-Point link to Router"; 2007 } 2008 enum transit-network-link { 2009 value "2"; 2010 description 2011 "Link to transit network identified by 2012 Designated-Router (DR)"; 2013 } 2014 enum stub-network-link { 2015 value "3"; 2016 description 2017 "Link to stub network identified by subnet"; 2018 } 2019 enum virtual-link { 2020 value "4"; 2021 description 2022 "Virtual link across transit area"; 2023 } 2024 } 2025 description 2026 "OSPF Router Link Type."; 2027 } 2029 typedef nbr-state-type { 2030 type enumeration { 2031 enum down { 2032 value "1"; 2033 description 2034 "Neighbor down state."; 2035 } 2036 enum attempt { 2037 value "2"; 2038 description 2039 "Neighbor attempt state."; 2040 } 2041 enum init { 2042 value "3"; 2043 description 2044 "Neighbor init state."; 2045 } 2046 enum 2-way { 2047 value "4"; 2048 description 2049 "Neighbor 2-Way state."; 2050 } 2051 enum exstart { 2052 value "5"; 2053 description 2054 "Neighbor exchange start state."; 2055 } 2056 enum exchange { 2057 value "6"; 2058 description 2059 "Neighbor exchange state."; 2060 } 2061 enum loading { 2062 value "7"; 2063 description 2064 "Neighbor loading state."; 2066 } 2067 enum full { 2068 value "8"; 2069 description 2070 "Neighbor full state."; 2071 } 2072 } 2073 description 2074 "OSPF neighbor state type."; 2075 } 2077 typedef restart-helper-status-type { 2078 type enumeration { 2079 enum not-helping { 2080 value "1"; 2081 description 2082 "Restart helper status not helping."; 2083 } 2084 enum helping { 2085 value "2"; 2086 description 2087 "Restart helper status helping."; 2088 } 2089 } 2090 description 2091 "Restart helper status type."; 2092 } 2094 typedef restart-exit-reason-type { 2095 type enumeration { 2096 enum none { 2097 value "1"; 2098 description 2099 "Restart not attempted."; 2100 } 2101 enum in-progress { 2102 value "2"; 2103 description 2104 "Restart in progress."; 2105 } 2106 enum completed { 2107 value "3"; 2108 description 2109 "Restart successfully completed."; 2110 } 2111 enum timed-out { 2112 value "4"; 2113 description 2114 "Restart timed out."; 2115 } 2116 enum topology-changed { 2117 value "5"; 2118 description 2119 "Restart aborted due to topology change."; 2120 } 2121 } 2122 description 2123 "Describes the outcome of the last attempt at a 2124 graceful restart, either by itself or acting 2125 as a helper."; 2126 } 2128 typedef packet-type { 2129 type enumeration { 2130 enum hello { 2131 value "1"; 2132 description 2133 "OSPF Hello packet."; 2134 } 2135 enum database-description { 2136 value "2"; 2137 description 2138 "OSPF Database Description packet."; 2139 } 2140 enum link-state-request { 2141 value "3"; 2142 description 2143 "OSPF Link State Request packet."; 2144 } 2145 enum link-state-update { 2146 value "4"; 2147 description 2148 "OSPF Link State Update packet."; 2149 } 2150 enum link-state-ack { 2151 value "5"; 2152 description 2153 "OSPF Link State Acknowledgement packet."; 2154 } 2155 } 2156 description 2157 "OSPF packet type."; 2158 } 2160 typedef nssa-translator-state-type { 2161 type enumeration { 2162 enum enabled { 2163 value "1"; 2164 description 2165 "NSSA translator enabled state."; 2166 } 2167 enum elected { 2168 value "2"; 2169 description 2170 "NSSA translator elected state."; 2171 } 2172 enum disabled { 2173 value "3"; 2174 description 2175 "NSSA translator disabled state."; 2176 } 2177 } 2178 description 2179 "OSPF NSSA translator state type."; 2180 } 2182 typedef restart-status-type { 2183 type enumeration { 2184 enum not-restarting { 2185 value "1"; 2186 description 2187 "Router is not restarting."; 2188 } 2189 enum planned-restart { 2190 value "2"; 2191 description 2192 "Router is going through planned restart."; 2193 } 2194 enum unplanned-restart { 2195 value "3"; 2196 description 2197 "Router is going through unplanned restart."; 2198 } 2199 } 2200 description 2201 "OSPF graceful restart status type."; 2202 } 2204 typedef fletcher-checksum16-type { 2205 type string { 2206 pattern '(0x)?[0-9a-fA-F]{4}'; 2207 } 2208 description 2209 "Fletcher 16-bit checksum in hex-string format 0xXXXX."; 2211 reference "RFC 905: ISO Transport Protocol specification 2212 ISO DP 8073"; 2213 } 2215 typedef ospfv2-auth-trailer-rfc-version { 2216 type enumeration { 2217 enum rfc5709 { 2218 description 2219 "Support OSPF Authentication Trailer as 2220 described in RFC 5709"; 2221 reference "RFC 5709: OSPFv2 HMAC-SHA Cryptographic 2222 Authentication"; 2224 } 2225 enum rfc7474 { 2226 description 2227 "Support OSPF Authentication Trailer as 2228 described in RFC 7474"; 2229 reference 2230 "RFC 7474: Security Extension for OSPFv2 2231 When Using Manual Key Management Authentication"; 2233 } 2234 } 2235 description 2236 "OSPFv2 Authentication Trailer Support"; 2237 } 2239 grouping tlv { 2240 description 2241 "Type-Length-Value (TLV)"; 2242 leaf type { 2243 type uint16; 2244 description "TLV type."; 2245 } 2246 leaf length { 2247 type uint16; 2248 description "TLV length (octets)."; 2249 } 2250 leaf value { 2251 type yang:hex-string; 2252 description "TLV value."; 2253 } 2254 } 2256 grouping unknown-tlvs { 2257 description 2258 "Unknown TLVs grouping - Used for unknown TLVs or 2259 unknown sub-TLVs."; 2260 container unknown-tlvs { 2261 description "All unknown TLVs."; 2262 list unknown-tlv { 2263 description "Unknown TLV."; 2264 uses tlv; 2265 } 2266 } 2267 } 2269 grouping node-tag-tlv { 2270 description "OSPF Node Admin Tag TLV grouping."; 2271 list node-tag { 2272 leaf tag { 2273 type uint32; 2274 description 2275 "Node admin tag value."; 2276 } 2277 description 2278 "List of tags."; 2279 } 2280 } 2282 grouping router-capabilities-tlv { 2283 description "OSPF Router Capabilities TLV grouping."; 2284 reference "RFC 7770: OSPF Router Capabilities"; 2285 container router-informational-capabilities { 2286 leaf-list informational-capabilities { 2287 type identityref { 2288 base informational-capability; 2289 } 2290 description 2291 "Informational capability list. This list will 2292 contains the identities for the informational 2293 capabilities supported by router."; 2294 } 2295 description 2296 "OSPF Router Informational Flag Definitions."; 2297 } 2298 list informational-capabilities-flags { 2299 leaf informational-flag { 2300 type uint32; 2301 description 2302 "Individual informational capability flag."; 2303 } 2304 description 2305 "List of informational capability flags. This will 2306 return all the 32-bit informational flags irrespective 2307 of whether or not they are known to the device."; 2308 } 2309 list functional-capabilities { 2310 leaf functional-flag { 2311 type uint32; 2312 description 2313 "Individual functional capability flag."; 2314 } 2315 description 2316 "List of functional capability flags. This will 2317 return all the 32-bit functional flags irrespective 2318 of whether or not they are known to the device."; 2319 } 2320 } 2322 grouping dynamic-hostname-tlv { 2323 description "Dynamic Hostname TLV"; 2324 reference "RFC 5642: Dynamic Hostnames for OSPF"; 2325 leaf hostname { 2326 type string { 2327 length "1..255"; 2328 } 2329 description "Dynamic Hostname"; 2330 } 2331 } 2333 grouping sbfd-discriminator-tlv { 2334 description "Seamless BFD Discriminator TLV"; 2335 reference "RFC 7884: S-BFD Discriminators in OSPF"; 2336 list sbfd-discriminators { 2337 leaf sbfd-discriminator { 2338 type uint32; 2339 description "Individual S-BFD Discriminator."; 2340 } 2341 description 2342 "List of S-BFD Discriminators"; 2343 } 2344 } 2346 grouping maximum-sid-depth-tlv { 2347 description "Maximum SID Depth (MSD) TLV"; 2348 reference 2349 "RFC 8476: Signaling Maximum Segment Depth (MSD) 2350 using OSPF"; 2351 list msd-type { 2352 leaf msd-type { 2353 type uint8; 2354 description "Maximum Segment Depth (MSD) type"; 2356 } 2357 leaf msd-value { 2358 type uint8; 2359 description 2360 "Maximum Segment Depth (MSD) value for the type"; 2361 } 2362 description 2363 "List of Maximum Segment Depth (MSD) tuples"; 2364 } 2365 } 2367 grouping ospf-router-lsa-bits { 2368 container router-bits { 2369 leaf-list rtr-lsa-bits { 2370 type identityref { 2371 base router-lsa-bit; 2372 } 2373 description 2374 "Router LSA bits list. This list will contain 2375 identities for the bits which are set in the 2376 Router-LSA bits."; 2377 } 2378 description "Router LSA Bits."; 2379 } 2380 description 2381 "Router LSA Bits - Currently common for OSPFv2 and 2382 OSPFv3 but it may diverge with future augmentations."; 2383 } 2385 grouping ospfv2-router-link { 2386 description "OSPFv2 router link."; 2387 leaf link-id { 2388 type union { 2389 type inet:ipv4-address; 2390 type yang:dotted-quad; 2391 } 2392 description "Router-LSA Link ID"; 2393 } 2394 leaf link-data { 2395 type union { 2396 type inet:ipv4-address; 2397 type uint32; 2398 } 2399 description "Router-LSA Link data."; 2400 } 2401 leaf type { 2402 type router-link-type; 2403 description "Router-LSA Link type."; 2405 } 2406 } 2408 grouping ospfv2-lsa-body { 2409 description "OSPFv2 LSA body."; 2410 container router { 2411 when "derived-from-or-self(../../header/type, " 2412 + "'ospfv2-router-lsa')" { 2413 description 2414 "Only applies to Router-LSAs."; 2415 } 2416 description 2417 "Router LSA."; 2418 uses ospf-router-lsa-bits; 2419 leaf num-of-links { 2420 type uint16; 2421 description "Number of links in Router LSA."; 2422 } 2423 container links { 2424 description "All router Links."; 2425 list link { 2426 description "Router LSA link."; 2427 uses ospfv2-router-link; 2428 container topologies { 2429 description "All topologies for the link."; 2430 list topology { 2431 description 2432 "Topology specific information."; 2433 leaf mt-id { 2434 type uint8; 2435 description 2436 "The MT-ID for the topology enabled on 2437 the link."; 2438 } 2439 leaf metric { 2440 type uint16; 2441 description "Metric for the topology."; 2442 } 2443 } 2444 } 2445 } 2446 } 2447 } 2448 container network { 2449 when "derived-from-or-self(../../header/type, " 2450 + "'ospfv2-network-lsa')" { 2451 description 2452 "Only applies to Network LSAs."; 2454 } 2455 description 2456 "Network LSA."; 2457 leaf network-mask { 2458 type yang:dotted-quad; 2459 description 2460 "The IP address mask for the network."; 2461 } 2462 container attached-routers { 2463 description "All attached routers."; 2464 leaf-list attached-router { 2465 type inet:ipv4-address; 2466 description 2467 "List of the routers attached to the network."; 2468 } 2469 } 2470 } 2471 container summary { 2472 when "derived-from(../../header/type, " 2473 + "'ospfv2-summary-lsa-type')" { 2474 description 2475 "Only applies to Summary LSAs."; 2476 } 2477 description 2478 "Summary LSA."; 2479 leaf network-mask { 2480 type inet:ipv4-address; 2481 description 2482 "The IP address mask for the network"; 2483 } 2484 container topologies { 2485 description "All topologies for the summary LSA."; 2486 list topology { 2487 description 2488 "Topology specific information."; 2489 leaf mt-id { 2490 type uint8; 2491 description 2492 "The MT-ID for the topology enabled for 2493 the summary."; 2494 } 2495 leaf metric { 2496 type ospf-metric; 2497 description "Metric for the topology."; 2498 } 2499 } 2500 } 2501 } 2502 container external { 2503 when "derived-from(../../header/type, " 2504 + "'ospfv2-external-lsa-type')" { 2505 description 2506 "Only applies to AS-external LSAs and NSSA LSAs."; 2507 } 2508 description 2509 "External LSA."; 2510 leaf network-mask { 2511 type inet:ipv4-address; 2512 description 2513 "The IP address mask for the network"; 2514 } 2515 container topologies { 2516 description "All topologies for the external."; 2517 list topology { 2518 description 2519 "Topology specific information."; 2520 leaf mt-id { 2521 type uint8; 2522 description 2523 "The MT-ID for the topology enabled for the 2524 external or NSSA prefix."; 2525 } 2526 leaf flags { 2527 type bits { 2528 bit E { 2529 description 2530 "When set, the metric specified is a Type 2 2531 external metric."; 2532 } 2533 } 2534 description "Flags."; 2535 } 2536 leaf metric { 2537 type ospf-metric; 2538 description "Metric for the topology."; 2539 } 2540 leaf forwarding-address { 2541 type inet:ipv4-address; 2542 description 2543 "Forwarding address."; 2544 } 2545 leaf external-route-tag { 2546 type uint32; 2547 description 2548 "Route tag for the topology."; 2549 } 2551 } 2552 } 2553 } 2554 container opaque { 2555 when "derived-from(../../header/type, " 2556 + "'ospfv2-opaque-lsa-type')" { 2557 description 2558 "Only applies to Opaque LSAs."; 2559 } 2560 description 2561 "Opaque LSA."; 2563 container ri-opaque { 2564 description "OSPF Router Information (RI) opaque LSA."; 2565 reference "RFC 7770: OSPF Router Capabilities"; 2567 container router-capabilities-tlv { 2568 description 2569 "Informational and functional router capabilities"; 2570 uses router-capabilities-tlv; 2571 } 2573 container node-tag-tlvs { 2574 description 2575 "All node tag TLVs."; 2576 list node-tag-tlv { 2577 description 2578 "Node tag TLV."; 2579 uses node-tag-tlv; 2580 } 2581 } 2583 container dynamic-hostname-tlv { 2584 description "OSPF Dynamic Hostname"; 2585 uses dynamic-hostname-tlv; 2586 } 2588 container sbfd-discriminator-tlv { 2589 description "OSPF S-BFD Discriminators"; 2590 uses sbfd-discriminator-tlv; 2591 } 2593 container maximum-sid-depth-tlv { 2594 description "OSPF Maximum SID Depth (MSD) values"; 2595 uses maximum-sid-depth-tlv; 2596 } 2597 uses unknown-tlvs; 2598 } 2599 container te-opaque { 2600 description "OSPFv2 Traffic Engineering (TE) opaque LSA."; 2601 reference "RFC 3630: Traffic Engineering (TE) 2602 Extensions to OSPFv2"; 2604 container router-address-tlv { 2605 description 2606 "Router address TLV."; 2607 leaf router-address { 2608 type inet:ipv4-address; 2609 description 2610 "Router address."; 2611 } 2612 } 2614 container link-tlv { 2615 description "Describes a single link, and it is constructed 2616 of a set of Sub-TLVs."; 2617 leaf link-type { 2618 type router-link-type; 2619 mandatory true; 2620 description "Link type."; 2621 } 2622 leaf link-id { 2623 type union { 2624 type inet:ipv4-address; 2625 type yang:dotted-quad; 2626 } 2627 mandatory true; 2628 description "Link ID."; 2629 } 2630 container local-if-ipv4-addrs { 2631 description "All local interface IPv4 addresses."; 2632 leaf-list local-if-ipv4-addr { 2633 type inet:ipv4-address; 2634 description 2635 "List of local interface IPv4 addresses."; 2636 } 2637 } 2638 container remote-if-ipv4-addrs { 2639 description "All remote interface IPv4 addresses."; 2640 leaf-list remote-if-ipv4-addr { 2641 type inet:ipv4-address; 2642 description 2643 "List of remote interface IPv4 addresses."; 2644 } 2645 } 2646 leaf te-metric { 2647 type uint32; 2648 description "TE metric."; 2649 } 2650 leaf max-bandwidth { 2651 type rt-types:bandwidth-ieee-float32; 2652 description "Maximum bandwidth."; 2653 } 2654 leaf max-reservable-bandwidth { 2655 type rt-types:bandwidth-ieee-float32; 2656 description "Maximum reservable bandwidth."; 2657 } 2658 container unreserved-bandwidths { 2659 description "All unreserved bandwidths."; 2660 list unreserved-bandwidth { 2661 leaf priority { 2662 type uint8 { 2663 range "0 .. 7"; 2664 } 2665 description "Priority from 0 to 7."; 2666 } 2667 leaf unreserved-bandwidth { 2668 type rt-types:bandwidth-ieee-float32; 2669 description "Unreserved bandwidth."; 2670 } 2671 description 2672 "List of unreserved bandwidths for different 2673 priorities."; 2674 } 2675 } 2676 leaf admin-group { 2677 type uint32; 2678 description 2679 "Administrative group/Resource Class/Color."; 2680 } 2681 uses unknown-tlvs; 2682 } 2683 } 2685 container extended-prefix-opaque { 2686 description "All extended prefix TLVs in the LSA."; 2687 list extended-prefix-tlv { 2688 description "Extended prefix TLV."; 2689 leaf route-type { 2690 type enumeration { 2691 enum unspecified { 2692 value "0"; 2693 description "Unspecified."; 2694 } 2695 enum intra-area { 2696 value "1"; 2697 description "OSPF intra-area route."; 2698 } 2699 enum inter-area { 2700 value "3"; 2701 description "OSPF inter-area route."; 2702 } 2703 enum external { 2704 value "5"; 2705 description "OSPF External route."; 2706 } 2707 enum nssa { 2708 value "7"; 2709 description "OSPF NSSA external route."; 2710 } 2711 } 2712 description "Route type."; 2713 } 2714 container flags { 2715 leaf-list extended-prefix-flags { 2716 type identityref { 2717 base ospfv2-extended-prefix-flag; 2718 } 2719 description 2720 "Extended prefix TLV flags list. This list will 2721 contain identities for the prefix flags that 2722 are set in the extended prefix flags."; 2723 } 2724 description "Prefix Flags."; 2725 } 2726 leaf prefix { 2727 type inet:ip-prefix; 2728 description "Address prefix."; 2729 } 2730 uses unknown-tlvs; 2731 } 2732 } 2734 container extended-link-opaque { 2735 description "All extended link TLVs in the LSA."; 2736 container extended-link-tlv { 2737 description "Extended link TLV."; 2738 uses ospfv2-router-link; 2739 container maximum-sid-depth-tlv { 2740 description "OSPF Maximum SID Depth (MSD) values"; 2741 uses maximum-sid-depth-tlv; 2742 } 2743 uses unknown-tlvs; 2744 } 2745 } 2746 } 2747 } 2749 grouping ospfv3-lsa-options { 2750 description "OSPFv3 LSA options"; 2751 container lsa-options { 2752 leaf-list lsa-options { 2753 type identityref { 2754 base ospfv3-lsa-option; 2755 } 2756 description 2757 "OSPFv3 LSA Option flags list. This list will contain 2758 the identities for the OSPFv3 LSA options that are 2759 set for the LSA."; 2760 } 2761 description "OSPFv3 LSA options."; 2762 } 2763 } 2765 grouping ospfv3-lsa-prefix { 2766 description 2767 "OSPFv3 LSA prefix."; 2769 leaf prefix { 2770 type inet:ip-prefix; 2771 description 2772 "LSA Prefix."; 2773 } 2774 container prefix-options { 2775 leaf-list prefix-options { 2776 type identityref { 2777 base ospfv3-prefix-option; 2778 } 2779 description 2780 "OSPFv3 prefix option flag list. This list will 2781 contain the identities for the OSPFv3 options 2782 that are set for the OSPFv3 prefix."; 2783 } 2784 description "Prefix options."; 2785 } 2786 } 2788 grouping ospfv3-lsa-external { 2789 description 2790 "AS-External and NSSA LSA."; 2792 leaf metric { 2793 type ospf-metric; 2794 description "Metric"; 2795 } 2796 leaf flags { 2797 type bits { 2798 bit E { 2799 description 2800 "When set, the metric specified is a Type 2 2801 external metric."; 2802 } 2803 bit F { 2804 description 2805 "When set, a Forwarding Address is included 2806 in the LSA."; 2807 } 2808 bit T { 2809 description 2810 "When set, an External Route Tag is included 2811 in the LSA."; 2812 } 2813 } 2814 description "Flags."; 2815 } 2817 leaf referenced-ls-type { 2818 type identityref { 2819 base ospfv3-lsa-type; 2820 } 2821 description "Referenced Link State type."; 2822 } 2823 leaf unknown-referenced-ls-type { 2824 type uint16; 2825 description 2826 "Value for an unknown Referenced Link State type."; 2827 } 2829 uses ospfv3-lsa-prefix; 2831 leaf forwarding-address { 2832 type inet:ipv6-address; 2833 description 2834 "Forwarding address."; 2835 } 2837 leaf external-route-tag { 2838 type uint32; 2839 description 2840 "Route tag."; 2841 } 2842 leaf referenced-link-state-id { 2843 type uint32; 2844 description 2845 "Referenced Link State ID."; 2846 } 2847 } 2849 grouping ospfv3-lsa-body { 2850 description "OSPFv3 LSA body."; 2851 container router { 2852 when "derived-from-or-self(../../header/type, " 2853 + "'ospfv3-router-lsa')" { 2854 description 2855 "Only applies to Router LSAs."; 2856 } 2857 description "Router LSA."; 2858 uses ospf-router-lsa-bits; 2859 uses ospfv3-lsa-options; 2861 container links { 2862 description "All router link."; 2863 list link { 2864 description "Router LSA link."; 2865 leaf interface-id { 2866 type uint32; 2867 description "Interface ID for link."; 2868 } 2869 leaf neighbor-interface-id { 2870 type uint32; 2871 description "Neighbor's Interface ID for link."; 2872 } 2873 leaf neighbor-router-id { 2874 type rt-types:router-id; 2875 description "Neighbor's Router ID for link."; 2876 } 2877 leaf type { 2878 type router-link-type; 2879 description "Link type: 1 - Point-to-Point Link 2880 2 - Transit Network Link 2881 3 - Stub Network Link 2882 4 - Virtual Link"; 2883 } 2884 leaf metric { 2885 type uint16; 2886 description "Link Metric."; 2887 } 2889 } 2890 } 2891 } 2892 container network { 2893 when "derived-from-or-self(../../header/type, " 2894 + "'ospfv3-network-lsa')" { 2895 description 2896 "Only applies to Network LSAs."; 2897 } 2898 description "Network LSA."; 2900 uses ospfv3-lsa-options; 2902 container attached-routers { 2903 description "All attached routers."; 2904 leaf-list attached-router { 2905 type rt-types:router-id; 2906 description 2907 "List of the routers attached to the network."; 2908 } 2909 } 2910 } 2911 container inter-area-prefix { 2912 when "derived-from-or-self(../../header/type, " 2913 + "'ospfv3-inter-area-prefix-lsa')" { 2914 description 2915 "Only applies to Inter-Area-Prefix LSAs."; 2916 } 2917 leaf metric { 2918 type ospf-metric; 2919 description "Inter-Area Prefix Metric"; 2920 } 2921 uses ospfv3-lsa-prefix; 2922 description "Prefix LSA."; 2923 } 2924 container inter-area-router { 2925 when "derived-from-or-self(../../header/type, " 2926 + "'ospfv3-inter-area-router-lsa')" { 2927 description 2928 "Only applies to Inter-Area-Router LSAs."; 2929 } 2930 uses ospfv3-lsa-options; 2931 leaf metric { 2932 type ospf-metric; 2933 description "AS Boundary Router (ASBR) Metric."; 2934 } 2935 leaf destination-router-id { 2936 type rt-types:router-id; 2937 description 2938 "The Router ID of the ASBR described by the LSA."; 2939 } 2940 description "Inter-Area-Router LSA."; 2941 } 2942 container as-external { 2943 when "derived-from-or-self(../../header/type, " 2944 + "'ospfv3-as-external-lsa')" { 2945 description 2946 "Only applies to AS-external LSAs."; 2947 } 2949 uses ospfv3-lsa-external; 2951 description "AS-External LSA."; 2952 } 2953 container nssa { 2954 when "derived-from-or-self(../../header/type, " 2955 + "'ospfv3-nssa-lsa')" { 2956 description 2957 "Only applies to NSSA LSAs."; 2958 } 2959 uses ospfv3-lsa-external; 2961 description "NSSA LSA."; 2962 } 2963 container link { 2964 when "derived-from-or-self(../../header/type, " 2965 + "'ospfv3-link-lsa')" { 2966 description 2967 "Only applies to Link LSAs."; 2968 } 2969 leaf rtr-priority { 2970 type uint8; 2971 description 2972 "Router priority for DR election. A router with a 2973 higher priority will be preferred in the election 2974 and a value of 0 indicates the router is not 2975 eligible to become Designated Router or Backup 2976 Designated Router (BDR)."; 2977 } 2978 uses ospfv3-lsa-options; 2980 leaf link-local-interface-address { 2981 type inet:ipv6-address; 2982 description 2983 "The originating router's link-local 2984 interface address for the link."; 2986 } 2988 leaf num-of-prefixes { 2989 type uint32; 2990 description "Number of prefixes."; 2991 } 2993 container prefixes { 2994 description "All prefixes for the link."; 2995 list prefix { 2996 description 2997 "List of prefixes associated with the link."; 2998 uses ospfv3-lsa-prefix; 2999 } 3000 } 3001 description "Link LSA."; 3002 } 3003 container intra-area-prefix { 3004 when "derived-from-or-self(../../header/type, " 3005 + "'ospfv3-intra-area-prefix-lsa')" { 3006 description 3007 "Only applies to Intra-Area-Prefix LSAs."; 3008 } 3009 description "Intra-Area-Prefix LSA."; 3011 leaf referenced-ls-type { 3012 type identityref { 3013 base ospfv3-lsa-type; 3014 } 3015 description "Referenced Link State type."; 3016 } 3017 leaf unknown-referenced-ls-type { 3018 type uint16; 3019 description 3020 "Value for an unknown Referenced Link State type."; 3021 } 3022 leaf referenced-link-state-id { 3023 type uint32; 3024 description 3025 "Referenced Link State ID."; 3026 } 3027 leaf referenced-adv-router { 3028 type rt-types:router-id; 3029 description 3030 "Referenced Advertising Router."; 3031 } 3033 leaf num-of-prefixes { 3034 type uint16; 3035 description "Number of prefixes."; 3036 } 3037 container prefixes { 3038 description "All prefixes in this LSA."; 3039 list prefix { 3040 description "List of prefixes in this LSA."; 3041 uses ospfv3-lsa-prefix; 3042 leaf metric { 3043 type ospf-metric; 3044 description "Prefix Metric."; 3045 } 3046 } 3047 } 3048 } 3049 container router-information { 3050 when "derived-from-or-self(../../header/type, " 3051 + "'ospfv3-router-information-lsa')" { 3052 description 3053 "Only applies to Router Information LSAs (RFC7770)."; 3054 } 3055 container router-capabilities-tlv { 3056 description 3057 "Informational and functional router capabilities"; 3058 uses router-capabilities-tlv; 3059 } 3060 container node-tag-tlvs { 3061 description 3062 "All node tag tlvs."; 3063 list node-tag-tlv { 3064 description 3065 "Node tag tlv."; 3066 uses node-tag-tlv; 3067 } 3068 } 3069 container dynamic-hostname-tlv { 3070 description "OSPF Dynamic Hostname"; 3071 uses dynamic-hostname-tlv; 3072 } 3073 container sbfd-discriminator-tlv { 3074 description "OSPF S-BFD Discriminators"; 3075 uses sbfd-discriminator-tlv; 3076 } 3077 description "Router Information LSA."; 3078 reference "RFC 7770: Extensions for Advertising Router 3079 Capabilities"; 3080 } 3081 } 3082 grouping lsa-header { 3083 description 3084 "Common LSA for OSPFv2 and OSPFv3"; 3085 leaf age { 3086 type uint16; 3087 mandatory true; 3088 description "LSA age."; 3089 } 3090 leaf type { 3091 type identityref { 3092 base ospf-lsa-type; 3093 } 3094 mandatory true; 3095 description "LSA type"; 3096 } 3097 leaf adv-router { 3098 type rt-types:router-id; 3099 mandatory true; 3100 description "LSA advertising router."; 3101 } 3102 leaf seq-num { 3103 type uint32; 3104 mandatory true; 3105 description "LSA sequence number."; 3106 } 3107 leaf checksum { 3108 type fletcher-checksum16-type; 3109 mandatory true; 3110 description "LSA checksum."; 3111 } 3112 leaf length { 3113 type uint16; 3114 mandatory true; 3115 description "LSA length including the header."; 3116 } 3117 } 3119 grouping ospfv2-lsa { 3120 description 3121 "OSPFv2 LSA - LSAs are uniquely identified by 3122 the 3123 tuple with the sequence number differentiating 3124 LSA instances."; 3125 container header { 3126 must "(derived-from(type, " 3127 + "'ospfv2-opaque-lsa-type') and " 3128 + "opaque-id and opaque-type) or " 3129 + "(not(derived-from(type, " 3130 + "'ospfv2-opaque-lsa-type')) " 3131 + "and not(opaque-id) and not(opaque-type))" { 3132 description 3133 "Opaque type and ID only apply to Opaque LSAs."; 3134 } 3135 description 3136 "Decoded OSPFv2 LSA header data."; 3138 container lsa-options { 3139 leaf-list lsa-options { 3140 type identityref { 3141 base ospfv2-lsa-option; 3142 } 3143 description 3144 "LSA option flags list. This list will contain 3145 the identities for the identities for the OSPFv2 3146 LSA options that are set."; 3147 } 3148 description 3149 "LSA options."; 3150 } 3152 leaf lsa-id { 3153 type yang:dotted-quad; 3154 mandatory true; 3155 description "Link-State ID."; 3156 } 3158 leaf opaque-type { 3159 type uint8; 3160 description "Opaque type."; 3161 } 3163 leaf opaque-id { 3164 type opaque-id; 3165 description "Opaque ID."; 3166 } 3168 uses lsa-header; 3169 } 3170 container body { 3171 description 3172 "Decoded OSPFv2 LSA body data."; 3173 uses ospfv2-lsa-body; 3174 } 3175 } 3177 grouping ospfv3-lsa { 3178 description 3179 "Decoded OSPFv3 LSA."; 3180 container header { 3181 description 3182 "Decoded OSPFv3 LSA header data."; 3183 leaf lsa-id { 3184 type uint32; 3185 mandatory true; 3186 description "OSPFv3 LSA ID."; 3187 } 3188 uses lsa-header; 3189 } 3190 container body { 3191 description 3192 "Decoded OSPF LSA body data."; 3193 uses ospfv3-lsa-body; 3194 } 3195 } 3196 grouping lsa-common { 3197 description 3198 "Common fields for OSPF LSA representation."; 3199 leaf decode-completed { 3200 type boolean; 3201 description 3202 "The OSPF LSA body was successfully decoded other than 3203 unknown TLVs. Unknown LSAs types and OSPFv2 unknown 3204 opaque LSA types are not decoded. Additionally, 3205 malformed LSAs are generally not accepted and will 3206 not be in the Link State Database."; 3207 } 3208 leaf raw-data { 3209 type yang:hex-string; 3210 description 3211 "The complete LSA in network byte 3212 order hexadecimal as received or originated."; 3213 } 3214 } 3216 grouping lsa { 3217 description 3218 "OSPF LSA."; 3219 uses lsa-common; 3220 choice version { 3221 description 3222 "OSPFv2 or OSPFv3 LSA body."; 3223 container ospfv2 { 3224 description "OSPFv2 LSA"; 3225 uses ospfv2-lsa; 3227 } 3228 container ospfv3 { 3229 description "OSPFv3 LSA"; 3230 uses ospfv3-lsa; 3231 } 3232 } 3233 } 3235 grouping lsa-key { 3236 description 3237 "OSPF LSA key - the database key for each LSA of a given 3238 type in the Link State DataBase (LSDB)."; 3239 leaf lsa-id { 3240 type union { 3241 type yang:dotted-quad; 3242 type uint32; 3243 } 3244 description 3245 "Link-State ID."; 3246 } 3247 leaf adv-router { 3248 type rt-types:router-id; 3249 description 3250 "Advertising router."; 3251 } 3252 } 3254 grouping instance-stat { 3255 description "Per-instance statistics"; 3256 leaf discontinuity-time { 3257 type yang:date-and-time; 3258 description 3259 "The time on the most recent occasion at which any one or 3260 more of this OSPF instance's counters suffered a 3261 discontinuity. If no such discontinuities have occurred 3262 since the OSPF instance was last re-initialized, then 3263 this node contains the time the OSPF instance was 3264 re-initialized which normally occurs when it was 3265 created."; 3266 } 3267 leaf originate-new-lsa-count { 3268 type yang:counter32; 3269 description 3270 "The number of new LSAs originated. Discontinuities in the 3271 value of this counter can occur when the OSPF instance is 3272 re-initialized."; 3273 } 3274 leaf rx-new-lsas-count { 3275 type yang:counter32; 3276 description 3277 "The number of new LSAs received. Discontinuities in the 3278 value of this counter can occur when the OSPF instance is 3279 re-initialized."; 3280 } 3281 leaf as-scope-lsa-count { 3282 type yang:gauge32; 3283 description "The number of AS-scope LSAs."; 3284 } 3285 leaf as-scope-lsa-chksum-sum { 3286 type uint32; 3287 description 3288 "The module 2**32 sum of the LSA checksums 3289 for AS-scope LSAs. The value should be treated as 3290 unsigned when comparing two sums of checksums. While 3291 differing checksums indicate a different combination 3292 of LSAs, equivalent checksums don't guarantee that the 3293 LSAs are the same given that multiple combinations of 3294 LSAs can result in the same checksum."; 3295 } 3296 container database { 3297 description "Container for per AS-scope LSA statistics."; 3298 list as-scope-lsa-type { 3299 description "List of AS-scope LSA statistics"; 3300 leaf lsa-type { 3301 type uint16; 3302 description "AS-Scope LSA type."; 3303 } 3304 leaf lsa-count { 3305 type yang:gauge32; 3306 description "The number of LSAs of the LSA type."; 3307 } 3308 leaf lsa-cksum-sum { 3309 type uint32; 3310 description 3311 "The module 2**32 sum of the LSA checksums 3312 for the LSAs of this type. The value should be 3313 treated as unsigned when comparing two sums of 3314 checksums. While differing checksums indicate a 3315 different combination of LSAs, equivalent checksums 3316 don't guarantee that the LSAs are the same given that 3317 multiple combinations of LSAs can result in the same 3318 checksum."; 3319 } 3320 } 3321 } 3322 uses instance-fast-reroute-state; 3324 } 3326 grouping area-stat { 3327 description "Per-area statistics."; 3328 leaf discontinuity-time { 3329 type yang:date-and-time; 3330 description 3331 "The time on the most recent occasion at which any one or 3332 more of this OSPF area's counters suffered a 3333 discontinuity. If no such discontinuities have occurred 3334 since the OSPF area was last re-initialized, then 3335 this node contains the time the OSPF area was 3336 re-initialized which normally occurs when it was 3337 created."; 3338 } 3339 leaf spf-runs-count { 3340 type yang:counter32; 3341 description 3342 "The number of times the intra-area SPF has run. 3343 Discontinuities in the value of this counter can occur 3344 when the OSPF area is re-initialized."; 3345 } 3346 leaf abr-count { 3347 type yang:gauge32; 3348 description 3349 "The total number of Area Border Routers (ABRs) 3350 reachable within this area."; 3351 } 3352 leaf asbr-count { 3353 type yang:gauge32; 3354 description 3355 "The total number of AS Boundary Routers (ASBRs)."; 3356 } 3357 leaf ar-nssa-translator-event-count { 3358 type yang:counter32; 3359 description 3360 "The number of NSSA translator-state changes. 3361 Discontinuities in the value of this counter can occur 3362 when the OSPF area is re-initialized."; 3363 } 3364 leaf area-scope-lsa-count { 3365 type yang:gauge32; 3366 description 3367 "The number of area-scope LSAs in the area."; 3368 } 3369 leaf area-scope-lsa-cksum-sum { 3370 type uint32; 3371 description 3372 "The module 2**32 sum of the LSA checksums 3373 for area-scope LSAs. The value should be treated as 3374 unsigned when comparing two sums of checksums. While 3375 differing checksums indicate a different combination 3376 of LSAs, equivalent checksums don't guarantee that the 3377 LSAs are the same given that multiple combinations of 3378 LSAs can result in the same checksum."; 3379 } 3380 container database { 3381 description "Container for area-scope LSA type statistics."; 3382 list area-scope-lsa-type { 3383 description "List of area-scope LSA statistics"; 3384 leaf lsa-type { 3385 type uint16; 3386 description "Area-scope LSA type."; 3387 } 3388 leaf lsa-count { 3389 type yang:gauge32; 3390 description "The number of LSAs of the LSA type."; 3391 } 3392 leaf lsa-cksum-sum { 3393 type uint32; 3394 description 3395 "The module 2**32 sum of the LSA checksums 3396 for the LSAs of this type. The value should be 3397 treated as unsigned when comparing two sums of 3398 checksums. While differing checksums indicate a 3399 different combination of LSAs, equivalent checksums 3400 don't guarantee that the LSAs are the same given that 3401 multiple combinations of LSAs can result in the same 3402 checksum."; 3403 } 3404 } 3405 } 3406 } 3408 grouping interface-stat { 3409 description "Per-interface statistics"; 3410 leaf discontinuity-time { 3411 type yang:date-and-time; 3412 description 3413 "The time on the most recent occasion at which any one or 3414 more of this OSPF interface's counters suffered a 3415 discontinuity. If no such discontinuities have occurred 3416 since the OSPF interface was last re-initialized, then 3417 this node contains the time the OSPF interface was 3418 re-initialized which normally occurs when it was 3419 created."; 3421 } 3422 leaf if-event-count { 3423 type yang:counter32; 3424 description 3425 "The number of times this interface has changed its 3426 state or an error has occurred. Discontinuities in the 3427 value of this counter can occur when the OSPF interface 3428 is re-initialized."; 3429 } 3430 leaf link-scope-lsa-count { 3431 type yang:gauge32; 3432 description "The number of link-scope LSAs."; 3433 } 3434 leaf link-scope-lsa-cksum-sum { 3435 type uint32; 3436 description 3437 "The module 2**32 sum of the LSA checksums 3438 for link-scope LSAs. The value should be treated as 3439 unsigned when comparing two sums of checksums. While 3440 differing checksums indicate a different combination 3441 of LSAs, equivalent checksums don't guarantee that the 3442 LSAs are the same given that multiple combinations of 3443 LSAs can result in the same checksum."; 3444 } 3445 container database { 3446 description "Container for link-scope LSA type statistics."; 3447 list link-scope-lsa-type { 3448 description "List of link-scope LSA statistics"; 3449 leaf lsa-type { 3450 type uint16; 3451 description "Link scope LSA type."; 3452 } 3453 leaf lsa-count { 3454 type yang:gauge32; 3455 description "The number of LSAs of the LSA type."; 3456 } 3457 leaf lsa-cksum-sum { 3458 type uint32; 3459 description 3460 "The module 2**32 sum of the LSA checksums 3461 for the LSAs of this type. The value should be 3462 treated as unsigned when comparing two sums of 3463 checksums. While differing checksums indicate a 3464 different combination of LSAs, equivalent checksums 3465 don't guarantee that the LSAs are the same given that 3466 multiple combinations of LSAs can result in the same 3467 checksum."; 3468 } 3470 } 3471 } 3472 } 3474 grouping neighbor-stat { 3475 description "Per-neighbor statistics."; 3476 leaf discontinuity-time { 3477 type yang:date-and-time; 3478 description 3479 "The time on the most recent occasion at which any one or 3480 more of this OSPF neighbor's counters suffered a 3481 discontinuity. If no such discontinuities have occurred 3482 since the OSPF neighbor was last re-initialized, then 3483 this node contains the time the OSPF neighbor was 3484 re-initialized which normally occurs when the neighbor 3485 is dynamically discovered andcreated."; 3486 } 3487 leaf nbr-event-count { 3488 type yang:counter32; 3489 description 3490 "The number of times this neighbor has changed 3491 state or an error has occurred. Discontinuities in the 3492 value of this counter can occur when the OSPF neighbor 3493 is re-initialized."; 3494 } 3495 leaf nbr-retrans-qlen { 3496 type yang:gauge32; 3497 description 3498 "The current length of the retransmission queue."; 3499 } 3500 } 3502 grouping instance-fast-reroute-config { 3503 description 3504 "This group defines global configuration of IP 3505 Fast ReRoute (FRR)."; 3506 container fast-reroute { 3507 if-feature fast-reroute; 3508 description 3509 "This container may be augmented with global 3510 parameters for IP-FRR."; 3511 container lfa { 3512 if-feature lfa; 3513 description 3514 "This container may be augmented with 3515 global parameters for Loop-Free Alternatives (LFA). 3516 Container creation has no effect on LFA activation."; 3517 } 3519 } 3520 } 3522 grouping instance-fast-reroute-state { 3523 description "IP-FRR state data grouping"; 3525 container protected-routes { 3526 if-feature fast-reroute; 3527 config false; 3528 description "Instance protection statistics"; 3530 list address-family-stats { 3531 key "address-family prefix alternate"; 3532 description 3533 "Per Address Family protected prefix information"; 3535 leaf address-family { 3536 type iana-rt-types:address-family; 3537 description 3538 "Address-family"; 3539 } 3540 leaf prefix { 3541 type inet:ip-prefix; 3542 description 3543 "Protected prefix."; 3544 } 3545 leaf alternate { 3546 type inet:ip-address; 3547 description 3548 "Alternate next hop for the prefix."; 3549 } 3550 leaf alternate-type { 3551 type enumeration { 3552 enum equal-cost { 3553 description 3554 "ECMP alternate."; 3555 } 3556 enum lfa { 3557 description 3558 "LFA alternate."; 3559 } 3560 enum remote-lfa { 3561 description 3562 "Remote LFA alternate."; 3563 } 3564 enum tunnel { 3565 description 3566 "Tunnel based alternate 3567 (like RSVP-TE or GRE)."; 3568 } 3569 enum ti-lfa { 3570 description 3571 "TI-LFA alternate."; 3572 } 3573 enum mrt { 3574 description 3575 "MRT alternate."; 3576 } 3577 enum other { 3578 description 3579 "Unknown alternate type."; 3580 } 3581 } 3582 description 3583 "Type of alternate."; 3584 } 3585 leaf best { 3586 type boolean; 3587 description 3588 "Indicates that this alternate is preferred."; 3589 } 3590 leaf non-best-reason { 3591 type string { 3592 length "1..255"; 3593 } 3594 description 3595 "Information field to describe why the alternate 3596 is not best."; 3597 } 3598 leaf protection-available { 3599 type bits { 3600 bit node-protect { 3601 position 0; 3602 description 3603 "Node protection available."; 3604 } 3605 bit link-protect { 3606 position 1; 3607 description 3608 "Link protection available."; 3609 } 3610 bit srlg-protect { 3611 position 2; 3612 description 3613 "SRLG protection available."; 3614 } 3615 bit downstream-protect { 3616 position 3; 3617 description 3618 "Downstream protection available."; 3619 } 3620 bit other { 3621 position 4; 3622 description 3623 "Other protection available."; 3624 } 3625 } 3626 description "Protection provided by the alternate."; 3627 } 3628 leaf alternate-metric1 { 3629 type uint32; 3630 description 3631 "Metric from Point of Local Repair (PLR) to 3632 destination through the alternate path."; 3633 } 3634 leaf alternate-metric2 { 3635 type uint32; 3636 description 3637 "Metric from PLR to the alternate node"; 3638 } 3639 leaf alternate-metric3 { 3640 type uint32; 3641 description 3642 "Metric from alternate node to the destination"; 3643 } 3644 } 3645 } 3647 container unprotected-routes { 3648 if-feature fast-reroute; 3649 config false; 3650 description "List of prefixes that are not protected"; 3652 list address-family-stats { 3653 key "address-family prefix"; 3654 description 3655 "Per Address Family (AF) unprotected prefix statistics."; 3657 leaf address-family { 3658 type iana-rt-types:address-family; 3659 description "Address-family"; 3660 } 3661 leaf prefix { 3662 type inet:ip-prefix; 3663 description "Unprotected prefix."; 3664 } 3665 } 3666 } 3668 list protection-statistics { 3669 key frr-protection-method; 3670 config false; 3671 description "List protection method statistics"; 3673 leaf frr-protection-method { 3674 type string; 3675 description "Protection method used."; 3676 } 3677 list address-family-stats { 3678 key address-family; 3679 description "Per Address Family protection statistics."; 3681 leaf address-family { 3682 type iana-rt-types:address-family; 3683 description "Address-family"; 3684 } 3685 leaf total-routes { 3686 type uint32; 3687 description "Total prefixes."; 3688 } 3689 leaf unprotected-routes { 3690 type uint32; 3691 description 3692 "Total prefixes that are not protected."; 3693 } 3694 leaf protected-routes { 3695 type uint32; 3696 description 3697 "Total prefixes that are protected."; 3698 } 3699 leaf linkprotected-routes { 3700 type uint32; 3701 description 3702 "Total prefixes that are link protected."; 3703 } 3704 leaf nodeprotected-routes { 3705 type uint32; 3706 description 3707 "Total prefixes that are node protected."; 3708 } 3709 } 3710 } 3712 } 3714 grouping interface-fast-reroute-config { 3715 description 3716 "This group defines interface configuration of IP-FRR."; 3717 container fast-reroute { 3718 if-feature fast-reroute; 3719 container lfa { 3720 if-feature lfa; 3721 leaf candidate-enable { 3722 type boolean; 3723 default true; 3724 description 3725 "Enable the interface to be used as backup."; 3726 } 3727 leaf enable { 3728 type boolean; 3729 default false; 3730 description 3731 "Activates LFA - Per-prefix LFA computation 3732 is assumed."; 3733 } 3734 container remote-lfa { 3735 if-feature remote-lfa; 3736 leaf enable { 3737 type boolean; 3738 default false; 3739 description 3740 "Activates Remote LFA (R-LFA)."; 3741 } 3742 description 3743 "Remote LFA configuration."; 3744 } 3745 description 3746 "LFA configuration."; 3747 } 3748 description 3749 "Interface IP Fast-reroute configuration."; 3750 } 3751 } 3753 grouping interface-physical-link-config { 3754 description 3755 "Interface cost configuration that only applies to 3756 physical interfaces (non-virtual) and sham links."; 3757 leaf cost { 3758 type ospf-link-metric; 3759 description 3760 "Interface cost."; 3761 } 3762 leaf mtu-ignore { 3763 if-feature mtu-ignore; 3764 type boolean; 3765 description 3766 "Enable/Disable bypassing the MTU mismatch check in 3767 Database Description packets specified in RFC 2328, 3768 section 10.6."; 3769 } 3770 leaf prefix-suppression { 3771 if-feature prefix-suppression; 3772 type boolean; 3773 description 3774 "Suppress advertisement of the prefixes associated 3775 with the interface."; 3776 } 3777 } 3779 grouping interface-common-config { 3780 description 3781 "Common configuration for all types of interfaces, 3782 including virtual links and sham links."; 3784 leaf hello-interval { 3785 type uint16; 3786 units seconds; 3787 description 3788 "Interval between hello packets (seconds). It must 3789 be the same for all routers on the same network. 3790 Different networks, implementations, and deployments 3791 will use different hello-intervals. A sample value 3792 for a LAN network would be 10 seconds."; 3793 reference "RFC 2328: OSPF Version 2, Appendix C.3"; 3794 } 3796 leaf dead-interval { 3797 type uint16; 3798 units seconds; 3799 must "../dead-interval > ../hello-interval" { 3800 error-message "The dead interval must be " 3801 + "larger than the hello interval"; 3802 description 3803 "The value must be greater than the 'hello-interval'."; 3804 } 3805 description 3806 "Interval after which a neighbor is declared down 3807 (seconds) if hello packets are not received. It is 3808 typically 3 or 4 times the hello-interval. A typical 3809 value for LAN networks is 40 seconds."; 3810 reference "RFC 2328: OSPF Version 2, Appendix C.3"; 3811 } 3813 leaf retransmit-interval { 3814 type uint16 { 3815 range "1..3600"; 3816 } 3817 units seconds; 3818 description 3819 "Interval between retransmitting unacknowledged Link 3820 State Advertisements (LSAs) (seconds). This should 3821 be well over the round-trip transmit delay for 3822 any two routers on the network. A sample value 3823 would be 5 seconds."; 3824 reference "RFC 2328: OSPF Version 2, Appendix C.3"; 3825 } 3827 leaf transmit-delay { 3828 type uint16; 3829 units seconds; 3830 description 3831 "Estimated time needed to transmit Link State Update 3832 (LSU) packets on the interface (seconds). LSAs have 3833 their age incremented by this amount when advertised 3834 on the interface. A sample value would be 1 second."; 3835 reference "RFC 2328: OSPF Version 2, Appendix C.3"; 3836 } 3838 leaf lls { 3839 if-feature lls; 3840 type boolean; 3841 description 3842 "Enable/Disable link-local signaling (LLS) support."; 3843 } 3845 container ttl-security { 3846 if-feature ttl-security; 3847 description "Time to Live (TTL) security check."; 3848 leaf enable { 3849 type boolean; 3850 description 3851 "Enable/Disable TTL security check."; 3852 } 3853 leaf hops { 3854 type uint8 { 3855 range "1..254"; 3857 } 3858 default 1; 3859 description 3860 "Maximum number of hops that an OSPF packet may 3861 have traversed before reception."; 3862 } 3863 } 3864 leaf enable { 3865 type boolean; 3866 default true; 3867 description 3868 "Enable/disable OSPF protocol on the interface."; 3869 } 3871 container authentication { 3872 description "Authentication configuration."; 3873 choice auth-type-selection { 3874 description 3875 "Options for OSPFv2/OSPFv3 authentication 3876 configuration."; 3877 case ospfv2-auth { 3878 when "derived-from-or-self(../../../../../../rt:type, " 3879 + "'ospfv2')" { 3880 description "Applied to OSPFv2 only."; 3881 } 3882 leaf ospfv2-auth-trailer-rfc { 3883 if-feature ospfv2-authentication-trailer; 3884 type ospfv2-auth-trailer-rfc-version; 3885 description 3886 "Version of OSFPv2 authentication trailer support - 3887 RFC 5709 or RFC 7474"; 3888 } 3889 choice ospfv2-auth-specification { 3890 description 3891 "Key chain or explicit key parameter specification"; 3892 case auth-key-chain { 3893 if-feature key-chain; 3894 leaf ospfv2-key-chain { 3895 type key-chain:key-chain-ref; 3896 description 3897 "key-chain name."; 3898 } 3899 } 3900 case auth-key-explicit { 3901 leaf ospfv2-key-id { 3902 type uint32; 3903 description 3904 "Key Identifier"; 3906 } 3907 leaf ospfv2-key { 3908 type string; 3909 description 3910 "OSPFv2 authentication key. The 3911 length of the key may be dependent on the 3912 cryptographic algorithm."; 3913 } 3914 leaf ospfv2-crypto-algorithm { 3915 type identityref { 3916 base key-chain:crypto-algorithm; 3917 } 3918 description 3919 "Cryptographic algorithm associated with key."; 3920 } 3921 } 3922 } 3923 } 3924 case ospfv3-auth-ipsec { 3925 when "derived-from-or-self(../../../../../../rt:type, " 3926 + "'ospfv3')" { 3927 description "Applied to OSPFv3 only."; 3928 } 3929 if-feature ospfv3-authentication-ipsec; 3930 leaf sa { 3931 type string; 3932 description 3933 "Security Association (SA) name."; 3934 } 3935 } 3936 case ospfv3-auth-trailer { 3937 when "derived-from-or-self(../../../../../../rt:type, " 3938 + "'ospfv3')" { 3939 description "Applied to OSPFv3 only."; 3940 } 3941 if-feature ospfv3-authentication-trailer; 3942 choice ospfv3-auth-specification { 3943 description 3944 "Key chain or explicit key parameter specification"; 3945 case auth-key-chain { 3946 if-feature key-chain; 3947 leaf ospfv3-key-chain { 3948 type key-chain:key-chain-ref; 3949 description 3950 "key-chain name."; 3951 } 3952 } 3953 case auth-key-explicit { 3954 leaf ospfv3-sa-id { 3955 type uint16; 3956 description 3957 "Security Association (SA) Identifier"; 3958 } 3959 leaf ospfv3-key { 3960 type string; 3961 description 3962 "OSPFv3 authentication key. The 3963 length of the key may be dependent on the 3964 cryptographic algorithm."; 3965 } 3966 leaf ospfv3-crypto-algorithm { 3967 type identityref { 3968 base key-chain:crypto-algorithm; 3969 } 3970 description 3971 "Cryptographic algorithm associated with key."; 3972 } 3973 } 3974 } 3975 } 3976 } 3977 } 3978 } 3980 grouping interface-config { 3981 description "Configuration for real interfaces."; 3983 leaf interface-type { 3984 type enumeration { 3985 enum "broadcast" { 3986 description 3987 "Specify OSPF broadcast multi-access network."; 3988 } 3989 enum "non-broadcast" { 3990 description 3991 "Specify OSPF Non-Broadcast Multi-Access 3992 (NBMA) network."; 3993 } 3994 enum "point-to-multipoint" { 3995 description 3996 "Specify OSPF point-to-multipoint network."; 3997 } 3998 enum "point-to-point" { 3999 description 4000 "Specify OSPF point-to-point network."; 4001 } 4002 enum "hybrid" { 4003 if-feature hybrid-interface; 4004 description 4005 "Specify OSPF hybrid broadcast/P2MP network."; 4006 } 4007 } 4008 description 4009 "Interface type."; 4010 } 4012 leaf passive { 4013 type boolean; 4014 description 4015 "Enable/Disable passive interface - a passive interface's 4016 prefix will be advertised but no neighbor adjacencies 4017 will be formed on the interface."; 4018 } 4020 leaf demand-circuit { 4021 if-feature demand-circuit; 4022 type boolean; 4023 description 4024 "Enable/Disable demand circuit."; 4025 } 4027 leaf priority { 4028 type uint8; 4029 description 4030 "Configure OSPF router priority. On multi-access network 4031 this value is for Designated Router (DR) election. The 4032 priority is ignored on other interface types. A router 4033 with a higher priority will be preferred in the election 4034 and a value of 0 indicates the router is not eligible to 4035 become Designated Router or Backup Designated Router 4036 (BDR)."; 4037 } 4039 container multi-areas { 4040 if-feature multi-area-adj; 4041 description "Container for multi-area config."; 4042 list multi-area { 4043 key multi-area-id; 4044 description 4045 "Configure OSPF multi-area adjacency."; 4046 leaf multi-area-id { 4047 type area-id-type; 4048 description 4049 "Multi-area adjacency area ID."; 4051 } 4052 leaf cost { 4053 type ospf-link-metric; 4054 description 4055 "Interface cost for multi-area adjacency."; 4056 } 4057 } 4058 } 4060 container static-neighbors { 4061 description "Statically configured neighbors."; 4063 list neighbor { 4064 key "identifier"; 4065 description 4066 "Specify a static OSPF neighbor."; 4068 leaf identifier { 4069 type inet:ip-address; 4070 description 4071 "Neighbor Router ID, IPv4 address, or IPv6 address."; 4072 } 4074 leaf cost { 4075 type ospf-link-metric; 4076 description 4077 "Neighbor cost. Different implementations have different 4078 default costs with some defaulting to a cost inversely 4079 proportional to the interface speed. Others will 4080 default to 1 equating the cost to a hop count." ; 4081 } 4082 leaf poll-interval { 4083 type uint16; 4084 units seconds; 4085 description 4086 "Neighbor poll interval (seconds) for sending OSPF 4087 hello packets to discover the neighbor on NBMA 4088 networks. This interval dictates the granularity for 4089 discovery of new neighbors. A sample would be 4090 120 seconds (2 minutes) for a legacy Packet Data 4091 Network (PDN) X.25 network."; 4092 reference "RFC 2328: OSPF Version 2, Appendix C.5"; 4093 } 4094 leaf priority { 4095 type uint8; 4096 description 4097 "Neighbor priority for DR election. A router with a 4098 higher priority will be preferred in the election 4099 and a value of 0 indicates the router is not 4100 eligible to become Designated Router or Backup 4101 Designated Router (BDR)."; 4102 } 4103 } 4104 } 4106 leaf node-flag { 4107 if-feature node-flag; 4108 type boolean; 4109 default false; 4110 description 4111 "Set prefix as identifying the advertising router."; 4112 reference "RFC 7684: OSPFv2 Prefix/Link Attribute 4113 Advertisement"; 4114 } 4116 container bfd { 4117 if-feature bfd; 4118 description "BFD Client Configuration."; 4119 uses bfd-types:client-cfg-parms; 4120 reference "RFC YYYY: YANG Data Model for Bidirectional 4121 Forwarding Detection (BFD). Please replace YYYY with 4122 published RFC number for draft-ietf-bfd-yang."; 4123 } 4125 uses interface-fast-reroute-config; 4126 uses interface-common-config; 4127 uses interface-physical-link-config; 4128 } 4130 grouping neighbor-state { 4131 description 4132 "OSPF neighbor operational state."; 4134 leaf address { 4135 type inet:ip-address; 4136 config false; 4137 description 4138 "Neighbor address."; 4139 } 4140 leaf dr-router-id { 4141 type rt-types:router-id; 4142 config false; 4143 description "Neighbor's Designated Router (DR) Router ID."; 4144 } 4146 leaf dr-ip-addr { 4147 type inet:ip-address; 4148 config false; 4149 description "Neighbor's Designated Router (DR) IP address."; 4150 } 4152 leaf bdr-router-id { 4153 type rt-types:router-id; 4154 config false; 4155 description 4156 "Neighbor's Backup Designated Router (BDR) Router ID."; 4157 } 4159 leaf bdr-ip-addr { 4160 type inet:ip-address; 4161 config false; 4162 description 4163 "Neighbor's Backup Designated Router (BDR) IP Address."; 4164 } 4165 leaf state { 4166 type nbr-state-type; 4167 config false; 4168 description 4169 "OSPF neighbor state."; 4170 } 4171 leaf cost { 4172 type ospf-link-metric; 4173 config false; 4174 description "Cost to reach neighbor for Point-to-Multipoint 4175 and Hybrid networks"; 4176 } 4177 leaf dead-timer { 4178 type rt-types:timer-value-seconds16; 4179 config false; 4180 description "This timer tracks the remaining time before 4181 the neighbor is declared dead."; 4182 } 4183 container statistics { 4184 config false; 4185 description "Per-neighbor statistics"; 4186 uses neighbor-stat; 4187 } 4188 } 4190 grouping interface-common-state { 4191 description 4192 "OSPF interface common operational state."; 4193 reference "RFC2328 Section 9: OSPF Version2 - 4194 The Interface Data Structure"; 4196 leaf state { 4197 type if-state-type; 4198 config false; 4199 description "Interface state."; 4200 } 4202 leaf hello-timer { 4203 type rt-types:timer-value-seconds16; 4204 config false; 4205 description "This timer tracks the remaining time before 4206 the next hello packet is sent on the 4207 interface."; 4208 } 4210 leaf wait-timer { 4211 type rt-types:timer-value-seconds16; 4212 config false; 4213 description "This timer tracks the remaining time before 4214 the interface exits the Waiting state."; 4215 } 4217 leaf dr-router-id { 4218 type rt-types:router-id; 4219 config false; 4220 description "Designated Router (DR) Router ID."; 4221 } 4223 leaf dr-ip-addr { 4224 type inet:ip-address; 4225 config false; 4226 description "Designated Router (DR) IP address."; 4227 } 4229 leaf bdr-router-id { 4230 type rt-types:router-id; 4231 config false; 4232 description "Backup Designated Router (BDR) Router ID."; 4233 } 4235 leaf bdr-ip-addr { 4236 type inet:ip-address; 4237 config false; 4238 description "Backup Designated Router (BDR) IP Address."; 4239 } 4241 container statistics { 4242 config false; 4243 description "Per-interface statistics"; 4244 uses interface-stat; 4245 } 4247 container neighbors { 4248 config false; 4249 description "All neighbors for the interface."; 4250 list neighbor { 4251 key "neighbor-router-id"; 4252 description 4253 "List of interface OSPF neighbors."; 4254 leaf neighbor-router-id { 4255 type rt-types:router-id; 4256 description 4257 "Neighbor Router ID."; 4258 } 4259 uses neighbor-state; 4260 } 4261 } 4262 container database { 4263 config false; 4264 description "Link-scope Link State Database."; 4265 list link-scope-lsa-type { 4266 key "lsa-type"; 4267 description 4268 "List OSPF link-scope LSAs."; 4269 leaf lsa-type { 4270 type uint16; 4271 description "OSPF link-scope LSA type."; 4272 } 4273 container link-scope-lsas { 4274 description 4275 "All link-scope LSAs of this LSA type."; 4276 list link-scope-lsa { 4277 key "lsa-id adv-router"; 4278 description "List of OSPF link-scope LSAs"; 4279 uses lsa-key; 4280 uses lsa { 4281 refine "version/ospfv2/ospfv2" { 4282 must "derived-from-or-self( " 4283 + "../../../../../../../../../../" 4284 + "rt:type, 'ospfv2')" { 4285 description "OSPFv2 LSA."; 4286 } 4287 } 4288 refine "version/ospfv3/ospfv3" { 4289 must "derived-from-or-self( " 4290 + "../../../../../../../../../../" 4291 + "rt:type, 'ospfv3')" { 4293 description "OSPFv3 LSA."; 4294 } 4295 } 4296 } 4297 } 4298 } 4299 } 4300 } 4301 } 4303 grouping interface-state { 4304 description 4305 "OSPF interface operational state."; 4306 reference "RFC2328 Section 9: OSPF Version2 - 4307 The Interface Data Structure"; 4309 uses interface-common-state; 4310 } 4312 grouping virtual-link-config { 4313 description 4314 "OSPF virtual link configuration state."; 4316 uses interface-common-config; 4317 } 4319 grouping virtual-link-state { 4320 description 4321 "OSPF virtual link operational state."; 4323 leaf cost { 4324 type ospf-link-metric; 4325 config false; 4326 description 4327 "Virtual link interface cost."; 4328 } 4329 uses interface-common-state; 4330 } 4332 grouping sham-link-config { 4333 description 4334 "OSPF sham link configuration state."; 4336 uses interface-common-config; 4337 uses interface-physical-link-config; 4338 } 4340 grouping sham-link-state { 4341 description 4342 "OSPF sham link operational state."; 4343 uses interface-common-state; 4344 } 4346 grouping address-family-area-config { 4347 description 4348 "OSPF address-family specific area config state."; 4350 container ranges { 4351 description "Container for summary ranges"; 4353 list range { 4354 key "prefix"; 4355 description 4356 "Summarize routes matching address/mask - 4357 Applicable to Area Border Routers (ABRs) only."; 4358 leaf prefix { 4359 type inet:ip-prefix; 4360 description 4361 "IPv4 or IPv6 prefix"; 4362 } 4363 leaf advertise { 4364 type boolean; 4365 description 4366 "Advertise or hide."; 4367 } 4368 leaf cost { 4369 type ospf-metric; 4370 description 4371 "Advertised cost of summary route."; 4372 } 4373 } 4374 } 4375 } 4377 grouping area-common-config { 4378 description 4379 "OSPF area common configuration state."; 4381 leaf summary { 4382 when "derived-from(../area-type,'stub-nssa-area')" { 4383 description 4384 "Summary advertisement into the stub/NSSA area."; 4385 } 4386 type boolean; 4387 description 4388 "Enable/Disable summary advertisement into the stub or 4389 NSSA area."; 4390 } 4391 leaf default-cost { 4392 when "derived-from(../area-type,'stub-nssa-area')" { 4393 description 4394 "Cost for LSA default route advertised into the 4395 stub or NSSA area."; 4396 } 4397 type ospf-metric; 4398 description 4399 "Set the summary default route cost for a 4400 stub or NSSA area."; 4401 } 4402 } 4404 grouping area-config { 4405 description 4406 "OSPF area configuration state."; 4408 leaf area-type { 4409 type identityref { 4410 base area-type; 4411 } 4412 default normal-area; 4413 description 4414 "Area type."; 4415 } 4417 uses area-common-config; 4418 uses address-family-area-config; 4419 } 4421 grouping area-state { 4422 description 4423 "OSPF area operational state."; 4425 container statistics { 4426 config false; 4427 description "Per-area statistics"; 4428 uses area-stat; 4429 } 4431 container database { 4432 config false; 4433 description "Area-scope Link State Database."; 4434 list area-scope-lsa-type { 4435 key "lsa-type"; 4436 description "List OSPF area-scope LSAs."; 4437 leaf lsa-type { 4438 type uint16; 4439 description "OSPF area-scope LSA type."; 4440 } 4441 container area-scope-lsas { 4442 description 4443 "All area-scope LSAs of an area-scope 4444 LSA type."; 4445 list area-scope-lsa { 4446 key "lsa-id adv-router"; 4447 description "List of OSPF area-scope LSAs"; 4448 uses lsa-key; 4449 uses lsa { 4450 refine "version/ospfv2/ospfv2" { 4451 must "derived-from-or-self( " 4452 + "../../../../../../../../" 4453 + "rt:type, 'ospfv2')" { 4454 description "OSPFv2 LSA."; 4455 } 4456 } 4457 refine "version/ospfv3/ospfv3" { 4458 must "derived-from-or-self( " 4459 + "../../../../../../../../" 4460 + "rt:type, 'ospfv3')" { 4461 description "OSPFv3 LSA."; 4462 } 4463 } 4464 } 4465 } 4466 } 4467 } 4468 } 4469 } 4471 grouping local-rib { 4472 description "Local-rib - RIB for Routes computed by the local 4473 OSPF routing instance."; 4474 container local-rib { 4475 config false; 4476 description "Local-rib."; 4477 list route { 4478 key "prefix"; 4479 description "Routes"; 4480 leaf prefix { 4481 type inet:ip-prefix; 4482 description "Destination prefix."; 4483 } 4484 container next-hops { 4485 description "Next hops for the route."; 4486 list next-hop { 4487 key "next-hop"; 4488 description "List of next hops for the route"; 4489 leaf outgoing-interface { 4490 type if:interface-ref; 4491 description 4492 "Name of the outgoing interface."; 4493 } 4494 leaf next-hop { 4495 type inet:ip-address; 4496 description "Next hop address."; 4497 } 4498 } 4499 } 4500 leaf metric { 4501 type uint32; 4502 description "Metric for this route."; 4503 } 4504 leaf route-type { 4505 type route-type; 4506 description "Route type for this route."; 4507 } 4508 leaf route-tag { 4509 type uint32; 4510 description "Route tag for this route."; 4511 } 4512 } 4513 } 4514 } 4516 grouping ietf-spf-delay { 4517 leaf initial-delay { 4518 type uint32; 4519 units milliseconds; 4520 description 4521 "Delay used while in QUIET state (milliseconds)."; 4522 } 4523 leaf short-delay { 4524 type uint32; 4525 units milliseconds; 4526 description 4527 "Delay used while in SHORT_WAIT state (milliseconds)."; 4528 } 4529 leaf long-delay { 4530 type uint32; 4531 units milliseconds; 4532 description 4533 "Delay used while in LONG_WAIT state (milliseconds)."; 4534 } 4535 leaf hold-down { 4536 type uint32; 4537 units milliseconds; 4538 description 4539 "Timer used to consider an IGP stability period 4540 (milliseconds)."; 4541 } 4542 leaf time-to-learn { 4543 type uint32; 4544 units milliseconds; 4545 description 4546 "Duration used to learn all the IGP events 4547 related to a single component failure (milliseconds)."; 4548 } 4549 leaf current-state { 4550 type enumeration { 4551 enum "quiet" { 4552 description "QUIET state"; 4553 } 4554 enum "short-wait" { 4555 description "SHORT_WAIT state"; 4556 } 4557 enum "long-wait" { 4558 description "LONG_WAIT state"; 4559 } 4560 } 4561 config false; 4562 description 4563 "Current SPF back-off algorithm state."; 4564 } 4565 leaf remaining-time-to-learn { 4566 type rt-types:timer-value-milliseconds; 4567 config false; 4568 description 4569 "Remaining time until time-to-learn timer fires."; 4570 } 4571 leaf remaining-hold-down { 4572 type rt-types:timer-value-milliseconds; 4573 config false; 4574 description 4575 "Remaining time until hold-down timer fires."; 4576 } 4577 leaf last-event-received { 4578 type yang:timestamp; 4579 config false; 4580 description 4581 "Time of last SPF triggering event."; 4582 } 4583 leaf next-spf-time { 4584 type yang:timestamp; 4585 config false; 4586 description 4587 "Time when next SPF has been scheduled."; 4588 } 4589 leaf last-spf-time { 4590 type yang:timestamp; 4591 config false; 4592 description 4593 "Time of last SPF computation."; 4594 } 4595 description 4596 "Grouping for IETF SPF delay configuration and state"; 4597 } 4599 grouping node-tag-config { 4600 description 4601 "OSPF node tag config state."; 4602 container node-tags { 4603 if-feature node-tag; 4604 list node-tag { 4605 key tag; 4606 leaf tag { 4607 type uint32; 4608 description 4609 "Node tag value."; 4610 } 4611 description 4612 "List of tags."; 4613 } 4614 description 4615 "Container for node admin tags."; 4616 } 4617 } 4619 grouping instance-config { 4620 description 4621 "OSPF instance config state."; 4623 leaf enable { 4624 type boolean; 4625 default true; 4626 description 4627 "Enable/Disable the protocol."; 4628 } 4629 leaf explicit-router-id { 4630 if-feature explicit-router-id; 4631 type rt-types:router-id; 4632 description 4633 "Defined in RFC 2328. A 32-bit number 4634 that uniquely identifies the router."; 4635 } 4637 container preference { 4638 description 4639 "Route preference configuration. In many 4640 implementations, preference is referred to as 4641 administrative distance."; 4642 reference 4643 "RFC 8349: A YANG Data Model for Routing Management 4644 (NMDA Version)"; 4645 choice scope { 4646 description 4647 "Options for expressing preference 4648 as single or multiple values."; 4649 case single-value { 4650 leaf all { 4651 type uint8; 4652 description 4653 "Preference for intra-area, inter-area, and 4654 external routes."; 4655 } 4656 } 4657 case multi-values { 4658 choice granularity { 4659 description 4660 "Options for expressing preference 4661 for intra-area and inter-area routes."; 4662 case detail { 4663 leaf intra-area { 4664 type uint8; 4665 description 4666 "Preference for intra-area routes."; 4667 } 4668 leaf inter-area { 4669 type uint8; 4670 description 4671 "Preference for inter-area routes."; 4672 } 4673 } 4674 case coarse { 4675 leaf internal { 4676 type uint8; 4677 description 4678 "Preference for both intra-area and 4679 inter-area routes."; 4680 } 4681 } 4682 } 4683 leaf external { 4684 type uint8; 4685 description 4686 "Preference for AS external routes."; 4687 } 4688 } 4689 } 4690 } 4692 container nsr { 4693 if-feature nsr; 4694 description 4695 "Non-Stop Routing (NSR) config state."; 4696 leaf enable { 4697 type boolean; 4698 description 4699 "Enable/Disable NSR."; 4700 } 4701 } 4703 container graceful-restart { 4704 if-feature graceful-restart; 4705 description 4706 "Graceful restart config state."; 4707 reference "RFC 3623: OSPF Graceful Restart 4708 RFC 5187: OSPFv3 Graceful Restart"; 4709 leaf enable { 4710 type boolean; 4711 description 4712 "Enable/Disable graceful restart as defined in RFC 3623 4713 for OSPFv2 and RFC 5187 for OSPFv3."; 4714 } 4715 leaf helper-enable { 4716 type boolean; 4717 description 4718 "Enable graceful restart helper support for restarting 4719 routers (RFC 3623 Section 3)."; 4720 } 4721 leaf restart-interval { 4722 type uint16 { 4723 range "1..1800"; 4724 } 4725 units seconds; 4726 default "120"; 4727 description 4728 "Interval to attempt graceful restart prior 4729 to failing (RFC 3623 Section B.1) (seconds)"; 4730 } 4731 leaf helper-strict-lsa-checking { 4732 type boolean; 4733 description 4734 "Terminate graceful restart when an LSA topology change 4735 is detected (RFC 3623 Section B.2)."; 4736 } 4737 } 4739 container auto-cost { 4740 if-feature auto-cost; 4741 description 4742 "Interface Auto-cost configuration state."; 4743 leaf enable { 4744 type boolean; 4745 description 4746 "Enable/Disable interface auto-cost."; 4747 } 4748 leaf reference-bandwidth { 4749 when "../enable = 'true'" { 4750 description "Only when auto cost is enabled"; 4751 } 4752 type uint32 { 4753 range "1..4294967"; 4754 } 4755 units Mbits; 4756 description 4757 "Configure reference bandwidth used to automatically 4758 determine interface cost (Mbits). The cost is the 4759 reference bandwidth divided by the interface speed 4760 with 1 being the minimum cost."; 4761 } 4762 } 4764 container spf-control { 4765 leaf paths { 4766 if-feature max-ecmp; 4767 type uint16 { 4768 range "1..65535"; 4769 } 4770 description 4771 "Maximum number of Equal-Cost Multi-Path (ECMP) paths."; 4772 } 4773 container ietf-spf-delay { 4774 if-feature ietf-spf-delay; 4775 uses ietf-spf-delay; 4776 description 4777 "IETF SPF delay algorithm configuration."; 4778 } 4779 description "SPF calculation control."; 4780 } 4782 container database-control { 4783 leaf max-lsa { 4784 if-feature max-lsa; 4785 type uint32 { 4786 range "1..4294967294"; 4787 } 4788 description 4789 "Maximum number of LSAs OSPF the router will accept."; 4790 } 4791 description "Database maintenance control."; 4792 } 4794 container stub-router { 4795 if-feature stub-router; 4796 description "Set maximum metric configuration"; 4798 choice trigger { 4799 description 4800 "Specific triggers which will enable stub 4801 router state."; 4802 container always { 4803 presence 4804 "Enables unconditional stub router support"; 4805 description 4806 "Unconditional stub router state (advertise 4807 transit links with MaxLinkMetric"; 4808 reference "RFC 6987: OSPF Stub Router 4809 Advertisement"; 4810 } 4811 } 4812 } 4814 container mpls { 4815 description 4816 "OSPF MPLS config state."; 4817 container te-rid { 4818 if-feature te-rid; 4819 description 4820 "Stable OSPF Router IP Address used for Traffic 4821 Engineering (TE)"; 4822 leaf ipv4-router-id { 4823 type inet:ipv4-address; 4824 description 4825 "Explicitly configure the TE IPv4 Router ID."; 4826 } 4827 leaf ipv6-router-id { 4828 type inet:ipv6-address; 4829 description 4830 "Explicitly configure the TE IPv6 Router ID."; 4831 } 4832 } 4833 container ldp { 4834 description 4835 "OSPF MPLS LDP config state."; 4836 leaf igp-sync { 4837 if-feature ldp-igp-sync; 4838 type boolean; 4839 description 4840 "Enable LDP IGP synchronization."; 4841 } 4842 } 4843 } 4844 uses instance-fast-reroute-config; 4845 uses node-tag-config; 4846 } 4848 grouping instance-state { 4849 description 4850 "OSPF instance operational state."; 4852 leaf router-id { 4853 type rt-types:router-id; 4854 config false; 4855 description 4856 "Defined in RFC 2328. A 32-bit number 4857 that uniquely identifies the router."; 4858 } 4860 uses local-rib; 4862 container statistics { 4863 config false; 4864 description "Per-instance statistics"; 4865 uses instance-stat; 4866 } 4868 container database { 4869 config false; 4870 description "AS-scope Link State Database."; 4871 list as-scope-lsa-type { 4872 key "lsa-type"; 4873 description "List OSPF AS-scope LSAs."; 4874 leaf lsa-type { 4875 type uint16; 4876 description "OSPF AS scope LSA type."; 4877 } 4878 container as-scope-lsas { 4879 description "All AS-scope of LSA of this LSA type."; 4880 list as-scope-lsa { 4881 key "lsa-id adv-router"; 4882 description "List of OSPF AS-scope LSAs"; 4883 uses lsa-key; 4884 uses lsa { 4885 refine "version/ospfv2/ospfv2" { 4886 must "derived-from-or-self( " 4887 + "../../../../../../" 4888 + "rt:type, 'ospfv2')" { 4889 description "OSPFv2 LSA."; 4890 } 4891 } 4892 refine "version/ospfv3/ospfv3" { 4893 must "derived-from-or-self( " 4894 + "../../../../../../" 4895 + "rt:type, 'ospfv3')" { 4896 description "OSPFv3 LSA."; 4897 } 4898 } 4899 } 4900 } 4901 } 4902 } 4903 } 4904 uses spf-log; 4905 uses lsa-log; 4906 } 4908 grouping multi-topology-area-common-config { 4909 description 4910 "OSPF multi-topology area common configuration state."; 4911 leaf summary { 4912 when "derived-from(../../../area-type, 'stub-nssa-area')" { 4913 description 4914 "Summary advertisement into the stub/NSSA area."; 4915 } 4916 type boolean; 4917 description 4918 "Enable/Disable summary advertisement into the 4919 topology in the stub or NSSA area."; 4920 } 4921 leaf default-cost { 4922 when "derived-from(../../../area-type, 'stub-nssa-area')" { 4923 description 4924 "Cost for LSA default route advertised into the 4925 topology into the stub or NSSA area."; 4926 } 4927 type ospf-metric; 4928 description 4929 "Set the summary default route cost for a 4930 stub or NSSA area."; 4931 } 4932 } 4934 grouping multi-topology-area-config { 4935 description 4936 "OSPF multi-topology area configuration state."; 4938 uses multi-topology-area-common-config; 4939 uses address-family-area-config; 4940 } 4942 grouping multi-topology-state { 4943 description 4944 "OSPF multi-topology operational state."; 4946 uses local-rib; 4947 } 4949 grouping multi-topology-interface-config { 4950 description 4951 "OSPF multi-topology configuration state."; 4953 leaf cost { 4954 type ospf-link-metric; 4955 description 4956 "Interface cost for this topology."; 4957 } 4958 } 4960 grouping ospfv3-interface-config { 4961 description 4962 "OSPFv3 interface specific configuration state."; 4964 leaf instance-id { 4965 type uint8 { 4966 range "0 .. 31"; 4967 } 4968 description 4969 "OSPFv3 instance ID."; 4970 } 4971 } 4973 grouping ospfv3-interface-state { 4974 description 4975 "OSPFv3 interface specific operational state."; 4977 leaf interface-id { 4978 type uint16; 4979 config false; 4980 description 4981 "OSPFv3 interface ID."; 4982 } 4983 } 4985 grouping lsa-identifiers { 4986 description 4987 "The parameters that uniquely identify an LSA."; 4988 leaf area-id { 4989 type area-id-type; 4990 description 4991 "Area ID"; 4992 } 4993 leaf type { 4994 type uint16; 4995 description 4996 "LSA type."; 4997 } 4998 leaf lsa-id { 4999 type union { 5000 type inet:ipv4-address; 5001 type yang:dotted-quad; 5002 } 5003 description "Link-State ID."; 5004 } 5005 leaf adv-router { 5006 type rt-types:router-id; 5007 description 5008 "LSA advertising router."; 5009 } 5010 leaf seq-num { 5011 type uint32; 5012 description 5013 "LSA sequence number."; 5014 } 5015 } 5017 grouping spf-log { 5018 description 5019 "Grouping for SPF log."; 5020 container spf-log { 5021 config false; 5022 description 5023 "This container lists the SPF log."; 5024 list event { 5025 key id; 5026 description 5027 "List of SPF log entries represented 5028 as a wrapping buffer in chronological 5029 order with the oldest entry returned 5030 first."; 5031 leaf id { 5032 type uint32; 5033 description 5034 "Event identifier - Purely internal value."; 5035 } 5036 leaf spf-type { 5037 type enumeration { 5038 enum full { 5039 description 5040 "SPF computation was a Full SPF."; 5041 } 5042 enum intra { 5043 description 5044 "SPF computation was only for intra-area routes."; 5045 } 5046 enum inter { 5047 description 5048 "SPF computation was only for inter-area 5049 summary routes."; 5050 } 5051 enum external { 5052 description 5053 "SPF computation was only for AS external routes."; 5054 } 5055 } 5056 description 5057 "The SPF computation type for the SPF log entry."; 5058 } 5059 leaf schedule-timestamp { 5060 type yang:timestamp; 5061 description 5062 "This is the timestamp when the computation was 5063 scheduled."; 5064 } 5065 leaf start-timestamp { 5066 type yang:timestamp; 5067 description 5068 "This is the timestamp when the computation was 5069 started."; 5070 } 5071 leaf end-timestamp { 5072 type yang:timestamp; 5073 description 5074 "This the timestamp when the computation was 5075 completed."; 5076 } 5077 list trigger-lsa { 5078 description 5079 "The list of LSAs that triggered the computation."; 5080 uses lsa-identifiers; 5081 } 5082 } 5083 } 5084 } 5086 grouping lsa-log { 5087 description 5088 "Grouping for the LSA log."; 5089 container lsa-log { 5090 config false; 5091 description 5092 "This container lists the LSA log. 5093 Local LSA modifications are also included 5094 in the list."; 5095 list event { 5096 key id; 5097 description 5098 "List of LSA log entries represented 5099 as a wrapping buffer in chronological order 5100 with the oldest entries returned first."; 5101 leaf id { 5102 type uint32; 5103 description 5104 "Event identifier - purely internal value."; 5105 } 5106 container lsa { 5107 description 5108 "This container describes the logged LSA."; 5110 uses lsa-identifiers; 5111 } 5112 leaf received-timestamp { 5113 type yang:timestamp; 5114 description 5115 "This is the timestamp when the LSA was received. 5116 In case of local LSA update, the timestamp refers 5117 to the LSA origination time."; 5118 } 5119 leaf reason { 5120 type identityref { 5121 base lsa-log-reason; 5122 } 5123 description 5124 "This reason for the LSA log entry."; 5125 } 5126 } 5127 } 5128 } 5130 augment "/rt:routing/rt:control-plane-protocols/" 5131 + "rt:control-plane-protocol" { 5132 when "derived-from(rt:type, 'ospf')" { 5133 description 5134 "This augmentation is only valid for a routing protocol 5135 instance of OSPF (type 'ospfv2' or 'ospfv3')."; 5136 } 5137 description "OSPF protocol ietf-routing module 5138 control-plane-protocol augmentation."; 5140 container ospf { 5141 description 5142 "OSPF protocol Instance"; 5144 leaf address-family { 5145 type iana-rt-types:address-family; 5146 description 5147 "Address-family of the instance."; 5148 } 5150 uses instance-config; 5151 uses instance-state; 5153 container areas { 5154 description "All areas."; 5155 list area { 5156 key "area-id"; 5157 description 5158 "List of OSPF areas"; 5159 leaf area-id { 5160 type area-id-type; 5161 description 5162 "Area ID"; 5163 } 5165 uses area-config; 5166 uses area-state; 5168 container virtual-links { 5169 when "derived-from-or-self(../area-type, 'normal-area') " 5170 + "and ../area-id = '0.0.0.0'" { 5171 description 5172 "Virtual links must be in backbone area."; 5173 } 5174 description "All virtual links."; 5175 list virtual-link { 5176 key "transit-area-id router-id"; 5177 description 5178 "OSPF virtual link"; 5179 leaf transit-area-id { 5180 type leafref { 5181 path "../../../../area/area-id"; 5182 } 5183 must "derived-from-or-self(" 5184 + "../../../../area[area-id=current()]/area-type, " 5185 + "'normal-area') and " 5186 + "../../../../area[area-id=current()]/area-id != " 5187 + "'0.0.0.0'" { 5188 error-message "Virtual link transit area must " 5189 + "be non-zero."; 5190 description 5191 "Virtual-link transit area must be 5192 non-zero area."; 5193 } 5194 description 5195 "Virtual link transit area ID."; 5196 } 5197 leaf router-id { 5198 type rt-types:router-id; 5199 description 5200 "Virtual Link remote endpoint Router ID."; 5201 } 5203 uses virtual-link-config; 5204 uses virtual-link-state; 5205 } 5207 } 5208 container sham-links { 5209 if-feature pe-ce-protocol; 5210 description "All sham links."; 5211 list sham-link { 5212 key "local-id remote-id"; 5213 description 5214 "OSPF sham link"; 5215 leaf local-id { 5216 type inet:ip-address; 5217 description 5218 "Address of the local sham Link endpoint."; 5219 } 5220 leaf remote-id { 5221 type inet:ip-address; 5222 description 5223 "Address of the remote sham Link endpoint."; 5224 } 5225 uses sham-link-config; 5226 uses sham-link-state; 5227 } 5228 } 5229 container interfaces { 5230 description "All interfaces."; 5231 list interface { 5232 key "name"; 5233 description 5234 "List of OSPF interfaces."; 5235 leaf name { 5236 type if:interface-ref; 5237 description 5238 "Interface name reference."; 5239 } 5240 uses interface-config; 5241 uses interface-state; 5242 } 5243 } 5244 } 5245 } 5246 } 5247 } 5249 augment "/rt:routing/rt:control-plane-protocols/" 5250 + "rt:control-plane-protocol/ospf" { 5251 when "derived-from(../rt:type, 'ospf')" { 5252 description 5253 "This augmentation is only valid for OSPF 5254 (type 'ospfv2' or 'ospfv3')."; 5256 } 5257 if-feature multi-topology; 5258 description 5259 "OSPF multi-topology instance configuration 5260 state augmentation."; 5261 container topologies { 5262 description "All topologies."; 5263 list topology { 5264 key "name"; 5265 description 5266 "OSPF topology - The OSPF topology address-family 5267 must coincide with the routing-instance 5268 address-family."; 5269 leaf name { 5270 type leafref { 5271 path "../../../../../../rt:ribs/rt:rib/rt:name"; 5272 } 5273 description "RIB name corresponding to the OSPF 5274 topology."; 5275 } 5277 uses multi-topology-state; 5278 } 5279 } 5280 } 5282 augment "/rt:routing/rt:control-plane-protocols/" 5283 + "rt:control-plane-protocol/ospf/" 5284 + "areas/area" { 5285 when "derived-from-or-self(../../../rt:type, " 5286 + "'ospfv2')" { 5287 description 5288 "This augmentation is only valid for OSPFv2."; 5289 } 5290 if-feature multi-topology; 5291 description 5292 "OSPF multi-topology area configuration state 5293 augmentation."; 5294 container topologies { 5295 description "All topologies for the area."; 5296 list topology { 5297 key "name"; 5298 description "OSPF area topology."; 5299 leaf name { 5300 type leafref { 5301 path "../../../../../../../../" 5302 + "rt:ribs/rt:rib/rt:name"; 5303 } 5304 description 5305 "Single topology enabled for this area."; 5306 } 5308 uses multi-topology-area-config; 5309 } 5310 } 5311 } 5313 augment "/rt:routing/rt:control-plane-protocols/" 5314 + "rt:control-plane-protocol/ospf/" 5315 + "areas/area/interfaces/interface" { 5316 when "derived-from-or-self(../../../../../rt:type, " 5317 + "'ospfv2')" { 5318 description 5319 "This augmentation is only valid for OSPFv2."; 5320 } 5321 if-feature multi-topology; 5322 description 5323 "OSPF multi-topology interface configuration state 5324 augmentation."; 5325 container topologies { 5326 description "All topologies for the interface."; 5327 list topology { 5328 key "name"; 5329 description "OSPF interface topology."; 5330 leaf name { 5331 type leafref { 5332 path "../../../../../../../../../../" 5333 + "rt:ribs/rt:rib/rt:name"; 5334 } 5335 description 5336 "Single topology enabled on this interface."; 5337 } 5339 uses multi-topology-interface-config; 5340 } 5341 } 5342 } 5344 augment "/rt:routing/rt:control-plane-protocols/" 5345 + "rt:control-plane-protocol/ospf/" 5346 + "areas/area/interfaces/interface" { 5347 when "derived-from-or-self(../../../../../rt:type, " 5348 + "'ospfv3')" { 5349 description 5350 "This augmentation is only valid for OSPFv3."; 5351 } 5352 description 5353 "OSPFv3 interface specific configuration state 5354 augmentation."; 5355 uses ospfv3-interface-config; 5356 uses ospfv3-interface-state; 5357 } 5359 grouping route-content { 5360 description 5361 "This grouping defines OSPF-specific route attributes."; 5362 leaf metric { 5363 type uint32; 5364 description "OSPF route metric."; 5365 } 5366 leaf tag { 5367 type uint32; 5368 default "0"; 5369 description "OSPF route tag."; 5370 } 5371 leaf route-type { 5372 type route-type; 5373 description "OSPF route type"; 5374 } 5375 } 5377 augment "/rt:routing/rt:ribs/rt:rib/rt:routes/rt:route" { 5378 when "derived-from(rt:source-protocol, 'ospf')" { 5379 description 5380 "This augmentation is only valid for routes whose 5381 source protocol is OSPF."; 5382 } 5383 description 5384 "OSPF-specific route attributes."; 5385 uses route-content; 5386 } 5388 /* 5389 * RPCs 5390 */ 5392 rpc clear-neighbor { 5393 description 5394 "This RPC request clears a particular set of OSPF neighbors. 5395 If the operation fails for OSPF internal reason, then 5396 error-tag and error-app-tag should be set to a meaningful 5397 value."; 5398 input { 5399 leaf routing-protocol-name { 5400 type leafref { 5401 path "/rt:routing/rt:control-plane-protocols/" 5402 + "rt:control-plane-protocol/rt:name"; 5403 } 5404 mandatory "true"; 5405 description 5406 "OSPF protocol instance which information for neighbors 5407 are to be cleared. 5409 If the referenced OSPF instance doesn't exist, then 5410 this operation SHALL fail with error-tag 'data-missing' 5411 and error-app-tag 5412 'routing-protocol-instance-not-found'."; 5413 } 5415 leaf interface { 5416 type if:interface-ref; 5417 description 5418 "Name of the OSPF interface for which neighbors are to 5419 be cleared. 5421 If the referenced OSPF interface doesn't exist, then 5422 this operation SHALL fail with error-tag 5423 'data-missing' and error-app-tag 5424 'ospf-interface-not-found'."; 5425 } 5426 } 5427 } 5429 rpc clear-database { 5430 description 5431 "This RPC request clears a particular OSPF Link State 5432 Database. If the operation fails for OSPF internal reason, 5433 then error-tag and error-app-tag should be set to a 5434 meaningful value."; 5435 input { 5436 leaf routing-protocol-name { 5437 type leafref { 5438 path "/rt:routing/rt:control-plane-protocols/" 5439 + "rt:control-plane-protocol/rt:name"; 5440 } 5441 mandatory "true"; 5442 description 5443 "OSPF protocol instance whose Link State Database is to 5444 be cleared. 5446 If the referenced OSPF instance doesn't exist, then 5447 this operation SHALL fail with error-tag 'data-missing' 5448 and error-app-tag 5449 'routing-protocol-instance-not-found'."; 5450 } 5451 } 5452 } 5454 /* 5455 * Notifications 5456 */ 5458 grouping notification-instance-hdr { 5459 description 5460 "This grouping describes common instance specific 5461 data for OSPF notifications."; 5463 leaf routing-protocol-name { 5464 type leafref { 5465 path "/rt:routing/rt:control-plane-protocols/" 5466 + "rt:control-plane-protocol/rt:name"; 5467 } 5468 must "derived-from( " 5469 + "/rt:routing/rt:control-plane-protocols/" 5470 + "rt:control-plane-protocol[rt:name=current()]/" 5471 + "rt:type, 'ospf')"; 5472 description 5473 "OSPF routing protocol instance name."; 5474 } 5476 leaf address-family { 5477 type leafref { 5478 path "/rt:routing/" 5479 + "rt:control-plane-protocols/rt:control-plane-protocol" 5480 + "[rt:name=current()/../routing-protocol-name]/" 5481 + "ospf/address-family"; 5482 } 5483 description 5484 "Address family of the OSPF instance."; 5485 } 5486 } 5488 grouping notification-interface { 5489 description 5490 "This grouping provides interface information 5491 for the OSPF interface specific notification."; 5493 choice if-link-type-selection { 5494 description 5495 "Options for link type."; 5497 container interface { 5498 description "Normal interface."; 5499 leaf interface { 5500 type if:interface-ref; 5501 description "Interface."; 5502 } 5503 } 5504 container virtual-link { 5505 description "virtual-link."; 5506 leaf transit-area-id { 5507 type area-id-type; 5508 description "Area ID."; 5509 } 5510 leaf neighbor-router-id { 5511 type rt-types:router-id; 5512 description "Neighbor Router ID."; 5513 } 5514 } 5515 container sham-link { 5516 description "sham link."; 5517 leaf area-id { 5518 type area-id-type; 5519 description "Area ID."; 5520 } 5521 leaf local-ip-addr { 5522 type inet:ip-address; 5523 description "Sham link local address."; 5524 } 5525 leaf remote-ip-addr { 5526 type inet:ip-address; 5527 description "Sham link remote address."; 5528 } 5529 } 5530 } 5531 } 5533 grouping notification-neighbor { 5534 description 5535 "This grouping provides the neighbor information 5536 for neighbor specific notifications."; 5538 leaf neighbor-router-id { 5539 type rt-types:router-id; 5540 description "Neighbor Router ID."; 5541 } 5543 leaf neighbor-ip-addr { 5544 type inet:ip-address; 5545 description "Neighbor address."; 5546 } 5547 } 5549 notification if-state-change { 5550 uses notification-instance-hdr; 5551 uses notification-interface; 5553 leaf state { 5554 type if-state-type; 5555 description "Interface state."; 5556 } 5557 description 5558 "This notification is sent when an interface 5559 state change is detected."; 5560 } 5562 notification if-config-error { 5563 uses notification-instance-hdr; 5564 uses notification-interface; 5566 leaf packet-source { 5567 type inet:ip-address; 5568 description "Source address."; 5569 } 5571 leaf packet-type { 5572 type packet-type; 5573 description "OSPF packet type."; 5574 } 5576 leaf error { 5577 type enumeration { 5578 enum "bad-version" { 5579 description "Bad version."; 5580 } 5581 enum "area-mismatch" { 5582 description "Area mismatch."; 5583 } 5584 enum "unknown-nbma-nbr" { 5585 description "Unknown NBMA neighbor."; 5586 } 5587 enum "unknown-virtual-nbr" { 5588 description "Unknown virtual link neighbor."; 5589 } 5590 enum "auth-type-mismatch" { 5591 description "Auth type mismatch."; 5592 } 5593 enum "auth-failure" { 5594 description "Auth failure."; 5595 } 5596 enum "net-mask-mismatch" { 5597 description "Network mask mismatch."; 5598 } 5599 enum "hello-interval-mismatch" { 5600 description "Hello interval mismatch."; 5601 } 5602 enum "dead-interval-mismatch" { 5603 description "Dead interval mismatch."; 5604 } 5605 enum "option-mismatch" { 5606 description "Option mismatch."; 5607 } 5608 enum "mtu-mismatch" { 5609 description "MTU mismatch."; 5610 } 5611 enum "duplicate-router-id" { 5612 description "Duplicate Router ID."; 5613 } 5614 enum "no-error" { 5615 description "No error."; 5616 } 5617 } 5618 description "Error code."; 5619 } 5620 description 5621 "This notification is sent when an interface 5622 config error is detected."; 5623 } 5625 notification nbr-state-change { 5626 uses notification-instance-hdr; 5627 uses notification-interface; 5628 uses notification-neighbor; 5630 leaf state { 5631 type nbr-state-type; 5632 description "Neighbor state."; 5633 } 5635 description 5636 "This notification is sent when a neighbor 5637 state change is detected."; 5638 } 5640 notification nbr-restart-helper-status-change { 5641 uses notification-instance-hdr; 5642 uses notification-interface; 5643 uses notification-neighbor; 5645 leaf status { 5646 type restart-helper-status-type; 5647 description "Restart helper status."; 5648 } 5650 leaf age { 5651 type rt-types:timer-value-seconds16; 5652 description 5653 "Remaining time in current OSPF graceful restart 5654 interval when the router is acting as a restart 5655 helper for the neighbor."; 5656 } 5658 leaf exit-reason { 5659 type restart-exit-reason-type; 5660 description 5661 "Restart helper exit reason."; 5662 } 5663 description 5664 "This notification is sent when a neighbor restart 5665 helper status change is detected."; 5666 } 5668 notification if-rx-bad-packet { 5669 uses notification-instance-hdr; 5670 uses notification-interface; 5672 leaf packet-source { 5673 type inet:ip-address; 5674 description "Source address."; 5675 } 5677 leaf packet-type { 5678 type packet-type; 5679 description "OSPF packet type."; 5680 } 5682 description 5683 "This notification is sent when an OSPF packet that 5684 cannot be parsed is received on an OSPF interface."; 5685 } 5687 notification lsdb-approaching-overflow { 5688 uses notification-instance-hdr; 5689 leaf ext-lsdb-limit { 5690 type uint32; 5691 description 5692 "The maximum number of non-default AS-external LSAs 5693 entries that can be stored in the Link State Database."; 5694 } 5696 description 5697 "This notification is sent when the number of LSAs 5698 in the router's Link State Database has exceeded 5699 ninety percent of the AS-external limit (ext-lsdb-limit)."; 5700 } 5702 notification lsdb-overflow { 5703 uses notification-instance-hdr; 5705 leaf ext-lsdb-limit { 5706 type uint32; 5707 description 5708 "The maximum number of non-default AS-external LSAs 5709 entries that can be stored in the Link State Database."; 5710 } 5712 description 5713 "This notification is sent when the number of LSAs 5714 in the router's Link State Database has exceeded the 5715 AS-external limit (ext-lsdb-limit)."; 5716 } 5718 notification nssa-translator-status-change { 5719 uses notification-instance-hdr; 5721 leaf area-id { 5722 type area-id-type; 5723 description "Area ID."; 5724 } 5726 leaf status { 5727 type nssa-translator-state-type; 5728 description 5729 "NSSA translator status."; 5730 } 5732 description 5733 "This notification is sent when there is a change 5734 in the router's role in translating OSPF NSSA LSAs 5735 to OSPF AS-External LSAs."; 5736 } 5737 notification restart-status-change { 5738 uses notification-instance-hdr; 5740 leaf status { 5741 type restart-status-type; 5742 description 5743 "Restart status."; 5744 } 5746 leaf restart-interval { 5747 type uint16 { 5748 range 1..1800; 5749 } 5750 units seconds; 5751 default "120"; 5752 description 5753 "Restart interval."; 5754 } 5756 leaf exit-reason { 5757 type restart-exit-reason-type; 5758 description 5759 "Restart exit reason."; 5760 } 5762 description 5763 "This notification is sent when the graceful restart 5764 state for the router has changed."; 5765 } 5766 } 5767 5769 4. Security Considerations 5771 The YANG modules specified in this document define a schema for data 5772 that is designed to be accessed via network management protocols such 5773 as NETCONF [RFC6241] or RESTCONF [RFC8040]. The lowest NETCONF layer 5774 is the secure transport layer, and the mandatory-to-implement secure 5775 transport is Secure Shell (SSH) [RFC6242]. The lowest RESTCONF layer 5776 is HTTPS, and the mandatory-to-implement secure transport is TLS 5777 [RFC8446]. 5779 The NETCONF Access Control Model (NACM) [RFC8341] provides the means 5780 to restrict access for particular NETCONF or RESTCONF users to a pre- 5781 configured subset of all available NETCONF or RESTCONF protocol 5782 operations and content. 5784 There are a number of data nodes defined in ietf-ospf.yang module 5785 that are writable/creatable/deletable (i.e., config true, which is 5786 the default). These data nodes may be considered sensitive or 5787 vulnerable in some network environments. Write operations (e.g., 5788 edit-config) to these data nodes without proper protection can have a 5789 negative effect on network operations. Writable data node represent 5790 configuration of each instance, area, virtual link, sham-link, and 5791 interface. These correspond to the following schema nodes: 5793 /ospf 5795 /ospf/areas/ 5797 /ospf/areas/area[area-id] 5799 /ospf/virtual-links/ 5801 /ospf/virtual-links/virtual-link[transit-area-id router-id] 5803 /ospf/areas/area[area-id]/interfaces 5805 /ospf/areas/area[area-id]/interfaces/interface[name] 5807 /ospf/area/area[area-id]/sham-links 5809 /ospf/area/area[area-id]/sham-links/sham-link[local-id remote-id] 5811 For OSPF, the ability to modify OSPF configuration will allow the 5812 entire OSPF domain to be compromised including peering with 5813 unauthorized routers to misroute traffic or mount a massive Denial- 5814 of-Service (DoS) attack. For example, adding OSPF on any unprotected 5815 interface could allow an OSPF adjacency to be formed with an 5816 unauthorized and malicious neighbor. Once an adjacency is formed, 5817 traffic could be hijacked. As a simpler example, a Denial-of-Service 5818 attack could be mounted by changing the cost of an OSPF interface to 5819 be asymmetric such that a hard routing loop ensues. In general, 5820 unauthorized modification of most OSPF features will pose there own 5821 set of security risks and the "Security Considerations" in the 5822 respective reference RFCs should be consulted. 5824 Some of the readable data nodes in the ietf-ospf.yang module may be 5825 considered sensitive or vulnerable in some network environments. It 5826 is thus important to control read access (e.g., via get, get-config, 5827 or notification) to these data nodes. The exposure of the Link State 5828 Database (LSDB) will expose the detailed topology of the network. 5829 There is a separate Link State Database for each instance, area, 5830 virtual link, sham-link, and interface. These correspond to the 5831 following schema nodes: 5833 /ospf/database 5835 /ospf/areas/area[area-id]/database 5837 /ospf/virtual-links/virtual-link[transit-area-id router- 5838 id]/database 5840 /ospf/areas/area[area-id]/interfaces/interface[name]/database 5842 /ospf/area/area[area-id]/sham-links/sham-link[local-id remote- 5843 id]/database 5845 Exposure of the Link State Database includes information beyond the 5846 scope of the OSPF router and this may be undesirable since exposure 5847 may facilitate other attacks. Additionally, in the case of an area 5848 LSDB, the complete IP network topology and, if deployed, the traffic 5849 engineering topology of the OSPF area can be reconstucted. Network 5850 operators may consider their topologies to be sensitive confidential 5851 data. 5853 For OSPF authentication, configuration is supported via the 5854 specification of key-chains [RFC8177] or the direct specification of 5855 key and authentication algorithm. Hence, authentication 5856 configuration using the "auth-table-trailer" case in the 5857 "authentication" container inherits the security considerations of 5858 [RFC8177]. This includes the considerations with respect to the 5859 local storage and handling of authentication keys. 5861 Additionally, local specification of OSPF authentication keys and the 5862 associated authentication algorithm is supported for legacy 5863 implementations that do not support key-chains [RFC8177] It is 5864 RECOMMENDED that implementations migrate to key-chains due the 5865 seamless support of key and algorithm rollover, as well as, the 5866 hexadecimal key specification affording more key entropy, and 5867 encryption of keys using the Advanced Encryption Standard (AES) Key 5868 Wrap Padding Algorithm [RFC5649]. 5870 Some of the RPC operations in this YANG module may be considered 5871 sensitive or vulnerable in some network environments. It is thus 5872 important to control access to these operations. The OSPF YANG 5873 module supports the "clear-neighbor" and "clear-database" RPCs. If 5874 access to either of these is compromised, they can result in 5875 temporary network outages be employed to mount DoS attacks. 5877 The actual authentication key data (whether locally specified or part 5878 of a key-chain) is sensitive and needs to be kept secret from 5879 unauthorized parties; compromise of the key data would allow an 5880 attacker to forge OSPF traffic that would be accepted as authentic, 5881 potentially compromising the entirety OSPF domain. 5883 5. IANA Considerations 5885 This document registers a URI in the IETF XML registry [RFC3688]. 5886 Following the format in [RFC3688], the following registration is 5887 requested to be made: 5889 URI: urn:ietf:params:xml:ns:yang:ietf-ospf 5890 Registrant Contact: The IESG. 5891 XML: N/A, the requested URI is an XML namespace. 5893 This document registers a YANG module in the YANG Module Names 5894 registry [RFC6020]. 5896 name: ietf-ospf 5897 namespace: urn:ietf:params:xml:ns:yang:ietf-ospf 5898 prefix: ospf 5899 reference: RFC XXXX 5901 6. Acknowledgements 5903 The authors wish to thank Yi Yang, Alexander Clemm, Gaurav Gupta, 5904 Ladislav Lhotka, Stephane Litkowski, Greg Hankins, Manish Gupta, 5905 Michael Darwish, and Alan Davey for their thorough reviews and 5906 helpful comments. 5908 Thanks to Tom Petch for last call review and improvement of the 5909 document organization. 5911 Thanks to Alvaro Retana for AD comments. 5913 Thanks to Benjamin Kaduk, Suresh Krishnan, and Roman Dannyliw for 5914 IESG review comments. 5916 This document was produced using Marshall Rose's xml2rfc tool. 5918 Author affiliation with The MITRE Corporation is provided for 5919 identification purposes only, and is not intended to convey or imply 5920 MITRE's concurrence with, or support for, the positions, opinions or 5921 viewpoints expressed. MITRE has approved this document for Public 5922 Release, Distribution Unlimited, with Public Release Case Number 5923 18-3194. 5925 7. References 5927 7.1. Normative References 5929 [I-D.ietf-bfd-yang] 5930 Rahman, R., Zheng, L., Jethanandani, M., Networks, J., and 5931 G. Mirsky, "YANG Data Model for Bidirectional Forwarding 5932 Detection (BFD)", draft-ietf-bfd-yang-17 (work in 5933 progress), August 2018. 5935 [RFC1765] Moy, J., "OSPF Database Overflow", RFC 1765, 5936 DOI 10.17487/RFC1765, March 1995, 5937 . 5939 [RFC1793] Moy, J., "Extending OSPF to Support Demand Circuits", 5940 RFC 1793, DOI 10.17487/RFC1793, April 1995, 5941 . 5943 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 5944 Requirement Levels", BCP 14, RFC 2119, 5945 DOI 10.17487/RFC2119, March 1997, 5946 . 5948 [RFC2328] Moy, J., "OSPF Version 2", STD 54, RFC 2328, 5949 DOI 10.17487/RFC2328, April 1998, 5950 . 5952 [RFC3101] Murphy, P., "The OSPF Not-So-Stubby Area (NSSA) Option", 5953 RFC 3101, DOI 10.17487/RFC3101, January 2003, 5954 . 5956 [RFC3623] Moy, J., Pillay-Esnault, P., and A. Lindem, "Graceful OSPF 5957 Restart", RFC 3623, DOI 10.17487/RFC3623, November 2003, 5958 . 5960 [RFC3630] Katz, D., Kompella, K., and D. Yeung, "Traffic Engineering 5961 (TE) Extensions to OSPF Version 2", RFC 3630, 5962 DOI 10.17487/RFC3630, September 2003, 5963 . 5965 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 5966 DOI 10.17487/RFC3688, January 2004, 5967 . 5969 [RFC4552] Gupta, M. and N. Melam, "Authentication/Confidentiality 5970 for OSPFv3", RFC 4552, DOI 10.17487/RFC4552, June 2006, 5971 . 5973 [RFC4576] Rosen, E., Psenak, P., and P. Pillay-Esnault, "Using a 5974 Link State Advertisement (LSA) Options Bit to Prevent 5975 Looping in BGP/MPLS IP Virtual Private Networks (VPNs)", 5976 RFC 4576, DOI 10.17487/RFC4576, June 2006, 5977 . 5979 [RFC4577] Rosen, E., Psenak, P., and P. Pillay-Esnault, "OSPF as the 5980 Provider/Customer Edge Protocol for BGP/MPLS IP Virtual 5981 Private Networks (VPNs)", RFC 4577, DOI 10.17487/RFC4577, 5982 June 2006, . 5984 [RFC4915] Psenak, P., Mirtorabi, S., Roy, A., Nguyen, L., and P. 5985 Pillay-Esnault, "Multi-Topology (MT) Routing in OSPF", 5986 RFC 4915, DOI 10.17487/RFC4915, June 2007, 5987 . 5989 [RFC4973] Srisuresh, P. and P. Joseph, "OSPF-xTE: Experimental 5990 Extension to OSPF for Traffic Engineering", RFC 4973, 5991 DOI 10.17487/RFC4973, July 2007, 5992 . 5994 [RFC5082] Gill, V., Heasley, J., Meyer, D., Savola, P., Ed., and C. 5995 Pignataro, "The Generalized TTL Security Mechanism 5996 (GTSM)", RFC 5082, DOI 10.17487/RFC5082, October 2007, 5997 . 5999 [RFC5185] Mirtorabi, S., Psenak, P., Lindem, A., Ed., and A. Oswal, 6000 "OSPF Multi-Area Adjacency", RFC 5185, 6001 DOI 10.17487/RFC5185, May 2008, 6002 . 6004 [RFC5187] Pillay-Esnault, P. and A. Lindem, "OSPFv3 Graceful 6005 Restart", RFC 5187, DOI 10.17487/RFC5187, June 2008, 6006 . 6008 [RFC5250] Berger, L., Bryskin, I., Zinin, A., and R. Coltun, "The 6009 OSPF Opaque LSA Option", RFC 5250, DOI 10.17487/RFC5250, 6010 July 2008, . 6012 [RFC5286] Atlas, A., Ed. and A. Zinin, Ed., "Basic Specification for 6013 IP Fast Reroute: Loop-Free Alternates", RFC 5286, 6014 DOI 10.17487/RFC5286, September 2008, 6015 . 6017 [RFC5309] Shen, N., Ed. and A. Zinin, Ed., "Point-to-Point Operation 6018 over LAN in Link State Routing Protocols", RFC 5309, 6019 DOI 10.17487/RFC5309, October 2008, 6020 . 6022 [RFC5329] Ishiguro, K., Manral, V., Davey, A., and A. Lindem, Ed., 6023 "Traffic Engineering Extensions to OSPF Version 3", 6024 RFC 5329, DOI 10.17487/RFC5329, September 2008, 6025 . 6027 [RFC5340] Coltun, R., Ferguson, D., Moy, J., and A. Lindem, "OSPF 6028 for IPv6", RFC 5340, DOI 10.17487/RFC5340, July 2008, 6029 . 6031 [RFC5613] Zinin, A., Roy, A., Nguyen, L., Friedman, B., and D. 6032 Yeung, "OSPF Link-Local Signaling", RFC 5613, 6033 DOI 10.17487/RFC5613, August 2009, 6034 . 6036 [RFC5642] Venkata, S., Harwani, S., Pignataro, C., and D. McPherson, 6037 "Dynamic Hostname Exchange Mechanism for OSPF", RFC 5642, 6038 DOI 10.17487/RFC5642, August 2009, 6039 . 6041 [RFC5709] Bhatia, M., Manral, V., Fanto, M., White, R., Barnes, M., 6042 Li, T., and R. Atkinson, "OSPFv2 HMAC-SHA Cryptographic 6043 Authentication", RFC 5709, DOI 10.17487/RFC5709, October 6044 2009, . 6046 [RFC5714] Shand, M. and S. Bryant, "IP Fast Reroute Framework", 6047 RFC 5714, DOI 10.17487/RFC5714, January 2010, 6048 . 6050 [RFC5838] Lindem, A., Ed., Mirtorabi, S., Roy, A., Barnes, M., and 6051 R. Aggarwal, "Support of Address Families in OSPFv3", 6052 RFC 5838, DOI 10.17487/RFC5838, April 2010, 6053 . 6055 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 6056 the Network Configuration Protocol (NETCONF)", RFC 6020, 6057 DOI 10.17487/RFC6020, October 2010, 6058 . 6060 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 6061 and A. Bierman, Ed., "Network Configuration Protocol 6062 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 6063 . 6065 [RFC6242] Wasserman, M., "Using the NETCONF Protocol over Secure 6066 Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011, 6067 . 6069 [RFC6565] Pillay-Esnault, P., Moyer, P., Doyle, J., Ertekin, E., and 6070 M. Lundberg, "OSPFv3 as a Provider Edge to Customer Edge 6071 (PE-CE) Routing Protocol", RFC 6565, DOI 10.17487/RFC6565, 6072 June 2012, . 6074 [RFC6845] Sheth, N., Wang, L., and J. Zhang, "OSPF Hybrid Broadcast 6075 and Point-to-Multipoint Interface Type", RFC 6845, 6076 DOI 10.17487/RFC6845, January 2013, 6077 . 6079 [RFC6860] Yang, Y., Retana, A., and A. Roy, "Hiding Transit-Only 6080 Networks in OSPF", RFC 6860, DOI 10.17487/RFC6860, January 6081 2013, . 6083 [RFC6987] Retana, A., Nguyen, L., Zinin, A., White, R., and D. 6084 McPherson, "OSPF Stub Router Advertisement", RFC 6987, 6085 DOI 10.17487/RFC6987, September 2013, 6086 . 6088 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 6089 RFC 6991, DOI 10.17487/RFC6991, July 2013, 6090 . 6092 [RFC7166] Bhatia, M., Manral, V., and A. Lindem, "Supporting 6093 Authentication Trailer for OSPFv3", RFC 7166, 6094 DOI 10.17487/RFC7166, March 2014, 6095 . 6097 [RFC7474] Bhatia, M., Hartman, S., Zhang, D., and A. Lindem, Ed., 6098 "Security Extension for OSPFv2 When Using Manual Key 6099 Management", RFC 7474, DOI 10.17487/RFC7474, April 2015, 6100 . 6102 [RFC7490] Bryant, S., Filsfils, C., Previdi, S., Shand, M., and N. 6103 So, "Remote Loop-Free Alternate (LFA) Fast Reroute (FRR)", 6104 RFC 7490, DOI 10.17487/RFC7490, April 2015, 6105 . 6107 [RFC7684] Psenak, P., Gredler, H., Shakir, R., Henderickx, W., 6108 Tantsura, J., and A. Lindem, "OSPFv2 Prefix/Link Attribute 6109 Advertisement", RFC 7684, DOI 10.17487/RFC7684, November 6110 2015, . 6112 [RFC7770] Lindem, A., Ed., Shen, N., Vasseur, JP., Aggarwal, R., and 6113 S. Shaffer, "Extensions to OSPF for Advertising Optional 6114 Router Capabilities", RFC 7770, DOI 10.17487/RFC7770, 6115 February 2016, . 6117 [RFC7777] Hegde, S., Shakir, R., Smirnov, A., Li, Z., and B. 6118 Decraene, "Advertising Node Administrative Tags in OSPF", 6119 RFC 7777, DOI 10.17487/RFC7777, March 2016, 6120 . 6122 [RFC7884] Pignataro, C., Bhatia, M., Aldrin, S., and T. Ranganath, 6123 "OSPF Extensions to Advertise Seamless Bidirectional 6124 Forwarding Detection (S-BFD) Target Discriminators", 6125 RFC 7884, DOI 10.17487/RFC7884, July 2016, 6126 . 6128 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 6129 RFC 7950, DOI 10.17487/RFC7950, August 2016, 6130 . 6132 [RFC8040] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF 6133 Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017, 6134 . 6136 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 6137 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 6138 May 2017, . 6140 [RFC8177] Lindem, A., Ed., Qu, Y., Yeung, D., Chen, I., and J. 6141 Zhang, "YANG Data Model for Key Chains", RFC 8177, 6142 DOI 10.17487/RFC8177, June 2017, 6143 . 6145 [RFC8294] Liu, X., Qu, Y., Lindem, A., Hopps, C., and L. Berger, 6146 "Common YANG Data Types for the Routing Area", RFC 8294, 6147 DOI 10.17487/RFC8294, December 2017, 6148 . 6150 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 6151 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 6152 . 6154 [RFC8341] Bierman, A. and M. Bjorklund, "Network Configuration 6155 Access Control Model", STD 91, RFC 8341, 6156 DOI 10.17487/RFC8341, March 2018, 6157 . 6159 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 6160 and R. Wilton, "Network Management Datastore Architecture 6161 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 6162 . 6164 [RFC8343] Bjorklund, M., "A YANG Data Model for Interface 6165 Management", RFC 8343, DOI 10.17487/RFC8343, March 2018, 6166 . 6168 [RFC8349] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for 6169 Routing Management (NMDA Version)", RFC 8349, 6170 DOI 10.17487/RFC8349, March 2018, 6171 . 6173 [RFC8405] Decraene, B., Litkowski, S., Gredler, H., Lindem, A., 6174 Francois, P., and C. Bowers, "Shortest Path First (SPF) 6175 Back-Off Delay Algorithm for Link-State IGPs", RFC 8405, 6176 DOI 10.17487/RFC8405, June 2018, 6177 . 6179 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 6180 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 6181 . 6183 [RFC8476] Tantsura, J., Chunduri, U., Aldrin, S., and P. Psenak, 6184 "Signaling Maximum SID Depth (MSD) Using OSPF", RFC 8476, 6185 DOI 10.17487/RFC8476, December 2018, 6186 . 6188 7.2. Informative References 6190 [RFC0905] "ISO Transport Protocol specification ISO DP 8073", 6191 RFC 905, DOI 10.17487/RFC0905, April 1984, 6192 . 6194 [RFC4750] Joyal, D., Ed., Galecki, P., Ed., Giacalone, S., Ed., 6195 Coltun, R., and F. Baker, "OSPF Version 2 Management 6196 Information Base", RFC 4750, DOI 10.17487/RFC4750, 6197 December 2006, . 6199 [RFC5443] Jork, M., Atlas, A., and L. Fang, "LDP IGP 6200 Synchronization", RFC 5443, DOI 10.17487/RFC5443, March 6201 2009, . 6203 [RFC5643] Joyal, D., Ed. and V. Manral, Ed., "Management Information 6204 Base for OSPFv3", RFC 5643, DOI 10.17487/RFC5643, August 6205 2009, . 6207 [RFC5649] Housley, R. and M. Dworkin, "Advanced Encryption Standard 6208 (AES) Key Wrap with Padding Algorithm", RFC 5649, 6209 DOI 10.17487/RFC5649, September 2009, 6210 . 6212 [RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 6213 (BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010, 6214 . 6216 [RFC5881] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 6217 (BFD) for IPv4 and IPv6 (Single Hop)", RFC 5881, 6218 DOI 10.17487/RFC5881, June 2010, 6219 . 6221 Appendix A. Contributors' Addresses 6223 Dean Bogdanovic 6224 Volta Networks, Inc. 6226 EMail: dean@voltanet.io 6228 Kiran Koushik Agrahara Sreenivasa 6229 Verizon 6230 500 W Dove Rd 6231 Southlake, TX 76092 6232 USA 6234 EMail: kk@employees.org 6236 Authors' Addresses 6238 Derek Yeung 6239 Arrcus 6241 EMail: derek@arrcus.com 6243 Yingzhen Qu 6244 Futurewei 6245 2330 Central Expressway 6246 Santa Clara, CA 95050 6247 USA 6249 EMail: yingzhen.qu@futurewei.com 6251 Jeffrey Zhang 6252 Juniper Networks 6253 10 Technology Park Drive 6254 Westford, MA 01886 6255 USA 6257 EMail: zzhang@juniper.net 6259 Ing-Wher Chen 6260 The MITRE Corporation 6262 EMail: ingwherchen@mitre.org 6263 Acee Lindem 6264 Cisco Systems 6265 301 Midenhall Way 6266 Cary, NC 27513 6268 EMail: acee@cisco.com