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