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