idnits 2.17.1 draft-ietf-ospf-yang-04.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 448 has weird spacing: '...area-id are...' == Line 503 has weird spacing: '...rw name lea...' == Line 670 has weird spacing: '...r-bound uin...' == Line 671 has weird spacing: '...r-bound uin...' == Line 678 has weird spacing: '...roup-id uin...' == (3 more instances...) -- The document date (March 21, 2016) is 2958 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 7223 (Obsoleted by RFC 8343) == Outdated reference: A later version (-17) exists of draft-ietf-bfd-yang-00 == Outdated reference: A later version (-25) exists of draft-ietf-netmod-routing-cfg-20 == Outdated reference: A later version (-30) exists of draft-ietf-spring-sr-yang-00 Summary: 2 errors (**), 0 flaws (~~), 10 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet D. Yeung 3 Internet-Draft Y. Qu 4 Intended status: Informational Cisco Systems 5 Expires: September 22, 2016 J. Zhang 6 Juniper Networks 7 D. Bogdanovic 9 K. Sreenivasa 10 Cisco Systems 11 March 21, 2016 13 Yang Data Model for OSPF Protocol 14 draft-ietf-ospf-yang-04 16 Abstract 18 This document defines a YANG data model that can be used to configure 19 and manage OSPF. 21 Status of This Memo 23 This Internet-Draft is submitted in full conformance with the 24 provisions of BCP 78 and BCP 79. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF). Note that other groups may also distribute 28 working documents as Internet-Drafts. The list of current Internet- 29 Drafts is at http://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 This Internet-Draft will expire on September 22, 2016. 38 Copyright Notice 40 Copyright (c) 2016 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents 45 (http://trustee.ietf.org/license-info) in effect on the date of 46 publication of this document. Please review these documents 47 carefully, as they describe your rights and restrictions with respect 48 to this document. Code Components extracted from this document must 49 include Simplified BSD License text as described in Section 4.e of 50 the Trust Legal Provisions and are provided without warranty as 51 described in the Simplified BSD License. 53 Table of Contents 55 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 2 56 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 57 2. Design of Data Model . . . . . . . . . . . . . . . . . . . . 3 58 2.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 3 59 2.2. OSPFv2 and OSPFv3 . . . . . . . . . . . . . . . . . . . . 5 60 2.3. Optional Features . . . . . . . . . . . . . . . . . . . . 5 61 2.4. Inheritance . . . . . . . . . . . . . . . . . . . . . . . 5 62 2.5. OSPF Router Configuration . . . . . . . . . . . . . . . . 6 63 2.6. OSPF Instance Configuration . . . . . . . . . . . . . . . 6 64 2.7. OSPF Area Configuration . . . . . . . . . . . . . . . . . 7 65 2.8. OSPF Interface Configuration . . . . . . . . . . . . . . 10 66 2.9. OSPF notification . . . . . . . . . . . . . . . . . . . . 11 67 3. OSPF Segment Routing . . . . . . . . . . . . . . . . . . . . 14 68 4. OSPF BFD Yang Module . . . . . . . . . . . . . . . . . . . . 21 69 5. OSPF Yang Module . . . . . . . . . . . . . . . . . . . . . . 22 70 6. OSPF Segment Routing Yang Module . . . . . . . . . . . . . . 93 71 7. OSPF BFD Yang Module . . . . . . . . . . . . . . . . . . . . 107 72 8. Security Considerations . . . . . . . . . . . . . . . . . . . 110 73 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 110 74 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 111 75 10.1. Normative References . . . . . . . . . . . . . . . . . . 111 76 10.2. Informative References . . . . . . . . . . . . . . . . . 112 77 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 113 79 1. Overview 81 YANG [RFC6020] is a data definition language used to define the 82 contents of a conceptual data store that allows networked devices to 83 be managed using NETCONF [RFC6241]. YANG is proving relevant beyond 84 its initial confines, as bindings to other interfaces (e.g., ReST) 85 and encodings other than XML (e.g., JSON) are being defined. 86 Furthermore, YANG data models can be used as the basis for 87 implementation of other interfaces, such as CLI and programmatic 88 APIs. 90 This document defines a YANG data model that can be used to configure 91 and manage OSPF and it is an augmentation to the core routing data 92 model. A core routing data model is defined in 93 [I-D.ietf-netmod-routing-cfg], and it provides the basis for the 94 development of data models for routing protocols. The interface data 95 model is defined in [RFC7223] and is used for referencing interfaces 96 from the routing protocol. The key-chain data model used for OSPF 97 authentication is defined in [I-D.acee-rtg-yang-key-chain] and 98 provides both a reference to configured key-chains and an enumeration 99 of cryptographic algorithms. 101 Both OSPFv2 [RFC2328] and OSPFv3 [RFC5340] are supported. In 102 addition to the core OSPF protocol, features described in other OSPF 103 RFCs are also supported. They includes demand circuit [RFC1793], 104 traffic engineering [RFC3630], multiple address family [RFC5838], 105 graceful restart [RFC3623] [RFC5187], NSSA [RFC3101], and sham link 106 [RFC4577]. These non-core features are made optional in the OSPF 107 data model. 109 1.1. Requirements Language 111 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 112 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 113 document are to be interpreted as described in [RFC2119]. 115 2. Design of Data Model 117 Although the basis of OSPF configuration elements like routers, 118 areas, and interfaces remains the same, the detailed configuration 119 model varies among router vendors. Differences are observed in terms 120 of how the protocol engine is tied to routing domain, how multiple 121 protocol engines are be instantiated, and configuration inheritance, 122 among others. 124 The goal of this document is to define a data model that provides a 125 common user interface to the OSPFv2 and OSPFv3 protocol. There is 126 very little information that is designated as "mandatory", providing 127 freedom for vendors to adapt this data model to their respective 128 product implementations. 130 2.1. Overview 132 The OSPF YANG module defined in this document has all the common 133 building blocks for the OSPF protocol. 135 The OSPF YANG module augments the routing/routing-instance/routing- 136 protocols/routing-protocol path defined in the ietf-routing module. 138 module: ospf 139 +--rw routing 140 +--rw routing-protocols 141 +--rw routing-protocol [name] 142 +--rw ospf 143 . 144 . 145 +--rw all-instances-inherit {instance-inheritance}? 146 | . 147 | . 148 +--rw instance* [routing-instance af] 149 . 150 . 151 +--rw areas 152 | +--rw area* [area-id] 153 | . 154 | . 155 | +--rw all-interfaces-inherit {interface-inheritance}? 156 | . 157 | . 158 | +--rw virtual-links 159 | | +--rw virtual-link* [router-id] 160 | | . 161 | | . 162 | +--rw sham-links 163 | | +--rw sham-link* [local-id remote-id] 164 | | . 165 | | . 166 | +--rw interfaces 167 | | +--rw interface* [interface] 168 | | . 169 | | . 170 | . 171 | . 172 +--rw topologies 173 +--rw topology* [name] 175 The ospf module is intended to match to the vendor specific OSPF 176 configuration construct that is identified by a 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 186 ["default" "ipv4-unicast"] is required. The instance also contains 187 OSPF router level configuration 189 The instance/area and instance/area/interface containers respectively 190 define the OSPF configuration for OSPF areas and interfaces. 192 The instance/topology container defines the OSPF configuration for 193 OSPF topologies when the multi-topology feature is supported. 195 2.2. OSPFv2 and OSPFv3 197 The data model defined herein supports both OSPFv2 and OSPFv3. 199 The field 'version' is used to indicate the OSPF version and is 200 mandatory. Based on the configured version, the data model varies to 201 accommodate the differences between OSPFv2 and OSPFv3. 203 2.3. Optional Features 205 Optional features are beyond the basic OSPF configuration and it is 206 the responsibility of each vendor to decide whether to support a 207 given feature on a particular device. 209 This model defines a number of features, such as NSR, max-LSA, etc. 210 It is expected that vendors will support additional features through 211 vendor specific augmentations. 213 2.4. Inheritance 215 This data model supports configuration inheritance at different 216 levels including instance-level, area-level, and interface-level 217 inheritance. 219 The all-instances-inherit, all-areas-inherit, and all-interfaces- 220 inherit containers are defined to provide a consistent way to 221 configure inheritable configuration parameters. For example, 222 parameters defined in the all-instances-inherit container apply to 223 all OSPF instances. However, a particular instance configuration can 224 override this inheritance. 226 Inheritance is defined as an optional feature, and vendors are 227 permitted to augment the inheritance containers with their own vendor 228 specific parameters. 230 2.5. OSPF Router Configuration 232 The ospf container is the top level container in this data model. It 233 contains shared information among the OSPF instances configured 234 within the container. 236 module: ospf 237 +--rw ospf 238 +--rw all-instances-inherit {instance-inheritance}? 239 | +--rw area 240 | +--rw interface 241 +--rw operation-mode? identityref 242 +--rw instance* [af] 243 . 244 . 246 2.6. OSPF Instance Configuration 248 The instance container represents an OSPF protocol engine and 249 contains the router level configuration. The routing domain for each 250 instance is dictated through the specification of [routing-instance 251 af]. 253 The all-areas-inherit container contains area configuration that may 254 be inherited by configured OSPF areas. 256 module: ospf 257 +--rw ospf 258 . 259 . 260 +--rw instance* [af] 261 +--rw af identityref 262 +--rw all-areas-inherit {area-inheritance}? 263 | +--rw area 264 | +--rw interface 265 +--rw explicit-router-id? yang:dotted-quad {explicit-router-id}? 266 +--rw admin-distance 267 | +--rw (scope)? 268 | +--:(single-value) 269 | | +--rw all? uint8 270 | +--:(multi-values) 271 | +--rw (granularity)? 272 | | +--:(detail) 273 | | | +--rw intra-area? uint8 274 | | | +--rw inter-area? uint8 275 | | +--:(coarse) 276 | | +--rw internal? uint8 277 | +--rw external? uint8 278 +--rw nsr {nsr}? 279 | +--rw enable? boolean 280 +--rw graceful-restart {graceful-restart}? 281 | +--rw enable? boolean 282 | +--rw helper-enable? boolean 283 | +--rw restart-interval? uint16 284 | +--rw helper-strict-lsa-checking? boolean 285 +--rw enable? boolean {admin-control}? 286 +--rw auto-cost {auto-cost}? 287 | +--rw enable? boolean 288 | +--rw reference-bandwidth? uint32 289 +--rw spf-control 290 | +--rw paths? uint16 {max-ecmp}? 291 +--rw database-control 292 | +--rw max-lsa? uint32 {max-lsa}? 293 +--rw stub-router {stub-router}? 294 | +--rw (trigger)? 295 | +--:(always) 296 | +--rw always! 297 +--rw mpls 298 | +--rw te-rid {te-rid}? 299 | | +--rw (source)? 300 | | +--:(interface) 301 | | | +--rw interface? if:interface-ref 302 | | +--:(explicit) 303 | | +--rw router-id? inet:ipv4-address 304 | +--rw ldp 305 | +--rw igp-sync? boolean {ldp-igp-sync}? 306 | +--rw autoconfig? boolean {ldp-igp-autoconfig}? 307 +--rw fast-reroute {fast-reroute}? 308 | +--rw lfa {lfa}? 310 2.7. OSPF Area Configuration 312 The area container contains OSPF area configuration and the list of 313 interface containers representing all the OSPF interfaces in the 314 area. 316 The all-interfaces-inherit contains interface configuration that may 317 be inherited by all OSPF area interfaces. 319 module: ospf 320 +--rw ospf 321 . 322 . 323 +--rw instance* [routing-instance af] 324 . 325 . 327 +--rw areas 328 | +--rw area* [area-id] 329 | +--rw area-id area-id-type 330 | +--rw all-interfaces-inherit {interface-inheritance}? 331 | | +--rw interface 332 | +--rw area-type? identityref 333 | +--rw summary? boolean 334 | +--rw default-cost? uint32 335 | +--rw ranges 336 | | +--rw range* [prefix] 337 | | +--rw prefix inet:ip-prefix 338 | | +--rw advertise? boolean 339 | | +--rw cost? uint24 340 | +--rw virtual-links 341 | | +--rw virtual-link* [router-id] 342 | | +--rw router-id yang:dotted-quad 343 | | +--rw cost? uint16 344 | | +--rw hello-interval? uint16 345 | | +--rw dead-interval? uint16 346 | | +--rw retransmit-interval? uint16 347 | | +--rw transmit-delay? uint16 348 | | +--rw mtu-ignore? boolean {mtu-ignore}? 349 | | +--rw lls? boolean {lls}? 350 | | +--rw prefix-suppression? boolean {prefix-suppression}? 351 | | +--rw ttl-security {ttl-security}? 352 | | | +--rw enable? boolean 353 | | | +--rw hops? uint8 354 | | +--rw enable? boolean {admin-control}? 355 | | +--rw authentication 356 | | +--rw (auth-type-selection)? 357 | | +--:(auth-ipsec) {ospfv3-authentication-ipsec}? 358 | | | +--rw sa? string 359 | | +--:(auth-trailer-key-chain) 360 | | | +--rw key-chain? key-chain:key-chain-ref 361 | | +--:(auth-trailer-key) 362 | | +--rw key? string 363 | | +--rw crypto-algorithm 364 | | +--rw (algorithm)? 365 | | +--:(hmac-sha-1-12) {crypto-hmac-sha-1-12}? 366 | | | +--rw hmac-sha1-12? empty 367 | | +--:(md5) 368 | | | +--rw md5? empty 369 | | +--:(sha-1) 370 | | | +--rw sha-1? empty 371 | | +--:(hmac-sha-1) 372 | | | +--rw hmac-sha-1? empty 373 | | +--:(hmac-sha-256) 374 | | | +--rw hmac-sha-256? empty 375 | | +--:(hmac-sha-384) 376 | | | +--rw hmac-sha-384? empty 377 | | +--:(hmac-sha-512) 378 | | | +--rw hmac-sha-512? empty 379 | | +--:(clear-text) {clear-text}? 380 | | +--rw clear-text? empty 381 | +--rw sham-link 382 | | +--rw sham-link* [local-id remote-id] 383 | | +--rw local-id inet:ip-address 384 | | +--rw remote-id inet:ip-address 385 | | +--rw cost? uint16 386 | | +--rw hello-interval? uint16 387 | | +--rw dead-interval? uint16 388 | | +--rw retransmit-interval? uint16 389 | | +--rw transmit-delay? uint16 390 | | +--rw mtu-ignore? boolean {mtu-ignore}? 391 | | +--rw lls? boolean {lls}? 392 | | +--rw prefix-suppression? boolean {prefix-suppression}? 393 | | +--rw bfd? boolean {bfd}? 394 | | +--rw ttl-security {ttl-security}? 395 | | | +--rw enable? boolean 396 | | | +--rw hops? uint8 397 | | +--rw enable? boolean {admin-control}? 398 | | +--rw authentication 399 | | +--rw (auth-type-selection)? 400 | | +--:(auth-ipsec) {ospfv3-authentication-ipsec}? 401 | | | +--rw sa? string 402 | | +--:(auth-trailer-key-chain) 403 | | | +--rw key-chain? key-chain:key-chain-ref 404 | | +--:(auth-trailer-key) 405 | | +--rw key? string 406 | | +--rw crypto-algorithm 407 | | +--rw (algorithm)? 408 | | +--:(hmac-sha-1-12) {crypto-hmac-sha-1-12}? 409 | | | +--rw hmac-sha1-12? empty 410 | | +--:(md5) 411 | | | +--rw md5? empty 412 | | +--:(sha-1) 413 | | | +--rw sha-1? empty 414 | | +--:(hmac-sha-1) 415 | | | +--rw hmac-sha-1? empty 416 | | +--:(hmac-sha-256) 417 | | | +--rw hmac-sha-256? empty 418 | | +--:(hmac-sha-384) 419 | | | +--rw hmac-sha-384? empty 420 | | +--:(hmac-sha-512) 421 | | | +--rw hmac-sha-512? empty 422 | | +--:(clear-text) {clear-text}? 423 | | +--rw clear-text? empty 425 2.8. OSPF Interface Configuration 427 The interface container contains OSPF interface configuration. 429 module: ospf 430 +--rw ospf 431 . 432 . 433 +--rw instance* [routing-instance af] 434 . 435 . 436 +--rw areas 437 | +--rw area* [area-id] 438 . 439 . 440 | +--rw interfaces 441 | +--rw interface* [interface] 442 | +--rw interface if:interface-ref 443 | +--rw network-type? enumeration 444 | +--rw passive? boolean 445 | +--rw demand-circuit? boolean {demand-circuit}? 446 | +--rw multi-areas 447 | | +--rw multi-area* [multi-area-id] {multi-area-adj}? 448 | | +--rw multi-area-id area-id-type 449 | | +--rw cost? uint16 450 | +--rw static-neighbors 451 | | +--rw neighbor* [address] 452 | | +--rw address inet:ip-address 453 | | +--rw cost? uint16 454 | | +--rw poll-interval? uint16 455 | | +--rw priority? uint8 456 | +--rw node-flag? boolean {node-flag}? 457 | +--rw fast-reroute {fast-reroute}? 458 | | +--rw lfa {lfa}? 459 | | +--rw candidate-disabled? boolean 460 | | +--rw enabled? boolean 461 | | +--rw remote-lfa {remote-lfa}? 462 | | +--rw enabled? boolean 463 | +--rw cost? uint16 464 | +--rw hello-interval? uint16 465 | +--rw dead-interval? uint16 466 | +--rw retransmit-interval? uint16 467 | +--rw transmit-delay? uint16 468 | +--rw mtu-ignore? boolean {mtu-ignore}? 469 | +--rw lls? boolean {lls}? 470 | +--rw prefix-suppression? boolean {prefix-suppression}? 471 | +--rw ttl-security {ttl-security}? 472 | | +--rw enable? boolean 473 | | +--rw hops? uint8 474 | +--rw enable? boolean {admin-control}? 475 | +--rw authentication 476 | | +--rw (auth-type-selection)? 477 | | +--:(auth-ipsec) {ospfv3-authentication-ipsec}? 478 | | | +--rw sa? string 479 | | +--:(auth-trailer-key-chain) 480 | | | +--rw key-chain? key-chain:key-chain-ref 481 | | +--:(auth-trailer-key) 482 | | +--rw key? string 483 | | +--rw crypto-algorithm 484 | | +--rw (algorithm)? 485 | | +--:(hmac-sha-1-12) {crypto-hmac-sha-1-12}? 486 | | | +--rw hmac-sha1-12? empty 487 | | +--:(md5) 488 | | | +--rw md5? empty 489 | | +--:(sha-1) 490 | | | +--rw sha-1? empty 491 | | +--:(hmac-sha-1) 492 | | | +--rw hmac-sha-1? empty 493 | | +--:(hmac-sha-256) 494 | | | +--rw hmac-sha-256? empty 495 | | +--:(hmac-sha-384) 496 | | | +--rw hmac-sha-384? empty 497 | | +--:(hmac-sha-512) 498 | | | +--rw hmac-sha-512? empty 499 | | +--:(clear-text) {clear-text}? 500 | | +--rw clear-text? empty 501 | +--rw topologies 502 | | +--rw topology* [name] 503 | | +--rw name leafref 504 | | +--rw cost? uint32 505 | +--rw instance-id? uint8 507 2.9. OSPF notification 509 This YANG model defines a list of notifications that inform YANG 510 clients of important events detected during protocol operation. The 511 defined notifications cover the common set of traps from the OSPFv2 512 MIB [RFC4750] and OSPFv3 MIB [RFC5643]. 514 module: ospf 515 notifications: 516 +---n if-state-change 517 | +--ro routing-instance? string 518 | +--ro routing-protocol-type? -> ... 520 | +--ro routing-protocol-name? -> ... 521 | +--ro af? -> ... 522 | +--ro (if-link-type-selection)? 523 | | +--:(interface) 524 | | | +--ro interface 525 | | | +--ro interface? if:interface-ref 526 | | +--:(virtual-link) 527 | | | +--ro virtual-link 528 | | | +--ro area-id? area-id-type 529 | | | +--ro neighbor-router-id? yang:dotted-quad 530 | | +--:(sham-link) 531 | | +--ro sham-link 532 | | +--ro area-id? area-id-type 533 | | +--ro local-ip-addr? inet:ip-address 534 | | +--ro remote-ip-addr? inet:ip-address 535 | +--ro state? if-state-type 536 +---n if-config-error 537 | +--ro routing-instance? string 538 | +--ro routing-protocol-type? -> ... 539 | +--ro routing-protocol-name? -> ... 540 | +--ro af? -> ... 541 | +--ro (if-link-type-selection)? 542 | | +--:(interface) 543 | | | +--ro interface 544 | | | +--ro interface? if:interface-ref 545 | | +--:(virtual-link) 546 | | | +--ro virtual-link 547 | | | +--ro area-id? area-id-type 548 | | | +--ro neighbor-router-id? yang:dotted-quad 549 | | +--:(sham-link) 550 | | +--ro sham-link 551 | | +--ro area-id? area-id-type 552 | | +--ro local-ip-addr? inet:ip-address 553 | | +--ro remote-ip-addr? inet:ip-address 554 | +--ro packet-source? yang:dotted-quad 555 | +--ro packet-type? packet-type 556 | +--ro error? enumeration 557 +---n nbr-state-change 558 | +--ro routing-instance? string 559 | +--ro routing-protocol-type? -> ... 560 | +--ro routing-protocol-name? -> ... 561 | +--ro af? -> ... 562 | +--ro (if-link-type-selection)? 563 | | +--:(interface) 564 | | | +--ro interface 565 | | | +--ro interface? if:interface-ref 566 | | +--:(virtual-link) 567 | | | +--ro virtual-link 568 | | | +--ro area-id? area-id-type 569 | | | +--ro neighbor-router-id? yang:dotted-quad 570 | | +--:(sham-link) 571 | | +--ro sham-link 572 | | +--ro area-id? area-id-type 573 | | +--ro local-ip-addr? inet:ip-address 574 | | +--ro remote-ip-addr? inet:ip-address 575 | +--ro neighbor-router-id? yang:dotted-quad 576 | +--ro neighbor-ip-addr? yang:dotted-quad 577 | +--ro state? nbr-state-type 578 +---n nbr-restart-helper-status-change 579 | +--ro routing-instance? string 580 | +--ro routing-protocol-type? -> ... 581 | +--ro routing-protocol-name? -> ... 582 | +--ro af? -> ... 583 | +--ro (if-link-type-selection)? 584 | | +--:(interface) 585 | | | +--ro interface 586 | | | +--ro interface? if:interface-ref 587 | | +--:(virtual-link) 588 | | | +--ro virtual-link 589 | | | +--ro area-id? area-id-type 590 | | | +--ro neighbor-router-id? yang:dotted-quad 591 | | +--:(sham-link) 592 | | +--ro sham-link 593 | | +--ro area-id? area-id-type 594 | | +--ro local-ip-addr? inet:ip-address 595 | | +--ro remote-ip-addr? inet:ip-address 596 | +--ro neighbor-router-id? yang:dotted-quad 597 | +--ro neighbor-ip-addr? yang:dotted-quad 598 | +--ro status? restart-helper-status-type 599 | +--ro age? uint32 600 | +--ro exit-reason? restart-exit-reason-type 601 +---n rx-bad-packet 602 | +--ro routing-instance? string 603 | +--ro routing-protocol-type? -> ... 604 | +--ro routing-protocol-name? -> ... 605 | +--ro af? -> ... 606 | +--ro (if-link-type-selection)? 607 | | +--:(interface) 608 | | | +--ro interface 609 | | | +--ro interface? if:interface-ref 610 | | +--:(virtual-link) 611 | | | +--ro virtual-link 612 | | | +--ro area-id? area-id-type 613 | | | +--ro neighbor-router-id? yang:dotted-quad 614 | | +--:(sham-link) 615 | | +--ro sham-link 616 | | +--ro area-id? area-id-type 617 | | +--ro local-ip-addr? inet:ip-address 618 | | +--ro remote-ip-addr? inet:ip-address 619 | +--ro packet-source? yang:dotted-quad 620 | +--ro packet-type? packet-type 621 +---n lsdb-approaching-overflow 622 | +--ro routing-instance? string 623 | +--ro routing-protocol-type? -> ... 624 | +--ro routing-protocol-name? -> ... 625 | +--ro af? -> ... 626 | +--ro ext-lsdb-limit? uint32 627 +---n lsdb-overflow 628 | +--ro routing-instance? string 629 | +--ro routing-protocol-type? -> ... 630 | +--ro routing-protocol-name? -> ... 631 | +--ro af? -> ... 632 | +--ro ext-lsdb-limit? uint32 633 +---n nssa-translator-status-change 634 | +--ro routing-instance? string 635 | +--ro routing-protocol-type? -> ... 636 | +--ro routing-protocol-name? -> ... 637 | +--ro af? -> ... 638 | +--ro area-id? area-id-type 639 | +--ro status? nssa-translator-state-type 640 +---n restart-status-change 641 +--ro routing-instance? string 642 +--ro routing-protocol-type? -> ... 643 +--ro routing-protocol-name? -> ... 644 +--ro af? -> ... 645 +--ro status? restart-status-type 646 +--ro restart-interval? uint16 647 +--ro exit-reason? restart-exit-reason-type 649 3. OSPF Segment Routing 651 In addition to the OSPF base YANG model, this document also defines a 652 model for the OSPF segment routing feature. 654 The OSPF SR YANG module requires support for the base segment routing 655 module [I-D.ietf-spring-sr-yang], which defines the global segment 656 routing configuration independent of any specific routing protocol 657 configuration. 659 module: ietf-ospf-sr 660 augment /rt:routing/rt:routing-protocols 661 /rt:routing-protocol/ospf:ospf/ospf:instance: 662 +--rw segment-routing 663 | +--rw enabled? boolean 664 | +--rw bindings 665 | +--rw advertise 666 | | +--rw policies* string 667 | +--rw receive? boolean 668 +--rw protocol-srgb {sr:protocol-srgb}? 669 +--rw srgb* [lower-bound upper-bound] 670 +--rw lower-bound uint32 671 +--rw upper-bound uint32 672 augment /rt:routing/rt:routing-protocols 673 /rt:routing-protocol/ospf:ospf/ospf:instance 674 /ospf:areas/ospf:area/ospf:interfaces/ospf:interface: 675 +--rw segment-routing 676 +--rw adjacency-sid 677 +--rw advertise-adj-group-sid* [group-id] 678 | +--rw group-id uint32 679 +--rw advertise-protection? enumeration 680 augment /rt:routing/rt:routing-protocols 681 /rt:routing-protocol/ospf:ospf/ospf:instance/ospf:areas 682 /ospf:area/ospf:interfaces/ospf:interface/ospf:fast-reroute: 683 +--rw ti-lfa {ti-lfa}? 684 +--rw enable? boolean 685 augment /rt:routing-state/rt:routing-protocols 686 /rt:routing-protocol/ospf:ospf/ospf:instance: 687 +--ro segment-routing 688 | +--ro enabled? boolean 689 | +--ro bindings 690 | +--ro advertise 691 | | +--ro policies* string 692 | +--ro receive? boolean 693 +--ro protocol-srgb {sr:protocol-srgb}? 694 +--ro srgb* [lower-bound upper-bound] 695 +--ro lower-bound uint32 696 +--ro upper-bound uint32 697 augment /rt:routing-state/rt:routing-protocols 698 /rt:routing-protocol/ospf:ospf/ospf:instance 699 /ospf:areas/ospf:area/ospf:interfaces/ospf:interface: 700 +--ro segment-routing 701 +--ro adjacency-sid 702 +--ro advertise-adj-group-sid* [group-id] 703 | +--ro group-id uint32 704 +--ro advertise-protection? enumeration 705 augment /rt:routing-state/rt:routing-protocols 706 /rt:routing-protocol/ospf:ospf/ospf:instance/ospf:areas 707 /ospf:area/ospf:interfaces/ospf:interface/ospf:database 708 /ospf:link-scope-lsa-type/ospf:link-scope-lsas 709 /ospf:link-scope-lsa/ospf:version/ospf:ospfv2 710 /ospf:ospfv2/ospf:body/ospf:opaque 711 /ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv: 713 +--ro perfix-sid-sub-tlvs 714 | +--ro prefix-sid-sub-tlv* 715 | +--ro flags? bits 716 | +--ro mt-id? uint8 717 | +--ro algorithm? uint8 718 | +--ro sid? uint32 719 +--ro sid-binding-sub-tlvs 720 +--ro sid-binding-sub-tlv* 721 +--ro flags? bits 722 +--ro mt-id? uint8 723 +--ro weight? uint8 724 +--ro sid-sub-tlv 725 | +--ro sid? uint32 726 +--ro ero-metric-sub-tlv 727 | +--ro metric? uint32 728 +--ro ipv4-ero-sub-tlv 729 | +--ro flags? bits 730 | +--ro ipv4-address? inet:ipv4-address 731 +--ro unnumbered-ero-sub-tlv 732 | +--ro flags? bits 733 | +--ro router-id? yang:dotted-quad 734 | +--ro interface-id? uint32 735 +--ro ipv4-backup-ero-sub-tlv 736 | +--ro flags? bits 737 | +--ro ipv4-address? inet:ipv4-address 738 +--ro unnumbered-backup-ero-sub-tlv 739 +--ro flags? bits 740 +--ro router-id? yang:dotted-quad 741 +--ro interface-id? uint32 742 augment /rt:routing-state/rt:routing-protocols 743 /rt:routing-protocol/ospf:ospf/ospf:instance 744 /ospf:areas/ospf:area/ospf:database 745 /ospf:area-scope-lsa-type/ospf:area-scope-lsas 746 /ospf:area-scope-lsa/ospf:version/ospf:ospfv2 747 /ospf:ospfv2/ospf:body/ospf:opaque 748 /ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv: 749 +--ro perfix-sid-sub-tlvs 750 | +--ro prefix-sid-sub-tlv* 751 | +--ro flags? bits 752 | +--ro mt-id? uint8 753 | +--ro algorithm? uint8 754 | +--ro sid? uint32 755 +--ro sid-binding-sub-tlvs 756 +--ro sid-binding-sub-tlv* 757 +--ro flags? bits 758 +--ro mt-id? uint8 759 +--ro weight? uint8 760 +--ro sid-sub-tlv 761 | +--ro sid? uint32 762 +--ro ero-metric-sub-tlv 763 | +--ro metric? uint32 764 +--ro ipv4-ero-sub-tlv 765 | +--ro flags? bits 766 | +--ro ipv4-address? inet:ipv4-address 767 +--ro unnumbered-ero-sub-tlv 768 | +--ro flags? bits 769 | +--ro router-id? yang:dotted-quad 770 | +--ro interface-id? uint32 771 +--ro ipv4-backup-ero-sub-tlv 772 | +--ro flags? bits 773 | +--ro ipv4-address? inet:ipv4-address 774 +--ro unnumbered-backup-ero-sub-tlv 775 +--ro flags? bits 776 +--ro router-id? yang:dotted-quad 777 +--ro interface-id? uint32 778 augment /rt:routing-state/rt:routing-protocols 779 /rt:routing-protocol/ospf:ospf/ospf:instance 780 /ospf:database/ospf:as-scope-lsa-type/ospf:as-scope-lsas 781 /ospf:as-scope-lsa/ospf:version/ospf:ospfv2 782 /ospf:ospfv2/ospf:body/ospf:opaque 783 /ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv: 784 +--ro perfix-sid-sub-tlvs 785 | +--ro prefix-sid-sub-tlv* 786 | +--ro flags? bits 787 | +--ro mt-id? uint8 788 | +--ro algorithm? uint8 789 | +--ro sid? uint32 790 +--ro sid-binding-sub-tlvs 791 +--ro sid-binding-sub-tlv* 792 +--ro flags? bits 793 +--ro mt-id? uint8 794 +--ro weight? uint8 795 +--ro sid-sub-tlv 796 | +--ro sid? uint32 797 +--ro ero-metric-sub-tlv 798 | +--ro metric? uint32 799 +--ro ipv4-ero-sub-tlv 800 | +--ro flags? bits 801 | +--ro ipv4-address? inet:ipv4-address 802 +--ro unnumbered-ero-sub-tlv 803 | +--ro flags? bits 804 | +--ro router-id? yang:dotted-quad 805 | +--ro interface-id? uint32 806 +--ro ipv4-backup-ero-sub-tlv 807 | +--ro flags? bits 808 | +--ro ipv4-address? inet:ipv4-address 809 +--ro unnumbered-backup-ero-sub-tlv 810 +--ro flags? bits 811 +--ro router-id? yang:dotted-quad 812 +--ro interface-id? uint32 813 augment /rt:routing-state/rt:routing-protocols 814 /rt:routing-protocol/ospf:ospf/ospf:instance 815 /ospf:areas/ospf:area/ospf:database 816 /ospf:area-scope-lsa-type/ospf:area-scope-lsas 817 /ospf:area-scope-lsa/ospf:version/ospf:ospfv2 818 /ospf:ospfv2/ospf:body/ospf:opaque 819 /ospf:extended-link-tlvs/ospf:extended-link-tlv: 820 +--ro adj-sid-sub-tlvs 821 | +--ro adj-sid-sub-tlv* 822 | +--ro flags? bits 823 | +--ro mt-id? uint8 824 | +--ro weight? uint8 825 | +--ro sid? uint32 826 +--ro lan-adj-sid-sub-tlvs 827 +--ro lan-adj-sid-sub-tlv* 828 +--ro flags? bits 829 +--ro mt-id? uint8 830 +--ro weight? uint8 831 +--ro neighbor-router-id? yang:dotted-quad 832 +--ro sid? uint32 833 augment /rt:routing-state/rt:routing-protocols 834 /rt:routing-protocol/ospf:ospf/ospf:instance/ospf:areas 835 /ospf:area/ospf:interfaces/ospf:interface 836 /ospf:database/ospf:link-scope-lsa-type/ospf:link-scope-lsas 837 /ospf:link-scope-lsa/ospf:version/ospf:ospfv2 838 /ospf:ospfv2/ospf:body/ospf:opaque: 839 +--ro extended-prefix-range-tlvs 840 | +--ro extended-prefix-range-tlv* 841 | +--ro range-size? uint16 842 | +--ro flags? bits 843 | +--ro prefix? inet:ip-prefix 844 | +--ro perfix-sid-sub-tlvs 845 | | +--ro prefix-sid-sub-tlv* 846 | | +--ro flags? bits 847 | | +--ro mt-id? uint8 848 | | +--ro algorithm? uint8 849 | | +--ro sid? uint32 850 | +--ro sid-binding-sub-tlvs 851 | | +--ro sid-binding-sub-tlv* 852 | | +--ro flags? bits 853 | | +--ro mt-id? uint8 854 | | +--ro weight? uint8 855 | | +--ro sid-sub-tlv 856 | | | +--ro sid? uint32 857 | | +--ro ero-metric-sub-tlv 858 | | | +--ro metric? uint32 859 | | +--ro ipv4-ero-sub-tlv 860 | | | +--ro flags? bits 861 | | | +--ro ipv4-address? inet:ipv4-address 862 | | +--ro unnumbered-ero-sub-tlv 863 | | | +--ro flags? bits 864 | | | +--ro router-id? yang:dotted-quad 865 | | | +--ro interface-id? uint32 866 | | +--ro ipv4-backup-ero-sub-tlv 867 | | | +--ro flags? bits 868 | | | +--ro ipv4-address? inet:ipv4-address 869 | | +--ro unnumbered-backup-ero-sub-tlv 870 | | +--ro flags? bits 871 | | +--ro router-id? yang:dotted-quad 872 | | +--ro interface-id? uint32 873 | +--ro unknown-tlvs 874 | +--ro unknown-tlv* 875 | +--ro type? uint16 876 | +--ro length? uint16 877 | +--ro value? yang:hex-string 878 +--ro sr-algorithm-tlv 879 | +--ro sr-algorithm* uint8 880 +--ro sid-range-tlvs 881 +--ro sid-range-tlv* 882 +--ro range-size? ospf:uint24 883 +--ro sid-sub-tlv 884 +--ro sid? uint32 885 augment /rt:routing-state/rt:routing-protocols 886 /rt:routing-protocol/ospf:ospf/ospf:instance/ospf:areas 887 /ospf:area/ospf:database/ospf:area-scope-lsa-type 888 /ospf:area-scope-lsas/ospf:area-scope-lsa 889 /ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque: 890 +--ro extended-prefix-range-tlvs 891 | +--ro extended-prefix-range-tlv* 892 | +--ro range-size? uint16 893 | +--ro flags? bits 894 | +--ro prefix? inet:ip-prefix 895 | +--ro perfix-sid-sub-tlvs 896 | | +--ro prefix-sid-sub-tlv* 897 | | +--ro flags? bits 898 | | +--ro mt-id? uint8 899 | | +--ro algorithm? uint8 900 | | +--ro sid? uint32 901 | +--ro sid-binding-sub-tlvs 902 | | +--ro sid-binding-sub-tlv* 903 | | +--ro flags? bits 904 | | +--ro mt-id? uint8 905 | | +--ro weight? uint8 906 | | +--ro sid-sub-tlv 907 | | | +--ro sid? uint32 908 | | +--ro ero-metric-sub-tlv 909 | | | +--ro metric? uint32 910 | | +--ro ipv4-ero-sub-tlv 911 | | | +--ro flags? bits 912 | | | +--ro ipv4-address? inet:ipv4-address 913 | | +--ro unnumbered-ero-sub-tlv 914 | | | +--ro flags? bits 915 | | | +--ro router-id? yang:dotted-quad 916 | | | +--ro interface-id? uint32 917 | | +--ro ipv4-backup-ero-sub-tlv 918 | | | +--ro flags? bits 919 | | | +--ro ipv4-address? inet:ipv4-address 920 | | +--ro unnumbered-backup-ero-sub-tlv 921 | | +--ro flags? bits 922 | | +--ro router-id? yang:dotted-quad 923 | | +--ro interface-id? uint32 924 | +--ro unknown-tlvs 925 | +--ro unknown-tlv* 926 | +--ro type? uint16 927 | +--ro length? uint16 928 | +--ro value? yang:hex-string 929 +--ro sr-algorithm-tlv 930 | +--ro sr-algorithm* uint8 931 +--ro sid-range-tlvs 932 +--ro sid-range-tlv* 933 +--ro range-size? ospf:uint24 934 +--ro sid-sub-tlv 935 +--ro sid? uint32 936 augment /rt:routing-state/rt:routing-protocols 937 /rt:routing-protocol/ospf:ospf/ospf:instance/ospf:database 938 /ospf:as-scope-lsa-type/ospf:as-scope-lsas/ospf:as-scope-lsa 939 /ospf:version/ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque: 940 +--ro extended-prefix-range-tlvs 941 | +--ro extended-prefix-range-tlv* 942 | +--ro range-size? uint16 943 | +--ro flags? bits 944 | +--ro prefix? inet:ip-prefix 945 | +--ro perfix-sid-sub-tlvs 946 | | +--ro prefix-sid-sub-tlv* 947 | | +--ro flags? bits 948 | | +--ro mt-id? uint8 949 | | +--ro algorithm? uint8 950 | | +--ro sid? uint32 951 | +--ro sid-binding-sub-tlvs 952 | | +--ro sid-binding-sub-tlv* 953 | | +--ro flags? bits 954 | | +--ro mt-id? uint8 955 | | +--ro weight? uint8 956 | | +--ro sid-sub-tlv 957 | | | +--ro sid? uint32 958 | | +--ro ero-metric-sub-tlv 959 | | | +--ro metric? uint32 960 | | +--ro ipv4-ero-sub-tlv 961 | | | +--ro flags? bits 962 | | | +--ro ipv4-address? inet:ipv4-address 963 | | +--ro unnumbered-ero-sub-tlv 964 | | | +--ro flags? bits 965 | | | +--ro router-id? yang:dotted-quad 966 | | | +--ro interface-id? uint32 967 | | +--ro ipv4-backup-ero-sub-tlv 968 | | | +--ro flags? bits 969 | | | +--ro ipv4-address? inet:ipv4-address 970 | | +--ro unnumbered-backup-ero-sub-tlv 971 | | +--ro flags? bits 972 | | +--ro router-id? yang:dotted-quad 973 | | +--ro interface-id? uint32 974 | +--ro unknown-tlvs 975 | +--ro unknown-tlv* 976 | +--ro type? uint16 977 | +--ro length? uint16 978 | +--ro value? yang:hex-string 979 +--ro sr-algorithm-tlv 980 | +--ro sr-algorithm* uint8 981 +--ro sid-range-tlvs 982 +--ro sid-range-tlv* 983 +--ro range-size? ospf:uint24 984 +--ro sid-sub-tlv 985 +--ro sid? uint32 987 4. OSPF BFD Yang Module 989 Additionally this document defines a module that can be used to 990 configure and monitor the OSPF BFD feature. 992 Bidirectional Forwarding Detection (BFD) [RFC5880] is a network 993 protocol that is used for liveness detection of arbitrary paths 994 between systems. A YANG data model is defined in [I-D.ietf-bfd-yang] 995 that supports BFD configuration and management. 997 As a client of BFD, the OSPF protocol uses the services provided by 998 BFD. The OSPF BFD YANG augments the base OSPF module and is defined 999 as a separate module. So any implementation that does not support 1000 BFD can still use the OSPF base model without having to import the 1001 BFD module [I-D.ietf-bfd-yang]. 1003 module: ietf-ospf-bfd 1004 augment /rt:routing/rt:routing-protocols 1005 /rt:routing-protocol/ospf:ospf/ospf:instance 1006 /ospf:areas/ospf:area/ospf:interfaces/ospf:interface: 1007 +--rw bfd 1008 +--rw enabled? boolean 1009 augment /rt:routing-state/rt:routing-protocols 1010 /rt:routing-protocol/ospf:ospf/ospf:instance 1011 /ospf:areas/ospf:area/ospf:interfaces/ospf:interface: 1012 +--ro bfd 1013 +--ro enabled? boolean 1015 5. OSPF Yang Module 1017 file "ietf-ospf@2016-03-20.yang" 1018 module ietf-ospf { 1019 namespace "urn:ietf:params:xml:ns:yang:ietf-ospf"; 1021 prefix ospf; 1023 import ietf-inet-types { 1024 prefix "inet"; 1025 } 1027 import ietf-yang-types { 1028 prefix "yang"; 1029 } 1031 import ietf-interfaces { 1032 prefix "if"; 1033 } 1035 import ietf-routing { 1036 prefix "rt"; 1037 } 1039 import ietf-routing-key-chain { 1040 prefix "key-chain"; 1041 } 1043 organization 1044 "Cisco Systems 1045 170 West Tasman Drive 1046 San Jose, CA 95134-1706 1047 USA"; 1049 contact 1050 "WG Web: 1051 WG List: 1053 WG Chair: Acee Lindem 1054 1056 WG Chair: Abhay Roy 1057 1059 Editor: Derek Yeung 1060 1061 Author: Derek Yeung 1062 1063 Author: Yingzhen Qu 1064 1065 Author: Jeffrey Zhang 1066 1067 Author: Ing-Wher Chen 1068 1069 Author: Dean Bogdanovic 1070 1071 Author: Kiran Agrahara Sreenivasa 1072 "; 1074 description 1075 "This YANG module defines the generic configuration and 1076 operational state for the OSPF protocol common to all 1077 vendor implementations. It is intended that the module 1078 will be extended by vendors to define vendor-specific 1079 OSPF configuration parameters and policies, 1080 for example route maps or route policies. 1082 Terms and Acronyms 1084 OSPF (ospf): Open Shortest Path First 1086 IP (ip): Internet Protocol 1088 IPv4 (ipv4):Internet Protocol Version 4 1090 IPv6 (ipv6): Internet Protocol Version 6 1092 MTU (mtu) Maximum Transmission Unit 1093 "; 1095 revision 2016-03-20 { 1096 description 1097 "* Reorganize *-config and *-operation groupings. 1098 * Use *-config under state tree for applied config. 1099 * Rename config router-id to explicit-router-id. 1100 * Rename feature router-id to explicit-router-id. 1101 * Add OSPFv3 instance ID. 1102 * Add OSPFv3 interface ID. 1103 * Add ip-address for DR and BDR. 1104 * Remove routing-instance. 1105 * Change import module name to ietf-routing-key-chain."; 1106 reference 1107 "RFC XXXX: A YANG Data Model for OSPF."; 1108 } 1110 revision 2015-10-19 { 1111 description 1112 "* Remove the abstract identity ospf. 1113 * Make area-id-type dotted-quad only. 1114 * Use area-id-type for all area-id leafs. 1115 * Restructure notifications. 1116 * Move BFD support to the new ietf-ospf-bfd module. 1117 * Update author information. 1118 * Editorial changes."; 1119 reference 1120 "RFC XXXX: A YANG Data Model for OSPF."; 1121 } 1123 revision 2015-09-02 { 1124 description 1125 "* Author information update. 1126 * Editorial changes"; 1127 reference 1128 "RFC XXXX: A YANG Data Model for OSPF."; 1129 } 1131 revision 2015-07-06 { 1132 description 1133 "* Remove support for protocol-centric config. 1134 * Enclose list in container, except for instance. 1135 * Replace protocol-shutdown with admin-control. 1136 * Add IP-FRR per-interface config. 1137 * Reorganize max-path etc node. 1138 * Add node-flag. 1139 * Align config/operation hierarchy. 1140 * Use relative path for reference to rib. 1141 * Add ability to set single admin distance. 1142 * Make unreserved bandwidth into list. 1143 * Add F and T bit to OSPFv3 external LSA. 1144 * Remove key statement inside LSA body. 1146 * Add stub router support. 1147 * Fix usage of af-area-config. 1148 * Add statistics to operation data. 1149 * Add local rib. 1150 * Use dotted-quad for all router-id fields. 1151 * Support more than one multi-area per interface. 1152 * Use uint16 for LSA type. 1153 * Update grouping notification-instance-hdr. 1154 * Rework condition for opaque type and id in OSPFv2 LSA. 1155 * Rename local-remote-ipv4-addr with remote-if-ipv4-addr. 1156 * Add virtual-link/sham-link to operation state. 1157 * Allow multiple link TLVs in one LSA. 1158 * Fix bug in as-scope-lsas. 1159 * Remove OSPFv3 restriction in link-scope-lsas. 1160 * Editorial changes."; 1161 reference 1162 "RFC XXXX: A YANG Data Model for OSPF."; 1163 } 1165 revision 2015-03-09 { 1166 description 1167 "Initial revision."; 1168 reference 1169 "RFC XXXX: A YANG Data Model for OSPF."; 1170 } 1172 identity ospfv2 { 1173 base "rt:routing-protocol"; 1174 description "OSPFv2"; 1175 } 1177 identity ospfv3 { 1178 base "rt:routing-protocol"; 1179 description "OSPFv3"; 1180 } 1182 identity operation-mode { 1183 description 1184 "OSPF operation mode."; 1185 } 1187 identity ships-in-the-night { 1188 base operation-mode; 1189 description 1190 "Ships-in-the-night operation mode in which 1191 each OSPF instance carries only one address family"; 1192 } 1193 identity area-type { 1194 description "Base identity for OSPF area type."; 1195 } 1197 identity normal { 1198 base area-type; 1199 description "OSPF normal area."; 1200 } 1202 identity stub { 1203 base area-type; 1204 description "OSPF stub area."; 1205 } 1207 identity nssa { 1208 base area-type; 1209 description "OSPF NSSA area."; 1210 } 1212 typedef uint24 { 1213 type uint32 { 1214 range "0 .. 16777215"; 1215 } 1216 description 1217 "24-bit unsigned integer."; 1218 } 1220 typedef area-id-type { 1221 type yang:dotted-quad; 1222 description 1223 "Area ID type."; 1224 } 1226 typedef route-type { 1227 type enumeration { 1228 enum intra-area { 1229 description "OSPF intra-area route."; 1230 } 1231 enum inter-area { 1232 description "OSPF inter-area route."; 1233 } 1234 enum external-1 { 1235 description "OSPF type 1 external route."; 1236 } 1237 enum external-2 { 1238 description "OSPF type 2 external route."; 1239 } 1240 enum nssa-1 { 1241 description "OSPF type 1 NSSA route."; 1242 } 1243 enum nssa-2 { 1244 description "OSPF type 2 NSSA route."; 1245 } 1246 } 1247 description "OSPF route type."; 1248 } 1250 typedef if-state-type { 1251 type enumeration { 1252 enum Down { 1253 value "1"; 1254 description 1255 "Interface down state."; 1256 } 1257 enum Loopback { 1258 value "2"; 1259 description 1260 "Interface loopback state."; 1261 } 1262 enum Waiting { 1263 value "3"; 1264 description 1265 "Interface waiting state."; 1266 } 1267 enum Point-to-Point { 1268 value "4"; 1269 description 1270 "Interface point-to-point state."; 1271 } 1272 enum DR { 1273 value "5"; 1274 description 1275 "Interface Designated Router (DR) state."; 1276 } 1277 enum BDR { 1278 value "6"; 1279 description 1280 "Interface Backup Designated Router (BDR) state."; 1281 } 1282 enum DR-Other { 1283 value "7"; 1284 description 1285 "Interface Other Designated Router state."; 1286 } 1287 } 1288 description 1289 "OSPF interface state type."; 1290 } 1292 typedef nbr-state-type { 1293 type enumeration { 1294 enum Down { 1295 value "1"; 1296 description 1297 "Neighbor down state."; 1298 } 1299 enum Attempt { 1300 value "2"; 1301 description 1302 "Neighbor attempt state."; 1303 } 1304 enum Init { 1305 value "3"; 1306 description 1307 "Neighbor init state."; 1308 } 1309 enum 2-Way { 1310 value "4"; 1311 description 1312 "Neighbor 2-Way state."; 1313 } 1314 enum ExStart { 1315 value "5"; 1316 description 1317 "Neighbor exchange start state."; 1318 } 1319 enum Exchange { 1320 value "6"; 1321 description 1322 "Neighbor exchange state."; 1323 } 1324 enum Loading { 1325 value "7"; 1326 description 1327 "Neighbor loading state."; 1328 } 1329 enum Full { 1330 value "8"; 1331 description 1332 "Neighbor full state."; 1333 } 1334 } 1335 description 1336 "OSPF neighbor state type."; 1338 } 1340 typedef restart-helper-status-type { 1341 type enumeration { 1342 enum Not-Helping { 1343 value "1"; 1344 description 1345 "Restart helper status not helping."; 1346 } 1347 enum Helping { 1348 value "2"; 1349 description 1350 "Restart helper status helping."; 1351 } 1352 } 1353 description 1354 "Restart helper status type."; 1355 } 1357 typedef restart-exit-reason-type { 1358 type enumeration { 1359 enum None { 1360 value "1"; 1361 description 1362 "Not attempted."; 1363 } 1364 enum InProgress { 1365 value "2"; 1366 description 1367 "Restart in progress."; 1368 } 1369 enum Completed { 1370 value "3"; 1371 description 1372 "Successfully completed."; 1373 } 1374 enum TimedOut { 1375 value "4"; 1376 description 1377 "Timed out."; 1378 } 1379 enum TopologyChanged { 1380 value "5"; 1381 description 1382 "Aborted due to topology change."; 1383 } 1384 } 1385 description 1386 "Describes the outcome of the last attempt at a 1387 graceful restart, either by itself or acting 1388 as a helper."; 1389 } 1390 typedef packet-type { 1391 type enumeration { 1392 enum Hello { 1393 value "1"; 1394 description 1395 "OSPF hello packet."; 1396 } 1397 enum Database-Descripton { 1398 value "2"; 1399 description 1400 "OSPF database description packet."; 1401 } 1402 enum Link-State-Request { 1403 value "3"; 1404 description 1405 "OSPF link state request packet."; 1406 } 1407 enum Link-State-Update { 1408 value "4"; 1409 description 1410 "OSPF link state update packet."; 1411 } 1412 enum Link-State-Ack { 1413 value "5"; 1414 description 1415 "OSPF link state acknowlegement packet."; 1416 } 1417 } 1418 description 1419 "OSPF packet type."; 1420 } 1422 typedef nssa-translator-state-type { 1423 type enumeration { 1424 enum Enabled { 1425 value "1"; 1426 description 1427 "NSSA translator enabled state."; 1428 } 1429 enum Elected { 1430 description 1431 "NSSA translator elected state."; 1432 } 1433 enum Disabled { 1434 value "3"; 1435 description 1436 "NSSA translator disabled state."; 1437 } 1438 } 1439 description 1440 "OSPF NSSA translator state type."; 1441 } 1443 typedef restart-status-type { 1444 type enumeration { 1445 enum Not-Restarting { 1446 value "1"; 1447 description 1448 "Router is not restarting."; 1449 } 1450 enum Planned-Restart { 1451 description 1452 "Router is going through planned restart."; 1453 } 1454 enum Unplanned-Restart { 1455 value "3"; 1456 description 1457 "Router is going through unplanned restart."; 1458 } 1459 } 1460 description 1461 "OSPF graceful restart status type."; 1462 } 1464 feature multi-topology { 1465 description 1466 "Support Multiple-Topolgy Routing (MTR)."; 1467 } 1469 feature multi-area-adj { 1470 description 1471 "OSPF multi-area adjacency support as in RFC 5185."; 1472 } 1473 feature explicit-router-id { 1474 description 1475 "Set Router-ID per instance explicitly."; 1476 } 1478 feature demand-circuit { 1479 description 1480 "OSPF demand circuit support as in RFC 1793."; 1481 } 1482 feature mtu-ignore { 1483 description 1484 "Disable OSPF Database Description packet MTU 1485 mismatch checking."; 1486 } 1488 feature lls { 1489 description 1490 "OSPF link-local signaling (LLS) as in RFC 5613."; 1491 } 1493 feature prefix-suppression { 1494 description 1495 "OSPF prefix suppression support as in RFC 6860."; 1496 } 1498 feature ttl-security { 1499 description 1500 "OSPF TTL security check."; 1501 } 1503 feature nsr { 1504 description 1505 "Non-Stop-Routing (NSR)."; 1506 } 1508 feature graceful-restart { 1509 description 1510 "Graceful OSPF Restart as defined in RFC 3623 and 1511 RFC 5187."; 1512 } 1514 feature admin-control { 1515 description 1516 "Administrative control of the protocol state."; 1517 } 1519 feature auto-cost { 1520 description 1521 "Calculate OSPF interface cost according to 1522 reference bandwidth."; 1523 } 1525 feature max-ecmp { 1526 description 1527 "Setting maximum number of ECMP paths."; 1528 } 1529 feature max-lsa { 1530 description 1531 "Setting maximum number of LSAs the OSPF instance 1532 will accept."; 1533 } 1535 feature te-rid { 1536 description 1537 "TE Router-ID."; 1538 } 1540 feature ldp-igp-sync { 1541 description 1542 "LDP IGP synchronization."; 1543 } 1545 feature ldp-igp-autoconfig { 1546 description 1547 "LDP IGP auto-config."; 1548 } 1550 feature ospfv3-authentication-ipsec { 1551 description 1552 "Use IPsec for OSPFv3 authentication."; 1553 } 1555 feature fast-reroute { 1556 description 1557 "Support of IP Fast Reroute (IP-FRR)."; 1558 } 1560 feature node-flag { 1561 description 1562 "Support of node flag."; 1563 } 1564 feature lfa { 1565 description 1566 "Support of Loop Free Alternates (LFAs)."; 1567 } 1569 feature remote-lfa { 1570 description 1571 "Support of Remote Loop Free Alternates (R-LFA)."; 1572 } 1574 feature stub-router { 1575 description 1576 "Support of RFC 6987 OSPF Stub Router Advertisement."; 1578 } 1580 feature instance-inheritance { 1581 description 1582 "Support instance inheritance"; 1583 } 1585 feature area-inheritance { 1586 description 1587 "Support area inheritance"; 1588 } 1590 feature interface-inheritance { 1591 description 1592 "Support interface inheritance"; 1593 } 1595 grouping tlv { 1596 description 1597 "TLV"; 1598 leaf type { 1599 type uint16; 1600 description "TLV type."; 1601 } 1602 leaf length { 1603 type uint16; 1604 description "TLV length."; 1605 } 1606 leaf value { 1607 type yang:hex-string; 1608 description "TLV value."; 1609 } 1610 } 1612 grouping unknown-tlvs { 1613 description 1614 "Unknown TLVs grouping - Used for unknown TLVs or 1615 unknown sub-TLVs."; 1616 container unknown-tlvs { 1617 description "All unknown TLVs."; 1618 list unknown-tlv { 1619 description "Unknown TLV."; 1620 uses tlv; 1621 } 1622 } 1623 } 1625 grouping ospfv2-router-link { 1626 description "OSPFv2 router link."; 1627 leaf link-id { 1628 type union { 1629 type inet:ipv4-address; 1630 type yang:dotted-quad; 1631 } 1632 description "Link ID."; 1633 } 1634 leaf link-data { 1635 type union { 1636 type inet:ipv4-address; 1637 type uint32; 1638 } 1639 description "Link data."; 1640 } 1641 leaf type { 1642 type uint8; 1643 description "Link type."; 1644 } 1645 } 1647 grouping ospfv2-lsa-body { 1648 description "OSPFv2 LSA body."; 1649 container router { 1650 when "../../header/type = 1" { 1651 description 1652 "Only applies to Router LSAs."; 1653 } 1654 description 1655 "Router LSA."; 1656 leaf flags { 1657 type bits { 1658 bit V { 1659 description 1660 "When set, the router is an endpoint of one or 1661 more virtual links."; 1662 } 1663 bit E { 1664 description 1665 "When set, the router is an AS Boundary Router 1666 (ASBR)."; 1667 } 1668 bit B { 1669 description 1670 "When set, the router is an Area Border 1671 Router (ABR)."; 1672 } 1673 } 1674 description "Flags."; 1675 } 1676 leaf num-of-links { 1677 type uint16; 1678 description "Number of links."; 1679 } 1680 container links { 1681 description "All router Links."; 1682 list link { 1683 description "Router LSA link."; 1684 uses ospfv2-router-link; 1685 container topologies { 1686 description "All topologies for the link."; 1687 list topology { 1688 description 1689 "Topology specific information."; 1690 leaf mt-id { 1691 type uint8; 1692 description 1693 "The MT-ID for the topology enabled on 1694 the link."; 1695 } 1696 leaf metric { 1697 type uint16; 1698 description "Metric for the topology."; 1699 } 1700 } 1701 } 1702 } 1703 } 1704 } 1705 container network { 1706 when "../../header/type = 2" { 1707 description 1708 "Only applies to Network LSAs."; 1709 } 1710 description 1711 "Network LSA."; 1712 leaf network-mask { 1713 type inet:ipv4-address; 1714 description 1715 "The IP address mask for the network."; 1716 } 1717 container attached-routers { 1718 description "All attached routers."; 1719 leaf-list attached-router { 1720 type yang:dotted-quad; 1721 description 1722 "List of the routers attached to the network."; 1723 } 1724 } 1725 } 1726 container summary { 1727 when "../../header/type = 3 or " 1728 + "../../header/type = 4" { 1729 description 1730 "Only applies to Summary LSAs."; 1731 } 1732 description 1733 "Summary LSA."; 1734 leaf network-mask { 1735 type inet:ipv4-address; 1736 description 1737 "The IP address mask for the network"; 1738 } 1739 container topologies { 1740 description "All topologies for the summary LSA."; 1741 list topology { 1742 description 1743 "Topology specific information."; 1744 leaf mt-id { 1745 type uint8; 1746 description 1747 "The MT-ID for the topology enabled for 1748 the summary."; 1749 } 1750 leaf metric { 1751 type uint24; 1752 description "Metric for the topology."; 1753 } 1754 } 1755 } 1756 } 1757 container external { 1758 when "../../header/type = 5 or " 1759 + "../../header/type = 7" { 1760 description 1761 "Only applies to AS-external LSAs and NSSA LSAs."; 1762 } 1763 description 1764 "External LSA."; 1765 leaf network-mask { 1766 type inet:ipv4-address; 1767 description 1768 "The IP address mask for the network"; 1769 } 1770 container topologies { 1771 description "All topologies for the external."; 1772 list topology { 1773 description 1774 "Topology specific information."; 1775 leaf mt-id { 1776 type uint8; 1777 description 1778 "The MT-ID for the topology enabled for the 1779 external or NSSA prefix."; 1780 } 1781 leaf flags { 1782 type bits { 1783 bit E { 1784 description 1785 "When set, the metric specified is a Type 2 1786 external metric."; 1787 } 1788 } 1789 description "Flags."; 1790 } 1791 leaf metric { 1792 type uint24; 1793 description "Metric for the topology."; 1794 } 1795 leaf forwarding-address { 1796 type inet:ipv4-address; 1797 description 1798 "Forwarding address."; 1799 } 1800 leaf external-route-tag { 1801 type uint32; 1802 description 1803 "Route tag for the topology."; 1804 } 1805 } 1806 } 1807 } 1808 container opaque { 1809 when "../../header/type = 9 or " 1810 + "../../header/type = 10 or " 1811 + "../../header/type = 11" { 1812 description 1813 "Only applies to Opaque LSAs."; 1814 } 1815 description 1816 "Opaque LSA."; 1818 uses unknown-tlvs; 1820 container router-address-tlv { 1821 description 1822 "Router address TLV."; 1823 leaf router-address { 1824 type inet:ipv4-address; 1825 description 1826 "Router address."; 1827 } 1828 } 1830 container link-tlvs { 1831 description "All link TLVs in the LSA."; 1832 container link-tlv { 1833 description "Link TLV."; 1834 leaf link-type { 1835 type uint8; 1836 mandatory true; 1837 description "Link type."; 1838 } 1839 leaf link-id { 1840 type union { 1841 type inet:ipv4-address; 1842 type yang:dotted-quad; 1843 } 1844 mandatory true; 1845 description "Link ID."; 1846 } 1847 container local-if-ipv4-addrs { 1848 description "All local interface IPv4 addresses."; 1849 leaf-list local-if-ipv4-addr { 1850 type inet:ipv4-address; 1851 description 1852 "List of local interface IPv4 addresses."; 1853 } 1854 } 1855 container remote-if-ipv4-addrs { 1856 description "All remote interface IPv4 addresses."; 1857 leaf-list remote-if-ipv4-addr { 1858 type inet:ipv4-address; 1859 description 1860 "List of remote interface IPv4 addresses."; 1861 } 1862 } 1863 leaf te-metric { 1864 type uint32; 1865 description "TE metric."; 1867 } 1868 leaf max-bandwidth { 1869 type decimal64 { 1870 fraction-digits 2; 1871 } 1872 description "Maximum bandwidth."; 1873 } 1874 leaf max-reservable-bandwidth { 1875 type decimal64 { 1876 fraction-digits 2; 1877 } 1878 description "Maximum reservable bandwidth."; 1879 } 1880 container unreserved-bandwidths { 1881 description "All unreserved bandwidths."; 1882 list unreserved-bandwidth { 1883 leaf priority { 1884 type uint8 { 1885 range "0 .. 7"; 1886 } 1887 description "Priority from 0 to 7."; 1888 } 1889 leaf unreserved-bandwidth { 1890 type decimal64 { 1891 fraction-digits 2; 1892 } 1893 description "Unreserved bandwidth."; 1894 } 1895 description 1896 "List of unreserved bandwidths for different 1897 priorities."; 1898 } 1899 } 1900 leaf admin-group { 1901 type uint32; 1902 description 1903 "Administrative group/Resource Class/Color."; 1904 } 1905 uses unknown-tlvs; 1906 } 1907 } 1909 container extended-prefix-tlvs { 1910 description "All extended prefix TLVs in the LSA."; 1911 list extended-prefix-tlv { 1912 description "Extended prefix TLV."; 1913 leaf route-type { 1914 type enumeration { 1915 enum unspecified { 1916 value "0"; 1917 description "Unspecified."; 1918 } 1919 enum intra-area { 1920 value "1"; 1921 description "OSPF intra-area route."; 1922 } 1923 enum inter-area { 1924 value "3"; 1925 description "OSPF inter-area route."; 1926 } 1927 enum external { 1928 value "5"; 1929 description "OSPF External route."; 1930 } 1931 enum nssa { 1932 value "7"; 1933 description "OSPF NSSA external route."; 1934 } 1935 } 1936 description "Route type."; 1937 } 1938 leaf flags { 1939 type bits { 1940 bit A { 1941 description 1942 "Attach flag."; 1943 } 1944 bit N { 1945 description 1946 "Node flag."; 1947 } 1948 } 1949 description "Flags."; 1950 } 1951 leaf prefix { 1952 type inet:ip-prefix; 1953 description "Address prefix."; 1954 } 1955 uses unknown-tlvs; 1956 } 1957 } 1959 container extended-link-tlvs { 1960 description "All extended link TLVs in the LSA."; 1961 list extended-link-tlv { 1962 description "Extended link TLV."; 1963 uses ospfv2-router-link; 1964 uses unknown-tlvs; 1965 } 1966 } 1967 } 1968 } 1970 grouping ospfv3-lsa-options { 1971 description "OSPFv3 LSA options"; 1972 leaf options { 1973 type bits { 1974 bit DC { 1975 description 1976 "When set, the router supports demand circuits."; 1977 } 1978 bit R { 1979 description 1980 "When set, the originator is an active router."; 1981 } 1982 bit N { 1983 description 1984 "If set, the router is attached to an NSSA"; 1985 } 1986 bit E { 1987 description 1988 "This bit describes the way AS-external LSAs 1989 are flooded"; 1990 } 1991 bit V6 { 1992 description 1993 "If clear, the router/link should be excluded 1994 from IPv6 routing calculaton"; 1995 } 1996 } 1997 mandatory true; 1998 description "OSPFv3 LSA options."; 1999 } 2000 } 2002 grouping ospfv3-lsa-prefix { 2003 description 2004 "OSPFv3 LSA prefix."; 2006 leaf prefix { 2007 type inet:ip-prefix; 2008 description 2009 "Prefix."; 2010 } 2011 leaf prefix-options { 2012 type bits { 2013 bit NU { 2014 description 2015 "When set, the prefix should be excluded 2016 from IPv6 unicast calculations."; 2017 } 2018 bit LA { 2019 description 2020 "When set, the prefix is actually an IPv6 interface 2021 address of the Advertising Router."; 2022 } 2023 bit P { 2024 description 2025 "When set, the NSSA area prefix should be 2026 translated to an AS External LSA and readvertised 2027 by the translating NSSA Border Router."; 2028 } 2029 bit DN { 2030 description 2031 "When set, the inter-area-prefix LSA or 2032 AS-external LSA prefix has been advertised as an 2033 L3VPN prefix."; 2034 } 2035 } 2036 mandatory true; 2037 description "Prefix options."; 2038 } 2039 } 2041 grouping ospfv3-lsa-external { 2042 description 2043 "AS-External and NSSA LSA."; 2044 leaf metric { 2045 type uint24; 2046 description "Metric"; 2047 } 2049 leaf flags { 2050 type bits { 2051 bit E { 2052 description 2053 "When set, the metric specified is a Type 2 2054 external metric."; 2055 } 2056 bit F { 2057 description 2058 "When set, a Forwarding Address is included 2059 in the LSA."; 2060 } 2061 bit T { 2062 description 2063 "When set, an External Route Tag is included 2064 in the LSA."; 2065 } 2066 } 2067 description "Flags."; 2068 } 2070 leaf referenced-ls-type { 2071 type uint16; 2072 description "Referenced Link State type."; 2073 } 2075 uses ospfv3-lsa-prefix; 2077 leaf forwarding-address { 2078 type inet:ipv6-address; 2079 description 2080 "Forwarding address."; 2081 } 2083 leaf external-route-tag { 2084 type uint32; 2085 description 2086 "Route tag."; 2087 } 2088 leaf referenced-link-state-id { 2089 type uint32; 2090 description 2091 "Referenced Link State ID."; 2092 } 2093 } 2095 grouping ospfv3-lsa-body { 2096 description "OSPFv3 LSA body."; 2097 container router { 2098 when "../../header/type = 8193" { // 0x2001 2099 description 2100 "Only applies to Router LSAs."; 2101 } 2102 description "Router LSA."; 2103 leaf flags { 2104 type bits { 2105 bit V { 2106 description 2107 "When set, the router is an endpoint of one or 2108 more virtual links."; 2109 } 2110 bit E { 2111 description 2112 "When set, the router is an AS Boundary Router 2113 (ASBR)."; 2114 } 2115 bit B { 2116 description 2117 "When set, the router is an Area Border 2118 Router (ABR)."; 2119 } 2120 bit Nt { 2121 description 2122 "When set, the router is an NSSA border router 2123 that is unconditionally translating NSSA LSAs 2124 into AS-external LSAs."; 2125 } 2126 } 2127 mandatory true; 2128 description "Router LSA flags."; 2129 } 2131 uses ospfv3-lsa-options; 2133 container links { 2134 description "All router link."; 2135 list link { 2136 description "Router LSA link."; 2137 leaf interface-id { 2138 type uint32; 2139 description "Interface ID."; 2140 } 2141 leaf neighbor-interface-id { 2142 type uint32; 2143 description "Neighbor Interface ID."; 2144 } 2145 leaf neighbor-router-id { 2146 type yang:dotted-quad; 2147 description "Neighbor Router ID."; 2148 } 2149 leaf type { 2150 type uint8; 2151 description "Link type."; 2152 } 2153 leaf metric { 2154 type uint16; 2155 description "Metric."; 2156 } 2157 } 2158 } 2159 } 2160 container network { 2161 when "../../header/type = 8194" { // 0x2002 2162 description 2163 "Only applies to Network LSA."; 2164 } 2165 description "Network LSA."; 2167 uses ospfv3-lsa-options; 2169 container attached-routers { 2170 description "All attached routers."; 2171 leaf-list attached-router { 2172 type yang:dotted-quad; 2173 description 2174 "List of the routers attached to the network."; 2175 } 2176 } 2177 } 2178 container inter-area-prefix { 2179 when "../../header/type = 8195" { // 0x2003 2180 description 2181 "Only applies to Inter-Area-Prefix LSAs."; 2182 } 2183 leaf metric { 2184 type uint24; 2185 description "Metric"; 2186 } 2187 uses ospfv3-lsa-prefix; 2188 description "Inter-Area-Prefix LSA."; 2189 } 2190 container inter-area-router { 2191 when "../../header/type = 8196" { // 0x2004 2192 description 2193 "Only applies to Inter-Area-Router LSAs."; 2194 } 2195 uses ospfv3-lsa-options; 2196 leaf metric { 2197 type uint24; 2198 description "Metric."; 2199 } 2200 leaf destination-router-id { 2201 type yang:dotted-quad; 2202 description 2203 "The Router ID of the router being described by the LSA."; 2204 } 2205 description "Inter-Area-Router LSA."; 2206 } 2207 container as-external { 2208 when "../../header/type = 16389" { // 0x4005 2209 description 2210 "Only applies to AS-external LSAs."; 2211 } 2213 uses ospfv3-lsa-external; 2215 description "AS-External LSA."; 2216 } 2217 container nssa { 2218 when "../../header/type = 8199" { // 0x2007 2219 description 2220 "Only applies to NSSA LSAs."; 2221 } 2222 uses ospfv3-lsa-external; 2224 description "NSSA LSA."; 2225 } 2226 container link { 2227 when "../../header/type = 8" { // 0x0008 2228 description 2229 "Only applies to Link LSAs."; 2230 } 2231 leaf rtr-priority { 2232 type uint8; 2233 description "Router Priority for the interface."; 2234 } 2235 uses ospfv3-lsa-options; 2237 leaf link-local-interface-address { 2238 type inet:ipv6-address; 2239 description 2240 "The originating router's link-local 2241 interface address for the link."; 2242 } 2244 leaf num-of-prefixes { 2245 type uint32; 2246 description "Number of prefixes."; 2247 } 2249 container prefixes { 2250 description "All prefixes for the link."; 2251 list prefix { 2252 description 2253 "List of prefixes associated with the link."; 2254 uses ospfv3-lsa-prefix; 2255 } 2256 } 2257 description "Link LSA."; 2258 } 2259 container intra-area-prefix { 2260 when "../../header/type = 8201" { // 0x2009 2261 description 2262 "Only applies to Intra-Area-Prefix LSA."; 2263 } 2264 description "Intra-Area-Prefix LSA."; 2266 leaf referenced-ls-type { 2267 type uint16; 2268 description "Referenced Link State type."; 2269 } 2270 leaf referenced-link-state-id { 2271 type uint32; 2272 description 2273 "Referenced Link State ID."; 2274 } 2275 leaf referenced-adv-router { 2276 type inet:ipv4-address; 2277 description 2278 "Referenced Advertising Router."; 2279 } 2281 leaf num-of-prefixes { 2282 type uint16; 2283 description "Number of prefixes."; 2284 } 2285 container prefixes { 2286 description "All prefixes in this LSA."; 2287 list prefix { 2288 description "List of prefixes in this LSA."; 2289 uses ospfv3-lsa-prefix; 2290 leaf metric { 2291 type uint24; 2292 description "Prefix Metric."; 2293 } 2294 } 2295 } 2296 } 2297 } 2298 grouping lsa-header { 2299 description 2300 "Common LSA for OSPFv2 and OSPFv3"; 2301 leaf age { 2302 type uint16; 2303 mandatory true; 2304 description "LSA age."; 2305 } 2306 leaf type { 2307 type uint16; 2308 mandatory true; 2309 description "LSA type."; 2310 } 2311 leaf adv-router { 2312 type yang:dotted-quad; 2313 mandatory true; 2314 description "LSA advertising router."; 2315 } 2316 leaf seq-num { 2317 type uint32; 2318 mandatory true; 2319 description "LSA sequence number."; 2320 } 2321 leaf checksum { 2322 type uint16; 2323 mandatory true; 2324 description "LSA checksum."; 2325 } 2326 leaf length { 2327 type uint16; 2328 mandatory true; 2329 description "LSA length."; 2330 } 2331 } 2333 grouping ospfv2-lsa { 2334 description 2335 "OSPFv2 LSA."; 2336 container header { 2337 must "(type = 9 or type = 10 or type = 11) and " 2338 + "opaque-id and opaque-type " 2339 + "or (type != 9 and type != 10 and type != 11) " 2340 + "and not(opaque-id) and " 2341 + "not(opaque-type)" { 2342 description 2343 "Opaque type and ID only apply to Opaque LSAs."; 2344 } 2345 description 2346 "Decoded OSPFv2 LSA header data."; 2347 leaf option { 2348 type bits { 2349 bit DC { 2350 description 2351 "When set, the router supports demand circuits."; 2352 } 2353 bit P { 2354 description 2355 "Only used in type-7 LSA. When set, an NSSA 2356 border router should translate the type-7 LSA 2357 to a type-5 LSA."; 2358 } 2359 bit MC { 2360 description 2361 "When set, the router supports MOSPF."; 2362 } 2363 bit E { 2364 description 2365 "This bit describes the way AS-external LSAs 2366 are flooded"; 2367 } 2368 } 2369 mandatory true; 2370 description "LSA options."; 2371 } 2372 leaf lsa-id { 2373 type inet:ipv4-address; 2374 mandatory true; 2375 description "LSA ID."; 2376 } 2378 leaf opaque-type { 2379 type uint8; 2380 description "Opaque type."; 2381 } 2383 leaf opaque-id { 2384 type uint24; 2385 description "Opaque ID."; 2386 } 2388 uses lsa-header; 2389 } 2390 container body { 2391 description 2392 "Decoded OSPFv2 LSA body data."; 2393 uses ospfv2-lsa-body; 2395 } 2396 } 2398 grouping ospfv3-lsa { 2399 description 2400 "Decoded OSPFv3 LSA."; 2401 container header { 2402 description 2403 "Decoded OSPFv3 LSA header data."; 2404 leaf lsa-id { 2405 type uint32; 2406 mandatory true; 2407 description "LSA ID."; 2408 } 2409 uses lsa-header; 2410 } 2411 container body { 2412 description 2413 "Decoded OSPF LSA body data."; 2414 uses ospfv3-lsa-body; 2415 } 2416 } 2417 grouping lsa-common { 2418 description 2419 "Common field for OSPF LSA represenation."; 2420 leaf decoded-completed { 2421 type boolean; 2422 description 2423 "The OSPF LSA body is fully decoded."; 2424 } 2425 leaf raw-data { 2426 type yang:hex-string; 2427 description 2428 "The complete LSA in network byte 2429 order hexadecimal as received or originated."; 2430 } 2431 } 2433 grouping lsa { 2434 description 2435 "OSPF LSA."; 2436 uses lsa-common; 2437 choice version { 2438 description 2439 "OSPFv2 or OSPFv3 LSA body."; 2440 container ospfv2 { 2441 description "OSPFv2 LSA"; 2442 uses ospfv2-lsa; 2444 } 2445 container ospfv3 { 2446 description "OSPFv3 LSA"; 2447 uses ospfv3-lsa; 2448 } 2449 } 2450 } 2452 grouping lsa-key { 2453 description 2454 "OSPF LSA key."; 2455 leaf lsa-id { 2456 type union { 2457 type inet:ipv4-address; 2458 type uint32; 2459 } 2460 description 2461 "LSA ID."; 2462 } 2463 leaf adv-router { 2464 type inet:ipv4-address; 2465 description 2466 "Advertising router."; 2467 } 2468 } 2470 grouping instance-stat { 2471 description "Per-instance statistics"; 2472 leaf originate-new-lsa-count { 2473 type yang:counter32; 2474 description "The number of new LSAs originated."; 2475 } 2476 leaf rx-new-lsas-count { 2477 type yang:counter32; 2478 description "The number of LSAs received."; 2479 } 2480 leaf as-scope-lsa-count { 2481 type yang:gauge32; 2482 description "The number of AS Scope LSAs."; 2483 } 2484 leaf as-scope-lsa-chksum-sum { 2485 type uint32; 2486 description 2487 "The sum of the LSA checksums for AS Scope LSAs."; 2488 } 2489 container database { 2490 description "Container for per AS-scope LSA statistics."; 2491 list as-scope-lsa-type { 2492 description "List of AS-scope LSA statistics"; 2493 leaf lsa-type { 2494 type uint16; 2495 description "AS-scope LSA type."; 2496 } 2497 leaf lsa-count { 2498 type yang:gauge32; 2499 description "The number of LSAs of the LSA type."; 2500 } 2501 leaf lsa-cksum-sum { 2502 type int32; 2503 description 2504 "The sum of the LSA checksums of the LSA type."; 2505 } 2506 } 2507 } 2508 } 2510 grouping area-stat { 2511 description "Per-area statistics."; 2512 leaf spf-runs-count { 2513 type yang:counter32; 2514 description 2515 "The number of times the intra-area SPF has run."; 2516 } 2517 leaf abr-count { 2518 type yang:gauge32; 2519 description 2520 "The total number of Area Border Routers (ABRs) 2521 reachable within this area."; 2522 } 2523 leaf asbr-count { 2524 type yang:gauge32; 2525 description 2526 "The total number of AS Border Routers (ASBRs)."; 2527 } 2528 leaf ar-nssa-translator-event-count { 2529 type yang:counter32; 2530 description 2531 "The number of NSSA translator-state changes."; 2532 } 2533 leaf area-scope-lsa-count { 2534 type yang:gauge32; 2535 description 2536 "The number of area scope LSAs in the area."; 2537 } 2538 leaf area-scope-lsa-cksum-sum { 2539 type int32; 2540 description "The sum of the area scope LSAs checksums."; 2541 } 2542 container database { 2543 description "Container for area scope LSA type statistics."; 2544 list area-scope-lsa-type { 2545 description "List of area scope LSA statistics"; 2546 leaf lsa-type { 2547 type uint16; 2548 description "Area scope LSA type."; 2549 } 2550 leaf lsa-count { 2551 type yang:gauge32; 2552 description "The number of LSAs of the LSA type."; 2553 } 2554 leaf lsa-cksum-sum { 2555 type int32; 2556 description 2557 "The sum of the LSA checksums of the LSA type."; 2558 } 2559 } 2560 } 2561 } 2563 grouping interface-stat { 2564 description "Per-interface statistics"; 2565 leaf if-event-count { 2566 type yang:counter32; 2567 description 2568 "The number of times this interface has changed its 2569 state or an error has occurred."; 2570 } 2571 leaf link-scope-lsa-count { 2572 type yang:gauge32; 2573 description "The number of link scope LSAs."; 2574 } 2575 leaf link-scope-lsa-cksum-sum { 2576 type uint32; 2577 description "The sum of link scope LSA checksums."; 2578 } 2579 container database { 2580 description "Container for link scope LSA type statistics."; 2581 list link-scope-lsa-type { 2582 description "List of link scope LSA statistics"; 2583 leaf lsa-type { 2584 type uint16; 2585 description "Link scope LSA type."; 2586 } 2587 leaf lsa-count { 2588 type yang:gauge32; 2589 description "The number of LSAs of the LSA type."; 2590 } 2591 leaf lsa-cksum-sum { 2592 type int32; 2593 description 2594 "The sum of the LSA checksums of the LSA type."; 2595 } 2596 } 2597 } 2598 } 2600 grouping neighbor-stat { 2601 description "Per-neighbor statistics."; 2602 leaf nbr-event-count { 2603 type yang:counter32; 2604 description 2605 "The number of times this neighbor has changed 2606 state or an error has occurred."; 2607 } 2608 leaf nbr-retrans-qlen { 2609 type yang:gauge32; 2610 description 2611 "The current length of the retransmission queue."; 2612 } 2613 } 2615 grouping instance-fast-reroute-config { 2616 description 2617 "This group defines global configuration of IP-FRR."; 2618 container fast-reroute { 2619 if-feature fast-reroute; 2620 description 2621 "This container may be augmented with global 2622 parameters for IP-FRR."; 2623 container lfa { 2624 if-feature lfa; 2625 description 2626 "This container may be augmented with 2627 global parameters for LFA. Container creation 2628 has no effect on LFA activation."; 2629 } 2630 } 2631 } 2633 grouping interface-fast-reroute-config { 2634 description 2635 "This group defines interface configuration of IP-FRR."; 2637 container fast-reroute { 2638 if-feature fast-reroute; 2639 container lfa { 2640 if-feature lfa; 2641 leaf candidate-disabled { 2642 type boolean; 2643 description 2644 "Prevent the interface to be used as backup."; 2645 } 2646 leaf enabled { 2647 type boolean; 2648 description 2649 "Activates LFA - Per-prefix LFA computation 2650 is assumed."; 2651 } 2652 container remote-lfa { 2653 if-feature remote-lfa; 2654 leaf enabled { 2655 type boolean; 2656 description 2657 "Activates Remote LFA (R-LFA)."; 2658 } 2659 description 2660 "Remote LFA configuration."; 2661 } 2662 description 2663 "LFA configuration."; 2664 } 2665 description 2666 "IP Fast-reroute configuration."; 2667 } 2668 } 2670 grouping interface-common-config { 2671 description 2672 "Common configuration for all types of interfaces, 2673 including virtual links and sham links."; 2675 leaf cost { 2676 type uint16 { 2677 range "1..65535"; 2678 } 2679 description 2680 "Interface cost."; 2681 } 2682 leaf hello-interval { 2683 type uint16 { 2684 range "1..65535"; 2686 } 2687 units seconds; 2688 description 2689 "Interval between hello packets in seconds."; 2690 } 2692 leaf dead-interval { 2693 type uint16 { 2694 range "1..65535"; 2695 } 2696 units seconds; 2697 must "../dead-interval > ../hello-interval" { 2698 error-message "The dead interval must be " 2699 + "larger than the hello interval"; 2700 description 2701 "The value MUST be greater than 'hello-internval'."; 2702 } 2703 description 2704 "Interval after which a neighbor is 2705 declared down in seconds."; 2706 } 2708 leaf retransmit-interval { 2709 type uint16 { 2710 range "1..65535"; 2711 } 2712 units seconds; 2713 description 2714 "Interval between retransmitting unacknowledged Link 2715 State Advertisements (LSAs) in seconds."; 2716 } 2718 leaf transmit-delay { 2719 type uint16 { 2720 range "1..65535"; 2721 } 2722 units seconds; 2723 description 2724 "Estimated time needed to transmit Link State Update 2725 packets on the interface in seconds."; 2726 } 2728 leaf mtu-ignore { 2729 if-feature mtu-ignore; 2730 type boolean; 2731 description 2732 "Enable/Disable bypassing the MTU mismatch check in 2733 Database Description packets."; 2735 } 2737 leaf lls { 2738 if-feature lls; 2739 type boolean; 2740 description 2741 "Enable/Disable link-local signaling (LLS) support."; 2742 } 2744 leaf prefix-suppression { 2745 if-feature prefix-suppression; 2746 type boolean; 2747 description 2748 "Suppress advertisement of the prefixes associated 2749 with the interface."; 2750 } 2752 container ttl-security { 2753 if-feature ttl-security; 2754 description "TTL security check."; 2755 leaf enable { 2756 type boolean; 2757 description 2758 "Enable/Disable TTL security check."; 2759 } 2760 leaf hops { 2761 type uint8 { 2762 range "1..254"; 2763 } 2764 description 2765 "Maximum number of hops that an OSPF packet may 2766 have traversed before reception."; 2767 } 2768 } 2769 leaf enable { 2770 if-feature admin-control; 2771 type boolean; 2772 default true; 2773 description 2774 "Enable/disable protocol on the interface."; 2775 } 2777 container authentication { 2778 description "Authentication configuration."; 2779 choice auth-type-selection { 2780 description 2781 "Options for expressing authentication setting."; 2782 case auth-ipsec { 2783 when "../../../../../../../rt:type = 'ospf:ospfv3'" { 2784 description "Applied to OSPFv3 only."; 2785 } 2786 if-feature ospfv3-authentication-ipsec; 2787 leaf sa { 2788 type string; 2789 description 2790 "Security Association name."; 2791 } 2792 } 2793 case auth-trailer-key-chain { 2794 leaf key-chain { 2795 type key-chain:key-chain-ref; 2796 description 2797 "key-chain name."; 2798 } 2799 } 2800 case auth-trailer-key { 2801 leaf key { 2802 type string; 2803 description 2804 "Key string in ASCII format."; 2805 } 2806 container crypto-algorithm { 2807 uses key-chain:crypto-algorithm-types; 2808 description 2809 "Cryptographic algorithm associated with key."; 2810 } 2811 } 2812 } 2813 } 2814 } // interface-common-config 2816 grouping interface-config { 2817 description "Configuration for real interfaces."; 2819 leaf network-type { 2820 type enumeration { 2821 enum "broadcast" { 2822 description 2823 "Specify OSPF broadcast multi-access network."; 2824 } 2825 enum "non-broadcast" { 2826 description 2827 "Specify OSPF Non-Broadcast Multi-Access 2828 (NBMA) network."; 2829 } 2830 enum "point-to-multipoint" { 2831 description 2832 "Specify OSPF point-to-multipoint network."; 2833 } 2834 enum "point-to-point" { 2835 description 2836 "Specify OSPF point-to-point network."; 2837 } 2838 } 2839 description 2840 "Network type."; 2841 } 2843 leaf passive { 2844 type boolean; 2845 description 2846 "Enable/Disable passive interface - a passive interface's 2847 prefix will be advertised but no neighbor adjacencies 2848 will be formed on the interface."; 2849 } 2851 leaf demand-circuit { 2852 if-feature demand-circuit; 2853 type boolean; 2854 description 2855 "Enable/Disable demand circuit."; 2856 } 2858 container multi-areas { 2859 description "Container for multi-area config."; 2860 list multi-area { 2861 if-feature multi-area-adj; 2862 key multi-area-id; 2863 description 2864 "Configure OSPF multi-area adjacency."; 2865 leaf multi-area-id { 2866 type area-id-type; 2867 description 2868 "Multi-area adjacency area ID."; 2869 } 2870 leaf cost { 2871 type uint16; 2872 description 2873 "Interface cost for multi-area adjacency."; 2874 } 2875 } 2876 } 2878 container static-neighbors { 2879 description "Statically configured neighbors."; 2881 list neighbor { 2882 key "address"; 2883 description 2884 "Specify a static OSPF neighbor."; 2886 leaf address { 2887 type inet:ip-address; 2888 description "Neighbor IP address."; 2889 } 2891 leaf cost { 2892 type uint16 { 2893 range "1..65535"; 2894 } 2895 description "Neighbor cost."; 2896 } 2897 leaf poll-interval { 2898 type uint16 { 2899 range "1..65535"; 2900 } 2901 units seconds; 2902 description "Neighbor poll interval in seconds."; 2903 } 2904 leaf priority { 2905 type uint8 { 2906 range "1..255"; 2907 } 2908 description "Neighbor priority for DR election."; 2909 } 2910 } 2911 } 2913 leaf node-flag { 2914 if-feature node-flag; 2915 type boolean; 2916 default false; 2917 description 2918 "Set prefix as a segment routing (SR) node 2919 representative prefix."; 2920 } 2921 uses interface-fast-reroute-config; 2922 uses interface-common-config; 2923 } // grouping interface-config 2925 grouping neighbor-operation { 2926 description 2927 "OSPF neighbor operation data."; 2929 leaf address { 2930 type inet:ip-address; 2931 description 2932 "Neighbor address."; 2933 } 2934 leaf dr-router-id { 2935 type yang:dotted-quad; 2936 description "Neighbor's Designated Router (DR) router ID."; 2937 } 2939 leaf dr-ip-addr { 2940 type inet:ip-address; 2941 description "Neighbor's Designated Router (DR) IP address."; 2942 } 2944 leaf bdr-router-id { 2945 type yang:dotted-quad; 2946 description 2947 "Neighbor's Backup Designated Router (BDR) router ID."; 2948 } 2950 leaf bdr-ip-addr { 2951 type inet:ipv4-address; 2952 description 2953 "Neighbor's Backup Designated Router (BDR) IP Address."; 2954 } 2955 leaf state { 2956 type nbr-state-type; 2957 description 2958 "OSPF neighbor state."; 2959 } 2960 container statistics { 2961 description "Per neighbor statistics"; 2962 uses neighbor-stat; 2963 } 2964 } 2966 grouping interface-common-operation { 2967 description 2968 "OSPF interface common operation state."; 2969 reference "RFC2328 Section 9"; 2971 leaf state { 2972 type if-state-type; 2973 description "Interface state."; 2974 } 2975 leaf hello-timer { 2976 type uint32; 2977 units "milliseconds"; 2978 description "Hello timer."; 2979 } 2981 leaf wait-timer { 2982 type uint32; 2983 units "milliseconds"; 2984 description "Wait timer."; 2985 } 2987 leaf dr-router-id { 2988 type yang:dotted-quad; 2989 description "Designated Router (DR) router ID."; 2990 } 2992 leaf dr-ip-addr { 2993 type inet:ip-address; 2994 description "Designated Router (DR) IP address."; 2995 } 2997 leaf bdr-router-id { 2998 type yang:dotted-quad; 2999 description "Backup Designated Router (BDR) router ID."; 3000 } 3002 leaf bdr-ip-addr { 3003 type inet:ipv4-address; 3004 description "Backup Designated Router (BDR) IP Address."; 3005 } 3007 container statistics { 3008 description "Per interface statistics"; 3009 uses interface-stat; 3010 } 3012 container neighbors { 3013 description "All neighbors for the interface."; 3014 list neighbor { 3015 key "neighbor-router-id"; 3016 description 3017 "List of OSPF neighbors."; 3018 leaf neighbor-router-id { 3019 type yang:dotted-quad; 3020 description 3021 "Neighbor router ID."; 3022 } 3023 uses neighbor-operation; 3024 } // list of OSPF neighbors 3025 } 3026 } // interface-common-operation 3028 grouping interface-operation { 3029 description 3030 "OSPF interface operation state."; 3031 reference "RFC2328 Section 9"; 3033 uses interface-common-operation; 3035 container database { 3036 description "Link scope LSA database."; 3037 list link-scope-lsa-type { 3038 key "lsa-type"; 3039 description 3040 "List OSPF link scope LSA databases."; 3041 leaf lsa-type { 3042 type uint16; 3043 description "OSPF link scope LSA type."; 3044 } 3045 container link-scope-lsas { 3046 description 3047 "All link scope LSAs of this LSA type."; 3048 list link-scope-lsa { 3049 key "lsa-id adv-router"; 3050 description "List of OSPF link scope LSAs"; 3051 uses lsa-key; 3052 uses lsa { 3053 refine "version/ospfv2/ospfv2" { 3054 must "../../../../../../../../../../../" 3055 + "rt:type = 'ospf:ospfv2'" { 3056 description "OSPFv2 LSA."; 3057 } 3058 } 3059 refine "version/ospfv3/ospfv3" { 3060 must "../../../../../../../../../../../" 3061 + "rt:type = 'ospf:ospfv3'" { 3062 description "OSPFv3 LSA."; 3063 } 3064 } 3065 } 3066 } 3067 } 3068 } // list link-scope-lsas 3069 } 3070 } 3071 grouping virtual-link-config { 3072 description 3073 "OSPF virtual link configuration state."; 3075 uses interface-common-config; 3076 } 3078 grouping virtual-link-operation { 3079 description 3080 "OSPF virtual link operation state."; 3082 uses interface-common-operation; 3083 } 3085 grouping sham-link-config { 3086 description 3087 "OSPF sham link configuration state."; 3089 uses interface-common-config; 3090 } 3092 grouping sham-link-operation { 3093 description 3094 "OSPF sham link operation state."; 3096 uses interface-common-operation; 3097 } 3099 grouping af-area-config { 3100 description 3101 "OSPF address-family specific area config state."; 3103 container ranges { 3104 description "Container for summary ranges"; 3106 list range { 3107 key "prefix"; 3108 description 3109 "Summarize routes matching address/mask 3110 (Area Border Routers (ABRs) only)"; 3111 leaf prefix { 3112 type inet:ip-prefix; 3113 description 3114 "IPv4 or IPv6 prefix"; 3115 } 3116 leaf advertise { 3117 type boolean; 3118 description 3119 "Advertise or hide."; 3120 } 3121 leaf cost { 3122 type uint24 { 3123 range "0..16777214"; 3124 } 3125 description 3126 "Advertised cost of summary route."; 3127 } 3128 } 3129 } 3130 } 3132 grouping area-common-config { 3133 description 3134 "OSPF area common configuration state."; 3136 leaf summary { 3137 when "../area-type = 'ospf:stub' or " 3138 + "../area-type = 'ospf:nssa'" { 3139 description 3140 "Summary advertisement into the stub/NSSA area."; 3141 } 3142 type boolean; 3143 description 3144 "Enable/Disable summary advertisement into the stub or 3145 NSSA area."; 3146 } 3147 leaf default-cost { 3148 when "../area-type = 'ospf:stub' or " 3149 + "../area-type = 'ospf:nssa'" { 3150 description 3151 "Cost for LSA default route advertised into the 3152 stub or NSSA area."; 3153 } 3154 type uint32 { 3155 range "1..16777215"; 3156 } 3157 description 3158 "Set the summary default route cost for a 3159 stub or NSSA area."; 3160 } 3161 } 3163 grouping area-config { 3164 description 3165 "OSPF area configuration state."; 3167 container all-interfaces-inherit { 3168 if-feature interface-inheritance; 3169 description 3170 "Inheritance for all interfaces"; 3171 container interface { 3172 description 3173 "Interface config to be inherited by all 3174 interfaces in the area."; 3175 } 3176 } 3178 leaf area-type { 3179 type identityref { 3180 base area-type; 3181 } 3182 default normal; 3183 description 3184 "Area type."; 3185 } 3187 uses area-common-config; 3189 uses af-area-config { 3190 when "../../operation-mode = " 3191 + "'ospf:ships-in-the-night'" { 3192 description 3193 "Ships in the night configuration."; 3194 } 3195 } 3196 } 3198 grouping area-operation { 3199 description 3200 "OSPF area operation state."; 3202 container statistics { 3203 description "Per area statistics"; 3204 uses area-stat; 3205 } 3207 container database { 3208 description "Area scope LSA database."; 3209 list area-scope-lsa-type { 3210 key "lsa-type"; 3211 description "List OSPF area scope LSA databases."; 3212 leaf lsa-type { 3213 type uint16; 3214 description "OSPF area scope LSA type."; 3216 } 3217 container area-scope-lsas { 3218 description 3219 "All area scope LSAs of an area scope 3220 LSA type."; 3221 list area-scope-lsa { 3222 key "lsa-id adv-router"; 3223 description "List of OSPF area scope LSAs"; 3224 uses lsa-key; 3225 uses lsa { 3226 refine "version/ospfv2/ospfv2" { 3227 must "../../../../../../../../../" 3228 + "rt:type = 'ospf:ospfv2'" { 3229 description "OSPFv2 LSA."; 3230 } 3231 } 3232 refine "version/ospfv3/ospfv3" { 3233 must "../../../../../../../../../" 3234 + "rt:type = 'ospf:ospfv3'" { 3235 description "OSPFv3 LSA."; 3236 } 3237 } 3238 } 3239 } 3240 } 3241 } // list area-scope-lsas 3242 } 3243 } 3245 grouping local-rib { 3246 description "Local-rib grouping."; 3247 container local-rib { 3248 description "Local-rib."; 3249 list route { 3250 key "prefix"; 3251 description "Routes"; 3252 leaf prefix { 3253 type inet:ip-prefix; 3254 description "Destination prefix."; 3255 } 3256 container next-hops { 3257 description "All next hops for the route."; 3258 list next-hop { 3259 key "next-hop"; 3260 description "List of next hop for the route"; 3261 leaf outgoing-interface { 3262 type if:interface-ref; 3263 description 3264 "Name of the outgoing interface."; 3265 } 3266 leaf next-hop { 3267 type inet:ip-address; 3268 description "Nexthop address."; 3269 } 3270 } 3271 } 3272 leaf metric { 3273 type uint32; 3274 description "Metric for this route."; 3275 } 3276 leaf route-type { 3277 type route-type; 3278 description "Route type for this route."; 3279 } 3280 leaf route-tag { 3281 type uint32; 3282 description "Route tag for this route."; 3283 } 3284 } 3285 } 3286 } 3288 grouping instance-config { 3289 description 3290 "OSPF instance config state."; 3292 container all-areas-inherit { 3293 if-feature area-inheritance; 3294 description 3295 "Inheritance for all areas."; 3296 container area { 3297 description 3298 "Area config to be inherited by all areas."; 3299 } 3300 container interface { 3301 description 3302 "Interface config to be inherited by all interfaces 3303 in all areas."; 3304 } 3305 } 3307 leaf explicit-router-id { 3308 if-feature explicit-router-id; 3309 type yang:dotted-quad; 3310 description 3311 "Defined in RFC 2328. A 32-bit number 3312 that uniquely identifies the router."; 3313 } 3315 container admin-distance { 3316 description "Admin distance config state."; 3317 choice scope { 3318 description 3319 "Options for expressing admin distance 3320 as single or multiple values."; 3321 case single-value { 3322 leaf all { 3323 type uint8; 3324 description 3325 "Admin distance for intra-area, inter-area and 3326 external routes."; 3327 } 3328 } 3329 case multi-values { 3330 choice granularity { 3331 description 3332 "Options for expressing admin distance 3333 for intra-area and inter-area routes."; 3334 case detail { 3335 leaf intra-area { 3336 type uint8; 3337 description 3338 "Admin distance for intra-area routes."; 3339 } 3340 leaf inter-area { 3341 type uint8; 3342 description 3343 "Admin distance for inter-area routes."; 3344 } 3345 } 3346 case coarse { 3347 leaf internal { 3348 type uint8; 3349 description 3350 "Admin distance for both intra-area and 3351 inter-area routes."; 3352 } 3353 } 3354 } 3355 leaf external { 3356 type uint8; 3357 description 3358 "Admin distance for external routes."; 3359 } 3361 } 3362 } 3363 } 3365 container nsr { 3366 if-feature nsr; 3367 description 3368 "Non-Stop Routing (NSR) config state."; 3369 leaf enable { 3370 type boolean; 3371 description 3372 "Enable/Disable NSR."; 3373 } 3374 } 3376 container graceful-restart { 3377 if-feature graceful-restart; 3378 description 3379 "Graceful restart config state."; 3380 leaf enable { 3381 type boolean; 3382 description 3383 "Enable/Disable graceful restart as defined in RFC 3623 3384 for OSPFv2 and RFC 5187 for OSPFv3."; 3385 } 3386 leaf helper-enable { 3387 type boolean; 3388 description 3389 "Enable graceful restart helper support for restarting 3390 routers (RFC 3623 Section 3)."; 3391 } 3392 leaf restart-interval { 3393 type uint16 { 3394 range "1..1800"; // Range is defined in RFC 3623. 3395 } 3396 units seconds; 3397 default "120"; // Default is defined in RFC 3623. 3398 description 3399 "Interval in seconds to attempt graceful restart prior 3400 to failing (RFC 3623 Section B.1)"; 3401 } 3402 leaf helper-strict-lsa-checking { 3403 type boolean; 3404 description 3405 "Terminate graceful restart when an LSA topology change 3406 is detected (RFC 3623 Section B.2)."; 3407 } 3408 } 3409 leaf enable { 3410 if-feature admin-control; 3411 type boolean; 3412 default true; 3413 description 3414 "Enable/Disable the protocol."; 3415 } 3417 container auto-cost { 3418 if-feature auto-cost; 3419 description 3420 "Interface Auto-cost configuration state."; 3421 leaf enable { 3422 type boolean; 3423 description 3424 "Enable/Disable interface auto-cost."; 3425 } 3426 leaf reference-bandwidth { 3427 when "../enable = 'true'" { 3428 description "Only when auto cost is enabled"; 3429 } 3430 type uint32 { 3431 range "1..4294967"; 3432 } 3433 units Mbits; 3434 description 3435 "Configure reference bandwidth used to automatically 3436 determine interface cost (Mbits). The cost is the 3437 reference bandwidth divided by the interface speed 3438 with 1 being the minimum cost."; 3439 } 3440 } 3442 container spf-control { 3443 leaf paths { 3444 if-feature max-ecmp; 3445 type uint16 { 3446 range "1..32"; 3447 } 3448 description 3449 "Maximum number of Equal-Cost Multi-Path (ECMP) paths."; 3450 } 3451 description "SPF calculation control."; 3452 } 3454 container database-control { 3455 leaf max-lsa { 3456 if-feature max-lsa; 3457 type uint32 { 3458 range "1..4294967294"; 3459 } 3460 description 3461 "Maximum number of LSAs OSPF the router will accept."; 3462 } 3463 description "Database maintenance control."; 3464 } 3466 container stub-router { 3467 if-feature stub-router; 3468 description "Set maximum metric configuration"; 3470 choice trigger { 3471 description 3472 "Specific triggers which will enable stub 3473 router state."; 3474 container always { 3475 presence 3476 "Enables unconditional stub router support"; 3477 description 3478 "Unconditional stub router state (advertise 3479 transit links with max metric"; 3480 } 3481 } 3482 } 3484 container mpls { 3485 description 3486 "OSPF MPLS config state."; 3487 container te-rid { 3488 if-feature te-rid; 3489 description 3490 "Stable OSPF Router IP Address used for Traffic 3491 Engineering (TE)"; 3492 choice source { 3493 description 3494 "Different options for specifying TE router ID."; 3495 case interface { 3496 leaf interface { 3497 type if:interface-ref; 3498 description 3499 "Use the interface's IPv4 address as TE 3500 router ID."; 3501 } 3502 } 3503 case explicit { 3504 leaf router-id { 3505 type inet:ipv4-address; 3506 description 3507 "Explicitly configure the TE router ID."; 3508 } 3509 } 3510 } 3511 } 3512 container ldp { 3513 description 3514 "OSPF MPLS LDP config state."; 3515 leaf igp-sync { 3516 if-feature ldp-igp-sync; 3517 type boolean; 3518 description 3519 "Enable LDP IGP synchronization."; 3520 } 3521 leaf autoconfig { 3522 if-feature ldp-igp-autoconfig; 3523 type boolean; 3524 description 3525 "Enable LDP IGP interface auto-configuration."; 3526 } 3527 } 3528 } 3529 uses instance-fast-reroute-config; 3530 } 3532 grouping instance-operation { 3533 description 3534 "OSPF Address Family operation state."; 3536 leaf router-id { 3537 type yang:dotted-quad; 3538 description 3539 "Defined in RFC 2328. A 32-bit number 3540 that uniquely identifies the router."; 3541 } 3543 uses local-rib; 3545 container statistics { 3546 description "Per instance statistics"; 3547 uses instance-stat; 3548 } 3550 container database { 3551 description "AS scope LSA database."; 3552 list as-scope-lsa-type { 3553 key "lsa-type"; 3554 description "List OSPF AS scope LSA databases."; 3555 leaf lsa-type { 3556 type uint16; 3557 description "OSPF AS scope LSA type."; 3558 } 3559 container as-scope-lsas { 3560 description "All AS scope of LSA of this LSA type."; 3561 list as-scope-lsa { 3562 key "lsa-id adv-router"; 3563 description "List of OSPF area scope LSAs"; 3564 uses lsa-key; 3565 uses lsa { 3566 refine "version/ospfv2/ospfv2" { 3567 must "../../../../../../../rt:type = " 3568 + "'ospf:ospfv2'" { 3569 description "OSPFv2 LSA."; 3570 } 3571 } 3572 refine "version/ospfv3/ospfv3" { 3573 must "../../../../../../../rt:type = " 3574 + "'ospf:ospfv3'" { 3575 description "OSPFv3 LSA."; 3576 } 3577 } 3578 } 3579 } 3580 } 3581 } // list as-scope-lsas 3582 } 3583 } 3585 grouping ospf-config { 3586 description 3587 "OSPF top configuration state."; 3589 container all-instances-inherit { 3590 if-feature instance-inheritance; 3591 description 3592 "Inheritance support to all instances."; 3593 container area { 3594 description 3595 "Area config to be inherited by all areas 3596 in all instances."; 3597 } 3598 container interface { 3599 description 3600 "Interface config to be inherited by all 3601 interfaces in all instances."; 3602 } 3603 } 3605 leaf operation-mode { 3606 type identityref { 3607 base operation-mode; 3608 } 3609 default ospf:ships-in-the-night; 3610 description 3611 "OSPF operation mode."; 3612 } 3613 } 3615 grouping ospf-operation { 3616 description 3617 "OSPF top operation state."; 3618 } 3620 grouping multi-topology-area-config { 3621 description 3622 "OSPF multi-topology area configuration state."; 3624 uses area-common-config; 3626 uses af-area-config { 3627 when "../../../../operation-mode = " 3628 + "'ospf:ships-in-the-night'" { 3629 description 3630 "Ships in the night configuration."; 3631 } 3632 } 3633 } 3635 grouping multi-topology-area-operation { 3636 description 3637 "OSPF multi-topology area operation state."; 3638 } 3640 grouping multi-topology-config { 3641 description 3642 "OSPF multi-topology configuration state."; 3643 } 3645 grouping multi-topology-operation { 3646 description 3647 "OSPF multi-topology operation state."; 3649 uses local-rib; 3650 } 3652 grouping multi-topology-interface-config { 3653 description 3654 "OSPF multi-topology configuration state."; 3656 leaf cost { 3657 type uint32; 3658 description 3659 "Interface cost for this topology."; 3660 } 3661 } 3663 grouping multi-topology-interface-operation { 3664 description 3665 "OSPF multi-topology operation state."; 3666 } 3668 grouping ospfv3-interface-config { 3669 description 3670 "OSPFv3 interface specific configuration state."; 3672 leaf instance-id { 3673 type uint8 { 3674 range "0 .. 31"; 3675 } 3676 description 3677 "OSPFv3 instance ID."; 3678 } 3679 } 3681 grouping ospfv3-interface-operation { 3682 description 3683 "OSPFv3 interface specific operation state."; 3685 leaf interface-id { 3686 type uint16; 3687 description 3688 "OSPFv3 interface ID."; 3689 } 3690 } 3692 augment "/rt:routing/rt:routing-protocols/" 3693 + "rt:routing-protocol" { 3694 when "rt:type = 'ospf:ospfv2' or rt:type = 'ospf:ospfv3'" { 3695 description 3696 "This augmentation is only valid for a routing protocol 3697 instance of OSPF (type 'ospfv2' or 'ospfv3')."; 3698 } 3699 description "OSPF augmentation."; 3701 container ospf { 3702 description 3703 "OSPF."; 3705 uses ospf-config; 3707 list instance { 3708 key "af"; 3709 description 3710 "An OSPF routing protocol instance."; 3712 leaf af { 3713 type identityref { 3714 base rt:address-family; 3715 } 3716 description 3717 "Address-family of the instance."; 3718 } 3720 uses instance-config; 3722 container areas { 3723 description "All areas."; 3724 list area { 3725 key "area-id"; 3726 description 3727 "List of OSPF areas"; 3728 leaf area-id { 3729 type area-id-type; 3730 description 3731 "Area ID."; 3732 } 3734 uses area-config; 3736 container virtual-links { 3737 description "All virtual links."; 3738 list virtual-link { 3739 when "../../area-id != '0' and " 3740 + "../../area-type = 'ospf:normal'" { 3741 description 3742 "Transit area must be a non-backbone 3743 normal area."; 3744 } 3745 key "router-id"; 3746 description 3747 "OSPF virtual link"; 3748 leaf router-id { 3749 type yang:dotted-quad; 3750 description 3751 "Virtual Link remote endpoint router ID."; 3752 } 3754 uses virtual-link-config; 3755 } 3756 } 3757 container sham-links { 3758 description "All sham links."; 3759 list sham-link { 3760 key "local-id remote-id"; 3761 description 3762 "OSPF sham link"; 3763 leaf local-id { 3764 type inet:ip-address; 3765 description 3766 "Address of the local Sham Link endpoint."; 3767 } 3768 leaf remote-id { 3769 type inet:ip-address; 3770 description 3771 "Address of the remote Sham Link endpoint."; 3772 } 3773 uses sham-link-config; 3774 } 3775 } 3776 container interfaces { 3777 description "All interfaces."; 3778 list interface { 3779 key "interface"; 3780 description 3781 "List of OSPF interfaces."; 3782 leaf interface { 3783 type if:interface-ref; 3784 description 3785 "Interface."; 3786 } 3787 uses interface-config; 3788 } // list of interfaces 3789 } 3790 } // list of areas 3791 } 3792 } // list of instance 3794 } // container ospf 3795 } 3797 augment "/rt:routing/rt:routing-protocols/" 3798 + "rt:routing-protocol/ospf:ospf/ospf:instance" { 3799 when "../../rt:type = 'ospf:ospfv2' or 3800 ../../rt:type = 'ospf:ospfv3'" { 3801 description 3802 "This augmentation is only valid for OSPF 3803 (type 'ospfv2' or 'ospfv3')."; 3804 } 3805 if-feature multi-topology; 3806 description 3807 "OSPF multi-topology instance configuration 3808 state augmentation."; 3809 container topologies { 3810 description "All topologies."; 3811 list topology { 3812 // Topology must be in the same routing-instance 3813 // and of same AF as the container. 3814 key "name"; 3815 description "OSPF topology."; 3816 leaf name { 3817 type leafref { 3818 path "../../../../../../../rt:ribs/rt:rib/rt:name"; 3819 } 3820 description "RIB"; 3821 } 3823 uses multi-topology-config; 3825 container areas { 3826 description "All areas in the topology."; 3827 list area { 3828 key "area-id"; 3829 description 3830 "List of OSPF areas"; 3831 leaf area-id { 3832 type area-id-type; 3833 description 3834 "Area ID."; 3835 } 3836 uses multi-topology-area-config; 3837 } 3838 } 3839 } 3840 } 3841 } 3842 augment "/rt:routing/rt:routing-protocols/" 3843 + "rt:routing-protocol/ospf:ospf/ospf:instance/" 3844 + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" { 3845 when "../../../../../../rt:type = 'ospf:ospfv2'" { 3846 description 3847 "This augmentation is only valid for OSPFv2."; 3848 } 3849 if-feature ospf:multi-topology; 3850 description 3851 "OSPF multi-topology interface configuration state 3852 augmentation."; 3853 container topologies { 3854 description "All topologies for the interface."; 3855 list topology { 3856 key "name"; 3857 description "OSPF interface topology."; 3858 leaf name { 3859 type leafref { 3860 path "../../../../../../../../../../../" 3861 + "rt:ribs/rt:rib/rt:name"; 3862 } 3863 description 3864 "One of the topologies enabled on this interface."; 3865 } 3867 uses multi-topology-interface-config; 3868 } 3869 } 3870 } 3872 augment "/rt:routing/rt:routing-protocols/" 3873 + "rt:routing-protocol/ospf:ospf/ospf:instance/" 3874 + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" { 3875 when "../../../../../../rt:type = 'ospf:ospfv3'" { 3876 description 3877 "This augmentation is only valid for OSPFv3."; 3878 } 3879 description 3880 "OSPFv3 interface specific configuration state 3881 augmentation."; 3882 uses ospfv3-interface-config; 3883 } 3885 augment "/rt:routing-state/" 3886 + "rt:routing-protocols/rt:routing-protocol" { 3887 when "rt:type = 'ospf:ospfv2' or " 3888 + "rt:type = 'ospf:ospfv3'" { 3889 description 3890 "This augmentation is only valid for a routing protocol 3891 instance of type 'ospfv2' or 'ospfv3'."; 3892 } 3893 description 3894 "OSPF operational state."; 3895 container ospf { 3896 description "OSPF"; 3898 uses ospf-config; 3899 uses ospf-operation; 3901 list instance { 3902 key "af"; 3903 description 3904 "An OSPF routing protocol instance."; 3906 leaf af { 3907 type identityref { 3908 base rt:address-family; 3909 } 3910 description 3911 "Address-family of the instance."; 3912 } 3914 uses instance-config; 3915 uses instance-operation; 3917 container areas { 3918 description "All areas"; 3919 list area { 3920 key "area-id"; 3921 description "List of OSPF areas"; 3922 leaf area-id { 3923 type area-id-type; 3924 description "Area ID."; 3925 } 3927 uses area-config; 3928 uses area-operation; 3930 container virtual-links { 3931 description "All virtual links."; 3932 list virtual-link { 3933 description 3934 "OSPF virtual link"; 3935 leaf router-id { 3936 type yang:dotted-quad; 3937 description 3938 "Virtual link router ID."; 3939 } 3941 uses virtual-link-config; 3942 uses virtual-link-operation; 3943 } 3944 } 3945 container sham-links { 3946 description "All sham links."; 3947 list sham-link { 3948 description 3949 "OSPF sham link"; 3950 leaf local-id { 3951 type inet:ip-address; 3952 description 3953 "Address of the local Sham Link endpoint."; 3954 } 3955 leaf remote-id { 3956 type inet:ip-address; 3957 description 3958 "Address of the remote Sham Link endpoint."; 3959 } 3960 uses sham-link-config; 3961 uses sham-link-operation; 3962 } 3963 } 3965 container interfaces { 3966 description "All interfaces in the area."; 3967 list interface { 3968 key "interface"; 3969 description 3970 "List of OSPF interfaces."; 3971 leaf interface { 3972 // Should it refer to config state leaf? 3973 type if:interface-ref; 3974 description "Interface."; 3975 } 3977 uses interface-config; 3978 uses interface-operation; 3979 } // list of OSPF interfaces 3980 } 3981 } // list of OSPF areas 3982 } 3983 } // list of instances 3984 } // container ospf 3985 } 3986 augment "/rt:routing-state/" 3987 + "rt:routing-protocols/rt:routing-protocol/" 3988 + "ospf:ospf/ospf:instance" { 3989 when "../../rt:type = 'ospf:ospfv2'" { 3990 description 3991 "This augmentation is only valid for OSPFv2."; 3992 } 3993 if-feature multi-topology; 3994 description 3995 "OSPF multi-topology instance operation state 3996 augmentation."; 3997 container topologies { 3998 description "All topologies."; 3999 list topology { 4000 // Topology must be in the same routing-instance 4001 // and of same AF as the container. 4002 key "name"; 4003 description "OSPF topology."; 4004 leaf name { 4005 type leafref { 4006 path "../../../../../../../" 4007 + "rt:ribs/rt:rib/rt:name"; 4008 } 4009 description "RIB"; 4010 } 4012 uses multi-topology-config; 4013 uses multi-topology-operation; 4015 container areas { 4016 description "All areas in the topology."; 4017 list area { 4018 key "area-id"; 4019 description 4020 "List of OSPF areas"; 4021 leaf area-id { 4022 type area-id-type; 4023 description 4024 "Area ID."; 4025 } 4026 uses multi-topology-area-config; 4027 uses multi-topology-area-operation; 4028 } 4029 } 4030 } 4031 } 4032 } 4033 augment "/rt:routing-state/" 4034 + "rt:routing-protocols/rt:routing-protocol/" 4035 + "ospf:ospf/ospf:instance/ospf:areas/ospf:area/" 4036 + "ospf:interfaces/ospf:interface" { 4037 when "../../../../../../rt:type = 'ospf:ospfv2'" { 4038 description 4039 "This augmentation is only valid for OSPFv2."; 4040 } 4041 if-feature ospf:multi-topology; 4042 description 4043 "OSPF multi-topology interface operation state 4044 augmentation."; 4045 container topologies { 4046 description "All topologies."; 4047 list topology { 4048 key "name"; 4049 description "OSPF interface topology."; 4050 leaf name { 4051 type leafref { 4052 path "../../../../../../../../../../../" 4053 + "rt:ribs/rt:rib/rt:name"; 4054 } 4055 description 4056 "One of the topologies enabled on this interface."; 4057 } 4058 uses multi-topology-interface-config; 4059 uses multi-topology-interface-operation; 4060 } 4061 } 4062 } 4064 augment "/rt:routing-state/" 4065 + "rt:routing-protocols/rt:routing-protocol/" 4066 + "ospf:ospf/ospf:instance/ospf:areas/ospf:area/" 4067 + "ospf:interfaces/ospf:interface" { 4068 when "../../../../../../rt:type = 'ospf:ospfv3'" { 4069 description 4070 "This augmentation is only valid for OSPFv3."; 4071 } 4072 description 4073 "OSPFv3 interface specific operation state 4074 augmentation."; 4075 uses ospfv3-interface-config; 4076 uses ospfv3-interface-operation; 4077 } 4079 grouping route-content { 4080 description 4081 "This grouping defines OSPF-specific route attributes."; 4082 leaf metric { 4083 type uint32; 4084 description "OSPF route metric."; 4085 } 4086 leaf tag { 4087 type uint32; 4088 default "0"; 4089 description "OSPF route tag."; 4090 } 4091 leaf route-type { 4092 type route-type; 4093 description "OSPF route type"; 4094 } 4095 } 4097 augment "/rt:routing-state/" 4098 + "rt:ribs/rt:rib/rt:routes/rt:route" { 4099 when "rt:source-protocol = 'ospf:ospfv2' or " 4100 + "rt:source-protocol = 'ospf:ospfv3'" { 4101 description 4102 "This augmentation is only valid for a routes whose 4103 source protocol is OSPF."; 4104 } 4105 description 4106 "OSPF-specific route attributes."; 4107 uses route-content; 4108 } 4110 grouping notification-instance-hdr { 4111 description 4112 "This group describes common instance specific 4113 data for notifications."; 4115 /* 4116 * TBD: 4117 * Need to define a way to reference routing-instance. 4118 */ 4119 leaf routing-instance { 4120 type string; 4121 description 4122 "Describe the routing instance."; 4123 } 4125 leaf routing-protocol-type { 4126 type leafref { 4127 path "/rt:routing/rt:routing-protocols/" 4128 + "rt:routing-protocol/rt:type"; 4130 } 4131 must ". = 'ospf:ospfv2' or . = 'ospf:ospfv3'" { 4132 description "Only applies to the OSPF routing protocol."; 4133 } 4134 description 4135 "OSPF routing protocol type (OSPFv2 or OSPFv3)."; 4136 } 4138 leaf routing-protocol-name { 4139 type leafref { 4140 path "/rt:routing/" 4141 + "rt:routing-protocols/rt:routing-protocol" 4142 + "[rt:type=current()/../routing-protocol-type]/" 4143 + "rt:name"; 4144 } 4145 description 4146 "OSPF routing protocol instance name."; 4147 } 4149 leaf af { 4150 type leafref { 4151 path "/rt:routing/" 4152 + "rt:routing-protocols/rt:routing-protocol" 4153 + "[rt:name=current()/../routing-protocol-name]" 4154 + "[rt:type=current()/../routing-protocol-type]/" 4155 + "ospf:ospf/ospf:instance/af"; 4156 } 4157 description 4158 "Address family of the OSPF instance."; 4159 } 4160 } 4162 grouping notification-interface { 4163 description 4164 "This grouping provides the interface information 4165 for the notifications."; 4167 choice if-link-type-selection { 4168 description 4169 "Options for link type."; 4170 container interface { 4171 description "Normal interface."; 4172 leaf interface { 4173 type if:interface-ref; 4174 description "Interface."; 4175 } 4176 } 4177 container virtual-link { 4178 description "virtual-link."; 4179 leaf area-id { 4180 type area-id-type; 4181 description "Area ID."; 4182 } 4183 leaf neighbor-router-id { 4184 type yang:dotted-quad; 4185 description "Neighbor Router ID."; 4186 } 4187 } 4188 container sham-link { 4189 description "sham-link."; 4190 leaf area-id { 4191 type area-id-type; 4192 description "Area ID."; 4193 } 4194 leaf local-ip-addr { 4195 type inet:ip-address; 4196 description "Sham link local address."; 4197 } 4198 leaf remote-ip-addr { 4199 type inet:ip-address; 4200 description "Sham link remote address."; 4201 } 4202 } 4203 } 4204 } 4206 grouping notification-neighbor { 4207 description 4208 "This grouping provides the neighbor information 4209 for the notifications."; 4211 leaf neighbor-router-id { 4212 type yang:dotted-quad; 4213 description "Neighbor Router ID."; 4214 } 4216 leaf neighbor-ip-addr { 4217 type yang:dotted-quad; 4218 description "Neighbor address."; 4219 } 4220 } 4222 notification if-state-change { 4223 uses notification-instance-hdr; 4224 uses notification-interface; 4225 leaf state { 4226 type if-state-type; 4227 description "Interface state."; 4228 } 4229 description 4230 "This notification is sent when an interface 4231 state change is detected."; 4232 } 4234 notification if-config-error { 4235 uses notification-instance-hdr; 4236 uses notification-interface; 4238 leaf packet-source { 4239 type yang:dotted-quad; 4240 description "Source address."; 4241 } 4243 leaf packet-type { 4244 type packet-type; 4245 description "OSPF packet type."; 4246 } 4248 leaf error { 4249 type enumeration { 4250 enum "badVersion" { 4251 description "Bad version."; 4252 } 4253 enum "areaMismatch" { 4254 description "Area mistmatch."; 4255 } 4256 enum "unknownNbmaNbr" { 4257 description "Unknown NBMA neighbor."; 4258 } 4259 enum "unknownVirtualNbr" { 4260 description "Unknown virtual link neighbor."; 4261 } 4262 enum "authTypeMismatch" { 4263 description "Auth type mismatch."; 4264 } 4265 enum "authFailure" { 4266 description "Auth failure."; 4267 } 4268 enum "netMaskMismatch" { 4269 description "Network mask mismatch."; 4270 } 4271 enum "helloIntervalMismatch" { 4272 description "Hello interval mismatch."; 4274 } 4275 enum "deadIntervalMismatch" { 4276 description "Dead interval mismatch."; 4277 } 4278 enum "optionMismatch" { 4279 description "Option mismatch."; 4280 } 4281 enum "mtuMismatch" { 4282 description "MTU mismatch."; 4283 } 4284 enum "duplicateRouterId" { 4285 description "Duplicate router ID."; 4286 } 4287 enum "noError" { 4288 description "No error."; 4289 } 4290 } 4291 description "Error code."; 4292 } 4293 description 4294 "This notification is sent when interface 4295 config error is detected."; 4296 } 4298 notification nbr-state-change { 4299 uses notification-instance-hdr; 4300 uses notification-interface; 4301 uses notification-neighbor; 4303 leaf state { 4304 type nbr-state-type; 4305 description "Neighbor state."; 4306 } 4308 description 4309 "This notification is sent when neighbor 4310 state change is detected."; 4311 } 4313 notification nbr-restart-helper-status-change { 4314 uses notification-instance-hdr; 4315 uses notification-interface; 4316 uses notification-neighbor; 4318 leaf status { 4319 type restart-helper-status-type; 4320 description "Restart helper status."; 4321 } 4322 leaf age { 4323 type uint32; 4324 units seconds; 4325 description 4326 "Remaining time in current OSPF graceful restart 4327 interval, if the router is acting as a restart 4328 helper for the neighbor."; 4329 } 4331 leaf exit-reason { 4332 type restart-exit-reason-type; 4333 description 4334 "Restart helper exit reason."; 4335 } 4336 description 4337 "This notification is sent when a neighbor restart 4338 helper status change is detected."; 4339 } 4341 notification rx-bad-packet { 4342 uses notification-instance-hdr; 4343 uses notification-interface; 4345 leaf packet-source { 4346 type yang:dotted-quad; 4347 description "Source address."; 4348 } 4350 leaf packet-type { 4351 type packet-type; 4352 description "OSPF packet type."; 4353 } 4355 description 4356 "This notification is sent when an OSPF packet that 4357 cannot be parsed is received on an OSPF interface."; 4358 } 4359 notification lsdb-approaching-overflow { 4360 uses notification-instance-hdr; 4362 leaf ext-lsdb-limit { 4363 type uint32; 4364 description 4365 "The maximum number of non-default AS-external LSAs 4366 entries that can be stored in the link state database."; 4367 } 4369 description 4370 "This notification is sent when the number of LSAs 4371 in the router's link state database has exceeded 4372 ninety percent of the ext-lsdb-limit."; 4373 } 4375 notification lsdb-overflow { 4376 uses notification-instance-hdr; 4378 leaf ext-lsdb-limit { 4379 type uint32; 4380 description 4381 "The maximum number of non-default AS-external LSAs 4382 entries that can be stored in the link state database."; 4383 } 4385 description 4386 "This notification is sent when the number of LSAs 4387 in the router's link state database has exceeded 4388 ext-lsdb-limit."; 4389 } 4391 notification nssa-translator-status-change { 4392 uses notification-instance-hdr; 4394 leaf area-id { 4395 type area-id-type; 4396 description "Area ID."; 4397 } 4399 leaf status { 4400 type nssa-translator-state-type; 4401 description 4402 "NSSA translator status."; 4403 } 4405 description 4406 "This notification is sent when there is a change 4407 in the router's role in translating OSPF NSSA LSAs 4408 to OSPF AS-External LSAs."; 4409 } 4411 notification restart-status-change { 4412 uses notification-instance-hdr; 4414 leaf status { 4415 type restart-status-type; 4416 description 4417 "Restart status."; 4419 } 4421 leaf restart-interval { 4422 type uint16 { 4423 range "1..1800"; 4424 } 4425 units seconds; 4426 default "120"; 4427 description 4428 "Restart interval."; 4429 } 4431 leaf exit-reason { 4432 type restart-exit-reason-type; 4433 description 4434 "Restart exit reason."; 4435 } 4437 description 4438 "This notification is sent when the graceful restart 4439 state for the router has changed."; 4440 } 4441 } 4442 4444 6. OSPF Segment Routing Yang Module 4446 file "ietf-ospf-sr@2016-03-20.yang" 4447 module ietf-ospf-sr { 4448 namespace "urn:ietf:params:xml:ns:yang:ietf-ospf-sr"; 4450 prefix ospf-sr; 4452 import ietf-inet-types { 4453 prefix "inet"; 4454 } 4456 import ietf-yang-types { 4457 prefix "yang"; 4458 } 4460 import ietf-routing { 4461 prefix "rt"; 4462 } 4463 import ietf-segment-routing { 4464 prefix "sr"; 4465 } 4466 import ietf-ospf { 4467 prefix "ospf"; 4468 } 4470 organization 4471 "Cisco Systems 4472 170 West Tasman Drive 4473 San Jose, CA 95134-1706 4474 USA"; 4476 contact 4477 "WG Web: 4478 WG List: 4480 WG Chair: Acee Lindem 4481 4483 WG Chair: Abhay Roy 4484 4486 Editor: Derek Yeung 4487 4488 Author: Derek Yeung 4489 4490 Author: Yingzhen Qu 4491 4492 Author: Acee Lindem 4493 4494 Author: Jeffrey Zhang 4495 4496 Author: Ing-Wher Chen 4497 4498 Author: Greg Hankins 4499 "; 4501 description 4502 "This YANG module defines the generic configuration 4503 and operational state for OSPF Segment Routing, which is 4504 common across all of the vendor implementations. It is 4505 intended that the module will be extended by vendors to 4506 define vendor-specific OSPF Segment Routing configuration 4507 and operational parameters and policies. 4509 Terms and Acronyms 4511 OSPF (ospf): Open Shortest Path First 4513 IP (ip): Internet Protocol 4514 IPv4 (ipv4):Internet Protocol Version 4 4516 IPv6 (ipv6): Internet Protocol Version 6 4517 "; 4519 revision 2016-03-20 { 4520 description 4521 "* Remove routing-instance."; 4522 reference 4523 "RFC XXXX: A YANG Data Model for OSPF Segment Routing."; 4524 } 4526 revision 2015-10-19 { 4527 description 4528 "* Add per-protocol SRGB support. 4529 * Editorial changes."; 4530 reference 4531 "RFC XXXX: A YANG Data Model for OSPF Segment Routing."; 4532 } 4534 revision 2015-09-02 { 4535 description 4536 "* Author list update. 4537 * Editorial changes."; 4538 reference 4539 "RFC XXXX: A YANG Data Model for OSPF Segment Routing."; 4540 } 4542 revision 2015-07-06 { 4543 description 4544 "Initial revision."; 4545 reference 4546 "RFC XXXX: A YANG Data Model for OSPF Segment Routing."; 4547 } 4549 feature ti-lfa { 4550 description 4551 "Topology-Independent Loop-Free Alternate (TI-LFA) 4552 computation using segment routing."; 4553 } 4555 /* Configuration */ 4557 augment "/rt:routing/rt:routing-protocols" 4558 + "/rt:routing-protocol/ospf:ospf/ospf:instance" { 4559 when "../../rt:type = 'ospf:ospfv2' or " 4560 + "../../rt:type = 'ospf:ospfv3'" { 4561 description 4562 "This augments the OSPF routing protocol when used."; 4563 } 4564 description 4565 "This augments the OSPF protocol configuration 4566 with segment routing."; 4567 uses sr:controlplane-cfg; 4568 container protocol-srgb { 4569 if-feature sr:protocol-srgb; 4570 uses sr:srgb-cfg; 4571 description 4572 "Per-protocol SRGB."; 4573 } 4574 } 4576 augment "/rt:routing/rt:routing-protocols/" 4577 + "rt:routing-protocol/ospf:ospf/ospf:instance/" 4578 + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" { 4579 when "../../../../../../rt:type = 'ospf:ospfv2' or " 4580 + "../../../../../../rt:type = 'ospf:ospfv3'" { 4581 description 4582 "This augments the OSPF interface configuration 4583 when used."; 4584 } 4585 description 4586 "This augments the OSPF protocol interface 4587 configuration with segment routing."; 4589 uses sr:igp-interface-cfg; 4590 } 4592 augment "/rt:routing/rt:routing-protocols/" 4593 + "rt:routing-protocol/ospf:ospf/ospf:instance/" 4594 + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface/" 4595 + "ospf:fast-reroute" { 4596 when "../../../../../../../rt:type = 'ospf:ospfv2' or " 4597 + "../../../../../../../rt:type = 'ospf:ospfv3'" { 4598 description 4599 "This augments the OSPF routing protocol when used."; 4600 } 4601 description 4602 "This augments the OSPF protocol IP-FRR with TI-LFA."; 4604 container ti-lfa { 4605 if-feature ti-lfa; 4606 leaf enable { 4607 type boolean; 4608 description 4609 "Enables TI-LFA computation."; 4611 } 4612 description 4613 "Topology Independent Loop Free Alternate 4614 (TI-LFA) support."; 4615 } 4616 } 4618 /* Operational states */ 4620 augment "/rt:routing-state/" 4621 + "rt:routing-protocols/rt:routing-protocol/" 4622 + "ospf:ospf/ospf:instance" { 4623 when "../../rt:type = 'ospf:ospfv2' or " 4624 + "../../rt:type = 'ospf:ospfv3'" { 4625 description 4626 "This augments the OSPF routing protocol when used."; 4627 } 4628 description 4629 "This augments the OSPF protocol operational state 4630 with segment routing."; 4632 uses sr:controlplane-cfg; 4633 container protocol-srgb { 4634 if-feature sr:protocol-srgb; 4635 uses sr:srgb-cfg; 4636 description 4637 "Per-protocol SRGB."; 4638 } 4639 } 4641 augment "/rt:routing-state/" 4642 + "rt:routing-protocols/rt:routing-protocol/" 4643 + "ospf:ospf/ospf:instance/ospf:areas/ospf:area/" 4644 + "ospf:interfaces/ospf:interface" { 4645 when "../../../../../../rt:type = 'ospf:ospfv2' or " 4646 + "../../../../../../rt:type = 'ospf:ospfv3'" { 4647 description 4648 "This augments the OSPF routing protocol when used."; 4649 } 4650 description 4651 "This augments the OSPF protocol interface 4652 operational state with segment routing."; 4654 uses sr:igp-interface-cfg; 4655 } 4657 /* Database */ 4658 grouping sid-sub-tlv { 4659 description "SID/Label sub-TLV grouping."; 4660 container sid-sub-tlv { 4661 description 4662 "Used to advertise the SID/Label associated with a 4663 prefix or adjacency."; 4664 leaf sid { 4665 type uint32; 4666 description 4667 "Segment Identifier (SID) - A 20 bit label or 4668 32 bit SID."; 4669 } 4670 } 4671 } 4673 grouping prefix-sid-sub-tlvs { 4674 description "Prefix Segment ID (SID) sub-TLVs."; 4675 container perfix-sid-sub-tlvs{ 4676 description "Prefix SID sub-TLV."; 4677 list prefix-sid-sub-tlv { 4678 description "Prefix SID sub-TLV."; 4679 leaf flags { 4680 type bits { 4681 bit NP { 4682 description 4683 "No-PHP flag."; 4684 } 4685 bit M { 4686 description 4687 "Mapping server flag."; 4688 } 4689 bit E { 4690 description 4691 "Explicit-NULL flag."; 4692 } 4693 bit V { 4694 description 4695 "Value/Index flag."; 4696 } 4697 bit L { 4698 description 4699 "Local flag."; 4700 } 4701 } 4702 description "Segment Identifier (SID) Flags."; 4703 } 4704 leaf mt-id { 4705 type uint8; 4706 description "Multi-topology ID."; 4707 } 4708 leaf algorithm { 4709 type uint8; 4710 description 4711 "The algorithm associated with the prefix-SID."; 4712 } 4713 leaf sid { 4714 type uint32; 4715 description "An index or label."; 4716 } 4717 } 4718 } 4719 } 4721 grouping sid-binding-sub-tlvs { 4722 description "SID/Label binding sub-TLV grouping."; 4723 container sid-binding-sub-tlvs { 4724 description "SID binding sub-TLVs."; 4725 list sid-binding-sub-tlv { 4726 description "SID binding sub-TLV."; 4727 leaf flags { 4728 type bits { 4729 bit M { 4730 description 4731 "Mirroring context flag."; 4732 } 4733 } 4734 description "Flags."; 4735 } 4736 leaf mt-id { 4737 type uint8; 4738 description "Multi-topology ID."; 4739 } 4740 leaf weight { 4741 type uint8; 4742 description "Weight for load-balancing purposes."; 4743 } 4745 uses sid-sub-tlv; 4747 container ero-metric-sub-tlv { 4748 description 4749 "The cost of an Explicit Route Object (ERO) path."; 4750 leaf metric { 4751 type uint32; 4752 description "The aggregate IGP or TE path cost."; 4753 } 4755 } 4757 container ipv4-ero-sub-tlv { 4758 description 4759 "The IPv4 ERO sub-TLV describes a path segment 4760 using IPv4 address."; 4761 leaf flags { 4762 type bits { 4763 bit L { 4764 description 4765 "If set, then the segment path is designated as 4766 'loose'. Otherwise, the path is 'strict'."; 4767 } 4768 } 4769 description "ERO Flags."; 4770 } 4771 leaf ipv4-address { 4772 type inet:ipv4-address; 4773 description "The address of the explicit route hop."; 4774 } 4775 } 4776 container unnumbered-ero-sub-tlv { 4777 description "The unnumbered interface ID ERO sub-TLV 4778 describes a path segment that includes an 4779 unnumbered interface."; 4780 leaf flags { 4781 type bits { 4782 bit L { 4783 description 4784 "If set, then the segment path is designated as 4785 'loose'. Otherwise as 'strict'."; 4786 } 4787 } 4788 description "ERO Flags."; 4789 } 4790 leaf router-id { 4791 type yang:dotted-quad; 4792 description "Router-id of the next-hop."; 4793 } 4794 leaf interface-id { 4795 type uint32; 4796 description 4797 "The identifier assigned to the link by the 4798 router specified by the router-id."; 4799 } 4800 } 4801 container ipv4-backup-ero-sub-tlv { 4802 description 4803 "The IPv4 backup ERO sub-TLV describes a path 4804 segment using IPv4 address."; 4805 leaf flags { 4806 type bits { 4807 bit L { 4808 description 4809 "If set, then the segment path is designated as 4810 'loose'. Otherwise as 'strict'."; 4811 } 4812 } 4813 description "Flags."; 4814 } 4815 leaf ipv4-address { 4816 type inet:ipv4-address; 4817 description "The address of the explicit route hop."; 4818 } 4819 } 4820 container unnumbered-backup-ero-sub-tlv { 4821 description 4822 "The unnumbered interface ID backup ERO sub-TLV 4823 describes a path segment that includes an 4824 unnumbered interface."; 4825 leaf flags { 4826 type bits { 4827 bit L { 4828 description 4829 "If set, then the segment path is designated as 4830 'loose'. Otherwise, the path is 'strict'."; 4831 } 4832 } 4833 description "Flags."; 4834 } 4835 leaf router-id { 4836 type yang:dotted-quad; 4837 description "Router-id of the next-hop."; 4838 } 4839 leaf interface-id { 4840 type uint32; 4841 description 4842 "The identifier assigned to the link by the 4843 router specified by the router-id."; 4844 } 4845 } 4846 } 4847 } 4848 } 4850 grouping extended-prefix-range-tlvs { 4851 description "Extended prefix range TLV grouping."; 4853 container extended-prefix-range-tlvs { 4854 description "The list of range of prefixes."; 4855 list extended-prefix-range-tlv { //type=2? 4856 description "The range of prefixes."; 4857 leaf range-size { 4858 type uint16; 4859 description "The number of prefixes covered by the 4860 advertisement."; 4861 } 4862 leaf flags { 4863 type bits { 4864 bit IA { 4865 description 4866 "Inter-Area flag."; 4867 } 4868 } 4869 description "Flags."; 4870 } 4871 leaf prefix { 4872 type inet:ip-prefix; 4873 description "Address prefix."; 4874 } 4875 uses prefix-sid-sub-tlvs; 4876 uses sid-binding-sub-tlvs; 4877 uses ospf:unknown-tlvs; 4878 } 4879 } 4880 } 4882 grouping sr-algorithm-tlv { 4883 description "SR algorithm TLV grouping."; 4884 container sr-algorithm-tlv { 4885 description "All SR algorithm TLVs."; 4886 leaf-list sr-algorithm { 4887 type uint8; 4888 description 4889 "The Segment Routing (SR) algorithms that the router is 4890 currently using."; 4891 } 4892 } 4893 } 4895 grouping sid-range-tlvs { 4896 description "SID Range TLV grouping."; 4897 container sid-range-tlvs { 4898 description "List of SID range TLVs."; 4899 list sid-range-tlv { 4900 description "SID range TLV."; 4901 leaf range-size { 4902 type ospf:uint24; 4903 description "The SID range."; 4904 } 4905 uses sid-sub-tlv; 4906 } 4907 } 4908 } 4909 augment "/rt:routing-state/" 4910 + "rt:routing-protocols/rt:routing-protocol/" 4911 + "ospf:ospf/ospf:instance/ospf:areas/ospf:area/" 4912 + "ospf:interfaces/ospf:interface/ospf:database/" 4913 + "ospf:link-scope-lsa-type/ospf:link-scope-lsas/" 4914 + "ospf:link-scope-lsa/ospf:version/ospf:ospfv2/" 4915 + "ospf:ospfv2/ospf:body/ospf:opaque/" 4916 + "ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv" { 4917 when "../../../../../../../../../../../../../../../../../" 4918 + "rt:type = 'ospf:ospfv2'" { 4919 description 4920 "This augmentation is only valid for OSPFv2."; 4921 } 4922 description 4923 "SR specific TLVs for OSPFv2 extended prefix TLV 4924 in type 9 opaque LSA."; 4925 uses prefix-sid-sub-tlvs; 4926 uses sid-binding-sub-tlvs; 4927 } 4929 augment "/rt:routing-state/" 4930 + "rt:routing-protocols/rt:routing-protocol/" 4931 + "ospf:ospf/ospf:instance/ospf:areas/" 4932 + "ospf:area/ospf:database/" 4933 + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/" 4934 + "ospf:area-scope-lsa/ospf:version/ospf:ospfv2/" 4935 + "ospf:ospfv2/ospf:body/ospf:opaque/" 4936 + "ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv" { 4937 when "../../../../../../../../../../../../../../../" 4938 + "rt:type = 'ospf:ospfv2'" { 4939 description 4940 "This augmentation is only valid for OSPFv2."; 4941 } 4942 description 4943 "SR specific TLVs for OSPFv2 extended prefix TLV 4944 in type 10 opaque LSA."; 4945 uses prefix-sid-sub-tlvs; 4946 uses sid-binding-sub-tlvs; 4948 } 4950 augment "/rt:routing-state/" 4951 + "rt:routing-protocols/rt:routing-protocol/" 4952 + "ospf:ospf/ospf:instance/ospf:database/" 4953 + "ospf:as-scope-lsa-type/ospf:as-scope-lsas/" 4954 + "ospf:as-scope-lsa/ospf:version/ospf:ospfv2/" 4955 + "ospf:ospfv2/ospf:body/ospf:opaque/" 4956 + "ospf:extended-prefix-tlvs/ospf:extended-prefix-tlv" { 4957 when "../../../../../../../../../../../../../" 4958 + "rt:type = 'ospf:ospfv2'" { 4959 description 4960 "This augmentation is only valid for OSPFv2."; 4961 } 4962 description 4963 "SR specific TLVs for OSPFv2 extended prefix TLV 4964 in type 11 opaque LSA."; 4965 uses prefix-sid-sub-tlvs; 4966 uses sid-binding-sub-tlvs; 4967 } 4969 augment "/rt:routing-state/" 4970 + "rt:routing-protocols/rt:routing-protocol/" 4971 + "ospf:ospf/ospf:instance/ospf:areas/" 4972 + "ospf:area/ospf:database/" 4973 + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/" 4974 + "ospf:area-scope-lsa/ospf:version/ospf:ospfv2/" 4975 + "ospf:ospfv2/ospf:body/ospf:opaque/" 4976 + "ospf:extended-link-tlvs/ospf:extended-link-tlv" { 4977 when "../../../../../../../../../../../../../../../" 4978 + "rt:type = 'ospf:ospfv2'" { 4979 description 4980 "This augmentation is only valid for OSPFv2."; 4981 } 4982 description 4983 "SR specific TLVs for OSPFv2 extended link TLV 4984 in type 10 opaque LSA."; 4986 container adj-sid-sub-tlvs { 4987 description "Adjacency SID optional sub-TLVs."; 4988 list adj-sid-sub-tlv { 4989 description "List of Adjacency SID sub-TLVs."; 4990 leaf flags { 4991 type bits { 4992 bit B { 4993 description 4994 "Backup flag."; 4995 } 4996 bit V { 4997 description 4998 "Value/Index flag."; 4999 } 5000 bit L { 5001 description 5002 "Local/Global flag."; 5003 } 5004 bit S { 5005 description 5006 "Set flag."; 5007 } 5008 } 5009 description "Flags."; 5010 } 5011 leaf mt-id { 5012 type uint8; 5013 description "Multi-topology ID."; 5014 } 5015 leaf weight { 5016 type uint8; 5017 description "Weight used for load-balancing."; 5018 } 5019 leaf sid { 5020 type uint32; 5021 description "Segment Identifier (SID) index/label."; 5022 } 5023 } 5024 } 5026 container lan-adj-sid-sub-tlvs { 5027 description "LAN Adjacency SID optional sub-TLVs."; 5028 list lan-adj-sid-sub-tlv { 5029 description "List of LAN adjacency SID sub-TLVs."; 5030 leaf flags { 5031 type bits { 5032 bit B { 5033 description 5034 "Backup flag."; 5035 } 5036 bit V { 5037 description 5038 "Value/Index flag."; 5039 } 5040 bit L { 5041 description 5042 "Local/Global flag."; 5043 } 5044 bit S { 5045 description 5046 "Set flag."; 5047 } 5048 } 5049 description "Flags."; 5050 } 5051 leaf mt-id { 5052 type uint8; 5053 description "Multi-topology ID."; 5054 } 5055 leaf weight { 5056 type uint8; 5057 description "Weight used for load-balancing."; 5058 } 5059 leaf neighbor-router-id { 5060 type yang:dotted-quad; 5061 description "Neighbor router ID."; 5062 } 5063 leaf sid { 5064 type uint32; 5065 description "Segment Identifier (SID) index/label."; 5066 } 5067 } 5068 } 5069 } 5071 augment "/rt:routing-state/" 5072 + "rt:routing-protocols/rt:routing-protocol/" 5073 + "ospf:ospf/ospf:instance/ospf:areas/ospf:area/" 5074 + "ospf:interfaces/ospf:interface/ospf:database/" 5075 + "ospf:link-scope-lsa-type/ospf:link-scope-lsas/" 5076 + "ospf:link-scope-lsa/ospf:version/ospf:ospfv2/" 5077 + "ospf:ospfv2/ospf:body/ospf:opaque" { 5078 when "../../../../../../../../../../../../../../../" 5079 + "rt:type = 'ospf:ospfv2'" { 5080 description 5081 "This augmentation is only valid for OSPFv2."; 5082 } 5084 description 5085 "SR specific TLVs for OSPFv2 type 9 opaque LSA."; 5087 uses extended-prefix-range-tlvs; 5088 uses sr-algorithm-tlv; 5089 uses sid-range-tlvs; 5090 } 5091 augment "/rt:routing-state/" 5092 + "rt:routing-protocols/rt:routing-protocol/" 5093 + "ospf:ospf/ospf:instance/ospf:areas/" 5094 + "ospf:area/ospf:database/" 5095 + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/" 5096 + "ospf:area-scope-lsa/ospf:version/ospf:ospfv2/" 5097 + "ospf:ospfv2/ospf:body/ospf:opaque" { 5098 when "../../../../../../../../../../../../../" 5099 + "rt:type = 'ospf:ospfv2'" { 5100 description 5101 "This augmentation is only valid for OSPFv2."; 5102 } 5104 description 5105 "SR specific TLVs for OSPFv2 type 10 opaque LSA."; 5107 uses extended-prefix-range-tlvs; 5108 uses sr-algorithm-tlv; 5109 uses sid-range-tlvs; 5110 } 5112 augment "/rt:routing-state/" 5113 + "rt:routing-protocols/rt:routing-protocol/" 5114 + "ospf:ospf/ospf:instance/ospf:database/" 5115 + "ospf:as-scope-lsa-type/ospf:as-scope-lsas/" 5116 + "ospf:as-scope-lsa/ospf:version/ospf:ospfv2/" 5117 + "ospf:ospfv2/ospf:body/ospf:opaque" { 5118 when "../../../../../../../../../../../" 5119 + "rt:type = 'ospf:ospfv2'" { 5120 description 5121 "This augmentation is only valid for OSPFv2."; 5122 } 5123 description 5124 "SR specific TLVs for OSPFv2 type 11 opaque LSA."; 5126 uses extended-prefix-range-tlvs; 5127 uses sr-algorithm-tlv; 5128 uses sid-range-tlvs; 5129 } 5130 } 5131 5133 7. OSPF BFD Yang Module 5135 file "ietf-ospf-bfd@2016-03-20.yang" 5136 module ietf-ospf-bfd { 5137 namespace "urn:ietf:params:xml:ns:yang:ietf-ospf-bfd"; 5138 prefix ospf-bfd; 5140 import ietf-routing { 5141 prefix "rt"; 5142 } 5143 import ietf-ospf { 5144 prefix "ospf"; 5145 } 5147 organization 5148 "Cisco Systems 5149 170 West Tasman Drive 5150 San Jose, CA 95134-1706 5151 USA"; 5153 contact 5154 "WG Web: 5155 WG List: 5157 WG Chair: Acee Lindem 5158 5160 WG Chair: Abhay Roy 5161 5163 Editor: Derek Yeung 5164 5165 Author: Derek Yeung 5166 5167 Author: Yingzhen Qu 5168 5169 Author: Acee Lindem 5170 5171 Author: Jeffrey Zhang 5172 5173 Author: Ing-Wher Chen 5174 5175 Author: Greg Hankins 5176 "; 5178 description 5179 "This YANG module defines the generic configuration 5180 and operational state for OSPF BFD, which is common 5181 across all of the vendor implementations. It is 5182 intended that the module will be extended by vendors to 5183 define vendor-specific OSPF BFD configuration 5184 and operational parameters and policies. 5186 Terms and Acronyms 5188 OSPF (ospf): Open Shortest Path First 5190 IP (ip): Internet Protocol 5192 IPv4 (ipv4):Internet Protocol Version 4 5194 IPv6 (ipv6): Internet Protocol Version 6 5195 "; 5197 revision 2016-03-20 { 5198 description 5199 "* Remove routing-instance. 5200 * Remove use of bfd-protocol-parms from ietf-bfd module. 5201 * Remove import of ietf-bfd module."; 5202 reference 5203 "RFC XXXX: A YANG Data Model for OSPF BFD."; 5204 } 5206 revision 2015-10-19 { 5207 description 5208 "Initial revision."; 5209 reference 5210 "RFC XXXX: A YANG Data Model for OSPF BFD."; 5211 } 5213 /* Configuration */ 5215 augment "/rt:routing/rt:routing-protocols/" 5216 + "rt:routing-protocol/ospf:ospf/ospf:instance/" 5217 + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" { 5218 when "../../../../../../rt:type = 'ospf:ospfv2' or " 5219 + "../../../../../../rt:type = 'ospf:ospfv3'" { 5220 description 5221 "This augments the OSPF routing protocol when used"; 5222 } 5223 description 5224 "This augments OSPF protocol configuration 5225 with BFD."; 5227 container bfd { 5228 description "BFD configuration."; 5229 leaf enabled { 5230 type boolean; 5231 default false; 5232 description 5233 "True if BFD is enabled for the OSPF interface."; 5235 } 5236 } 5237 } 5239 /* Operational states */ 5241 augment "/rt:routing-state/" 5242 + "rt:routing-protocols/rt:routing-protocol/" 5243 + "ospf:ospf/ospf:instance/ospf:areas/ospf:area/" 5244 + "ospf:interfaces/ospf:interface" { 5245 when "../../../../../../rt:type = 'ospf:ospfv2' or " 5246 + "../../../../../../rt:type = 'ospf:ospfv3'" { 5247 description 5248 "This augments the OSPF routing protocol when used"; 5249 } 5250 description 5251 "This augments OSPF protocol operation 5252 with BFD."; 5254 container bfd { 5255 description "BFD operation."; 5256 leaf enabled { 5257 type boolean; 5258 description 5259 "True if BFD is enabled for the OSPF interface."; 5260 } 5261 } 5262 } 5263 } 5264 5266 8. Security Considerations 5268 The data model defined does not create any security implications. 5270 This draft does not change any underlying security issues inherent in 5271 [I-D.ietf-netmod-routing-cfg]. 5273 9. Acknowledgements 5275 The authors wish to thank Acee Lindem, Yi Yang, Alexander Clemm, 5276 Gaurav Gupta, Ing-Wher Chen, Ladislav Lhotka, Stephane Litkowski, 5277 Greg Hankins, Manish Gupta and Alan Davey for their thorough reviews 5278 and helpful comments. 5280 This document was produced using Marshall Rose's xml2rfc tool. 5282 10. References 5284 10.1. Normative References 5286 [RFC1793] Moy, J., "Extending OSPF to Support Demand Circuits", 5287 RFC 1793, DOI 10.17487/RFC1793, April 1995, 5288 . 5290 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 5291 Requirement Levels", BCP 14, RFC 2119, 5292 DOI 10.17487/RFC2119, March 1997, 5293 . 5295 [RFC2328] Moy, J., "OSPF Version 2", STD 54, RFC 2328, 5296 DOI 10.17487/RFC2328, April 1998, 5297 . 5299 [RFC3101] Murphy, P., "The OSPF Not-So-Stubby Area (NSSA) Option", 5300 RFC 3101, DOI 10.17487/RFC3101, January 2003, 5301 . 5303 [RFC3623] Moy, J., Pillay-Esnault, P., and A. Lindem, "Graceful OSPF 5304 Restart", RFC 3623, DOI 10.17487/RFC3623, November 2003, 5305 . 5307 [RFC3630] Katz, D., Kompella, K., and D. Yeung, "Traffic Engineering 5308 (TE) Extensions to OSPF Version 2", RFC 3630, 5309 DOI 10.17487/RFC3630, September 2003, 5310 . 5312 [RFC4577] Rosen, E., Psenak, P., and P. Pillay-Esnault, "OSPF as the 5313 Provider/Customer Edge Protocol for BGP/MPLS IP Virtual 5314 Private Networks (VPNs)", RFC 4577, DOI 10.17487/RFC4577, 5315 June 2006, . 5317 [RFC4750] Joyal, D., Ed., Galecki, P., Ed., Giacalone, S., Ed., 5318 Coltun, R., and F. Baker, "OSPF Version 2 Management 5319 Information Base", RFC 4750, DOI 10.17487/RFC4750, 5320 December 2006, . 5322 [RFC5187] Pillay-Esnault, P. and A. Lindem, "OSPFv3 Graceful 5323 Restart", RFC 5187, DOI 10.17487/RFC5187, June 2008, 5324 . 5326 [RFC5340] Coltun, R., Ferguson, D., Moy, J., and A. Lindem, "OSPF 5327 for IPv6", RFC 5340, DOI 10.17487/RFC5340, July 2008, 5328 . 5330 [RFC5643] Joyal, D., Ed. and V. Manral, Ed., "Management Information 5331 Base for OSPFv3", RFC 5643, DOI 10.17487/RFC5643, August 5332 2009, . 5334 [RFC5838] Lindem, A., Ed., Mirtorabi, S., Roy, A., Barnes, M., and 5335 R. Aggarwal, "Support of Address Families in OSPFv3", 5336 RFC 5838, DOI 10.17487/RFC5838, April 2010, 5337 . 5339 [RFC5880] Katz, D. and D. Ward, "Bidirectional Forwarding Detection 5340 (BFD)", RFC 5880, DOI 10.17487/RFC5880, June 2010, 5341 . 5343 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 5344 the Network Configuration Protocol (NETCONF)", RFC 6020, 5345 DOI 10.17487/RFC6020, October 2010, 5346 . 5348 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 5349 and A. Bierman, Ed., "Network Configuration Protocol 5350 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 5351 . 5353 [RFC7223] Bjorklund, M., "A YANG Data Model for Interface 5354 Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, 5355 . 5357 10.2. Informative References 5359 [I-D.acee-rtg-yang-key-chain] 5360 Lindem, A., Qu, Y., Yeung, D., Chen, H., Zhang, J., and Y. 5361 Yang, "Key Chain YANG Data Model", draft-acee-rtg-yang- 5362 key-chain-09 (work in progress), October 2015. 5364 [I-D.ietf-bfd-yang] 5365 Zheng, L., Rahman, R., Networks, J., Jethanandani, M., and 5366 G. Mirsky, "Yang Data Model for Bidirectional Forwarding 5367 Detection (BFD)", draft-ietf-bfd-yang-00 (work in 5368 progress), August 2015. 5370 [I-D.ietf-netmod-routing-cfg] 5371 Lhotka, L. and A. Lindem, "A YANG Data Model for Routing 5372 Management", draft-ietf-netmod-routing-cfg-20 (work in 5373 progress), October 2015. 5375 [I-D.ietf-spring-sr-yang] 5376 Litkowski, S., Qu, Y., Sarkar, P., and J. Tantsura, "YANG 5377 Data Model for Segment Routing", draft-ietf-spring-sr- 5378 yang-00 (work in progress), July 2015. 5380 Authors' Addresses 5382 Derek Yeung 5383 Cisco Systems 5384 170 West Tasman Drive 5385 San Jose, CA 95134 5386 USA 5388 EMail: myeung@cisco.com 5390 Yingzhen Qu 5391 Cisco Systems 5392 170 West Tasman Drive 5393 San Jose, CA 95134 5394 USA 5396 EMail: yiqu@cisco.com 5398 Jeffrey Zhang 5399 Juniper Networks 5400 10 Technology Park Drive 5401 Westford, MA 01886 5402 USA 5404 EMail: zzhang@juniper.net 5406 Dean Bogdanovic 5408 EMail: ivandean@gmail.com 5410 Kiran Koushik Agrahara Sreenivasa 5411 Cisco Systems 5412 12515 Research Blvd, Bldg 4 5413 Austin, TX 78681 5414 USA 5416 EMail: kkoushik@cisco.com