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