idnits 2.17.1 draft-ietf-rtgwg-yang-vrrp-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 : ---------------------------------------------------------------------------- == There are 2 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. == There are 2 instances of lines with private range IPv4 addresses in the document. If these are generic example addresses, they should be changed to use any of the ranges defined in RFC 6890 (or successor): 192.0.2.x, 198.51.100.x or 203.0.113.x. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 249 has weird spacing: '...address ine...' == Line 267 has weird spacing: '...address ine...' == Line 300 has weird spacing: '...address ine...' == Line 322 has weird spacing: '...address ine...' == Line 353 has weird spacing: '...address ine...' == (15 more instances...) == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (May 8, 2017) is 2537 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'RFC6087' is defined on line 1569, but no explicit reference was found in the text ** Obsolete normative reference: RFC 3768 (Obsoleted by RFC 5798) ** Obsolete normative reference: RFC 7223 (Obsoleted by RFC 8343) ** Obsolete normative reference: RFC 7277 (Obsoleted by RFC 8344) == Outdated reference: A later version (-25) exists of draft-ietf-netconf-yang-push-06 -- Obsolete informational reference (is this intentional?): RFC 6087 (Obsoleted by RFC 8407) -- Obsolete informational reference (is this intentional?): RFC 6536 (Obsoleted by RFC 8341) Summary: 3 errors (**), 0 flaws (~~), 12 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group X. Liu, Ed. 3 Internet-Draft A. Kyparlis 4 Intended status: Standards Track Jabil 5 Expires: November 9, 2017 R. Parikh 6 VMware 7 A. Lindem 8 Cisco Systems 9 M. Zhang 10 Huawei Technologies 11 May 8, 2017 13 A YANG Data Model for Virtual Router Redundancy Protocol (VRRP) 14 draft-ietf-rtgwg-yang-vrrp-03 16 Abstract 18 This document describes a data model for Virtual Router Redundancy 19 Protocol (VRRP). Both version 2 and version 3 of VRRP are covered. 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 November 9, 2017. 38 Copyright Notice 40 Copyright (c) 2017 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. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 56 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2 57 1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 3 58 1.3. Prefixes in Data Node Names . . . . . . . . . . . . . . . 3 59 2. Design of the Data Model . . . . . . . . . . . . . . . . . . 4 60 2.1. Scope of the Model . . . . . . . . . . . . . . . . . . . 4 61 2.2. Relations with Interface Model and IP Model . . . . . . . 4 62 2.3. Protocol Configuration . . . . . . . . . . . . . . . . . 6 63 2.4. Protocol States . . . . . . . . . . . . . . . . . . . . . 8 64 2.5. Notifications . . . . . . . . . . . . . . . . . . . . . . 9 65 3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 10 66 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 32 67 5. Security Considerations . . . . . . . . . . . . . . . . . . . 33 68 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 33 69 6.1. Normative References . . . . . . . . . . . . . . . . . . 33 70 6.2. Informative References . . . . . . . . . . . . . . . . . 35 71 Appendix A. Complete Model Tree Structure . . . . . . . . . . . 36 72 Appendix B. Data Tree Example . . . . . . . . . . . . . . . . . 39 73 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 42 75 1. Introduction 77 This document introduces a YANG [RFC6020][RFC7950] data model for 78 Virtual Router Redundancy Protocol (VRRP) [RFC3768][RFC5798]. VRRP 79 provides higher resiliency by specifying an election protocol that 80 dynamically assigns responsibility for a virtual router to one of the 81 VRRP routers on a LAN. 83 This YANG model supports both version 2 and version 3 of VRRP. VRRP 84 version 2 defined in [RFC3768] supports IPv4. VRRP version 3 defined 85 in [RFC5798] supports both IPv4 and IPv6. 87 1.1. Terminology 89 The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 90 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 91 "OPTIONAL" in this document are to be interpreted as described in BCP 92 14, [RFC2119]. 94 The following terms are defined in [RFC7950] and are not redefined 95 here: 97 o augment 99 o data model 101 o data node 103 1.2. Tree Diagrams 105 A simplified graphical representation of the data model is used in 106 this document. The meaning of the symbols in these diagrams is as 107 follows: 109 o Brackets "[" and "]" enclose list keys. 111 o Curly braces "{" and "}" contain names of optional features that 112 make the corresponding node conditional. 114 o Abbreviations before data node names: "rw" means configuration 115 (read-write), and "ro" means state data (read-only). 117 o Symbols after data node names: "?" means an optional node, "!" 118 means a presence container, and "*" denotes a list and leaf-list. 120 o Parentheses enclose choice and case nodes, and case nodes are also 121 marked with a colon (":"). 123 o Ellipsis ("...") stands for contents of subtrees that are not 124 shown. 126 1.3. Prefixes in Data Node Names 128 In this document, names of data nodes, actions, and other data model 129 objects are often used without a prefix, as long as it is clear from 130 the context in which YANG module each name is defined. Otherwise, 131 names are prefixed using the standard prefix associated with the 132 corresponding YANG module, as shown in Table 1. 134 +--------+-----------------+-----------+ 135 | Prefix | YANG module | Reference | 136 +--------+-----------------+-----------+ 137 | yang | ietf-yang-types | [RFC6991] | 138 | inet | ietf-inet-types | [RFC6991] | 139 | if | ietf-interfaces | [RFC7223] | 140 | ip | ietf-ip | [RFC7277] | 141 +--------+-----------------+-----------+ 143 Table 1: Prefixes and Corresponding YANG Modules 145 2. Design of the Data Model 147 2.1. Scope of the Model 149 The model covers VRRP version 2 [RFC3768] and VRRP version 3 150 [RFC5798] protocols. The model is designed to be implemented on a 151 device where VRRP version 2 or version 3 is implemented. With the 152 help of a proper management protocol, the defined model can be used 153 to: 155 o Configure the VRRP version 2 or version 3 protocol. 157 o Manage the protocol operational behavior. 159 o Retrieve the protocol operational status. 161 o Receive the protocol notifications. 163 2.2. Relations with Interface Model and IP Model 165 This model augments the interface data model "ietf-interfaces" 166 [RFC7223] and the IP management model "ietf-ip" [RFC7277]. The 167 augmentation relations are shown as follows: 169 module: ietf-interfaces 170 +--rw interfaces 171 | +--rw interface* [name] 172 ... 173 | +--rw ip:ipv4! 174 | | +--rw ip:address* [ip] 175 ... 176 | | +--rw vrrp:vrrp 177 | | +--rw vrrp:vrrp-instance* [vrid] 178 | | +--rw vrrp:vrid uint8 179 | | +--rw vrrp:virtual-ipv4-addresses 180 ... 181 | +--rw ip:ipv6! 182 | +--rw ip:address* [ip] 183 ... 184 | +--rw vrrp:vrrp 185 | +--rw vrrp:vrrp-instance* [vrid] 186 | +--rw vrrp:vrid uint8 187 | +--rw vrrp:virtual-ipv6-addresses 188 ... 189 +--ro interfaces-state 190 +--ro interface* [name] 191 ... 192 | +--ro ip:ipv4! 193 | | +--ro ip:address* [ip] 194 ... 195 | | +--ro vrrp:vrrp 196 | | +--ro vrrp:vrrp-instance* [vrid] 197 | | +--ro vrrp:vrid uint8 198 | | +--ro vrrp:virtual-ipv4-addresses 199 ... 200 | +--ro ip:ipv6! 201 | +--ro ip:address* [ip] 202 ... 203 | +--ro vrrp:vrrp 204 | +--ro vrrp:vrrp-instance* [vrid] 205 | +--ro vrrp:vrid uint8 206 | +--ro vrrp:virtual-ipv6-addresses 207 ... 208 +--ro vrrp:vrrp-global 209 ... 211 In the above figure, a tree node without a prefix is from the model 212 "ietf-interfaces". A tree node with prefix "ip:" is from the model 213 "ietf-ip". A tree node with prefix "vrrp:" is from the VRRP model 214 specified in this document. 216 The "vrrp" container contains a list of vrrp-instance nodes, which 217 are instantiated under an interface for a specified address family 218 (IPv4 or IPv6). 220 Each vrrp-instance node represents a VRRP router state machine 221 described in Section 6.4 of [RFC5798], providing the configuration 222 and state information for the election process of a virtual router. 223 The IP addresses on the augmented interface are the real addresses 224 through which the VRRP router operates. The IPv4 or IPv6 address(es) 225 associated with a virtual router (described in Section 1 of 226 [RFC5798]) are modeled as a list of IPv4 or IPv6 addresses under the 227 vrrp-instance. 229 2.3. Protocol Configuration 231 The model structure for the protocol configuration is as shown below: 233 augment /if:interfaces/if:interface/ip:ipv4: 234 +--rw vrrp 235 +--rw vrrp-instance* [vrid] 236 +--rw vrid uint8 237 | ... 238 +--rw track 239 | +--rw interfaces 240 | | +--rw interface* [interface] 241 | | +--rw interface if:interface-ref 242 | | ... 243 | +--rw networks 244 | +--rw network* [prefix] 245 | +--rw prefix inet:ipv4-prefix 246 | ... 247 +--rw virtual-ipv4-addresses 248 +--rw virtual-ipv4-address* [ipv4-address] 249 +--rw ipv4-address inet:ipv4-address 251 augment /if:interfaces/if:interface/ip:ipv6: 252 +--rw vrrp 253 +--rw vrrp-instance* [vrid] 254 +--rw vrid uint8 255 | ... 256 +--rw track 257 | +--rw interfaces 258 | | +--rw interface* [interface] 259 | | +--rw interface if:interface-ref 260 | | ... 261 | +--rw networks 262 | +--rw network* [prefix] 263 | +--rw prefix inet:ipv6-prefix 264 | ... 265 +--rw virtual-ipv6-addresses 266 +--rw virtual-ipv6-address* [ipv6-address] 267 +--rw ipv6-address inet:ipv6-address 269 The model allows to configure the following protocol entities: 271 o VRRP instance (version 2 or version 3), representing a VRRP 272 router. 274 o Virtual IPv4 or IPv6 address associated with a virtual router. 276 o Tracking interface, to detect interface connectivity failures. 278 o Tracking network, to detect interface connectivity failures. 280 2.4. Protocol States 282 The model structure for the protocol states is as shown below: 284 augment /if:interfaces-state/if:interface/ip:ipv4: 285 +--ro vrrp 286 +--ro vrrp-instance* [vrid] 287 +--ro vrid uint8 288 | ... 289 +--ro track 290 | +--ro interfaces 291 | | +--ro interface* [interface] 292 | | +--ro interface if:interface-ref 293 | | ... 294 | +--ro networks 295 | +--ro network* [prefix] 296 | +--ro prefix inet:ipv4-prefix 297 | ... 298 +--ro virtual-ipv4-addresses 299 | +--ro virtual-ipv4-address* [ipv4-address] 300 | +--ro ipv4-address inet:ipv4-address 301 | 302 +--ro 303 +--ro statistics 304 +--ro 306 augment /if:interfaces-state/if:interface/ip:ipv6: 307 +--ro vrrp 308 +--ro vrrp-instance* [vrid] 309 +--ro vrid uint8 310 + ... 311 +--ro track 312 | +--ro interfaces 313 | | +--ro interface* [interface] 314 | | +--ro interface if:interface-ref 315 | | ... 316 | +--ro networks 317 | +--ro network* [prefix] 318 | +--ro prefix inet:ipv6-prefix 319 | ... 320 +--ro virtual-ipv6-addresses 321 | +--ro virtual-ipv6-address* [ipv6-address] 322 | +--ro ipv6-address inet:ipv6-address 323 | 324 +--ro 325 +--ro statistics 326 +--ro 328 augment /if:interfaces-state: 329 +--ro vrrp-global 330 +--ro 331 +--ro statistics 332 +--ro 334 The model allows to retrieve protocol states at the following levels: 336 o VRRP instance (version 2 or version 3), representing a VRRP 337 router. 339 o Virtual IPv4 or IPv6 address associated with a virtual router. 341 o Tracking interface, to detect interface connectivity failures. 343 o Tracking network, to detect interface connectivity failures. 345 o Global states and statistics summarizing all instances. 347 2.5. Notifications 349 This model defines the following VRRP specific notifications: 351 notifications: 352 +---n vrrp-new-master-event 353 | +--ro master-ip-address inet:ip-address 354 | +--ro new-master-reason new-master-reason-type 355 +---n vrrp-protocol-error-event 356 | +--ro protocol-error-reason identityref 357 +---n vrrp-virtual-router-error-event 358 +--ro interface if:interface-ref 359 +--ro (ip-version) 360 | +--:(ipv4) 361 | | +--ro ipv4 362 | | +--ro vrid leafref 363 | +--:(ipv6) 364 | +--ro ipv6 365 | +--ro vrid leafref 366 +--ro virtual-router-error-reason identityref 368 Each notification type is used to indicate a type of VRRP state 369 changes or error occurances: 371 vrrp-new-master-event 372 VRRP new master event, indicating that a new master has been 373 elected. 375 vrrp-protocol-error-event 376 VRRP protocol error event for a message that fails to reach a VRRP 377 instance to be processed. 379 vrrp-virtual-router-error-event 380 VRRP virtual router error event for a message processed on a VRRP 381 instance. 383 In addition to the notifications specified above, the mechanism 384 defined in [I-D.ietf-netconf-yang-push] and 385 [I-D.ietf-netconf-rfc5277bis] can be used for other general 386 notifications. This mechanism currently allows the user to: 388 o Subscribe notifications on a per client basis. 390 o Specify subtree filters or xpath filters so that only interested 391 contents will be sent. 393 o Specify either periodic or on-demand notifications. 395 3. YANG Module 397 file "ietf-vrrp@2017-04-27.yang" 398 module ietf-vrrp { 399 yang-version 1.1; 400 namespace "urn:ietf:params:xml:ns:yang:ietf-vrrp"; 401 prefix "vrrp"; 403 import ietf-inet-types { 404 prefix "inet"; 405 } 407 import ietf-yang-types { 408 prefix "yang"; 409 } 411 import ietf-interfaces { 412 prefix "if"; 413 } 415 import ietf-ip { 416 prefix "ip"; 417 } 418 organization 419 "IETF Routing Area Working Group (RTGWG)"; 420 contact 421 "WG Web: 422 WG List: 424 WG Chair: Jeff Tantsura 425 427 WG Chair: Chris Bowers 428 430 Editor: Xufeng Liu 431 433 Editor: Athanasios Kyparlis 434 436 Editor: Ravi Parikh 437 439 Editor: Acee Lindem 440 442 Editor: Mingui Zhang 443 "; 445 description 446 "This YANG module defines a model for managing Virtual Router 447 Redundancy Protocol (VRRP) version 2 and version 3."; 449 revision 2017-04-27 { 450 description "Initial revision"; 451 reference 452 "RFC XXXX: A YANG Data Model for Virtual Router Redundancy 453 Protocol (VRRP). 454 RFC 2787: Definitions of Managed Objects for the Virtual 455 Router Redundancy Protocol. 456 RFC 3768: Virtual Router Redundancy Protocol (VRRP). 457 RFC 5798: Virtual Router Redundancy Protocol (VRRP) Version 3. 458 RFC 6527: Definitions of Managed Objects for the Virtual 459 Router Redundancy Protocol Version 3 (VRRPv3)."; 460 } 462 /* 463 * Features 464 */ 466 feature validate-interval-errors { 467 description 468 "This feature indicates that the system validates that 469 the advertisement interval from advertisement packets 470 received is the same as the one configured for the local 471 VRRP router."; 472 } 474 feature validate-address-list-errors { 475 description 476 "This feature indicates that the system validates that 477 the address list from received packets matches the 478 locally configured list for the VRRP router."; 479 } 481 /* 482 * Typedefs 483 */ 485 typedef new-master-reason-type { 486 type enumeration { 487 enum not-master { 488 description 489 "The virtual router has never transitioned to master 490 state,"; 491 } 492 enum priority { 493 description "Priority was higher."; 494 } 495 enum preempted { 496 description "The master was preempted."; 497 } 498 enum no-response { 499 description "Previous master did not respond."; 500 } 501 } 502 description 503 "The reason for the virtual router to transition to master 504 state."; 505 } // new-master-reason-type 507 /* 508 * Identities 509 */ 511 /* vrrp-event-type identity and its derivatives. */ 512 identity vrrp-event-type { 513 description 514 "The type to indicate the type of a VRRP protocol event."; 515 } 516 identity vrrp-event-none { 517 base vrrp-event-type; 518 description 519 "Indicates a non-meaningful event."; 520 } 521 identity vrrp-event-startup { 522 base vrrp-event-type; 523 description 524 "Indicates that a VRRP router has initiated the protocol."; 525 } 526 identity vrrp-event-shutdown { 527 base vrrp-event-type; 528 description 529 "Indicates that a VRRP router has closed down the protocol."; 530 } 531 identity vrrp-event-higher-priority-backup { 532 base vrrp-event-type; 533 description 534 "Indicates that a backup router has a higher priority than 535 the current master."; 536 } 537 identity vrrp-event-master-timeout { 538 base vrrp-event-type; 539 description 540 "Indicates that the current master has not sent an 541 advertisement within the limit of master-down-interval."; 542 } 543 identity vrrp-event-interface-up { 544 base vrrp-event-type; 545 description 546 "Indicates that the VRRP enabled interface has become 547 operational up."; 548 } 549 identity vrrp-event-interface-down { 550 base vrrp-event-type; 551 description 552 "Indicates that the VRRP enabled interface has become 553 operational down."; 554 } 555 identity vrrp-event-no-primary-ip-address { 556 base vrrp-event-type; 557 description 558 "Indicates that the primary IP address on the VRRP enabled 559 interface has become unavailable."; 560 } 561 identity vrrp-event-primary-ip-address { 562 base vrrp-event-type; 563 description 564 "Indicates that the primary IP address on the VRRP enabled 565 interface has become available."; 566 } 567 identity vrrp-event-no-virtual-ip-addresses { 568 base vrrp-event-type; 569 description 570 "Indicates that there are no virtual IP addresses on the 571 virtual router."; 572 } 573 identity vrrp-event-virtual-ip-addresses { 574 base vrrp-event-type; 575 description 576 "Indicates that there are virtual IP addresses on the 577 virtual router."; 578 } 579 identity vrrp-event-preempt-hold-timeout { 580 base vrrp-event-type; 581 description 582 "Indicates that the configured preemption hold time has 583 passed."; 584 } 585 identity vrrp-event-lower-priority-master { 586 base vrrp-event-type; 587 description 588 "Indicates that there is a lower priority VRRP master."; 589 } 590 identity vrrp-event-owner-preempt { 591 base vrrp-event-type; 592 description 593 "Indicates that the owner has preempted another router to 594 become the master."; 595 } 597 /* vrrp-error-global identity and its derivatives. */ 598 identity vrrp-error-global { 599 description 600 "The type to indicate the type of a VRRP error that occurs 601 for a packet before it reaches a VRRP router."; 602 } 603 identity checksum-error { 604 base vrrp-error-global; 605 description 606 "A packet has been received with an invalid VRRP checksum 607 value."; 608 } 609 identity ip-ttl-error { 610 base vrrp-error-global; 611 description 612 "A packet has been received with IP TTL (Time-To-Live) 613 not equal to 255."; 614 } 615 identity version-error { 616 base vrrp-error-global; 617 description 618 "A packet has been received with an unknown or unsupported 619 version number."; 620 } 621 identity vrid-error { 622 base vrrp-error-global; 623 description 624 "A packet has been received with a VRID that is not valid 625 for any virtual router on this router."; 626 } 628 /* vrrp-error-virtual-router identity and its derivatives. */ 629 identity vrrp-error-virtual-router { 630 description 631 "The type to indicate the type of a VRRP error that occurs 632 after a packet reaches a VRRP router."; 633 } 634 identity address-list-error { 635 base vrrp-error-virtual-router; 636 description 637 "A packet has been received with an address list that 638 does not match the locally configured address list for 639 the virtual router."; 640 } 641 identity interval-error { 642 base vrrp-error-virtual-router; 643 description 644 "A packet has been received with an advertisement 645 interval different than the one configured for the local 646 virtual router"; 647 } 648 identity packet-length-error { 649 base vrrp-error-virtual-router; 650 description 651 "A packet has been received with a packet length less 652 than the length of the VRRP header."; 653 } 655 /* vrrp-state-type identity and its derivatives. */ 656 identity vrrp-state-type { 657 description 658 "The type to indicate the state of a virtual router."; 659 } 660 identity initialize { 661 base vrrp-state-type; 662 description 663 "Indicates that the virtual router is waiting 664 for a startup event."; 665 } 666 identity backup { 667 base vrrp-state-type; 668 description 669 "Indicates that the virtual router is monitoring the 670 availability of the master router."; 671 } 672 identity master { 673 base vrrp-state-type; 674 description 675 "Indicates that the virtual router is forwarding 676 packets for IP addresses that are associated with 677 this virtual router."; 678 } 680 /* vrrp-version identity and its derivatives. */ 681 identity vrrp-version { 682 description 683 "The version of the VRRP protocol."; 684 } 685 identity vrrp-v2 { 686 base vrrp-version; 687 description 688 "Indicates version 2 of the VRRP protocol."; 689 } 690 identity vrrp-v3 { 691 base vrrp-version; 692 description 693 "Indicates version 3 of the VRRP protocol."; 694 } 696 /* 697 * Groupings 698 */ 700 grouping vrrp-common-attributes { 701 description 702 "Group of VRRP attributes common to version 2 and version 3"; 704 leaf vrid { 705 type uint8 { 706 range 1..255; 707 } 708 description "Virtual router ID."; 709 } 711 leaf version { 712 type identityref { 713 base vrrp:vrrp-version; 714 } 715 mandatory "true"; 716 description "Version 2 or version 3 of VRRP."; 717 } 719 leaf log-state-change { 720 type boolean; 721 default "false"; 722 description 723 "Generates VRRP state change messages each time the VRRP 724 instance changes state (from up to down or down to up)."; 725 } 727 container preempt { 728 description 729 "Enables a higher priority Virtual Router Redundancy 730 Protocol (VRRP) backup router to preempt a lower priority 731 VRRP master."; 732 leaf enabled { 733 type boolean; 734 default "true"; 735 description 736 "'true' if preemption is enabled."; 737 } 738 leaf hold-time { 739 type uint16; 740 units seconds; 741 default 0; 742 description 743 "Hold time, in seconds, for which a higher priority VRRP 744 backup router must wait before preempting a lower priority 745 VRRP master."; 746 } 747 } 749 leaf priority { 750 type uint8 { 751 range 1..254; 752 } 753 default 100; 754 description 755 "Configures the Virtual Router Redundancy Protocol (VRRP) 756 election priority for the backup virtual router."; 757 } 759 leaf accept-mode { 760 when "derived-from-or-self(current()/../version, 'vrrp-v3')" { 761 description "Applicable only to version 3."; 762 } 763 type boolean; 764 default false; 765 description 766 "Controls whether a virtual router in Master state will 767 accept packets addressed to the address owner's IPvX address 768 as its own if it is not the IPvX address owner. The default 769 is false. Deployments that rely on, for example, pinging the 770 address owner's IPvX address may wish to configure 771 accept-mode to true. 773 Note: IPv6 Neighbor Solicitations and Neighbor 774 Advertisements MUST NOT be dropped when accept-mode is 775 false."; 776 } 777 } // vrrp-common-attributes 779 grouping vrrp-ipv4-attributes { 780 description 781 "Group of VRRP attributes for IPv4."; 783 uses vrrp-common-attributes; 785 choice advertise-interval-choice { 786 description 787 "The options for the advertisement interval at which VRRPv2 788 or VRRPv3 advertisements are sent from the specified 789 interface."; 791 case v2 { 792 when "derived-from-or-self(version, 'vrrp-v2')" { 793 description "Applicable only to version 2."; 794 } 795 leaf advertise-interval-sec { 796 type uint8 { 797 range 1..254; 798 } 799 units seconds; 800 default 1; 801 description 802 "Configures the interval that Virtual Router 803 Redundancy Protocol Version 2 (VRRPv2) advertisements 804 are sent from the specified interface."; 805 } 806 } 808 case v3 { 809 when "derived-from-or-self(version, 'vrrp-v3')" { 810 description "Applicable only to version 3."; 811 } 812 leaf advertise-interval-centi-sec { 813 type uint16 { 814 range 1..4095; 815 } 816 units centiseconds; 817 default 100; 818 description 819 "Configures the interval that Virtual Router 820 Redundancy Protocol version 3 (VRRPv3) advertisements 821 are sent from the specified interface."; 822 } 823 } 824 } // advertise-interval-choice 826 container track { 827 description 828 "Enables the specified VRRP instance to track interfaces 829 or networks."; 830 container interfaces { 831 description 832 "Enables the specified Virtual Router Redundancy Protocol 833 version 2 (VRRP) or version 3 (VRRPv3) instance to track 834 an interface."; 836 list interface { 837 key "interface"; 838 description 839 "Interface to track."; 841 leaf interface { 842 type if:interface-ref; 843 must "/if:interfaces/if:interface[if:name=current()]/" 844 + "ip:ipv4" { 845 description "Interface is IPv4."; 846 } 847 description 848 "Interface to track."; 849 } 850 leaf priority-decrement { 851 type uint8 { 852 range 1..254; 853 } 854 default 10; 855 description 856 "Specifies how much to decrement the priority of the 857 VRRP instance if the interface goes down."; 858 } 859 } // interface 860 } // interfaces 862 container networks { 863 description 864 "Enables the backup Virtual Router Redundancy Protocol 865 version 2 (VRRP) or version 3 (VRRPv3) router to track a 866 specified network through the IP network prefix of that 867 network."; 868 list network { 869 key "prefix"; 870 description 871 "Enables the specified Virtual Router Redundancy 872 Protocol version 2 (VRRP) or version 3 (VRRPv3) 873 instance to track an IP network, by specifying the 874 prefix of the IP network."; 876 leaf prefix { 877 type inet:ipv4-prefix; 878 description 879 "The prefix of the network to track."; 880 } 882 leaf priority-decrement { 883 type uint8 { 884 range 1..254; 885 } 886 default 10; 887 description 888 "Specifies how much to decrement the priority of the 889 backup VRRP router if there is a failure in the IP 890 network."; 891 } 892 } // track-network 893 } // track-networks 894 } // track 896 container virtual-ipv4-addresses { 897 description 898 "Configures the virtual IP address for the Virtual Router 899 Redundancy Protocol (VRRP) interface."; 901 list virtual-ipv4-address { 902 key "ipv4-address"; 903 max-elements 16; 904 description 905 "Virtual IP addresses for a single VRRP instance. For a 906 VRRP owner router, the virtual address must match one 907 of the IP addresses configured on the interface 908 corresponding to the virtual router."; 910 leaf ipv4-address { 911 type inet:ipv4-address; 912 description 913 "An IPv4 address associated with a virtual router."; 914 reference 915 "RFC 5798: Virtual Router Redundancy Protocol (VRRP) 916 Version 3. Section 1.2."; 917 } 918 } // virtual-ipv4-address 919 } // virtual-ipv4-addresses 920 } // grouping vrrp-ipv4-attributes 922 grouping vrrp-ipv6-attributes { 923 description 924 "Group of VRRP attributes for IPv6."; 926 uses vrrp-common-attributes; 928 leaf advertise-interval-centi-sec { 929 type uint16 { 930 range 1..4095; 931 } 932 units centiseconds; 933 default 100; 934 description 935 "Configures the interval that Virtual Router 936 Redundancy Protocol version 3 (VRRPv3) advertisements 937 are sent from the specified interface."; 938 } 940 container track { 941 description 942 "Enables the specified VRRP instance to track interfaces 943 or networks."; 944 container interfaces { 945 description 946 "Enables the specified Virtual Router Redundancy Protocol 947 version 2 (VRRP) or version 3 (VRRPv3) instance to track 948 an interface."; 949 list interface { 950 key "interface"; 951 description 952 "Interface to track."; 954 leaf interface { 955 type if:interface-ref; 956 must "/if:interfaces/if:interface[if:name=current()]/" 957 + "ip:ipv6" { 958 description "Interface is IPv6."; 959 } 960 description 961 "Interface to track."; 962 } 964 leaf priority-decrement { 965 type uint8 { 966 range 1..254; 967 } 968 default 10; 969 description 970 "Specifies how much to decrement the priority of the 971 VRRP instance if the interface goes down."; 972 } 973 } // interface 974 } // interfaces 976 container networks { 977 description 978 "Enables the backup Virtual Router Redundancy Protocol 979 version 2 (VRRP) or version 3 (VRRPv3) router to track a 980 specified network through the IP network prefix of that 981 network."; 982 list network { 983 key "prefix"; 984 description 985 "Enables the specified Virtual Router Redundancy 986 Protocol version 2 (VRRP) or version 3 (VRRPv3) 987 instance to track an IP network, by specifying the 988 prefix of the IP network."; 990 leaf prefix { 991 type inet:ipv6-prefix; 992 description 993 "The prefix of the network to track."; 995 } 997 leaf priority-decrement { 998 type uint8 { 999 range 1..254; 1000 } 1001 default 10; 1002 description 1003 "Specifies how much to decrement the priority of the 1004 backup VRRP router if there is a failure in the IP 1005 network."; 1006 } 1007 } // track-network 1008 } // track-networks 1009 } // track 1011 container virtual-ipv6-addresses { 1012 description 1013 "Configures the virtual IP address for the Virtual Router 1014 Redundancy Protocol (VRRP) interface."; 1015 list virtual-ipv6-address { 1016 key "ipv6-address"; 1017 max-elements 2; 1018 description 1019 "Two IPv6 addresses are allowed. The first one must be 1020 a link-local address and the second one can be a 1021 link-local or global address."; 1023 leaf ipv6-address { 1024 type inet:ipv6-address; 1025 description 1026 "An IPv6 address associated with a virtual router."; 1027 reference 1028 "RFC 5798: Virtual Router Redundancy Protocol (VRRP) 1029 Version 3. Section 1.3."; 1030 } 1031 } // virtual-ipv6-address 1032 } // virtual-ipv6-addresses 1033 } // grouping vrrp-ipv6-attributes 1035 grouping vrrp-state-attributes { 1036 description 1037 "Group of VRRP state attributes."; 1039 leaf state { 1040 type identityref { 1041 base vrrp:vrrp-state-type; 1042 } 1043 description 1044 "Operational state."; 1045 } 1047 leaf is-owner { 1048 type boolean; 1049 description 1050 "Set to true if this virtual router is owner."; 1051 } 1053 leaf last-adv-source { 1054 type inet:ip-address; 1055 description 1056 "Last advertised IPv4/IPv6 source address"; 1057 } 1059 leaf up-datetime { 1060 type yang:date-and-time; 1061 description 1062 "The date and time when this virtual router 1063 transitioned out of init state."; 1064 } 1066 leaf master-down-interval { 1067 type uint32; 1068 units centiseconds; 1069 description 1070 "Time interval for backup virtual router to declare 1071 Master down."; 1072 } 1074 leaf skew-time { 1075 type uint32; 1076 units microseconds; 1077 description 1078 "Calculated based on the priority and advertisement 1079 interval configuration command parameters. See RFC 3768."; 1080 } 1082 leaf last-event { 1083 type identityref { 1084 base vrrp:vrrp-event-type; 1085 } 1086 description 1087 "Last reported event."; 1088 } 1090 leaf new-master-reason { 1091 type new-master-reason-type; 1092 description 1093 "Indicates the reason for the virtual router to transition 1094 to master state."; 1095 } 1097 container statistics { 1098 description 1099 "VRRP statistics."; 1101 leaf discontinuity-datetime { 1102 type yang:date-and-time; 1103 description 1104 "The time on the most recent occasion at which any one or 1105 more of the VRRP statistic counters suffered a 1106 discontinuity. If no such discontinuities have occurred 1107 since the last re-initialization of the local management 1108 subsystem, then this node contains the time that the 1109 local management subsystem re-initialized itself."; 1110 } 1112 leaf master-transitions { 1113 type yang:counter32; 1114 description 1115 "The total number of times that this virtual router's 1116 state has transitioned to master"; 1117 } 1119 leaf advertisement-recv { 1120 type yang:counter64; 1121 description 1122 "The total number of VRRP advertisements received by 1123 this virtual router."; 1124 } 1126 leaf advertisement-sent { 1127 type yang:counter64; 1128 description 1129 "The total number of VRRP advertisements sent by 1130 this virtual router."; 1131 } 1133 leaf interval-errors { 1134 if-feature validate-interval-errors; 1135 type yang:counter64; 1136 description 1137 "The total number of VRRP advertisement packets 1138 received with an advertisement interval 1139 different than the one configured for the local 1140 virtual router"; 1141 } 1143 leaf priority-zero-pkts-rcvd { 1144 type yang:counter64; 1145 description 1146 "The total number of VRRP packets received by the 1147 virtual router with a priority of 0."; 1148 } 1150 leaf priority-zero-pkts-sent { 1151 type yang:counter64; 1152 description 1153 "The total number of VRRP packets sent by the 1154 virtual router with a priority of 0."; 1155 } 1157 leaf invalid-type-pkts-rcvd { 1158 type yang:counter64; 1159 description 1160 "The number of VRRP packets received by the virtual 1161 router with an invalid value in the 'type' field."; 1162 } 1164 leaf address-list-errors { 1165 if-feature validate-address-list-errors; 1166 type yang:counter64; 1167 description 1168 "The total number of packets received with an 1169 address list that does not match the locally 1170 configured address list for the virtual router."; 1171 } 1173 leaf packet-length-errors { 1174 type yang:counter64; 1175 description 1176 "The total number of packets received with a packet 1177 length less than the length of the VRRP header."; 1178 } 1179 } // container statistics 1180 } // grouping vrrp-state-attributes 1182 grouping vrrp-global-state-attributes { 1183 description 1184 "Group of VRRP global state attributes."; 1186 leaf virtual-routers { 1187 type uint32; 1188 description "Number of configured virtual routers."; 1189 } 1191 leaf interfaces { 1192 type uint32; 1193 description "Number of interface with VRRP configured."; 1194 } 1196 container statistics { 1197 description 1198 "VRRP global statistics."; 1200 leaf discontinuity-datetime { 1201 type yang:date-and-time; 1202 description 1203 "The time on the most recent occasion at which one of 1204 checksum-errors, version-errors, vrid-errors, and 1205 ip-ttl-errors suffered a discontinuity. 1207 If no such discontinuities have occurred since the last 1208 re-initialization of the local management subsystem, 1209 then this node contains the time that the local management 1210 subsystem re-initialized itself."; 1211 } 1213 leaf checksum-errors { 1214 type yang:counter64; 1215 description 1216 "The total number of VRRP packets received with an invalid 1217 VRRP checksum value."; 1218 reference "RFC 5798, Section 5.2.8"; 1219 } 1221 leaf version-errors { 1222 type yang:counter64; 1223 description 1224 "The total number of VRRP packets received with an unknown 1225 or unsupported version number."; 1226 reference "RFC 5798, Section 5.2.1"; 1227 } 1229 leaf vrid-errors { 1230 type yang:counter64; 1231 description 1232 "The total number of VRRP packets received with a VRID that 1233 is not valid for any virtual router on this router."; 1234 reference "RFC 5798, Section 5.2.3"; 1236 } 1238 leaf ip-ttl-errors { 1239 type yang:counter64; 1240 description 1241 "The total number of VRRP packets received by the 1242 virtual router with IP TTL (Time-To-Live) not equal 1243 to 255."; 1244 reference "RFC 5798, Sections 5.1.1.3 and 5.1.2.3."; 1245 } 1246 } // statistics 1247 } // vrrp-global-state-attributes 1249 /* 1250 * Configuration data nodes 1251 */ 1253 augment "/if:interfaces/if:interface/ip:ipv4" { 1254 description "Augment IPv4 interface."; 1256 container vrrp { 1257 description 1258 "Configures the Virtual Router Redundancy Protocol (VRRP) 1259 version 2 or version 3 for IPv4."; 1261 list vrrp-instance { 1262 key vrid; 1263 description 1264 "Defines a virtual router, identified by a virtual router 1265 identifier (VRID), within IPv4 address space."; 1267 uses vrrp-ipv4-attributes; 1268 } 1269 } 1270 } // augment ipv4 1272 augment "/if:interfaces/if:interface/ip:ipv6" { 1273 description "Augment IPv6 interface."; 1275 container vrrp { 1276 description 1277 "Configures the Virtual Router Redundancy Protocol (VRRP) 1278 version 3 for IPv6."; 1280 list vrrp-instance { 1281 must "derived-from-or-self(version, 'vrrp-v3')" { 1282 description 1283 "IPv6 is only supported by version 3."; 1285 } 1286 key vrid; 1287 description 1288 "Defines a virtual router, identified by a virtual router 1289 identifier (VRID), within IPv6 address space."; 1291 uses vrrp-ipv6-attributes; 1292 } // list vrrp-instance 1293 } // container vrrp 1294 } // augment ipv6 1296 /* 1297 * Operational state data nodes 1298 */ 1300 augment "/if:interfaces-state/if:interface/ip:ipv4" { 1301 description "Augment IPv4 interface state."; 1303 container vrrp { 1304 description 1305 "State information for Virtual Router Redundancy Protocol 1306 (VRRP) version 2 for IPv4."; 1308 list vrrp-instance { 1309 key vrid; 1310 description 1311 "States of a virtual router, identified by a virtual router 1312 identifier (VRID), within IPv4 address space."; 1314 uses vrrp-ipv4-attributes; 1315 uses vrrp-state-attributes; 1316 } // list vrrp-instance 1317 } 1318 } 1320 augment "/if:interfaces-state/if:interface/ip:ipv6" { 1321 description "Augment IPv6 interface state."; 1323 container vrrp { 1324 description 1325 "State information of the Virtual Router Redundancy Protocol 1326 (VRRP) version 2 or version 3 for IPv6."; 1328 list vrrp-instance { 1329 key vrid; 1330 description 1331 "States of a virtual router, identified by a virtual router 1332 identifier (VRID), within IPv6 address space."; 1334 uses vrrp-ipv6-attributes; 1335 uses vrrp-state-attributes; 1336 } // list vrrp-instance 1337 } 1338 } 1340 augment "/if:interfaces-state" { 1341 description "Specify VRRP state data at the global level."; 1343 container vrrp-global { 1344 description 1345 "State information of the Virtual Router Redundancy Protocol 1346 (VRRP) at the global level"; 1348 uses vrrp-global-state-attributes; 1349 } 1350 } 1352 /* 1353 * Notifications 1354 */ 1356 notification vrrp-new-master-event { 1357 description 1358 "Notification event for a change of VRRP new master."; 1359 leaf master-ip-address { 1360 type inet:ip-address; 1361 mandatory "true"; 1362 description 1363 "IPv4 or IPv6 address of the new master."; 1364 } 1365 leaf new-master-reason { 1366 type new-master-reason-type; 1367 mandatory "true"; 1368 description 1369 "Indicates the reason for the virtual router to transition 1370 to master state."; 1371 } 1372 } 1374 notification vrrp-protocol-error-event { 1375 description 1376 "Notification event for a VRRP protocol error."; 1377 leaf protocol-error-reason { 1378 type identityref { 1379 base vrrp:vrrp-error-global; 1380 } 1381 mandatory "true"; 1382 description 1383 "Indicates the reason for the protocol error."; 1384 } 1385 } 1387 notification vrrp-virtual-router-error-event { 1388 description 1389 "Notification event for an error happened on a virtual 1390 router."; 1391 leaf interface { 1392 type if:interface-ref; 1393 mandatory "true"; 1394 description 1395 "Indicates the interface for which statistics area 1396 to be cleared."; 1397 } 1399 choice ip-version { 1400 mandatory "true"; 1401 description 1402 "The error may have happened on either an IPv4 virtual 1403 router or an IPv6 virtual router. The information 1404 related to a specific IP version is provided by one of 1405 the following cases."; 1406 case ipv4 { 1407 description "IPv4"; 1408 container ipv4 { 1409 description 1410 "Error information for IPv4."; 1411 leaf vrid { 1412 type leafref { 1413 path "/if:interfaces/if:interface" 1414 + "[if:name = current()/../../vrrp:interface]/" 1415 + "ip:ipv4/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid"; 1416 } 1417 mandatory "true"; 1418 description 1419 "Indicates the virtual router on which the event has 1420 occurred."; 1421 } 1422 } 1423 } 1424 case ipv6 { 1425 description "IPv6"; 1426 container ipv6 { 1427 description 1428 "Error information for IPv6."; 1429 leaf vrid { 1430 type leafref { 1431 path "/if:interfaces/if:interface" 1432 + "[if:name = current()/../../vrrp:interface]/" 1433 + "ip:ipv6/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid"; 1434 } 1435 mandatory "true"; 1436 description 1437 "Indicates the virtual router on which the event has 1438 occurred."; 1439 } 1440 } 1441 } 1442 } 1444 leaf virtual-router-error-reason { 1445 type identityref { 1446 base vrrp:vrrp-error-virtual-router; 1447 } 1448 mandatory "true"; 1449 description 1450 "Indicates the reason for the virtual router error."; 1451 } 1452 } 1453 } 1454 1456 4. IANA Considerations 1458 RFC Ed.: In this section, replace all occurrences of 'XXXX' with the 1459 actual RFC number (and remove this note). 1461 This document registers the following namespace URIs in the IETF XML 1462 registry [RFC3688]: 1464 -------------------------------------------------------------------- 1465 URI: urn:ietf:params:xml:ns:yang:ietf-vrrp 1466 Registrant Contact: The IESG. 1467 XML: N/A, the requested URI is an XML namespace. 1468 -------------------------------------------------------------------- 1470 This document registers the following YANG modules in the YANG Module 1471 Names registry [RFC7950]: 1473 -------------------------------------------------------------------- 1474 name: ietf-vrrp 1475 namespace: urn:ietf:params:xml:ns:yang:ietf-vrrp 1476 prefix: vrrp 1477 reference: RFC XXXX 1478 -------------------------------------------------------------------- 1480 5. Security Considerations 1482 The configuration, state, and action data defined in this document 1483 are designed to be accessed via a management protocol with a secure 1484 transport layer, such as NETCONF [RFC6241]. The NETCONF access 1485 control model [RFC6536] provides the means to restrict access for 1486 particular NETCONF users to a preconfigured subset of all available 1487 NETCONF protocol operations and content. 1489 A number of configuration data nodes defined in this document are 1490 writable/creatable/deletable (i.e., "config true" in YANG terms, 1491 which is the default). These data nodes may be considered sensitive 1492 or vulnerable in some network environments. Write operations to 1493 these data nodes, such as "edit-config" in NETCONF, can have negative 1494 effects on the network if the protocol operations are not properly 1495 protected. The vulnerable "config true" parameters and subtrees are 1496 the following: 1498 /if:interfaces/if:interface/ip:ipv4/vrrp:vrrp/vrrp:vrrp-instance 1500 /if:interfaces/if:interface/ip:ipv6/vrrp:vrrp/vrrp:vrrp-instance 1502 Unauthorized access to any node of these can adversely affect the 1503 routing subsystem of both the local device and the network. This may 1504 lead to network malfunctions, delivery of packets to inappropriate 1505 destinations, and other problems. 1507 6. References 1509 6.1. Normative References 1511 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1512 Requirement Levels", BCP 14, RFC 2119, 1513 DOI 10.17487/RFC2119, March 1997, 1514 . 1516 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1517 DOI 10.17487/RFC3688, January 2004, 1518 . 1520 [RFC3768] Hinden, R., Ed., "Virtual Router Redundancy Protocol 1521 (VRRP)", RFC 3768, DOI 10.17487/RFC3768, April 2004, 1522 . 1524 [RFC5798] Nadas, S., Ed., "Virtual Router Redundancy Protocol (VRRP) 1525 Version 3 for IPv4 and IPv6", RFC 5798, 1526 DOI 10.17487/RFC5798, March 2010, 1527 . 1529 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 1530 the Network Configuration Protocol (NETCONF)", RFC 6020, 1531 DOI 10.17487/RFC6020, October 2010, 1532 . 1534 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 1535 and A. Bierman, Ed., "Network Configuration Protocol 1536 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 1537 . 1539 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 1540 RFC 6991, DOI 10.17487/RFC6991, July 2013, 1541 . 1543 [RFC7223] Bjorklund, M., "A YANG Data Model for Interface 1544 Management", RFC 7223, DOI 10.17487/RFC7223, May 2014, 1545 . 1547 [RFC7277] Bjorklund, M., "A YANG Data Model for IP Management", 1548 RFC 7277, DOI 10.17487/RFC7277, June 2014, 1549 . 1551 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 1552 RFC 7950, DOI 10.17487/RFC7950, August 2016, 1553 . 1555 [I-D.ietf-netconf-rfc5277bis] 1556 Clemm, A., Prieto, A., Voit, E., Nilsen-Nygaard, E., 1557 Tripathy, A., Chisholm, S., and H. Trevino, "Subscribing 1558 to Event Notifications", draft-ietf-netconf-rfc5277bis-01 1559 (work in progress), October 2016. 1561 [I-D.ietf-netconf-yang-push] 1562 Clemm, A., Voit, E., Prieto, A., Tripathy, A., Nilsen- 1563 Nygaard, E., Bierman, A., and B. Lengyel, "Subscribing to 1564 YANG datastore push updates", draft-ietf-netconf-yang- 1565 push-06 (work in progress), April 2017. 1567 6.2. Informative References 1569 [RFC6087] Bierman, A., "Guidelines for Authors and Reviewers of YANG 1570 Data Model Documents", RFC 6087, DOI 10.17487/RFC6087, 1571 January 2011, . 1573 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration 1574 Protocol (NETCONF) Access Control Model", RFC 6536, 1575 DOI 10.17487/RFC6536, March 2012, 1576 . 1578 [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG", 1579 RFC 7951, DOI 10.17487/RFC7951, August 2016, 1580 . 1582 Appendix A. Complete Model Tree Structure 1584 The VRRP YANG data model defined in this document has the following 1585 tree structure: 1587 module: ietf-vrrp 1588 augment /if:interfaces/if:interface/ip:ipv4: 1589 +--rw vrrp 1590 +--rw vrrp-instance* [vrid] 1591 +--rw vrid uint8 1592 +--rw version identityref 1593 +--rw log-state-change? boolean 1594 +--rw preempt 1595 | +--rw enabled? boolean 1596 | +--rw hold-time? uint16 1597 +--rw priority? uint8 1598 +--rw accept-mode? boolean 1599 +--rw (advertise-interval-choice)? 1600 | +--:(v2) 1601 | | +--rw advertise-interval-sec? uint8 1602 | +--:(v3) 1603 | +--rw advertise-interval-centi-sec? uint16 1604 +--rw track 1605 | +--rw interfaces 1606 | | +--rw interface* [interface] 1607 | | +--rw interface if:interface-ref 1608 | | +--rw priority-decrement? uint8 1609 | +--rw networks 1610 | +--rw network* [prefix] 1611 | +--rw prefix inet:ipv4-prefix 1612 | +--rw priority-decrement? uint8 1613 +--rw virtual-ipv4-addresses 1614 +--rw virtual-ipv4-address* [ipv4-address] 1615 +--rw ipv4-address inet:ipv4-address 1616 augment /if:interfaces/if:interface/ip:ipv6: 1617 +--rw vrrp 1618 +--rw vrrp-instance* [vrid] 1619 +--rw vrid uint8 1620 +--rw version identityref 1621 +--rw log-state-change? boolean 1622 +--rw preempt 1623 | +--rw enabled? boolean 1624 | +--rw hold-time? uint16 1625 +--rw priority? uint8 1626 +--rw accept-mode? boolean 1627 +--rw advertise-interval-centi-sec? uint16 1628 +--rw track 1629 | +--rw interfaces 1630 | | +--rw interface* [interface] 1631 | | +--rw interface if:interface-ref 1632 | | +--rw priority-decrement? uint8 1633 | +--rw networks 1634 | +--rw network* [prefix] 1635 | +--rw prefix inet:ipv6-prefix 1636 | +--rw priority-decrement? uint8 1637 +--rw virtual-ipv6-addresses 1638 +--rw virtual-ipv6-address* [ipv6-address] 1639 +--rw ipv6-address inet:ipv6-address 1640 augment /if:interfaces-state/if:interface/ip:ipv4: 1641 +--ro vrrp 1642 +--ro vrrp-instance* [vrid] 1643 +--ro vrid uint8 1644 +--ro version identityref 1645 +--ro log-state-change? boolean 1646 +--ro preempt 1647 | +--ro enabled? boolean 1648 | +--ro hold-time? uint16 1649 +--ro priority? uint8 1650 +--ro accept-mode? boolean 1651 +--ro (advertise-interval-choice)? 1652 | +--:(v2) 1653 | | +--ro advertise-interval-sec? uint8 1654 | +--:(v3) 1655 | +--ro advertise-interval-centi-sec? uint16 1656 +--ro track 1657 | +--ro interfaces 1658 | | +--ro interface* [interface] 1659 | | +--ro interface if:interface-ref 1660 | | +--ro priority-decrement? uint8 1661 | +--ro networks 1662 | +--ro network* [prefix] 1663 | +--ro prefix inet:ipv4-prefix 1664 | +--ro priority-decrement? uint8 1665 +--ro virtual-ipv4-addresses 1666 | +--ro virtual-ipv4-address* [ipv4-address] 1667 | +--ro ipv4-address inet:ipv4-address 1668 +--ro state? identityref 1669 +--ro is-owner? boolean 1670 +--ro last-adv-source? inet:ip-address 1671 +--ro up-datetime? yang:date-and-time 1672 +--ro master-down-interval? uint32 1673 +--ro skew-time? uint32 1674 +--ro last-event? identityref 1675 +--ro new-master-reason? new-master-reason-type 1676 +--ro statistics 1677 +--ro discontinuity-datetime? yang:date-and-time 1678 +--ro master-transitions? yang:counter32 1679 +--ro advertisement-recv? yang:counter64 1680 +--ro advertisement-sent? yang:counter64 1681 +--ro interval-errors? yang:counter64 1682 {validate-interval-errors}? 1683 +--ro priority-zero-pkts-rcvd? yang:counter64 1684 +--ro priority-zero-pkts-sent? yang:counter64 1685 +--ro invalid-type-pkts-rcvd? yang:counter64 1686 +--ro address-list-errors? yang:counter64 1687 {validate-address-list-errors}? 1688 +--ro packet-length-errors? yang:counter64 1689 augment /if:interfaces-state/if:interface/ip:ipv6: 1690 +--ro vrrp 1691 +--ro vrrp-instance* [vrid] 1692 +--ro vrid uint8 1693 +--ro version identityref 1694 +--ro log-state-change? boolean 1695 +--ro preempt 1696 | +--ro enabled? boolean 1697 | +--ro hold-time? uint16 1698 +--ro priority? uint8 1699 +--ro accept-mode? boolean 1700 +--ro advertise-interval-centi-sec? uint16 1701 +--ro track 1702 | +--ro interfaces 1703 | | +--ro interface* [interface] 1704 | | +--ro interface if:interface-ref 1705 | | +--ro priority-decrement? uint8 1706 | +--ro networks 1707 | +--ro network* [prefix] 1708 | +--ro prefix inet:ipv6-prefix 1709 | +--ro priority-decrement? uint8 1710 +--ro virtual-ipv6-addresses 1711 | +--ro virtual-ipv6-address* [ipv6-address] 1712 | +--ro ipv6-address inet:ipv6-address 1713 +--ro state? identityref 1714 +--ro is-owner? boolean 1715 +--ro last-adv-source? inet:ip-address 1716 +--ro up-datetime? yang:date-and-time 1717 +--ro master-down-interval? uint32 1718 +--ro skew-time? uint32 1719 +--ro last-event? identityref 1720 +--ro new-master-reason? new-master-reason-type 1721 +--ro statistics 1722 +--ro discontinuity-datetime? yang:date-and-time 1723 +--ro master-transitions? yang:counter32 1724 +--ro advertisement-recv? yang:counter64 1725 +--ro advertisement-sent? yang:counter64 1726 +--ro interval-errors? yang:counter64 1727 {validate-interval-errors}? 1728 +--ro priority-zero-pkts-rcvd? yang:counter64 1729 +--ro priority-zero-pkts-sent? yang:counter64 1730 +--ro invalid-type-pkts-rcvd? yang:counter64 1731 +--ro address-list-errors? yang:counter64 1732 {validate-address-list-errors}? 1733 +--ro packet-length-errors? yang:counter64 1734 augment /if:interfaces-state: 1735 +--ro vrrp-global 1736 +--ro virtual-routers? uint32 1737 +--ro interfaces? uint32 1738 +--ro statistics 1739 +--ro discontinuity-datetime? yang:date-and-time 1740 +--ro checksum-errors? yang:counter64 1741 +--ro version-errors? yang:counter64 1742 +--ro vrid-errors? yang:counter64 1743 +--ro ip-ttl-errors? yang:counter64 1744 notifications: 1745 +---n vrrp-new-master-event 1746 | +--ro master-ip-address inet:ip-address 1747 | +--ro new-master-reason new-master-reason-type 1748 +---n vrrp-protocol-error-event 1749 | +--ro protocol-error-reason identityref 1750 +---n vrrp-virtual-router-error-event 1751 +--ro interface if:interface-ref 1752 +--ro (ip-version) 1753 | +--:(ipv4) 1754 | | +--ro ipv4 1755 | | +--ro vrid leafref 1756 | +--:(ipv6) 1757 | +--ro ipv6 1758 | +--ro vrid leafref 1759 +--ro virtual-router-error-reason identityref 1761 Appendix B. Data Tree Example 1763 This section contains an example of an instance data tree in the JSON 1764 encoding [RFC7951], containing both configuration and state data. 1766 Virtual router IP address: 10.0.0.1 1767 +-----------------+ +-----------------+ 1768 | | | | 1769 | Router 1.1.1.1 | | Router 1.1.1.2 | 1770 | | | | 1771 +--------+--------+ +--------+--------+ 1772 |eth1 |eth1 1773 |10.0.1.1 |10.0.2.1 1774 -------+--------------------------+------- 1775 | | 1776 |10.0.2.1 |10.0.2.2 1777 +--------+--------+ +--------+--------+ 1778 | Host 1 | | Host 2 | 1779 | Default gateway:| | Default gateway:| 1780 | 10.0.0.1 | | 10.0.0.1 | 1781 +-----------------+ +-----------------+ 1783 The instance data tree for Router 1.1.1.1 in the above figure could 1784 be as follows: 1786 { 1787 "ietf-interfaces:interfaces": { 1788 "interface": [ 1789 { 1790 "name": "eth1", 1791 "type": "iana-if-type:ethernetCsmacd", 1792 "description": "An interface with VRRP enabled.", 1793 "ietf-ip:ipv4": { 1794 "address": [ 1795 { 1796 "ip": "10.0.1.1", 1797 "prefix-length": 24 1798 } 1799 ], 1800 "forwarding": true, 1801 "ietf-vrrp:vrrp": { 1802 "vrrp-instance": [ 1803 { 1804 "vrid": 1, 1805 "version": "vrrp-v3", 1806 "priority": 200, 1807 "advertise-interval-centi-sec": 50, 1808 "virtual-ipv4-addresses": { 1809 "virtual-ipv4-address": [ 1810 "ipv4-address": "10.0.0.1" 1811 ] 1812 } 1813 } 1815 ] 1816 } 1817 } 1818 } 1819 ] 1820 }, 1821 "ietf-interfaces:interfaces-state": { 1822 "interface": [ 1823 { 1824 "name": "eth1", 1825 "type": "iana-if-type:ethernetCsmacd", 1826 "phys-address": "00:0C:42:E5:B1:E9", 1827 "oper-status": "up", 1828 "statistics": { 1829 "discontinuity-time": "2016-10-24T17:11:27+02:00" 1830 }, 1831 "ietf-ip:ipv4": { 1832 "forwarding": true, 1833 "mtu": 1500, 1834 "address": [ 1835 { 1836 "ip": "10.0.1.1", 1837 "prefix-length": 24 1838 } 1839 ] 1840 "ietf-vrrp:vrrp": { 1841 "vrrp-instance": [ 1842 { 1843 "vrid": 1, 1844 "version": "vrrp-v3", 1845 "log-state-change": false, 1846 "preempt": { 1847 "enabled": true, 1848 "hold-time": 0 1849 } 1850 "priority": 200, 1851 "accept-mode": false, 1852 "advertise-interval-centi-sec": 50, 1853 "virtual-ipv4-addresses": { 1854 "virtual-ipv4-address": [ 1855 "ipv4-address": "10.0.0.1" 1856 ] 1857 }, 1858 "state": "master", 1859 "is-owner": false, 1860 "last-adv-source": "10.1.1.1", 1861 "up-datetime": "2016-10-24T17:11:27+02:00", 1862 "master-down-interval": 161, 1863 "skew-time": 11, 1864 "last-event": "vrrp-event-interface-up", 1865 "new-master-reason": "priority", 1866 "statistics": { 1867 "discontinuity-datetime": 1868 "2016-10-24T17:11:27+02:00", 1869 "master-transitions": 2, 1870 "advertisement-recv": 20, 1871 "advertisement-sent": 12, 1872 "interval-errors": 0, 1873 "priority-zero-pkts-rcvd": 0, 1874 "priority-zero-pkts-sent": 0, 1875 "invalid-type-pkts-rcvd": 0, 1876 "address-list-errors": 0, 1877 "packet-length-errors": 1 1878 } 1879 } 1880 ] 1881 } 1882 } 1883 } 1884 ], 1885 "vrrp-global": { 1886 "virtual-routers": 3, 1887 "interfaces": 2, 1888 "statistics": { 1889 "discontinuity-datetime": "2016-10-24T17:11:27+02:00", 1890 "checksum-errors": 2, 1891 "version-errors": 0, 1892 "vrid-errors": 0, 1893 "ip-ttl-errors": 1 1894 } 1895 } 1896 } 1897 } 1899 Authors' Addresses 1901 Xufeng Liu (editor) 1902 Jabil 1903 8281 Greensboro Drive, Suite 200 1904 McLean VA 22102 1905 USA 1907 EMail: Xufeng_Liu@jabil.com 1908 Athanasios Kyparlis 1909 Jabil 1910 8281 Greensboro Drive, Suite 200 1911 McLean VA 22102 1912 USA 1914 EMail: Athanasios_Kyparlis@jabil.com 1916 Ravi Parikh 1917 VMware 1918 3425 Hillview Avenue 1919 Palo Alto CA 94304 1920 USA 1922 EMail: parikhr@vmware.com 1924 Acee Lindem 1925 Cisco Systems 1926 301 Midenhall Way 1927 Cary NC 27513 1928 USA 1930 EMail: acee@cisco.com 1932 Mingui Zhang 1933 Huawei Technologies 1934 No. 156 Beiqing Rd. Haidian District 1935 Beijing 100095 1936 P.R. China 1938 EMail: zhangmingui@huawei.com