idnits 2.17.00 (12 Aug 2021) /tmp/idnits11251/draft-yeung-netmod-ospf-02.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 382 has weird spacing: '...rw name rt:...' -- The document date (October 14, 2014) is 2769 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 7223 (Obsoleted by RFC 8343) == Outdated reference: draft-ietf-netmod-routing-cfg has been published as RFC 8022 Summary: 2 errors (**), 0 flaws (~~), 3 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 17, 2015 J. Zhang 6 D. Bogdanovic 7 Juniper Networks 8 K. Sreenivasa 9 Brocade Communications System 10 October 14, 2014 12 Yang Data Model for OSPF Protocol 13 draft-yeung-netmod-ospf-02 15 Abstract 17 This document defines a YANG data model that can be used to configure 18 and manage OSPF. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on April 17, 2015. 37 Copyright Notice 39 Copyright (c) 2014 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 2 55 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 56 2. Design of Data Model . . . . . . . . . . . . . . . . . . . . 3 57 2.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 3 58 2.2. OSPFv2 and OSPFv3 . . . . . . . . . . . . . . . . . . . . 5 59 2.3. Optional Features . . . . . . . . . . . . . . . . . . . . 5 60 2.4. Inheritance . . . . . . . . . . . . . . . . . . . . . . . 5 61 2.5. OSPF Router Configuration . . . . . . . . . . . . . . . . 5 62 2.6. OSPF Instance Configuration . . . . . . . . . . . . . . . 6 63 2.7. OSPF Area Configuration . . . . . . . . . . . . . . . . . 8 64 2.8. OSPF Interface Configuration . . . . . . . . . . . . . . 9 65 2.9. OSPF notification . . . . . . . . . . . . . . . . . . . . 10 66 3. OSPF Yang Module . . . . . . . . . . . . . . . . . . . . . . 13 67 4. Security Considerations . . . . . . . . . . . . . . . . . . . 69 68 5. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 69 69 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 69 70 6.1. Normative References . . . . . . . . . . . . . . . . . . 70 71 6.2. Informative References . . . . . . . . . . . . . . . . . 71 73 1. Overview 75 YANG [RFC6020] is a data definition language that was introduced to 76 define the contents of a conceptual data store that allows networked 77 devices to be managed using NETCONF [RFC6241]. YANG is proving 78 relevant beyond its initial confines, as bindings to other interfaces 79 (e.g. ReST) and encodings other than XML (e.g. JSON) are being 80 defined. Furthermore, YANG data models can be used as the basis of 81 implementation for other interfaces, such as CLI and programmatic 82 APIs. 84 A core routing data model is defined in 85 [I-D.ietf-netmod-routing-cfg], and it proposes a basis for the 86 development of data models for routing protocols. The interface data 87 model is defined in [RFC7223] and is used for referencing interface 88 from the routing protocol. This document defines a YANG data model 89 that can be used to configure and manage OSPF and it is an augment to 90 the core routing data model. 92 This document defines a YANG data model that can be used to configure 93 and manage OSPF. Both OSPFv2 [RFC2328] and OSPFv3 [RFC5340] are 94 supported. In additional to the core OSPF protocol, features 95 described in different separate OSPF RFCs are also supported. They 96 includes demand circuit [RFC1793], traffic engineering [RFC3630], 97 multiple address family [RFC5838], graceful restart [RFC3623] 98 [RFC5187], NSSA [RFC3101] and sham link [RFC4577]. Those non-core 99 features are made optional in the data model provided. 101 1.1. Requirements Language 103 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 104 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 105 document are to be interpreted as described in [RFC2119]. 107 2. Design of Data Model 109 Although the basis of OSPF configuration elements like routers, areas 110 and interfaces remains the same, the detailed configuration model 111 varies among different vendors. Differences are observed in term of 112 how protocol engine is tied to routing domain, how multiple protocol 113 engines could be instantiated and configuration inheritance, just to 114 name a few. 116 The goal of this document is to define a data model that is capable 117 of representing these differences. There is very little information 118 that is designated as "mandatory", providing freedom to vendors to 119 adapt this data model to their product implementation. 121 2.1. Overview 123 The OSPF YANG module defined in this document has all the common 124 building blocks for OSPF protocol. 126 The OSPF YANG module augments the routing/routing-instance/routing- 127 protocols/routing-protocol path of the ietf-routing module. 129 module: ospf 130 +--rw routing 131 +--rw routing-instance [name] 132 +--rw routing-protocols 133 +--rw routing-protocol [name] 134 +--rw ospf 135 . 136 . 137 +--rw all-instances-inherit {instance-inheritance}? 138 | . 139 | . 140 +--rw instance* [routing-instance af] 141 . 142 . 143 +--rw all-areas-inherit {area-inheritance}? 144 | . 145 | . 146 +--rw area* [area-id] 147 | . 148 | . 149 | +--rw all-interfaces-inherit {interface-inheritance}? 150 | . 151 | . 152 | +--rw interface* [interface] 153 | . 154 | . 155 +--rw topology* [name] 157 The ospf is intended to match to the vendor specific OSPF 158 configuration construct which is identified by a local identifier 159 'name'. The field 'version' allows support for OSPFv2 and OSPFv3. 161 The ospf container includes one or more OSPF protocol engines, each 162 encapsulated in the instance entity. Each instance includes 163 information for the routing domain it is running on based on the 164 [routing-instance af] specification. There is no default routing 165 domain assumed by the data model. For example, to enable OSPF on the 166 default IPv4 routing domain of the vendor, this model requires an 167 explicit instance entity with the specification like ["default" 168 "ipv4-unicast"]. The instance also contains OSPF router level 169 configuration 171 The instance/area and instance/area/interface container contain the 172 OSPF configuration for the area and interface level respectively 174 The instance/topology container contain the OSPF configuration for 175 topology when multi-topology feature is enabled 177 2.2. OSPFv2 and OSPFv3 179 The defined data model supports both OSPFv2 and OSPFv3. 181 The field 'version' is used to indicate the OSPF version and is a 182 mandatory. Based on the version set, the data model change 183 accordingly to accommodate the difference between the two versions. 185 2.3. Optional Features 187 Optional features are features beyond the basic of OSPF 188 configurations and it is up to a vendor to decide the support of a 189 particular feature on a particular device. 191 This module has declared a number of features, such as NSR, max-LSA 192 etc.. It is intended that vendors will extend the features list. 194 2.4. Inheritance 196 This defined data model supports configuration inheritance for 197 intances, areas and interfaces. 199 The all-instances-inherit, all-areas-inherit and all-interfaces- 200 inherit containers provides a consistent way to configure inheritable 201 command. Inheritance is treated as a feature. Vendors are expected 202 to augment the above container to provide the list of inheritance 203 command for their implementation. 205 2.5. OSPF Router Configuration 207 The container ospf is the top level container in this data model. It 208 contains shared information among different OSPF instances under the 209 container. 211 module: ospf 212 +--rw ospf 213 +--rw all-instances-inherit {instance-inheritance}? 214 | +--rw area 215 | +--rw interface 216 +--rw operation-mode? identityref 217 +--rw instance* [routing-instance af] 218 . 219 . 221 2.6. OSPF Instance Configuration 223 The container instance represents an OSPF protocol engine. Each 224 instance indicates the routing domain it is associated with based on 225 [routing-instance af] and contains the router level configurations. 227 The all-areas-inherit container contains area configuration that 228 could be inherited to all OSPF areas defined. Similarly, the all- 229 areas-inherit also contains interface configuration that could be 230 inherited to all the OSPF interfaces defined. 232 module: ospf 234 +--rw ospf 235 . 236 . 237 +--rw instance* [routing-instance af] 238 +--rw routing-instance rt:routing-instance-ref 239 +--rw af identityref 240 +--rw router-id? yang:dotted-quad {router-id}? 241 +--rw admin-distance 242 | +--rw (granularity)? 243 | | +--:(detail) 244 | | | +--rw intra-area? uint8 245 | | | +--rw inter-area? uint8 246 | | +--:(coarse) 247 | | +--rw internal? uint8 248 | +--rw external? uint8 249 +--rw nsr {nsr}? 250 | +--rw enable? boolean 251 +--rw graceful-restart {graceful-restart}? 252 | +--rw enable? boolean 253 | +--rw helper-enable? boolean 254 | +--rw restart-interval? uint16 255 | +--rw helper-strict-lsa-checking? boolean 256 +--rw protocol-shutdown {protocol-shutdown}? 257 | +--rw shutdown? boolean 258 +--rw auto-cost {auto-cost}? 259 | +--rw enable? boolean 260 | +--rw reference-bandwidth? uint32 261 +--rw maximum 262 | +--rw paths? uint16 {max-ecmp}? 263 | +--rw max-lsa? uint32 {max-lsa}? 264 +--rw mpls 265 | +--rw te-rid {te-rid}? 266 | | +--rw (source)? 267 | | +--:(interface) 268 | | | +--rw interface? if:interface-ref 269 | | +--:(explicit) 270 | | +--rw router-id? inet:ipv4-address 271 | +--rw ldp 272 | +--rw igp-sync? boolean {ldp-igp-sync}? 273 | +--rw autoconfig? boolean {ldp-igp-autoconfig}? 274 +--rw all-areas-inherit {area-inheritance}? 275 | +--rw area 276 | +--rw interface 278 2.7. OSPF Area Configuration 280 The container area contains configurations of that area and the list 281 of interface container represents all the OSPF interfaces active in 282 the enclosing area. 284 module: ospf 285 +--rw ospf 286 . 287 . 288 +--rw instance* [routing-instance af] 289 . 290 . 291 +--rw area* [area-id] 292 | +--rw area-id area-id-type 293 | +--rw area-type? identityref 294 | +--rw summary? boolean 295 | +--rw default-cost? uint32 296 | +--rw virtual-link* [router-id] 297 | | +--rw router-id yang:dotted-quad 298 | | +--rw cost? uint16 299 | | +--rw hello-interval? uint16 300 | | +--rw dead-interval? uint16 301 | | +--rw retransmit-interval? uint16 302 | | +--rw transmit-delay? uint16 303 | | +--rw mtu-ignore? boolean {mtu-ignore}? 304 | | +--rw lls? boolean {lls}? 305 | | +--rw prefix-suppression? boolean {prefix-suppression}? 306 | | +--rw bfd? boolean {bfd}? 307 | | +--rw ttl-security {ttl-security}? 308 | | | +--rw enable? boolean 309 | | | +--rw hops? uint8 310 | | +--rw protocol-shutdown {protocol-if-shutdown}? 311 | | +--rw shutdown? boolean 312 | +--rw sham-link* [local-id remote-id] 313 | | +--rw local-id inet:ip-address 314 | | +--rw remote-id inet:ip-address 315 | | +--rw cost? uint16 316 | | +--rw hello-interval? uint16 317 | | +--rw dead-interval? uint16 318 | | +--rw retransmit-interval? uint16 319 | | +--rw transmit-delay? uint16 320 | | +--rw mtu-ignore? boolean {mtu-ignore}? 321 | | +--rw lls? boolean {lls}? 322 | | +--rw prefix-suppression? boolean {prefix-suppression}? 323 | | +--rw bfd? boolean {bfd}? 324 | | +--rw ttl-security {ttl-security}? 325 | | | +--rw enable? boolean 326 | | | +--rw hops? uint8 327 | | +--rw protocol-shutdown {protocol-if-shutdown}? 328 | | +--rw shutdown? boolean 329 | +--rw range* [prefix] 330 | | +--rw prefix inet:ip-prefix 331 | | +--rw advertise? boolean 332 | | +--rw cost? uint24 333 | +--rw all-interfaces-inherit {interface-inheritance}? 334 | | +--rw interface 336 2.8. OSPF Interface Configuration 338 The container interface contains configurations of that interface. 340 The ospf-interfaces also contain interface configuration that could 341 be inherited to all ospf-interface's defined. 343 module: ospf 344 +--rw ospf 345 . 346 . 347 +--rw instance* [routing-instance af] 348 . 349 . 350 +--rw area* [area-id] 351 . 352 . 353 | +--rw interface* [interface] 354 | +--rw interface if:interface-ref 355 | +--rw network-type? enumeration 356 | +--rw passive? boolean 357 | +--rw demand-circuit? boolean {demand-circuit}? 358 | +--rw multi-area {multi-area-adj}? 359 | | +--rw multi-area-id? area-id-type 360 | | +--rw cost? uint16 361 | +--rw static-neighbors 362 | | +--rw neighbor* [address] 363 | | +--rw address inet:ip-address 364 | | +--rw cost? uint16 365 | | +--rw poll-interval? uint16 366 | | +--rw priority? uint8 367 | +--rw cost? uint16 368 | +--rw hello-interval? uint16 369 | +--rw dead-interval? uint16 370 | +--rw retransmit-interval? uint16 371 | +--rw transmit-delay? uint16 372 | +--rw mtu-ignore? boolean {mtu-ignore}? 373 | +--rw lls? boolean {lls}? 374 | +--rw prefix-suppression? boolean {prefix-suppression}? 375 | +--rw bfd? boolean {bfd}? 376 | +--rw ttl-security {ttl-security}? 377 | | +--rw enable? boolean 378 | | +--rw hops? uint8 379 | +--rw protocol-shutdown {protocol-if-shutdown}? 380 | | +--rw shutdown? boolean 381 | +--rw topology* [name] 382 | +--rw name rt:rib-ref 383 | +--rw cost? uint32 385 2.9. OSPF notification 387 This YANG model defines a list of notifications to inform client of 388 important events detected during the protocol operation. The 389 notifications defined cover the common set of traps from OSPFv2 MIB 390 [RFC4750] and OSPFv3 MIB [RFC5643]. 392 module: ospf 393 notifications: 394 +---n if-state-change 395 | +--ro routing-instance? rt:routing-instance-ref 396 | +--ro routing-protocol-name? string 397 | +--ro instance-af 398 | | +--ro af? identityref 399 | +--ro link-type? identityref 400 | +--ro interface 401 | | +--ro interface? if:interface-ref 402 | +--ro virtual-link 403 | | +--ro area-id? uint32 404 | | +--ro neighbor-router-id? yang:dotted-quad 405 | +--ro sham-link 406 | | +--ro area-id? uint32 407 | | +--ro local-ip-addr? inet:ip-address 408 | | +--ro remote-ip-addr? inet:ip-address 409 | +--ro state? if-state-type 410 +---n if-config-error 411 | +--ro routing-instance? rt:routing-instance-ref 412 | +--ro routing-protocol-name? string 413 | +--ro instance-af 414 | | +--ro af? identityref 415 | +--ro link-type? identityref 416 | +--ro interface 417 | | +--ro interface? if:interface-ref 418 | | +--ro packet-source? yang:dotted-quad 419 | +--ro virtual-link 420 | | +--ro area-id? uint32 421 | | +--ro neighbor-router-id? yang:dotted-quad 422 | +--ro sham-link 423 | | +--ro area-id? uint32 424 | | +--ro local-ip-addr? inet:ip-address 425 | | +--ro remote-ip-addr? inet:ip-address 426 | +--ro packet-type? packet-type 427 | +--ro error? enumeration 428 +---n nbr-state-change 429 | +--ro routing-instance? rt:routing-instance-ref 430 | +--ro routing-protocol-name? string 431 | +--ro instance-af 432 | | +--ro af? identityref 433 | +--ro link-type? identityref 434 | +--ro interface 435 | | +--ro interface? if:interface-ref 436 | | +--ro neighbor-router-id? yang:dotted-quad 437 | | +--ro neighbor-ip-addr? yang:dotted-quad 438 | +--ro virtual-link 439 | | +--ro area-id? uint32 440 | | +--ro neighbor-router-id? yang:dotted-quad 441 | +--ro sham-link 442 | | +--ro area-id? uint32 443 | | +--ro local-ip-addr? inet:ip-address 444 | | +--ro neighbor-router-id? yang:dotted-quad 445 | | +--ro neighbor-ip-addr? yang:dotted-quad 446 | +--ro state? nbr-state-type 447 +---n nbr-restart-helper-status-change 448 | +--ro routing-instance? rt:routing-instance-ref 449 | +--ro routing-protocol-name? string 450 | +--ro instance-af 451 | | +--ro af? identityref 452 | +--ro link-type? identityref 453 | +--ro interface 454 | | +--ro interface? if:interface-ref 455 | | +--ro neighbor-router-id? yang:dotted-quad 456 | | +--ro neighbor-ip-addr? yang:dotted-quad 457 | +--ro virtual-link 458 | | +--ro area-id? uint32 459 | | +--ro neighbor-router-id? yang:dotted-quad 460 | +--ro status? restart-helper-status-type 461 | +--ro age? uint32 462 | +--ro exit-reason? restart-exit-reason-type 463 +---n rx-bad-packet 464 | +--ro routing-instance? rt:routing-instance-ref 465 | +--ro routing-protocol-name? string 466 | +--ro instance-af 467 | | +--ro af? identityref 468 | +--ro link-type? identityref 469 | +--ro interface 470 | | +--ro interface? if:interface-ref 471 | | +--ro packet-source? yang:dotted-quad 472 | +--ro virtual-link 473 | | +--ro area-id? uint32 474 | | +--ro neighbor-router-id? yang:dotted-quad 475 | +--ro sham-link 476 | | +--ro area-id? uint32 477 | | +--ro local-ip-addr? inet:ip-address 478 | | +--ro remote-ip-addr? inet:ip-address 479 | +--ro packet-type? packet-type 480 +---n lsdb-approaching-overflow 481 | +--ro routing-instance? rt:routing-instance-ref 482 | +--ro routing-protocol-name? string 483 | +--ro instance-af 484 | | +--ro af? identityref 485 | +--ro ext-lsdb-limit? uint32 486 +---n lsdb-overflow 487 | +--ro routing-instance? rt:routing-instance-ref 488 | +--ro routing-protocol-name? string 489 | +--ro instance-af 490 | | +--ro af? identityref 491 | +--ro ext-lsdb-limit? uint32 492 +---n nssa-translator-status-change 493 | +--ro routing-instance? rt:routing-instance-ref 494 | +--ro routing-protocol-name? string 495 | +--ro instance-af 496 | | +--ro af? identityref 497 | +--ro area-id? uint32 498 | +--ro status? nssa-translator-state-type 499 +---n restart-status-change 500 +--ro routing-instance? rt:routing-instance-ref 501 +--ro routing-protocol-name? string 502 +--ro instance-af 503 | +--ro af? identityref 504 +--ro status? restart-status-type 505 +--ro restart-interval? uint16 506 +--ro exit-reason? restart-exit-reason-type 508 3. OSPF Yang Module 510 511 module ospf { 512 namespace "urn:ietf:params:xml:ns:yang:ospf"; 513 // replace with IANA namespace when assigned 514 prefix ospf; 516 import ietf-inet-types { 517 prefix "inet"; 518 } 520 import ietf-yang-types { 521 prefix "yang"; 522 } 524 import ietf-interfaces { 525 prefix "if"; 526 } 528 import ietf-routing { 529 prefix "rt"; 530 } 532 organization 533 "Cisco Systems 534 170 West Tasman Drive 535 San Jose, CA 95134-1706 536 USA"; 537 contact 538 "Derek Yeung myeung@cisco.com 539 Yingzhen Qu yiqu@cisco.com 540 Dean Bogdanovic deanb@juniper.net 541 Jeffrey Zhang zzhang@juniper.net 542 Kiran Agrahara Sreenivasa kkoushik@Brocade.com"; 544 description 545 "This YANG module defines the generic configuration 546 data for OSPF, which is common across all of the vendor 547 implementations of the protocol. It is intended that the module 548 will be extended by vendors to define vendor-specific 549 OSPF configuration parameters and policies, 550 for example route maps or route policies. 552 Terms and Acronyms 554 OSPF (ospf): Open Shortest Path First 556 IP (ip): Internet Protocol 558 IPv4 (ipv4):Internet Protocol Version 4 560 IPv6 (ipv6): Internet Protocol Version 6 562 MTU (mtu) Maximum Transmission Unit 563 "; 565 revision 2014-09-17 { 566 description 567 "Initial revision."; 568 reference 569 "RFC XXXX: A YANG Data Model for OSPF"; 570 } 572 identity ospfv2 { 573 base "rt:routing-protocol"; 574 description "OSPFv2"; 575 } 577 identity ospfv3 { 578 base "rt:routing-protocol"; 579 description "OSPFv3"; 580 } 582 identity operation-mode { 583 description 584 "OSPF operation mode."; 585 } 587 identity ships-in-the-night { 588 base operation-mode; 589 description 590 "Ships-in-the-night operation mode in which 591 each OSPF instance carries only one address family"; 592 } 594 identity area-type { 595 description "Base identity for OSPF area type."; 596 } 598 identity normal { 599 base area-type; 600 description "OSPF normal area."; 601 } 603 identity stub { 604 base area-type; 605 description "OSPF stub area."; 606 } 608 typedef uint24 { 609 type uint32 { 610 range "0 .. 16777215"; 611 } 612 description 613 "24-bit unsigned integer."; 614 } 616 typedef area-id-type { 617 type union { 618 type uint32; 619 type yang:dotted-quad; 620 } 621 description 622 "Area ID type."; 623 } 625 typedef if-state-type { 626 type enumeration { 627 enum Down { 628 value "1"; 629 description 630 "Interface down state"; 632 } 633 enum Loopback { 634 value "2"; 635 description 636 "Interface loopback state"; 637 } 638 enum Waiting { 639 value "3"; 640 description 641 "Interface waiting state"; 642 } 643 enum Point-to-Point { 644 value "4"; 645 description 646 "Interface point-to-point state"; 647 } 648 enum DR { 649 value "5"; 650 description 651 "Interface Designated Router (DR) state"; 652 } 653 enum BDR { 654 value "6"; 655 description 656 "Interface Backup Designated Router (BDR) state"; 657 } 658 enum DR-Other { 659 value "7"; 660 description 661 "Interface Other Designated Router state"; 662 } 663 } 664 description 665 "OSPF interface state type."; 666 } 668 typedef nbr-state-type { 669 type enumeration { 670 enum Down { 671 value "1"; 672 description 673 "Neighbor down state"; 674 } 675 enum Attempt { 676 value "2"; 677 description 678 "Neighbor attempt state"; 679 } 680 enum Init { 681 value "3"; 682 description 683 "Neighbor init state"; 684 } 685 enum 2-Way { 686 value "4"; 687 description 688 "Neighbor 2-Way state"; 689 } 690 enum ExStart { 691 value "5"; 692 description 693 "Neighbor exchange start state"; 694 } 695 enum Exchange { 696 value "6"; 697 description 698 "Neighbor exchange state"; 699 } 700 enum Loading { 701 value "7"; 702 description 703 "Neighbor loading state"; 704 } 705 enum Full { 706 value "8"; 707 description 708 "Neighbor full state"; 709 } 710 } 711 description 712 "OSPF neighbor state type."; 713 } 715 typedef restart-helper-status-type { 716 type enumeration { 717 enum Not-Helping { 718 value "1"; 719 description 720 "Restart helper status not helping."; 721 } 722 enum Helping { 723 value "2"; 724 description 725 "Restart helper status helping."; 726 } 727 } 728 description 729 "Restart helper status type."; 730 } 732 typedef restart-exit-reason-type { 733 type enumeration { 734 enum None { 735 value "1"; 736 description 737 "Not attempted."; 738 } 739 enum InProgress { 740 value "2"; 741 description 742 "Restart in progress."; 743 } 744 enum Completed { 745 value "3"; 746 description 747 "Successfully completed."; 748 } 749 enum TimedOut { 750 value "4"; 751 description 752 "Timed out."; 753 } 754 enum TopologyChanged { 755 value "5"; 756 description 757 "Aborted due to topology change."; 758 } 759 } 760 description 761 "Describes the outcome of the last attempt at a 762 graceful restart, either by itself or acting 763 as a helper."; 764 } 766 typedef packet-type { 767 type enumeration { 768 enum Hello { 769 value "1"; 770 description 771 "OSPF hello packet."; 772 } 773 enum Database-Descripton { 774 value "2"; 775 description 776 "OSPF database description packet."; 777 } 778 enum Link-State-Request { 779 value "3"; 780 description 781 "OSPF link state request packet."; 782 } 783 enum Link-State-Update { 784 value "4"; 785 description 786 "OSPF link state update packet."; 787 } 788 enum Link-State-Ack { 789 value "5"; 790 description 791 "OSPF link state acknowlegement packet."; 792 } 793 } 794 description 795 "OSPF packet type."; 796 } 798 typedef nssa-translator-state-type { 799 type enumeration { 800 enum Enabled { 801 value "1"; 802 description 803 "NSSA translator enabled state."; 804 } 805 enum Elected { 806 description 807 "NSSA translator elected state."; 808 } 809 enum Disabled { 810 value "3"; 811 description 812 "NSSA translator disabled state."; 813 } 814 } 815 description 816 "OSPF NSSA translator state type."; 817 } 819 typedef restart-status-type { 820 type enumeration { 821 enum Not-Restarting { 822 value "1"; 823 description 824 "Router is not restarting."; 825 } 826 enum Planned-Restart { 827 description 828 "Router is going through planned restart."; 829 } 830 enum Unplanned-Restart { 831 value "3"; 832 description 833 "Router is going through unplanned restart."; 834 } 835 } 836 description 837 "OSPF graceful restart status type."; 838 } 840 feature multi-topology { 841 description 842 "Support MTR."; 843 } 845 feature multi-area-adj { 846 description 847 "OSPF multi-area adjacency support as in RFC 5185."; 848 } 850 feature router-id { 851 description 852 "Set router ID per instance."; 853 } 855 feature demand-circuit { 856 description 857 "OSPF demand circuit support as in RFC 1793."; 858 } 860 feature mtu-ignore { 861 description 862 "Disable OSPF MTU mismatch detection on receiving 863 DBD packets."; 864 } 866 feature lls { 867 description 868 "OSPF link-local signaling (LLS) as in RFC 5613."; 869 } 871 feature prefix-suppression { 872 description 873 "OSPF prefix suppression support as in RFC 6860."; 874 } 876 feature bfd { 877 description 878 "OSPF BFD support."; 879 } 881 feature ttl-security { 882 description 883 "OSPF ttl security check."; 884 } 886 feature nsr { 887 description 888 "Non-Stop-Routing (NSR)."; 889 } 891 feature graceful-restart { 892 description 893 "Graceful OSPF Restart as defined in RFC3623 and RFC5187."; 894 } 896 feature protocol-shutdown { 897 description 898 "Shutdown the protocol."; 899 } 901 feature auto-cost { 902 description 903 "Calculate OSPF interface cost according to 904 reference bandwidth."; 905 } 907 feature max-ecmp { 908 description 909 "Setting maximum number of ECMP paths."; 910 } 912 feature max-lsa { 913 description 914 "Setting maximum number of LSAs OSPF will receive."; 915 } 917 feature te-rid { 918 description 919 "TE router-id."; 921 } 923 feature ldp-igp-sync { 924 description 925 "LDP IGP synchronization."; 926 } 928 feature ldp-igp-autoconfig { 929 description 930 "LDP IGP auto-config."; 931 } 933 feature protocol-if-shutdown { 934 description 935 "Shutdown the protocol over an interface."; 936 } 938 feature instance-inheritance { 939 description 940 "Support inheritance"; 941 } 943 feature af-inheritance { 944 description 945 "Support inheritance"; 946 } 948 feature area-inheritance { 949 description 950 "Support area inheritance"; 951 } 953 feature interface-inheritance { 954 description 955 "Support interface inheritance"; 956 } 958 grouping interface-common-config { 959 description "Common configuration for all types of interfaces, 960 including virtual link and sham link"; 962 leaf cost { 963 type uint16 { 964 range "1..65535"; 965 } 966 description 967 "Interface cost."; 968 } 969 leaf hello-interval { 970 type uint16 { 971 range "1..65535"; 972 } 973 units seconds; 974 description 975 "Time between hello packets."; 976 } 978 leaf dead-interval { 979 type uint16 { 980 range "1..65535"; 981 } 982 units seconds; 983 must "dead-interval > ../hello-interval" { 984 error-message "The dead interval must be " 985 + "larger than the hello interval"; 986 description 987 "The value MUST be greater than 'hello-internval'."; 988 } 989 description 990 "Interval after which a neighbor is declared dead."; 991 } 993 leaf retransmit-interval { 994 type uint16 { 995 range "1..65535"; 996 } 997 units seconds; 998 description 999 "Time between retransmitting unacknowledged Link State 1000 Advertisements (LSAs)."; 1001 } 1003 leaf transmit-delay { 1004 type uint16 { 1005 range "1..65535"; 1006 } 1007 units seconds; 1008 description 1009 "Estimated time needed to send link-state update."; 1010 } 1012 leaf mtu-ignore { 1013 if-feature mtu-ignore; 1014 type boolean; 1015 description 1016 "Enable/Disable ignoring of MTU in DBD packets."; 1018 } 1020 leaf lls { 1021 if-feature lls; 1022 type boolean; 1023 description 1024 "Enable/Disable link-local signaling (LLS) support."; 1025 } 1027 leaf prefix-suppression { 1028 if-feature prefix-suppression; 1029 type boolean; 1030 description 1031 "Suppress advertisement of the prefixes."; 1032 } 1034 leaf bfd { 1035 if-feature bfd; 1036 type boolean; 1037 description 1038 "Enable/disable bfd."; 1039 } 1041 container ttl-security { 1042 if-feature ttl-security; 1043 description "TTL security check."; 1044 leaf enable { 1045 type boolean; 1046 description 1047 "Enable/Disable TTL security check."; 1048 } 1049 leaf hops { 1050 type uint8 { 1051 range "1..254"; 1052 } 1053 description 1054 "Maximum number of hops that a OSPF packet may 1055 have traveled."; 1056 } 1057 } 1058 container protocol-shutdown { 1059 if-feature protocol-if-shutdown; 1060 description 1061 "Protocol shutdown interface config state."; 1062 leaf shutdown { 1063 type boolean; 1064 description 1065 "Enable/Disable protocol shutdown on the interface."; 1067 } 1068 } 1069 } // interface-common-config 1071 grouping interface-config { 1072 description "Configuration for real interfaces."; 1074 leaf network-type { 1075 type enumeration { 1076 enum "broadcast" { 1077 description 1078 "Specify OSPF broadcast multi-access network."; 1079 } 1080 enum "non-broadcast" { 1081 description 1082 "Specify OSPF Non-Broadcast Multi-Access 1083 (NBMA) network."; 1084 } 1085 enum "point-to-multipoint" { 1086 description 1087 "Specify OSPF point-to-multipoint network."; 1088 } 1089 enum "point-to-point" { 1090 description 1091 "Specify OSPF point-to-point network."; 1092 } 1093 } 1094 description 1095 "Network type."; 1096 } 1098 leaf passive { 1099 type boolean; 1100 description 1101 "Enable/Disable passive."; 1102 } 1104 leaf demand-circuit { 1105 if-feature demand-circuit; 1106 type boolean; 1107 description 1108 "Enable/Disable demand circuit."; 1109 } 1111 container multi-area { 1112 if-feature multi-area-adj; 1113 description 1114 "Configure ospf multi-area."; 1116 leaf multi-area-id { 1117 type area-id-type; 1118 description 1119 "Multi-area ID"; 1120 } 1121 leaf cost { 1122 type uint16; 1123 description 1124 "Interface cost for multi-area."; 1125 } 1126 } 1128 container static-neighbors { 1129 description "Static configured neighbors."; 1131 list neighbor { 1132 key "address"; 1133 description 1134 "Specify a neighbor router."; 1136 leaf address { 1137 type inet:ip-address; 1138 description "Neighbor IP address."; 1139 } 1141 leaf cost { 1142 type uint16 { 1143 range "1..65535"; 1144 } 1145 description "Neighbor cost."; 1146 } 1147 leaf poll-interval { 1148 type uint16 { 1149 range "1..65535"; 1150 } 1151 units seconds; 1152 description "Neighbor poll interval."; 1153 } 1154 leaf priority { 1155 type uint8 { 1156 range "1..255"; 1157 } 1158 description "Neighbor priority for DR election."; 1159 } 1160 } 1161 } 1163 uses interface-common-config; 1165 } // grouping interface-config 1167 grouping tlv { 1168 description 1169 "TLV"; 1170 leaf type { 1171 type uint16; 1172 description "TLV type."; 1173 } 1174 leaf length { 1175 type uint16; 1176 description "TLV length."; 1177 } 1178 leaf value { 1179 type yang:hex-string; 1180 description "TLV value."; 1181 } 1182 } 1184 grouping ospfv2-lsa-body { 1185 description "OSPFv2 LSA body."; 1186 container router { 1187 when "../../header/type = 1" { 1188 description 1189 "Only apply to Router-LSA."; 1190 } 1191 description 1192 "Router LSA."; 1193 leaf flags { 1194 type bits { 1195 bit V { 1196 description 1197 "When set, the router is an endpoint of one or 1198 more virtual links."; 1199 } 1200 bit E { 1201 description 1202 "When set, the router is an AS Boundary Router 1203 (ASBR)."; 1204 } 1205 bit B { 1206 description 1207 "When set, the router is an Area Border Router (ABR)."; 1208 } 1209 } 1210 description "Flags"; 1211 } 1212 leaf num-of-links { 1213 type uint16; 1214 description "Number of links."; 1215 } 1216 list link { 1217 key "link-id link-data"; 1218 description "Router LSA link."; 1219 leaf link-id { 1220 type union { 1221 type inet:ipv4-address; 1222 type yang:dotted-quad; 1223 } 1224 description "Link ID"; 1225 } 1226 leaf link-data { 1227 type union { 1228 type inet:ipv4-address; 1229 type uint32; 1230 } 1231 description "Link data."; 1232 } 1233 leaf type { 1234 type uint8; 1235 description "Link type."; 1236 } 1237 list topology { 1238 key "mt-id"; 1239 description 1240 "Topology specific information."; 1241 leaf mt-id { 1242 type uint8; 1243 description 1244 "The MT-ID for topology enabled on the link."; 1245 } 1246 leaf metric { 1247 type uint16; 1248 description "Metric for the topology."; 1249 } 1250 } 1251 } 1252 } 1253 container network { 1254 when "../../header/type = 2" { 1255 description 1256 "Only apply to network LSA."; 1257 } 1258 description 1259 "Network LSA."; 1260 leaf network-mask { 1261 type inet:ipv4-address; 1262 description 1263 "The IP address mask for the network"; 1264 } 1265 leaf-list attached-router { 1266 type yang:dotted-quad; 1267 description 1268 "List of the routers attached to the network."; 1269 } 1270 } 1271 container summary { 1272 when "../../header/type = 3 or " 1273 + "../../header/type = 4" { 1274 description 1275 "Only apply to Summary-LSA."; 1276 } 1277 description 1278 "Summary LSA."; 1279 leaf network-mask { 1280 type inet:ipv4-address; 1281 description 1282 "The IP address mask for the network"; 1283 } 1284 list topology { 1285 key "mt-id"; 1286 description 1287 "Topology specific information."; 1288 leaf mt-id { 1289 type uint8; 1290 description 1291 "The MT-ID for topology enabled on the link."; 1292 } 1293 leaf metric { 1294 type uint24; 1295 description "Metric for the topology."; 1296 } 1297 } 1298 } 1299 container external { 1300 when "../../header/type = 5 or " 1301 + "../../header/type = 7" { 1302 description 1303 "Only apply to AS-external-LSA and NSSA-LSA."; 1304 } 1305 description 1306 "External LSA."; 1307 leaf network-mask { 1308 type inet:ipv4-address; 1309 description 1310 "The IP address mask for the network"; 1311 } 1312 list topology { 1313 key "mt-id"; 1314 description 1315 "Topology specific information."; 1316 leaf mt-id { 1317 type uint8; 1318 description 1319 "The MT-ID for topology enabled on the link."; 1320 } 1321 leaf flags { 1322 type bits { 1323 bit E { 1324 description 1325 "When set, the metric specified is a Type 2 1326 external metric."; 1327 } 1328 } 1329 description "Flags."; 1330 } 1331 leaf metric { 1332 type uint24; 1333 description "Metric for the topology."; 1334 } 1335 leaf forwarding-address { 1336 type inet:ipv4-address; 1337 description 1338 "Forwarding address."; 1339 } 1340 leaf external-route-tag { 1341 type uint32; 1342 description 1343 "Route tag."; 1344 } 1345 } 1346 } 1347 container opaque { 1348 when "../../header/type = 9 or " 1349 + "../../header/type = 10 or " 1350 + "../../header/type = 11" { 1351 description 1352 "Only apply to opaque LSA."; 1353 } 1354 description 1355 "Opaque LSA."; 1357 list unknown-tlv { 1358 key "type"; 1359 description "Unknown TLV."; 1360 uses tlv; 1361 } 1363 container router-address-tlv { 1364 leaf router-address { 1365 type inet:ipv4-address; 1366 description 1367 "Router address."; 1368 } 1369 description 1370 "Router address TLV."; 1371 } 1373 container link-tlv { 1374 leaf link-type { 1375 type uint8; 1376 mandatory true; 1377 description "Link type."; 1378 } 1379 leaf link-id { 1380 type union { 1381 type inet:ipv4-address; 1382 type yang:dotted-quad; 1383 } 1384 mandatory true; 1385 description "Link ID."; 1386 } 1387 leaf-list local-if-ipv4-addr { 1388 type inet:ipv4-address; 1389 description 1390 "List of local interface IPv4 addresses."; 1391 } 1392 leaf-list local-remote-ipv4-addr { 1393 type inet:ipv4-address; 1394 description 1395 "List of remote interface IPv4 addresses."; 1396 } 1397 leaf te-metric { 1398 type uint32; 1399 description "TE metric."; 1400 } 1401 leaf max-bandwidth { 1402 type decimal64 { 1403 fraction-digits 2; 1404 } 1405 description "Maximum bandwidth."; 1406 } 1407 leaf max-reservable-bandwidth { 1408 type decimal64 { 1409 fraction-digits 2; 1410 } 1411 description "Maximum reservable bandwidth."; 1412 } 1413 leaf unreserved-bandwidth { 1414 type decimal64 { 1415 fraction-digits 2; 1416 } 1417 description "Unreserved bandwidth."; 1418 } 1419 leaf admin-group { 1420 type uint32; 1421 description "Administrative group/Resource class/Color."; 1422 } 1423 list unknown-subtlv { 1424 key "type"; 1425 description "Unknown sub-TLV."; 1426 uses tlv; 1427 } 1428 description 1429 "Link TLV."; 1430 } 1431 } 1432 } 1434 grouping ospfv3-lsa-options { 1435 description "OSPFv3 LSA options"; 1436 leaf options { 1437 type bits { 1438 bit DC { 1439 description 1440 "When set, the router support demand circuits."; 1441 } 1442 bit R { 1443 description 1444 "When set, the originator is an active router."; 1445 } 1446 bit N { 1447 description 1448 "If set, the router is attached to an NSSA"; 1449 } 1450 bit E { 1451 description 1452 "This bit describes the way AS-external-LSAs 1453 are flooded"; 1454 } 1455 bit V6 { 1456 description 1457 "If clear, the router/link should be excluded 1458 from IPv6 routing calculaton"; 1459 } 1460 } 1461 mandatory true; 1462 description "OSPFv3 LSA options."; 1463 } 1464 } 1466 grouping ospfv3-lsa-prefix { 1467 description 1468 "OSPFv3 LSA prefix."; 1470 leaf prefix { 1471 type inet:ip-prefix; 1472 description 1473 "Prefix"; 1474 } 1475 leaf prefix-options { 1476 type bits { 1477 bit NU { 1478 description 1479 "When set, the prefix should be excluded 1480 from IPv6 unicast calculations."; 1481 } 1482 bit LA { 1483 description 1484 "When set, the prefix is actually an IPv6 interface 1485 address of the Advertising Router."; 1486 } 1487 bit P { 1488 description 1489 "When set, the NSSA area prefix should be 1490 readvertised by the translating NSSA area border."; 1491 } 1492 bit DN { 1493 description 1494 "When set, the inter-area-prefix-LSA or 1495 AS-external-LSA prefix has been advertised in a VPN 1496 environment."; 1497 } 1498 } 1499 mandatory true; 1500 description "Prefix options."; 1502 } 1503 } 1505 grouping ospfv3-lsa-external { 1506 description 1507 "AS-External and NSSA LSA."; 1508 leaf metric { 1509 type uint24; 1510 description "Metric"; 1511 } 1513 leaf flags { 1514 type bits { 1515 bit E { 1516 description 1517 "When set, the metric specified is a Type 2 1518 external metric."; 1519 } 1520 } 1521 description "Flags."; 1522 } 1524 leaf referenced-ls-type { 1525 type uint16; 1526 description "Referenced Link State type."; 1527 } 1529 uses ospfv3-lsa-prefix; 1531 leaf forwarding-address { 1532 type inet:ipv6-address; 1533 description 1534 "Forwarding address."; 1535 } 1537 leaf external-route-tag { 1538 type uint32; 1539 description 1540 "Route tag."; 1541 } 1542 leaf referenced-link-state-id { 1543 type uint32; 1544 description 1545 "Referenced Link State ID."; 1546 } 1547 } 1549 grouping ospfv3-lsa-body { 1550 description "OSPFv3 LSA body."; 1551 container router { 1552 when "../../header/type = 8193" { // 0x2001 1553 description 1554 "Only apply to Router-LSA."; 1555 } 1556 description "Router LSA."; 1557 leaf flags { 1558 type bits { 1559 bit V { 1560 description 1561 "When set, the router is an endpoint of one or 1562 more virtual links."; 1563 } 1564 bit E { 1565 description 1566 "When set, the router is an AS Boundary Router 1567 (ASBR)."; 1568 } 1569 bit B { 1570 description 1571 "When set, the router is an Area Border Router (ABR)."; 1572 } 1573 bit Nt { 1574 description 1575 "When set, the router is an NSSA border router 1576 that is unconditionally translating NSSA-LSAs 1577 into AS-external-LSAs."; 1578 } 1579 } 1580 mandatory true; 1581 description "LSA option."; 1582 } 1584 uses ospfv3-lsa-options; 1586 list link { 1587 key "interface-id neighbor-interface-id neighbor-router-id"; 1588 description "Router LSA link."; 1589 leaf interface-id { 1590 type uint32; 1591 description "Interface ID."; 1592 } 1593 leaf neighbor-interface-id { 1594 type uint32; 1595 description "Neighbor Interface ID."; 1596 } 1597 leaf neighbor-router-id { 1598 type yang:dotted-quad; 1599 description "Neighbor Router ID"; 1600 } 1601 leaf type { 1602 type uint8; 1603 description "Link type."; 1604 } 1605 leaf metric { 1606 type uint16; 1607 description "Metric."; 1608 } 1609 } 1610 } 1611 container network { 1612 when "../../header/type = 8194" { // 0x2002 1613 description 1614 "Only apply to network LSA."; 1615 } 1616 description "Network LSA."; 1618 uses ospfv3-lsa-options; 1620 leaf-list attached-router { 1621 type yang:dotted-quad; 1622 description 1623 "List of the routers attached to the network."; 1624 } 1625 } 1626 container inter-area-prefix { 1627 when "../../header/type = 8195" { // 0x2003 1628 description 1629 "Only apply to inter-area-prefix LSA."; 1630 } 1631 leaf metric { 1632 type uint24; 1633 description "Metric"; 1634 } 1636 uses ospfv3-lsa-prefix; 1637 description "Inter-Area-Prefix LSA."; 1638 } 1639 container inter-area-router { 1640 when "../../header/type = 8196" { // 0x2004 1641 description 1642 "Only apply to inter-area-router LSA."; 1643 } 1644 uses ospfv3-lsa-options; 1645 leaf metric { 1646 type uint24; 1647 description "Metric"; 1648 } 1649 leaf destination-router-id { 1650 type yang:dotted-quad; 1651 description 1652 "The Router ID of the router being described by the LSA."; 1653 } 1654 description "Inter-Area-Router LSA."; 1655 } 1656 container as-external { 1657 when "../../header/type = 16389" { // 0x2007 1658 description 1659 "Only apply to as-external LSA."; 1660 } 1662 uses ospfv3-lsa-external; 1664 description "AS-External LSA."; 1665 } 1666 container nssa { 1667 when "../../header/type = 8199" { // 0x2007 1668 description 1669 "Only apply to nssa LSA."; 1670 } 1671 uses ospfv3-lsa-external; 1673 description "NSSA LSA."; 1674 } 1675 container link { 1676 when "../../header/type = 8" { // 0x0008 1677 description 1678 "Only apply to link LSA."; 1679 } 1680 leaf rtr-priority { 1681 type uint8; 1682 description "Router Priority of the interface."; 1683 } 1685 uses ospfv3-lsa-options; 1687 leaf link-local-interface-address { 1688 type inet:ipv6-address; 1689 description 1690 "The originating router's link-local 1691 interface address on the link."; 1692 } 1693 leaf num-of-prefixes { 1694 type uint32; 1695 description "Number of prefixes."; 1696 } 1698 list prefix { 1699 key "prefix"; 1700 description "List of prefixes associated with the link."; 1701 uses ospfv3-lsa-prefix; 1702 } 1703 description "Link LSA."; 1704 } 1705 container intra-area-prefix { 1706 when "../../header/type = 8201" { // 0x2009 1707 description 1708 "Only apply to intra-area-prefix LSA."; 1709 } 1710 description "Intra-Area-Prefix LSA."; 1712 leaf referenced-ls-type { 1713 type uint16; 1714 description "Referenced Link State type."; 1715 } 1716 leaf referenced-link-state-id { 1717 type uint32; 1718 description 1719 "Referenced Link State ID."; 1720 } 1721 leaf referenced-adv-router { 1722 type inet:ipv4-address; 1723 description 1724 "Referenced Advertising Router."; 1725 } 1727 leaf num-of-prefixes { 1728 type uint16; 1729 description "Number of prefixes."; 1730 } 1731 list prefix { 1732 key "prefix"; 1733 description "List of prefixes associated with the link."; 1734 uses ospfv3-lsa-prefix; 1735 leaf metric { 1736 type uint24; 1737 description "Metric"; 1738 } 1739 } 1740 } 1742 } 1744 grouping lsa-header { 1745 description 1746 "Common LSA for OSPFv2 and OSPFv3"; 1747 leaf age { 1748 type uint16; 1749 mandatory true; 1750 description "LSA age."; 1751 } 1752 leaf type { 1753 type uint16; 1754 mandatory true; 1755 description "LSA type."; 1756 } 1757 leaf adv-router { 1758 type yang:dotted-quad; 1759 mandatory true; 1760 description "LSA advertising router."; 1761 } 1762 leaf seq-num { 1763 type uint32; 1764 mandatory true; 1765 description "LSA sequence number."; 1766 } 1767 leaf checksum { 1768 type uint16; 1769 mandatory true; 1770 description "LSA checksum."; 1771 } 1772 leaf length { 1773 type uint16; 1774 mandatory true; 1775 description "LSA length."; 1776 } 1777 } 1779 grouping ospfv2-lsa { 1780 description 1781 "OSPFv2 LSA."; 1782 container header { 1783 description 1784 "Decoded OSPFv2 LSA header data."; 1785 leaf option { 1786 type bits { 1787 bit DC { 1788 description 1789 "When set, the router support demand circuits."; 1791 } 1792 bit P { 1793 description 1794 "Only used in type-7 LSA. When set, the NSSA 1795 border router should translate the type-7 LSA 1796 to type-5 LSA."; 1797 } 1798 bit MC { 1799 description 1800 "When set, the router support MOSPF."; 1801 } 1802 bit E { 1803 description 1804 "This bit describes the way AS-external-LSAs 1805 are flooded"; 1806 } 1807 } 1808 mandatory true; 1809 description "LSA option."; 1810 } 1811 leaf lsa-id { 1812 type inet:ipv4-address; 1813 mandatory true; 1814 description "LSA ID."; 1815 } 1817 leaf opaque-type { 1818 when "../../header/type = 9 or " 1819 + "../../header/type = 10 or " 1820 + "../../header/type = 11" { 1821 description 1822 "Only apply to opaque LSA."; 1823 } 1824 type uint8; 1825 mandatory true; 1826 description "Opaque type."; 1827 } 1829 leaf opaque-id { 1830 when "../../header/type = 9 or " 1831 + "../../header/type = 10 or " 1832 + "../../header/type = 11" { 1833 description 1834 "Only apply to opaque LSA."; 1835 } 1836 type uint24; 1837 mandatory true; 1838 description "Opaque id."; 1840 } 1841 uses lsa-header; 1842 } 1843 container body { 1844 description 1845 "Decoded OSPFv2 LSA body data."; 1846 uses ospfv2-lsa-body; 1847 } 1848 } 1850 grouping ospfv3-lsa { 1851 description 1852 "Decoded OSPFv3 LSA."; 1853 container header { 1854 description 1855 "Decoded OSPFv3 LSA header data."; 1856 leaf lsa-id { 1857 type uint32; 1858 mandatory true; 1859 description "LSA ID."; 1860 } 1861 uses lsa-header; 1862 } 1863 container body { 1864 description 1865 "Decoded OSPF LSA body data."; 1866 uses ospfv3-lsa-body; 1867 } 1868 } 1870 grouping lsa { 1871 description 1872 "OSPF LSA."; 1873 leaf decoded-completed { 1874 type boolean; 1875 description 1876 "The OSPF LSA body is fully decoded."; 1877 } 1878 leaf raw-data { 1879 type yang:hex-string; 1880 description 1881 "The complete LSA in network byte 1882 order as received/sent over the wire."; 1883 } 1884 choice version { 1885 description 1886 "OSPFv2 or OSPFv3 LSA body."; 1887 container ospfv2 { 1888 when "../../../rt:type = 'ospfv2'" { 1889 description "Applied to OSPFv2 only"; 1890 } 1891 description "OSPFv2 LSA"; 1892 uses ospfv2-lsa; 1893 } 1894 container ospfv3 { 1895 when "../../../rt:type = 'ospfv3'" { 1896 description "Applied to OSPFv3 only"; 1897 } 1898 description "OSPFv3 LSA"; 1899 uses ospfv3-lsa; 1900 } 1901 } 1902 } 1904 grouping lsa-key { 1905 description 1906 "OSPF LSA key."; 1907 leaf lsa-id { 1908 type union { 1909 type inet:ipv4-address; 1910 type uint32; 1911 } 1912 description 1913 "LSA ID."; 1914 } 1915 leaf adv-router { 1916 type inet:ipv4-address; 1917 description 1918 "Advertising router."; 1919 } 1920 } 1922 grouping af-area-config { 1923 description 1924 "OSPF address-family specific area config state."; 1925 list range { 1926 key "prefix"; 1927 description 1928 "Summarize routes matching address/mask (border 1929 routers only)"; 1930 leaf prefix { 1931 type inet:ip-prefix; 1932 description 1933 "IPv4 or IPv6 prefix"; 1934 } 1935 leaf advertise { 1936 type boolean; 1937 description 1938 "Advertise or hide."; 1939 } 1940 leaf cost { 1941 type uint24 { 1942 range "0..16777214"; 1943 } 1944 description 1945 "Cost of summary route."; 1946 } 1947 } 1948 } 1950 grouping area-config { 1951 description 1952 "OSPF area config state."; 1953 leaf area-type { 1954 type identityref { 1955 base area-type; 1956 } 1957 default normal; 1958 description 1959 "Area type."; 1960 } 1962 leaf summary { 1963 when "area-type = 'stub' or area-type = 'nssa'" { 1964 description 1965 "Summary generation valid for stub/NSSA area."; 1966 } 1967 type boolean; 1968 description 1969 "Enable/Disable summary generation to the stub or 1970 NSSA area."; 1971 } 1973 leaf default-cost { 1974 when "area-type = 'stub' or area-type = 'nssa'" { 1975 description 1976 "Default cost for LSA advertised into stub or 1977 NSSA area."; 1978 } 1979 type uint32 { 1980 range "1..16777215"; 1981 } 1982 description 1983 "Set the summary default-cost for a stub or NSSA area."; 1985 } 1987 list virtual-link { 1988 key "router-id"; 1989 description 1990 "OSPF virtual link"; 1991 leaf router-id { 1992 type yang:dotted-quad; 1993 description 1994 "Virtual link router ID."; 1995 } 1997 uses interface-common-config; 1998 } 2000 list sham-link { 2001 key "local-id remote-id"; 2002 description 2003 "OSPF sham link"; 2004 leaf local-id { 2005 type inet:ip-address; 2006 description 2007 "Address of the local end-point."; 2008 } 2009 leaf remote-id { 2010 type inet:ip-address; 2011 description 2012 "Address of the remote end-point."; 2013 } 2014 uses interface-common-config; 2015 } 2017 uses af-area-config { 2018 when "../../operation-mode = 'ospf:ships-in-the-night'" { 2019 description 2020 "Ships in the night configuration."; 2021 } 2022 } 2023 } 2025 grouping instance-config { 2026 description 2027 "OSPF instance config state."; 2028 leaf router-id { 2029 if-feature router-id; 2030 type yang:dotted-quad; 2031 description 2032 "Defined in RFC 2328. A 32-bit number 2033 that uniquely identifies the router."; 2034 } 2036 container admin-distance { 2037 description "Admin distance config state."; 2038 choice granularity { 2039 description 2040 "Options for expressing admin distance 2041 for intra-area and inter-area route"; 2042 case detail { 2043 leaf intra-area { 2044 type uint8; 2045 description 2046 "Admin distance for intra-area route."; 2047 } 2048 leaf inter-area { 2049 type uint8; 2050 description 2051 "Admin distance for inter-area route."; 2052 } 2053 } 2054 case coarse { 2055 leaf internal { 2056 type uint8; 2057 description 2058 "Admin distance for both intra-area and 2059 inter-area route."; 2060 } 2061 } 2062 } 2063 leaf external { 2064 type uint8; 2065 description 2066 "Admin distance for both external route."; 2067 } 2068 } 2070 container nsr { 2071 if-feature nsr; 2072 description 2073 "NSR config state."; 2074 leaf enable { 2075 type boolean; 2076 description 2077 "Enable/Disable NSR."; 2078 } 2079 } 2080 container graceful-restart { 2081 if-feature graceful-restart; 2082 description 2083 "Graceful restart config state."; 2084 leaf enable { 2085 type boolean; 2086 description 2087 "Enable/Disable graceful restart as defined in RFC 3623."; 2088 } 2089 leaf helper-enable { 2090 type boolean; 2091 description 2092 "Enable RestartHelperSupport in RFC 3623 Section B.2."; 2093 } 2094 leaf restart-interval { 2095 type uint16 { 2096 range "1..1800"; // Range is defined in RFC 3623. 2097 } 2098 units seconds; 2099 default "120"; // Default is defined in RFC 3623. 2100 description 2101 "RestartInterval option in RFC 3623 Section B.1."; 2102 } 2103 leaf helper-strict-lsa-checking { 2104 type boolean; 2105 description 2106 "RestartHelperStrictLSAChecking option in RFC 3623 2107 Section B.2."; 2108 } 2109 } 2111 container protocol-shutdown { 2112 if-feature protocol-shutdown; 2113 description 2114 "Protocol shutdown config state."; 2115 leaf shutdown { 2116 type boolean; 2117 description 2118 "Enable/Disable protocol shutdown."; 2119 } 2120 } 2122 container auto-cost { 2123 if-feature auto-cost; 2124 description 2125 "Auto cost config state."; 2126 leaf enable { 2127 type boolean; 2128 description 2129 "Enable/Disable auto cost."; 2130 } 2131 leaf reference-bandwidth { 2132 type uint32 { 2133 range "1..4294967"; 2134 } 2135 units Mbits; 2136 description 2137 "Configure reference bandwidth in term of Mbits"; 2138 } 2139 } 2141 container maximum { 2142 description 2143 "OSPF limits settings."; 2144 leaf paths { 2145 if-feature max-ecmp; 2146 type uint16 { 2147 range "1..32"; 2148 } 2149 description 2150 "Maximum number of ECMP paths."; 2151 } 2152 leaf max-lsa { 2153 if-feature max-lsa; 2154 type uint32 { 2155 range "1..4294967294"; 2156 } 2157 description 2158 "Maximum number of LSAs OSPF will receive."; 2159 } 2160 } 2162 container mpls { 2163 description 2164 "OSPF MPLS config state."; 2165 container te-rid { 2166 if-feature te-rid; 2167 description 2168 "Traffic Engineering stable IP address for system."; 2169 choice source { 2170 description 2171 "Different options for specifying TE router ID."; 2172 case interface { 2173 leaf interface { 2174 type if:interface-ref; 2175 description 2176 "Take the interface's IPv4 address as TE router ID."; 2177 } 2178 } 2179 case explicit { 2180 leaf router-id { 2181 type inet:ipv4-address; 2182 description 2183 "Explicitly configure the TE router ID."; 2184 } 2185 } 2186 } 2187 } 2188 container ldp { 2189 description 2190 "OSPF MPLS LDP config state."; 2191 leaf igp-sync { 2192 if-feature ldp-igp-sync; 2193 type boolean; 2194 description 2195 "Enable LDP IGP synchronization."; 2196 } 2197 leaf autoconfig { 2198 if-feature ldp-igp-autoconfig; 2199 type boolean; 2200 description 2201 "Enable LDP IGP interface auto-configuration."; 2202 } 2203 } 2204 } 2205 } 2207 grouping interface-operation { 2208 description 2209 "OSPF interface operation state."; 2210 reference "RFC2328 Section 9"; 2211 uses interface-config; 2213 leaf state { 2214 type if-state-type; 2215 description "Interface state."; 2216 } 2218 leaf hello-timer { 2219 type uint32; 2220 units "milliseconds"; 2221 description "Hello timer."; 2222 } 2223 leaf wait-timer { 2224 type uint32; 2225 units "milliseconds"; 2226 description "Wait timer."; 2227 } 2229 list neighbor { 2230 description 2231 "List of neighbors."; 2232 leaf neighbor-id { 2233 type leafref { 2234 path "../../neighbor/neighbor-id"; 2235 } 2236 description "Neighbor."; 2237 } 2238 } 2240 leaf dr { 2241 type inet:ipv4-address; 2242 description "DR."; 2243 } 2245 leaf bdr { 2246 type inet:ipv4-address; 2247 description "BDR."; 2248 } 2249 } // interface-operation 2251 grouping neighbor-operation { 2252 description 2253 "OSPF neighbor operation data."; 2255 leaf address { 2256 type inet:ip-address; 2257 description 2258 "Neighbor address."; 2259 } 2260 leaf dr { 2261 type inet:ipv4-address; 2262 description 2263 "Designated Router."; 2264 } 2265 leaf bdr { 2266 type inet:ipv4-address; 2267 description 2268 "Backup Designated Router."; 2269 } 2270 leaf state { 2271 type nbr-state-type; 2272 description 2273 "OSPF neighbor state."; 2274 } 2275 } 2277 grouping instance-operation { 2278 description 2279 "OSPF Address Family operation state."; 2280 leaf router-id { 2281 type yang:dotted-quad; 2282 description 2283 "Defined in RFC 2328. A 32-bit number 2284 that uniquely identifies the router."; 2285 } 2286 } 2288 augment "/rt:routing/rt:routing-instance/rt:routing-protocols/" 2289 + "rt:routing-protocol" { 2290 when "rt:type = 'ospf:ospfv2' or rt:type = 'ospf:ospfv3'" { 2291 description 2292 "This augment is only valid for a routing protocol instance 2293 of OSPF (type 'ospfv2' or 'ospfv3')."; 2294 } 2295 description "OSPF augmentation."; 2297 container ospf { 2298 description 2299 "OSPF."; 2301 container all-instances-inherit { 2302 if-feature instance-inheritance; 2303 description 2304 "Inheritance support to all instances."; 2305 container area { 2306 description 2307 "Area config to be inherited by all areas in 2308 all instances."; 2309 } 2310 container interface { 2311 description 2312 "Interface config to be inherited by all interfaces 2313 in all instances."; 2314 } 2315 } 2317 leaf operation-mode { 2318 type identityref { 2319 base operation-mode; 2320 } 2321 default ospf:ships-in-the-night; 2322 description 2323 "OSPF operation mode."; 2324 } 2326 list instance { 2327 key "routing-instance af"; 2328 description 2329 "An OSPF routing protocol instance."; 2330 leaf routing-instance { 2331 type rt:routing-instance-ref; 2332 description 2333 "For protocol centric model, which is supported in 2334 default-instance only, this could reference any layer 3 2335 routing-instance. 2336 For routing-instance centric model, must reference the 2337 enclosing routing-instance."; 2338 } 2340 leaf af { 2341 type identityref { 2342 base rt:address-family; 2343 } 2344 description 2345 "Address-family of the instance."; 2346 } 2348 uses instance-config; 2350 container all-areas-inherit { 2351 if-feature area-inheritance; 2352 description 2353 "Inheritance for all areas."; 2354 container area { 2355 description 2356 "Area config to be inherited by all areas."; 2357 } 2358 container interface { 2359 description 2360 "Interface config to be inherited by all interfaces 2361 in all areas."; 2362 } 2363 } 2365 list area { 2366 key "area-id"; 2367 description 2368 "List of ospf areas"; 2369 leaf area-id { 2370 type area-id-type; 2371 description 2372 "Area ID."; 2373 } 2375 uses area-config; 2377 container all-interfaces-inherit { 2378 if-feature interface-inheritance; 2379 description 2380 "Inheritance for all interfaces"; 2381 container interface { 2382 description 2383 "Interface config to be inherited by all 2384 interfaces."; 2385 } 2386 } 2388 list interface { 2389 key "interface"; 2390 description 2391 "List of OSPF interfaces."; 2392 leaf interface { 2393 type if:interface-ref; 2394 description 2395 "Interface."; 2396 } 2397 uses interface-config; 2398 } // list of interfaces 2399 } // list of areas 2400 } // list of instance 2401 } // container ospf 2402 } 2404 augment "/rt:routing/rt:routing-instance/rt:routing-protocols/" 2405 + "rt:routing-protocol/ospf:ospf/ospf:instance" { 2406 when "../rt:type = 'ospf:ospfv2' or ../rt:type = 'ospf:ospfv3'" { 2407 description 2408 "This augment is only valid for OSPF 2409 (type 'ospfv2' or 'ospfv3')."; 2410 } 2411 if-feature multi-topology; 2412 description 2413 "OSPF multi-topology routing-protocol augmentation."; 2415 list topology { 2416 // Topology must be in the same routing-instance 2417 // and of same AF as the container. 2418 key "name"; 2419 description "OSPF topology."; 2420 leaf name { 2421 type rt:rib-ref; 2422 description "RIB"; 2423 } 2424 list area { 2425 key "area-id"; 2426 description 2427 "List of ospf areas"; 2428 leaf area-id { 2429 type area-id-type; 2430 description 2431 "Area ID."; 2432 } 2433 uses area-config; 2434 } 2435 } 2436 } 2438 augment "/rt:routing/rt:routing-instance/rt:routing-protocols/" 2439 + "rt:routing-protocol/ospf:ospf/ospf:instance/" 2440 + "ospf:area/ospf:interface" { 2441 when "../../rt:type = 'ospf:ospfv2'" { 2442 description 2443 "This augment is only valid for OSPFv2."; 2444 } 2445 if-feature ospf:multi-topology; 2446 description "OSPF multi-topology interface augmentation."; 2447 list topology { 2448 key "name"; 2449 description "OSPF interface topology."; 2450 leaf name { 2451 type rt:rib-ref; 2452 description 2453 "One of the topology enabled on this interface"; 2454 } 2455 leaf cost { 2456 type uint32; 2457 description 2458 "Interface cost for this topology"; 2459 } 2460 } 2461 } 2462 augment "/rt:routing-state/rt:routing-instance/" 2463 + "rt:routing-protocols/rt:routing-protocol" { 2464 when "rt:type = 'ospf:ospfv2' or rt:type = 'ospf:ospfv3'" { 2465 description 2466 "This augment is only valid for a routing protocol instance 2467 of type 'ospfv2' or 'ospfv3'."; 2468 } 2469 description 2470 "OSPF configuration."; 2471 container ospf { 2472 description "OSPF"; 2474 leaf operation-mode { 2475 type identityref { 2476 base operation-mode; 2477 } 2478 description 2479 "OSPF operation mode."; 2480 } 2482 list instance { 2483 key "routing-instance af"; 2484 description 2485 "An OSPF routing protocol instance."; 2486 leaf routing-instance { 2487 type rt:routing-instance-ref; 2488 description 2489 "For protocol centric model, which is supported in 2490 default-instance only, this could reference any layer 3 2491 routing-instance. 2492 For routing-instance centric model, must reference the 2493 enclosing routing-instance."; 2494 } 2496 leaf af { 2497 type identityref { 2498 base rt:address-family; 2499 } 2500 description 2501 "Address-family of the instance."; 2502 } 2504 uses instance-operation; 2506 list neighbor { 2507 key "area-id interface neighbor-id"; 2508 description 2509 "List of OSPF neighbors."; 2511 leaf area-id { 2512 type area-id-type; 2513 description 2514 "Area ID."; 2515 } 2516 leaf interface { 2517 // Should it refer to config state leaf? 2518 type if:interface-ref; 2519 description 2520 "Interface."; 2521 } 2522 leaf neighbor-id { 2523 type inet:ipv4-address; 2524 description 2525 "Neighbor ID."; 2526 } 2528 uses neighbor-operation; 2529 } // list of OSPF neighbors 2531 list interface { 2532 key "area-id interface"; 2533 description 2534 "List of OSPF interfaces."; 2536 leaf area-id { 2537 type area-id-type; 2538 description "Area ID."; 2539 } 2540 leaf interface { 2541 // Should it refer to config state leaf? 2542 type if:interface-ref; 2543 description "Interface."; 2544 } 2546 uses interface-operation; 2547 } // list of OSPF interfaces 2549 list area { 2550 key "area-id"; 2551 description "List of OSPF areas"; 2552 leaf area-id { 2553 type area-id-type; 2554 description "Area ID."; 2555 } 2556 } // list of OSPF areas 2558 container databases { 2559 description 2560 "OSPF databases."; 2561 list link-scope-lsas { 2562 when "../../../rt:type = 'ospfv3'" { 2563 description 2564 "Link scope LSA only exists in OSPFv3."; 2565 } 2566 key "area-id interface lsa-type"; 2567 description "List OSPF link scope LSA databases"; 2568 leaf area-id { 2569 type uint32; // Should it refer to config state leaf? 2570 description "Area ID."; 2571 } 2572 leaf interface { 2573 // Should it refer to config state leaf? 2574 type if:interface-ref; 2575 description "Interface."; 2576 } 2577 leaf lsa-type { 2578 type uint8; 2579 description "OSPF link scope LSA type."; 2580 } 2581 list link-scope-lsa { 2582 key "lsa-id adv-router"; 2583 description "List of OSPF link scope LSAs"; 2584 uses lsa-key; 2585 uses lsa; 2586 } 2587 } // list link-scope-lsas 2589 list area-scope-lsas { 2590 key "area-id lsa-type"; 2591 description "List OSPF area scope LSA databases"; 2592 leaf lsa-type { 2593 type uint8; 2594 description "OSPF area scope LSA type."; 2595 } 2596 leaf area-id { 2597 type uint32; // Should it refer to config state leaf? 2598 description "Area ID."; 2599 } 2600 list area-scope-lsa { 2601 key "lsa-id adv-router"; 2602 description "List of OSPF area scope LSAs"; 2603 uses lsa-key; 2604 uses lsa; 2605 } 2606 } // list area-scope-lsas 2607 list as-scope-lsas { 2608 key "lsa-type"; 2609 description "List OSPF AS scope LSA databases"; 2610 leaf lsa-type { 2611 type uint8; 2612 description "OSPF AS scope LSA type."; 2613 } 2614 list as-scope-lsa { 2615 key "lsa-id adv-router"; 2616 description "List of OSPF AS scope LSAs"; 2617 uses lsa-key; 2618 uses lsa; 2619 } 2620 } // list as-scope-lsas 2621 } // container databases 2622 } 2623 } // container ospf 2624 } 2626 augment "/rt:routing-state/rt:routing-instance/" 2627 + "rt:routing-protocols/rt:routing-protocol/" 2628 + "ospf:ospf/ospf:instance" { 2629 when "../rt:type = 'ospf:ospfv2'" { 2630 description 2631 "This augment is only valid for OSPFv2."; 2632 } 2633 if-feature multi-topology; 2634 description 2635 "OSPF multi-topology routing-protocol augmentation."; 2636 list topology { 2637 // Topology must be in the same routing-instance 2638 // and of same AF as the container. 2639 key "name"; 2640 description "OSPF topology."; 2641 leaf name { 2642 type rt:rib-ref; 2643 description "RIB"; 2644 } 2645 list area { 2646 key "area-id"; 2647 description 2648 "List of ospf areas"; 2649 leaf area-id { 2650 type area-id-type; 2651 description 2652 "Area ID."; 2653 } 2654 } 2656 } 2657 } 2659 augment "/rt:routing-state/rt:routing-instance/" 2660 + "rt:routing-protocols/rt:routing-protocol/" 2661 + "ospf:ospf/ospf:instance/ospf:interface" { 2662 when "../../rt:type = 'ospf:ospfv2'" { 2663 description 2664 "This augment is only valid for OSPFv2."; 2665 } 2666 if-feature ospf:multi-topology; 2667 description "OSPF multi-topology interface augmentation."; 2668 list topology { 2669 key "name"; 2670 description "OSPF interface topology."; 2671 leaf name { 2672 type rt:rib-ref; 2673 description 2674 "One of the topology enabled on this interface"; 2675 } 2676 } 2677 } 2679 grouping route-content { 2680 description 2681 "This grouping defines OSPF-specific route attributes."; 2682 leaf metric { 2683 type uint32; 2684 description "OSPF route metric."; 2685 } 2686 leaf tag { 2687 type uint32; 2688 default "0"; 2689 description "OSPF route tag."; 2690 } 2691 leaf route-type { 2692 type enumeration { 2693 enum intra-area { 2694 description "OSPF intra-area route"; 2695 } 2696 enum inter-area { 2697 description "OSPF inter-area route"; 2698 } 2699 enum external-1 { 2700 description "OSPF external route type 1"; 2701 } 2702 enum external-2 { 2703 description "OSPF External route type 2"; 2705 } 2706 enum nssa-1 { 2707 description "OSPF NSSA external route type 1"; 2708 } 2709 enum nssa-2 { 2710 description "OSPF NSSA external route type 2"; 2711 } 2712 } 2713 description "OSPF route type"; 2714 } 2715 } 2717 augment "/rt:routing-state/rt:ribs/rt:rib/rt:routes/rt:route" { 2718 when "rt:source-protocol = 'ospf:ospfv2' or " 2719 + "rt:source-protocol = 'ospf:ospfv3'" { 2720 description 2721 "This augment is only valid for a routes whose source 2722 protocol is OSPF."; 2723 } 2724 description 2725 "OSPF-specific route attributes."; 2726 uses route-content; 2727 } 2729 augment "/rt:active-route/rt:output/rt:route" { 2730 description 2731 "OSPF-specific route attributes in the output of 'active-route' 2732 RPC."; 2733 uses route-content; 2734 } 2736 identity if-link-type { 2737 description "Base identity for OSPF interface link type."; 2738 } 2740 identity if-link-type-normal { 2741 base if-link-type; 2742 description "OSPF interface link type normal."; 2743 } 2745 identity if-link-type-virtual-link { 2746 base if-link-type; 2747 description "OSPF interface link type virtual link."; 2748 } 2750 identity if-link-type-sham-link { 2751 base if-link-type; 2752 description "OSPF interface link type sham link."; 2754 } 2756 grouping notification-instance-hdr { 2757 description 2758 "This group describes common instance specific 2759 data for notifications."; 2761 leaf routing-instance { 2762 type rt:routing-instance-ref; 2763 description 2764 "Describe the routing instance."; 2765 } 2767 leaf routing-protocol-name { 2768 type string; 2769 description 2770 "Describes the name of the OSPF routing protocol."; 2771 } 2773 container instance-af { 2774 leaf af { 2775 type identityref { 2776 base rt:address-family; 2777 } 2778 description 2779 "Address-family of the instance."; 2780 } 2781 description 2782 "Describes the address family of the OSPF instance."; 2783 } 2784 } 2786 notification if-state-change { 2787 uses notification-instance-hdr; 2789 leaf link-type { 2790 type identityref { 2791 base if-link-type; 2792 } 2793 description "Type of OSPF interface."; 2794 } 2796 container interface { 2797 description "Normal interface."; 2798 leaf interface { 2799 type if:interface-ref; 2800 description "Interface."; 2801 } 2803 } 2804 container virtual-link { 2805 description "virtual-link."; 2806 leaf area-id { 2807 type uint32; 2808 description "Area ID."; 2809 } 2810 leaf neighbor-router-id { 2811 type yang:dotted-quad; 2812 description "Neighbor router id."; 2813 } 2814 } 2815 container sham-link { 2816 description "sham-link."; 2817 leaf area-id { 2818 type uint32; 2819 description "Area ID."; 2820 } 2821 leaf local-ip-addr { 2822 type inet:ip-address; 2823 description "Sham link local address."; 2824 } 2826 leaf remote-ip-addr { 2827 type inet:ip-address; 2828 description "Sham link remote address."; 2829 } 2830 } 2832 leaf state { 2833 type if-state-type; 2834 description "Interface state."; 2835 } 2837 description 2838 "This notification is sent when interface 2839 state change is detected."; 2840 } 2842 notification if-config-error { 2843 uses notification-instance-hdr; 2845 leaf link-type { 2846 type identityref { 2847 base if-link-type; 2848 } 2849 description "Type of OSPF interface."; 2850 } 2851 container interface { 2852 description "Normal interface."; 2853 leaf interface { 2854 type if:interface-ref; 2855 description "Interface."; 2856 } 2857 leaf packet-source { 2858 type yang:dotted-quad; 2859 description "Source address."; 2860 } 2861 } 2862 container virtual-link { 2863 description "virtual-link."; 2864 leaf area-id { 2865 type uint32; 2866 description "Area ID."; 2867 } 2868 leaf neighbor-router-id { 2869 type yang:dotted-quad; 2870 description "Neighbor router id."; 2871 } 2872 } 2874 container sham-link { 2875 description "sham-link."; 2876 leaf area-id { 2877 type uint32; 2878 description "Area ID."; 2879 } 2880 leaf local-ip-addr { 2881 type inet:ip-address; 2882 description "Sham link local address."; 2883 } 2885 leaf remote-ip-addr { 2886 type inet:ip-address; 2887 description "Sham link remote address."; 2888 } 2889 } 2891 leaf packet-type { 2892 type packet-type; 2893 description "OSPF packet type."; 2894 } 2896 leaf error { 2897 type enumeration { 2898 enum "badVersion" { 2899 description "Bad version"; 2900 } 2901 enum "areaMismatch" { 2902 description "Area mistmatch"; 2903 } 2904 enum "unknownNbmaNbr" { 2905 description "Unknown NBMA neighbor"; 2906 } 2907 enum "unknownVirtualNbr" { 2908 description "Unknown virtual link neighbor"; 2909 } 2910 enum "authTypeMismatch" { 2911 description "Auth type mismatch"; 2912 } 2913 enum "authFailure" { 2914 description "Auth failure"; 2915 } 2916 enum "netMaskMismatch" { 2917 description "Network mask mismatch"; 2918 } 2919 enum "helloIntervalMismatch" { 2920 description "Hello interval mismatch"; 2921 } 2922 enum "deadIntervalMismatch" { 2923 description "Dead interval mismatch"; 2924 } 2925 enum "optionMismatch" { 2926 description "Option mismatch"; 2927 } 2928 enum "mtuMismatch" { 2929 description "MTU mismatch"; 2930 } 2931 enum "duplicateRouterId" { 2932 description "Duplicate router ID"; 2933 } 2934 enum "noError" { 2935 description "No error"; 2936 } 2937 } 2938 description "Error code."; 2939 } 2940 description 2941 "This notification is sent when interface 2942 config error is detected."; 2943 } 2945 notification nbr-state-change { 2946 uses notification-instance-hdr; 2947 leaf link-type { 2948 type identityref { 2949 base if-link-type; 2950 } 2951 description "Type of OSPF interface."; 2952 } 2954 container interface { 2955 description "Normal interface."; 2956 leaf interface { 2957 type if:interface-ref; 2958 description "Interface."; 2959 } 2960 leaf neighbor-router-id { 2961 type yang:dotted-quad; 2962 description "Neighbor router id."; 2963 } 2964 leaf neighbor-ip-addr { 2965 type yang:dotted-quad; 2966 description "Neighbor address."; 2967 } 2968 } 2969 container virtual-link { 2970 description "virtual-link."; 2971 leaf area-id { 2972 type uint32; 2973 description "Area ID."; 2974 } 2975 leaf neighbor-router-id { 2976 type yang:dotted-quad; 2977 description "Neighbor router id."; 2978 } 2979 } 2980 container sham-link { 2981 description "sham-link."; 2982 leaf area-id { 2983 type uint32; 2984 description "Area ID."; 2985 } 2986 leaf local-ip-addr { 2987 type inet:ip-address; 2988 description "Sham link local address."; 2989 } 2990 leaf neighbor-router-id { 2991 type yang:dotted-quad; 2992 description "Neighbor router id."; 2993 } 2994 leaf neighbor-ip-addr { 2995 type yang:dotted-quad; 2996 description "Neighbor address."; 2997 } 2998 } 3000 leaf state { 3001 type nbr-state-type; 3002 description "Neighbor state."; 3003 } 3005 description 3006 "This notification is sent when neighbor 3007 state change is detected."; 3008 } 3010 notification nbr-restart-helper-status-change { 3011 uses notification-instance-hdr; 3013 leaf link-type { 3014 type identityref { 3015 base if-link-type; 3016 } 3017 description "Type of OSPF interface."; 3018 } 3020 container interface { 3021 description "Normal interface."; 3022 leaf interface { 3023 type if:interface-ref; 3024 description "Interface."; 3025 } 3026 leaf neighbor-router-id { 3027 type yang:dotted-quad; 3028 description "Neighbor router id."; 3029 } 3030 leaf neighbor-ip-addr { 3031 type yang:dotted-quad; 3032 description "Neighbor address."; 3033 } 3034 } 3035 container virtual-link { 3036 description "virtual-link."; 3037 leaf area-id { 3038 type uint32; 3039 description "Area ID."; 3040 } 3041 leaf neighbor-router-id { 3042 type yang:dotted-quad; 3043 description "Neighbor router id."; 3044 } 3045 } 3047 leaf status { 3048 type restart-helper-status-type; 3049 description "Restart helper status."; 3050 } 3052 leaf age { 3053 type uint32; 3054 units seconds; 3055 description 3056 "Remaining time in current OSPF graceful restart 3057 interval, if the router is acting as a restart 3058 helper for the neighbor."; 3059 } 3061 leaf exit-reason { 3062 type restart-exit-reason-type; 3063 description 3064 "Restart helper exit reason."; 3065 } 3066 description 3067 "This notification is sent when neighbor restart 3068 helper status change is detected."; 3069 } 3071 notification rx-bad-packet { 3072 uses notification-instance-hdr; 3074 leaf link-type { 3075 type identityref { 3076 base if-link-type; 3077 } 3078 description "Type of OSPF interface."; 3079 } 3081 container interface { 3082 description "Normal interface."; 3083 leaf interface { 3084 type if:interface-ref; 3085 description "Interface."; 3086 } 3087 leaf packet-source { 3088 type yang:dotted-quad; 3089 description "Source address."; 3090 } 3092 } 3093 container virtual-link { 3094 description "virtual-link."; 3095 leaf area-id { 3096 type uint32; 3097 description "Area ID."; 3098 } 3099 leaf neighbor-router-id { 3100 type yang:dotted-quad; 3101 description "Neighbor router id."; 3102 } 3103 } 3105 container sham-link { 3106 description "sham-link."; 3107 leaf area-id { 3108 type uint32; 3109 description "Area ID."; 3110 } 3111 leaf local-ip-addr { 3112 type inet:ip-address; 3113 description "Sham link local address."; 3114 } 3116 leaf remote-ip-addr { 3117 type inet:ip-address; 3118 description "Sham link remote address."; 3119 } 3120 } 3122 leaf packet-type { 3123 type packet-type; 3124 description "OSPF packet type."; 3125 } 3127 description 3128 "This notification is sent when an OSPF packet 3129 has been received on a interface that cannot be parsed."; 3130 } 3132 notification lsdb-approaching-overflow { 3133 uses notification-instance-hdr; 3135 leaf ext-lsdb-limit { 3136 type uint32; 3137 description 3138 "The maximum number of non-default AS-external LSAs 3139 entries that can be stored in the link state database."; 3141 } 3143 description 3144 "This notification is sent when the number of LSAs 3145 in the router's link state database has exceeded 3146 ninety percent of the ext-lsdb-limit."; 3147 } 3149 notification lsdb-overflow { 3150 uses notification-instance-hdr; 3152 leaf ext-lsdb-limit { 3153 type uint32; 3154 description 3155 "The maximum number of non-default AS-external LSAs 3156 entries that can be stored in the link state database."; 3157 } 3159 description 3160 "This notification is sent when the number of LSAs 3161 in the router's link state database has exceeded 3162 ext-lsdb-limit."; 3163 } 3165 notification nssa-translator-status-change { 3166 uses notification-instance-hdr; 3168 leaf area-id { 3169 type uint32; 3170 description "Area ID."; 3171 } 3173 leaf status { 3174 type nssa-translator-state-type; 3175 description 3176 "NSSA translator status."; 3177 } 3179 description 3180 "This notification is sent when there is a change 3181 in the router's ability to translate OSPF NSSA LSAs 3182 OSPF AS-External LSAs."; 3183 } 3185 notification restart-status-change { 3186 uses notification-instance-hdr; 3188 leaf status { 3189 type restart-status-type; 3190 description 3191 "Restart status."; 3192 } 3194 leaf restart-interval { 3195 type uint16 { 3196 range "1..1800"; 3197 } 3198 units seconds; 3199 default "120"; 3200 description 3201 "Restart interval."; 3202 } 3204 leaf exit-reason { 3205 type restart-exit-reason-type; 3206 description 3207 "Restart exit reason."; 3208 } 3210 description 3211 "This notification is sent when the graceful restart 3212 state for the router has changed."; 3213 } 3214 } 3215 3217 4. Security Considerations 3219 The data model defined does not create any security implications. 3221 This draft does not change any underlying security issues inherent in 3222 [I-D.ietf-netmod-routing-cfg]. 3224 5. Acknowledgements 3226 The authors wish to thank Acee Lindem, Yi Yang, Alexander Clemm, 3227 Gaurav Gupta, Ing-Wher Chen, Ladislav Lhotka and Stephane Litkowski 3228 for their thorough reviews and helpful comments. 3230 This document was produced using Marshall Rose's xml2rfc tool. 3232 6. References 3233 6.1. Normative References 3235 [RFC1793] Moy, J., "Extending OSPF to Support Demand Circuits", RFC 3236 1793, April 1995. 3238 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 3239 Requirement Levels", BCP 14, RFC 2119, March 1997. 3241 [RFC2328] Moy, J., "OSPF Version 2", STD 54, RFC 2328, April 1998. 3243 [RFC3101] Murphy, P., "The OSPF Not-So-Stubby Area (NSSA) Option", 3244 RFC 3101, January 2003. 3246 [RFC3623] Moy, J., Pillay-Esnault, P., and A. Lindem, "Graceful OSPF 3247 Restart", RFC 3623, November 2003. 3249 [RFC3630] Katz, D., Kompella, K., and D. Yeung, "Traffic Engineering 3250 (TE) Extensions to OSPF Version 2", RFC 3630, September 3251 2003. 3253 [RFC4577] Rosen, E., Psenak, P., and P. Pillay-Esnault, "OSPF as the 3254 Provider/Customer Edge Protocol for BGP/MPLS IP Virtual 3255 Private Networks (VPNs)", RFC 4577, June 2006. 3257 [RFC4750] Joyal, D., Galecki, P., Giacalone, S., Coltun, R., and F. 3258 Baker, "OSPF Version 2 Management Information Base", RFC 3259 4750, December 2006. 3261 [RFC5187] Pillay-Esnault, P. and A. Lindem, "OSPFv3 Graceful 3262 Restart", RFC 5187, June 2008. 3264 [RFC5340] Coltun, R., Ferguson, D., Moy, J., and A. Lindem, "OSPF 3265 for IPv6", RFC 5340, July 2008. 3267 [RFC5643] Joyal, D. and V. Manral, "Management Information Base for 3268 OSPFv3", RFC 5643, August 2009. 3270 [RFC5838] Lindem, A., Mirtorabi, S., Roy, A., Barnes, M., and R. 3271 Aggarwal, "Support of Address Families in OSPFv3", RFC 3272 5838, April 2010. 3274 [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the 3275 Network Configuration Protocol (NETCONF)", RFC 6020, 3276 October 2010. 3278 [RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A. 3279 Bierman, "Network Configuration Protocol (NETCONF)", RFC 3280 6241, June 2011. 3282 [RFC7223] Bjorklund, M., "A YANG Data Model for Interface 3283 Management", RFC 7223, May 2014. 3285 6.2. Informative References 3287 [I-D.ietf-netmod-routing-cfg] 3288 Lhotka, L., "A YANG Data Model for Routing Management", 3289 draft-ietf-netmod-routing-cfg-15 (work in progress), May 3290 2014. 3292 Authors' Addresses 3294 Derek Yeung 3295 Cisco Systems 3296 170 West Tasman Drive 3297 San Jose, CA 95134 3298 USA 3300 EMail: myeung@cisco.com 3302 Yingzhen Qu 3303 Cisco Systems 3304 170 West Tasman Drive 3305 San Jose, CA 95134 3306 USA 3308 EMail: yiqu@cisco.com 3310 Jeffrey Zhang 3311 Juniper Networks 3312 10 Technology Park Drive 3313 Westford, MA 01886 3314 USA 3316 EMail: zzhang@juniper.net 3318 Dean Bogdanovic 3319 Juniper Networks 3320 10 Technology Park Drive 3321 Westford, MA 01886 3322 USA 3324 EMail: deanb@juniper.net 3325 Kiran Agrahara Sreenivasa 3326 Brocade Communications System 3327 9442 Capital of Texas Hwy North 3328 Arboretum Plaza One, Suite 500 3329 Austin, TX 78759 3330 USA 3332 EMail: kkoushik@brocade.com