idnits 2.17.1 draft-ietf-rtgwg-yang-vrrp-07.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 227 has weird spacing: '...address ine...' == Line 245 has weird spacing: '...address ine...' == Line 285 has weird spacing: '...address ine...' == Line 308 has weird spacing: '...address ine...' == Line 341 has weird spacing: '...address ine...' == (11 more instances...) -- The document date (October 27, 2017) is 2366 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) -- Possible downref: Normative reference to a draft: ref. 'I-D.bjorklund-netmod-rfc7223bis' -- Possible downref: Normative reference to a draft: ref. 'I-D.bjorklund-netmod-rfc7277bis' == Outdated reference: A later version (-10) exists of draft-ietf-netmod-revised-datastores-05 -- 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-10 == Outdated reference: A later version (-20) exists of draft-ietf-netmod-rfc6087bis-14 Summary: 0 errors (**), 0 flaws (~~), 10 warnings (==), 6 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: April 30, 2018 R. Parikh 6 VMware 7 A. Lindem 8 Cisco Systems 9 M. Zhang 10 Huawei Technologies 11 October 27, 2017 13 A YANG Data Model for Virtual Router Redundancy Protocol (VRRP) 14 draft-ietf-rtgwg-yang-vrrp-07 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 April 30, 2018. 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 . . . . . . . . . . . . . . . . . 5 63 2.4. Protocol States . . . . . . . . . . . . . . . . . . . . . 7 64 2.5. Notifications . . . . . . . . . . . . . . . . . . . . . . 8 65 3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 10 66 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 31 67 5. Security Considerations . . . . . . . . . . . . . . . . . . . 31 68 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 32 69 6.1. Normative References . . . . . . . . . . . . . . . . . . 32 70 6.2. Informative References . . . . . . . . . . . . . . . . . 33 71 Appendix A. Complete Model Tree Structure . . . . . . . . . . . 35 72 Appendix B. Data Tree Example . . . . . . . . . . . . . . . . . 37 73 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 41 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 | [I-D.bjorklund-netmod-rfc7223bis] | 138 | ip | ietf-ip | [I-D.bjorklund-netmod-rfc7277bis] | 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 [I-D.bjorklund-netmod-rfc7223bis] and the IP management model "ietf- 165 ip" [I-D.bjorklund-netmod-rfc7277bis]. The augmentation relations 166 are shown as follows: 168 module: ietf-interfaces 169 +--rw interfaces 170 +--rw interface* [name] 171 ... 172 +--rw ip:ipv4! 173 | +--rw ip:address* [ip] 174 ... 175 | +--rw vrrp:vrrp 176 | +--rw vrrp:vrrp-instance* [vrid] 177 | +--rw vrrp:vrid uint8 178 | +--rw vrrp:virtual-ipv4-addresses 179 ... 180 +--rw ip:ipv6! 181 +--rw ip:address* [ip] 182 ... 183 +--rw vrrp:vrrp 184 +--rw vrrp:vrrp-instance* [vrid] 185 +--rw vrrp:vrid uint8 186 +--rw vrrp:virtual-ipv6-addresses 187 ... 189 In the above figure, a tree node without a prefix is from the model 190 "ietf-interfaces". A tree node with prefix "ip:" is from the model 191 "ietf-ip". A tree node with prefix "vrrp:" is from the VRRP model 192 specified in this document. 194 The "vrrp" container contains a list of vrrp-instance nodes, which 195 are instantiated under an interface for a specified address family 196 (IPv4 or IPv6). 198 Each vrrp-instance node represents a VRRP router state machine 199 described in Section 6.4 of [RFC5798], providing the configuration 200 and state information for the election process of a virtual router. 201 The IP addresses on the augmented interface are the real addresses 202 through which the VRRP router operates. The IPv4 or IPv6 address(es) 203 associated with a virtual router (described in Section 1 of 204 [RFC5798]) are modeled as a list of IPv4 or IPv6 addresses under the 205 vrrp-instance. 207 2.3. Protocol Configuration 209 The model structure for the protocol configuration is as shown below: 211 augment /if:interfaces/if:interface/ip:ipv4: 212 +--rw vrrp 213 +--rw vrrp-instance* [vrid] 214 +--rw vrid uint8 215 | ... 216 +--rw track 217 | +--rw interfaces 218 | | +--rw interface* [interface] 219 | | +--rw interface if:interface-ref 220 | | ... 221 | +--rw networks 222 | +--rw network* [prefix] 223 | +--rw prefix inet:ipv4-prefix 224 | ... 225 +--rw virtual-ipv4-addresses 226 +--rw virtual-ipv4-address* [ipv4-address] 227 +--rw ipv4-address inet:ipv4-address 229 augment /if:interfaces/if:interface/ip:ipv6: 230 +--rw vrrp 231 +--rw vrrp-instance* [vrid] 232 +--rw vrid uint8 233 | ... 234 +--rw track 235 | +--rw interfaces 236 | | +--rw interface* [interface] 237 | | +--rw interface if:interface-ref 238 | | ... 239 | +--rw networks 240 | +--rw network* [prefix] 241 | +--rw prefix inet:ipv6-prefix 242 | ... 243 +--rw virtual-ipv6-addresses 244 +--rw virtual-ipv6-address* [ipv6-address] 245 +--rw ipv6-address inet:ipv6-address 247 The model allows to configure the following protocol entities: 249 o VRRP instance (version 2 or version 3), representing a VRRP 250 router. 252 o Virtual IPv4 or IPv6 address associated with a virtual router. 254 o Tracking interface, to detect interface connectivity failures. 256 o Tracking network, to detect interface connectivity failures. 258 2.4. Protocol States 260 The model structure for the protocol states is as shown below: 262 module: ietf-vrrp 263 +--ro vrrp 264 +--ro 265 +--ro statistics 266 +--ro discontinuity-datetime? yang:date-and-time 267 +--ro 269 augment /if:interfaces/if:interface/ip:ipv4: 270 +--rw vrrp 271 +--rw vrrp-instance* [vrid] 272 +--rw vrid uint8 273 | ... 274 +--rw track 275 | +--rw interfaces 276 | | +--rw interface* [interface] 277 | | +--rw interface if:interface-ref 278 | | ... 279 | +--rw networks 280 | +--rw network* [prefix] 281 | +--rw prefix inet:ipv4-prefix 282 | ... 283 +--rw virtual-ipv4-addresses 284 | +--rw virtual-ipv4-address* [ipv4-address] 285 | +--rw ipv4-address inet:ipv4-address 286 | 287 +--ro 288 +--ro statistics 289 +--ro 291 augment /if:interfaces/if:interface/ip:ipv6: 292 +--rw vrrp 293 +--rw vrrp-instance* [vrid] 294 +--rw vrid uint8 295 + ... 296 +--rw track 297 | +--rw interfaces 298 | | +--rw interface* [interface] 299 | | +--rw interface if:interface-ref 300 | | ... 301 | +--rw networks 302 | +--rw network* [prefix] 303 | +--rw prefix inet:ipv6-prefix 304 | ... 306 +--rw virtual-ipv6-addresses 307 | +--rw virtual-ipv6-address* [ipv6-address] 308 | +--rw ipv6-address inet:ipv6-address 309 | 310 +--ro 311 +--ro statistics 312 +--ro 314 This model conforms to the Network Management Datastore Architecture 315 (NMDA) [I-D.ietf-netmod-revised-datastores]. The operational state 316 data is combined with the associated configuration data in the same 317 hierarchy [I-D.ietf-netmod-rfc6087bis]. When protocol states are 318 retrieved from the NMDA operational state datastore, the returned 319 states cover all "config true" (rw) and "config false" (ro) nodes 320 defined in the schema. 322 The model allows to retrieve protocol states at the following levels: 324 o VRRP instance (version 2 or version 3), representing a VRRP 325 router. 327 o Virtual IPv4 or IPv6 address associated with a virtual router. 329 o Tracking interface, to detect interface connectivity failures. 331 o Tracking network, to detect interface connectivity failures. 333 o Global states and statistics summarizing all instances. 335 2.5. Notifications 337 This model defines the following VRRP specific notifications: 339 notifications: 340 +---n vrrp-new-master-event 341 | +--ro master-ip-address inet:ip-address 342 | +--ro new-master-reason new-master-reason-type 343 +---n vrrp-protocol-error-event 344 | +--ro protocol-error-reason identityref 345 +---n vrrp-virtual-router-error-event 346 +--ro interface if:interface-ref 347 +--ro (ip-version) 348 | +--:(ipv4) 349 | | +--ro ipv4 350 | | +--ro vrid leafref 351 | +--:(ipv6) 352 | +--ro ipv6 353 | +--ro vrid leafref 354 +--ro virtual-router-error-reason identityref 356 Each notification type is used to indicate a type of VRRP state 357 changes or error occurances: 359 vrrp-new-master-event 360 VRRP new master event, indicating that a new master has been 361 elected. 363 vrrp-protocol-error-event 364 VRRP protocol error event for a message that fails to reach a VRRP 365 instance to be processed. 367 vrrp-virtual-router-error-event 368 VRRP virtual router error event for a message processed on a VRRP 369 instance. 371 In addition to the notifications specified above, the mechanism 372 defined in [I-D.ietf-netconf-yang-push] and 373 [I-D.ietf-netconf-rfc5277bis] can be used for other general 374 notifications. This mechanism currently allows the user to: 376 o Subscribe notifications on a per client basis. 378 o Specify subtree filters or xpath filters so that only interested 379 contents will be sent. 381 o Specify either periodic or on-demand notifications. 383 3. YANG Module 385 file "ietf-vrrp@2017-10-25.yang" 386 module ietf-vrrp { 387 yang-version 1.1; 388 namespace "urn:ietf:params:xml:ns:yang:ietf-vrrp"; 389 prefix "vrrp"; 391 import ietf-inet-types { 392 prefix "inet"; 393 } 395 import ietf-yang-types { 396 prefix "yang"; 397 } 399 import ietf-interfaces { 400 prefix "if"; 401 } 403 import ietf-ip { 404 prefix "ip"; 405 } 407 organization 408 "IETF Routing Area Working Group (RTGWG)"; 409 contact 410 "WG Web: 411 WG List: 413 WG Chair: Jeff Tantsura 414 416 WG Chair: Chris Bowers 417 419 Editor: Xufeng Liu 420 422 Editor: Athanasios Kyparlis 423 425 Editor: Ravi Parikh 426 428 Editor: Acee Lindem 429 431 Editor: Mingui Zhang 432 "; 434 description 435 "This YANG module defines a model for managing Virtual Router 436 Redundancy Protocol (VRRP) version 2 and version 3."; 438 revision 2017-10-25 { 439 description "Initial revision"; 440 reference 441 "RFC XXXX: A YANG Data Model for Virtual Router Redundancy 442 Protocol (VRRP). 443 RFC 2787: Definitions of Managed Objects for the Virtual 444 Router Redundancy Protocol. 445 RFC 3768: Virtual Router Redundancy Protocol (VRRP). 446 RFC 5798: Virtual Router Redundancy Protocol (VRRP) Version 3. 447 RFC 6527: Definitions of Managed Objects for the Virtual 448 Router Redundancy Protocol Version 3 (VRRPv3)."; 449 } 451 /* 452 * Features 453 */ 455 feature validate-interval-errors { 456 description 457 "This feature indicates that the system validates that 458 the advertisement interval from advertisement packets 459 received is the same as the one configured for the local 460 VRRP router."; 461 } 463 feature validate-address-list-errors { 464 description 465 "This feature indicates that the system validates that 466 the address list from received packets matches the 467 locally configured list for the VRRP router."; 468 } 470 /* 471 * Typedefs 472 */ 474 typedef new-master-reason-type { 475 type enumeration { 476 enum not-master { 477 description 478 "The virtual router has never transitioned to master 479 state,"; 480 } 481 enum priority { 482 description "Priority was higher."; 483 } 484 enum preempted { 485 description "The master was preempted."; 486 } 487 enum no-response { 488 description "Previous master did not respond."; 489 } 490 } 491 description 492 "The reason for the virtual router to transition to master 493 state."; 494 } // new-master-reason-type 496 /* 497 * Identities 498 */ 500 /* vrrp-event-type identity and its derivatives. */ 501 identity vrrp-event-type { 502 description 503 "The type to indicate the type of a VRRP protocol event."; 504 } 505 identity vrrp-event-none { 506 base vrrp-event-type; 507 description 508 "Indicates a non-meaningful event."; 509 } 510 identity vrrp-event-startup { 511 base vrrp-event-type; 512 description 513 "Indicates that a VRRP router has initiated the protocol."; 514 } 515 identity vrrp-event-shutdown { 516 base vrrp-event-type; 517 description 518 "Indicates that a VRRP router has closed down the protocol."; 519 } 520 identity vrrp-event-higher-priority-backup { 521 base vrrp-event-type; 522 description 523 "Indicates that a backup router has a higher priority than 524 the current master."; 525 } 526 identity vrrp-event-master-timeout { 527 base vrrp-event-type; 528 description 529 "Indicates that the current master has not sent an 530 advertisement within the limit of master-down-interval."; 531 } 532 identity vrrp-event-interface-up { 533 base vrrp-event-type; 534 description 535 "Indicates that the VRRP enabled interface has become 536 operational up."; 537 } 538 identity vrrp-event-interface-down { 539 base vrrp-event-type; 540 description 541 "Indicates that the VRRP enabled interface has become 542 operational down."; 543 } 544 identity vrrp-event-no-primary-ip-address { 545 base vrrp-event-type; 546 description 547 "Indicates that the primary IP address on the VRRP enabled 548 interface has become unavailable."; 549 } 550 identity vrrp-event-primary-ip-address { 551 base vrrp-event-type; 552 description 553 "Indicates that the primary IP address on the VRRP enabled 554 interface has become available."; 555 } 556 identity vrrp-event-no-virtual-ip-addresses { 557 base vrrp-event-type; 558 description 559 "Indicates that there are no virtual IP addresses on the 560 virtual router."; 561 } 562 identity vrrp-event-virtual-ip-addresses { 563 base vrrp-event-type; 564 description 565 "Indicates that there are virtual IP addresses on the 566 virtual router."; 567 } 568 identity vrrp-event-preempt-hold-timeout { 569 base vrrp-event-type; 570 description 571 "Indicates that the configured preemption hold time has 572 passed."; 573 } 574 identity vrrp-event-lower-priority-master { 575 base vrrp-event-type; 576 description 577 "Indicates that there is a lower priority VRRP master."; 578 } 579 identity vrrp-event-owner-preempt { 580 base vrrp-event-type; 581 description 582 "Indicates that the owner has preempted another router to 583 become the master."; 584 } 586 /* vrrp-error-global identity and its derivatives. */ 587 identity vrrp-error-global { 588 description 589 "The type to indicate the type of a VRRP error that occurs 590 for a packet before it reaches a VRRP router."; 591 } 592 identity checksum-error { 593 base vrrp-error-global; 594 description 595 "A packet has been received with an invalid VRRP checksum 596 value."; 597 } 598 identity ip-ttl-error { 599 base vrrp-error-global; 600 description 601 "A packet has been received with IP TTL (Time-To-Live) 602 not equal to 255."; 603 } 604 identity version-error { 605 base vrrp-error-global; 606 description 607 "A packet has been received with an unknown or unsupported 608 version number."; 609 } 610 identity vrid-error { 611 base vrrp-error-global; 612 description 613 "A packet has been received with a VRID that is not valid 614 for any virtual router on this router."; 615 } 617 /* vrrp-error-virtual-router identity and its derivatives. */ 618 identity vrrp-error-virtual-router { 619 description 620 "The type to indicate the type of a VRRP error that occurs 621 after a packet reaches a VRRP router."; 622 } 623 identity address-list-error { 624 base vrrp-error-virtual-router; 625 description 626 "A packet has been received with an address list that 627 does not match the locally configured address list for 628 the virtual router."; 629 } 630 identity interval-error { 631 base vrrp-error-virtual-router; 632 description 633 "A packet has been received with an advertisement 634 interval different than the one configured for the local 635 virtual router"; 636 } 637 identity packet-length-error { 638 base vrrp-error-virtual-router; 639 description 640 "A packet has been received with a packet length less 641 than the length of the VRRP header."; 642 } 644 /* vrrp-state-type identity and its derivatives. */ 645 identity vrrp-state-type { 646 description 647 "The type to indicate the state of a virtual router."; 648 } 649 identity initialize { 650 base vrrp-state-type; 651 description 652 "Indicates that the virtual router is waiting 653 for a startup event."; 654 } 655 identity backup { 656 base vrrp-state-type; 657 description 658 "Indicates that the virtual router is monitoring the 659 availability of the master router."; 660 } 661 identity master { 662 base vrrp-state-type; 663 description 664 "Indicates that the virtual router is forwarding 665 packets for IP addresses that are associated with 666 this virtual router."; 667 } 669 /* vrrp-version identity and its derivatives. */ 670 identity vrrp-version { 671 description 672 "The version of the VRRP protocol."; 673 } 674 identity vrrp-v2 { 675 base vrrp-version; 676 description 677 "Indicates version 2 of the VRRP protocol."; 678 } 679 identity vrrp-v3 { 680 base vrrp-version; 681 description 682 "Indicates version 3 of the VRRP protocol."; 683 } 685 /* 686 * Groupings 687 */ 689 grouping vrrp-common-attributes { 690 description 691 "Group of VRRP attributes common to version 2 and version 3"; 693 leaf vrid { 694 type uint8 { 695 range 1..255; 696 } 697 description "Virtual router ID."; 698 } 700 leaf version { 701 type identityref { 702 base vrrp:vrrp-version; 703 } 704 mandatory true; 705 description "Version 2 or version 3 of VRRP."; 706 } 708 leaf log-state-change { 709 type boolean; 710 default "false"; 711 description 712 "Generates VRRP state change messages each time the VRRP 713 instance changes state (from up to down or down to up)."; 714 } 716 container preempt { 717 description 718 "Enables a higher priority Virtual Router Redundancy 719 Protocol (VRRP) backup router to preempt a lower priority 720 VRRP master."; 721 leaf enabled { 722 type boolean; 723 default "true"; 724 description 725 "'true' if preemption is enabled."; 726 } 727 leaf hold-time { 728 type uint16; 729 units seconds; 730 default 0; 731 description 732 "Hold time, in seconds, for which a higher priority VRRP 733 backup router must wait before preempting a lower priority 734 VRRP master."; 735 } 736 } 738 leaf priority { 739 type uint8 { 740 range 1..254; 741 } 742 default 100; 743 description 744 "Configures the Virtual Router Redundancy Protocol (VRRP) 745 election priority for the backup virtual router."; 746 } 748 leaf accept-mode { 749 when "derived-from-or-self(current()/../version, 'vrrp-v3')" { 750 description "Applicable only to version 3."; 751 } 752 type boolean; 753 default "false"; 754 description 755 "Controls whether a virtual router in Master state will 756 accept packets addressed to the address owner's IPvX address 757 as its own if it is not the IPvX address owner. The default 758 is false. Deployments that rely on, for example, pinging the 759 address owner's IPvX address may wish to configure 760 accept-mode to true. 762 Note: IPv6 Neighbor Solicitations and Neighbor 763 Advertisements MUST NOT be dropped when accept-mode is 764 false."; 765 } 766 } // vrrp-common-attributes 767 grouping vrrp-ipv4-attributes { 768 description 769 "Group of VRRP attributes for IPv4."; 771 uses vrrp-common-attributes; 773 choice advertise-interval-choice { 774 description 775 "The options for the advertisement interval at which VRRPv2 776 or VRRPv3 advertisements are sent from the specified 777 interface."; 779 case v2 { 780 when "derived-from-or-self(version, 'vrrp-v2')" { 781 description "Applicable only to version 2."; 782 } 783 leaf advertise-interval-sec { 784 type uint8 { 785 range 1..254; 786 } 787 units seconds; 788 default 1; 789 description 790 "Configures the interval that Virtual Router 791 Redundancy Protocol Version 2 (VRRPv2) advertisements 792 are sent from the specified interface."; 793 } 794 } 796 case v3 { 797 when "derived-from-or-self(version, 'vrrp-v3')" { 798 description "Applicable only to version 3."; 799 } 800 leaf advertise-interval-centi-sec { 801 type uint16 { 802 range 1..4095; 803 } 804 units centiseconds; 805 default 100; 806 description 807 "Configures the interval that Virtual Router 808 Redundancy Protocol version 3 (VRRPv3) advertisements 809 are sent from the specified interface."; 810 } 811 } 812 } // advertise-interval-choice 814 container track { 815 description 816 "Enables the specified VRRP instance to track interfaces 817 or networks."; 818 container interfaces { 819 description 820 "Enables the specified Virtual Router Redundancy Protocol 821 version 2 (VRRP) or version 3 (VRRPv3) instance to track 822 an interface."; 824 list interface { 825 key "interface"; 826 description 827 "Interface to track."; 829 leaf interface { 830 type if:interface-ref; 831 must "/if:interfaces/if:interface[if:name=current()]/" 832 + "ip:ipv4" { 833 description "Interface is IPv4."; 834 } 835 description 836 "Interface to track."; 837 } 839 leaf priority-decrement { 840 type uint8 { 841 range 1..254; 842 } 843 default 10; 844 description 845 "Specifies how much to decrement the priority of the 846 VRRP instance if the interface goes down."; 847 } 848 } // interface 849 } // interfaces 851 container networks { 852 description 853 "Enables the backup Virtual Router Redundancy Protocol 854 version 2 (VRRP) or version 3 (VRRPv3) router to track a 855 specified network through the IP network prefix of that 856 network."; 857 list network { 858 key "prefix"; 859 description 860 "Enables the specified Virtual Router Redundancy 861 Protocol version 2 (VRRP) or version 3 (VRRPv3) 862 instance to track an IP network, by specifying the 863 prefix of the IP network."; 865 leaf prefix { 866 type inet:ipv4-prefix; 867 description 868 "The prefix of the network to track."; 869 } 871 leaf priority-decrement { 872 type uint8 { 873 range 1..254; 874 } 875 default 10; 876 description 877 "Specifies how much to decrement the priority of the 878 backup VRRP router if there is a failure in the IP 879 network."; 880 } 881 } // track-network 882 } // track-networks 883 } // track 885 container virtual-ipv4-addresses { 886 description 887 "Configures the virtual IP address for the Virtual Router 888 Redundancy Protocol (VRRP) interface."; 890 list virtual-ipv4-address { 891 key "ipv4-address"; 892 max-elements 16; 893 description 894 "Virtual IP addresses for a single VRRP instance. For a 895 VRRP owner router, the virtual address must match one 896 of the IP addresses configured on the interface 897 corresponding to the virtual router."; 899 leaf ipv4-address { 900 type inet:ipv4-address; 901 description 902 "An IPv4 address associated with a virtual router."; 903 reference 904 "RFC 5798: Virtual Router Redundancy Protocol (VRRP) 905 Version 3. Section 1.2."; 906 } 907 } // virtual-ipv4-address 908 } // virtual-ipv4-addresses 909 } // grouping vrrp-ipv4-attributes 910 grouping vrrp-ipv6-attributes { 911 description 912 "Group of VRRP attributes for IPv6."; 914 uses vrrp-common-attributes; 916 leaf advertise-interval-centi-sec { 917 type uint16 { 918 range 1..4095; 919 } 920 units centiseconds; 921 default 100; 922 description 923 "Configures the interval that Virtual Router 924 Redundancy Protocol version 3 (VRRPv3) advertisements 925 are sent from the specified interface."; 926 } 928 container track { 929 description 930 "Enables the specified VRRP instance to track interfaces 931 or networks."; 932 container interfaces { 933 description 934 "Enables the specified Virtual Router Redundancy Protocol 935 version 2 (VRRP) or version 3 (VRRPv3) instance to track 936 an interface."; 937 list interface { 938 key "interface"; 939 description 940 "Interface to track."; 942 leaf interface { 943 type if:interface-ref; 944 must "/if:interfaces/if:interface[if:name=current()]/" 945 + "ip:ipv6" { 946 description "Interface is IPv6."; 947 } 948 description 949 "Interface to track."; 950 } 952 leaf priority-decrement { 953 type uint8 { 954 range 1..254; 955 } 956 default 10; 957 description 958 "Specifies how much to decrement the priority of the 959 VRRP instance if the interface goes down."; 960 } 961 } // interface 962 } // interfaces 964 container networks { 965 description 966 "Enables the backup Virtual Router Redundancy Protocol 967 version 2 (VRRP) or version 3 (VRRPv3) router to track a 968 specified network through the IP network prefix of that 969 network."; 970 list network { 971 key "prefix"; 972 description 973 "Enables the specified Virtual Router Redundancy 974 Protocol version 2 (VRRP) or version 3 (VRRPv3) 975 instance to track an IP network, by specifying the 976 prefix of the IP network."; 978 leaf prefix { 979 type inet:ipv6-prefix; 980 description 981 "The prefix of the network to track."; 982 } 984 leaf priority-decrement { 985 type uint8 { 986 range 1..254; 987 } 988 default 10; 989 description 990 "Specifies how much to decrement the priority of the 991 backup VRRP router if there is a failure in the IP 992 network."; 993 } 994 } // track-network 995 } // track-networks 996 } // track 998 container virtual-ipv6-addresses { 999 description 1000 "Configures the virtual IP address for the Virtual Router 1001 Redundancy Protocol (VRRP) interface."; 1002 list virtual-ipv6-address { 1003 key "ipv6-address"; 1004 max-elements 2; 1005 description 1006 "Two IPv6 addresses are allowed. The first one must be 1007 a link-local address and the second one can be a 1008 link-local or global address."; 1010 leaf ipv6-address { 1011 type inet:ipv6-address; 1012 description 1013 "An IPv6 address associated with a virtual router."; 1014 reference 1015 "RFC 5798: Virtual Router Redundancy Protocol (VRRP) 1016 Version 3. Section 1.3."; 1017 } 1018 } // virtual-ipv6-address 1019 } // virtual-ipv6-addresses 1020 } // grouping vrrp-ipv6-attributes 1022 grouping vrrp-state-attributes { 1023 description 1024 "Group of VRRP state attributes."; 1026 leaf state { 1027 type identityref { 1028 base vrrp:vrrp-state-type; 1029 } 1030 config false; 1031 description 1032 "Operational state."; 1033 } 1035 leaf is-owner { 1036 type boolean; 1037 config false; 1038 description 1039 "Set to true if this virtual router is owner."; 1040 } 1042 leaf last-adv-source { 1043 type inet:ip-address; 1044 config false; 1045 description 1046 "Last advertised IPv4/IPv6 source address"; 1047 } 1049 leaf up-datetime { 1050 type yang:date-and-time; 1051 config false; 1052 description 1053 "The date and time when this virtual router 1054 transitioned out of init state."; 1055 } 1057 leaf master-down-interval { 1058 type uint32; 1059 units centiseconds; 1060 config false; 1061 description 1062 "Time interval for backup virtual router to declare 1063 Master down."; 1064 } 1066 leaf skew-time { 1067 type uint32; 1068 units microseconds; 1069 config false; 1070 description 1071 "Calculated based on the priority and advertisement 1072 interval configuration command parameters. See RFC 3768."; 1073 } 1075 leaf last-event { 1076 type identityref { 1077 base vrrp:vrrp-event-type; 1078 } 1079 config false; 1080 description 1081 "Last reported event."; 1082 } 1084 leaf new-master-reason { 1085 type new-master-reason-type; 1086 config false; 1087 description 1088 "Indicates the reason for the virtual router to transition 1089 to master state."; 1090 } 1092 container statistics { 1093 config false; 1094 description 1095 "VRRP statistics."; 1097 leaf discontinuity-datetime { 1098 type yang:date-and-time; 1099 description 1100 "The time on the most recent occasion at which any one or 1101 more of the VRRP statistic counters suffered a 1102 discontinuity. If no such discontinuities have occurred 1103 since the last re-initialization of the local management 1104 subsystem, then this node contains the time that the 1105 local management subsystem re-initialized itself."; 1106 } 1108 leaf master-transitions { 1109 type yang:counter32; 1110 description 1111 "The total number of times that this virtual router's 1112 state has transitioned to master"; 1113 } 1115 leaf advertisement-recv { 1116 type yang:counter64; 1117 description 1118 "The total number of VRRP advertisements received by 1119 this virtual router."; 1120 } 1122 leaf advertisement-sent { 1123 type yang:counter64; 1124 description 1125 "The total number of VRRP advertisements sent by 1126 this virtual router."; 1127 } 1129 leaf interval-errors { 1130 if-feature validate-interval-errors; 1131 type yang:counter64; 1132 description 1133 "The total number of VRRP advertisement packets 1134 received with an advertisement interval 1135 different than the one configured for the local 1136 virtual router"; 1137 } 1139 leaf priority-zero-pkts-rcvd { 1140 type yang:counter64; 1141 description 1142 "The total number of VRRP packets received by the 1143 virtual router with a priority of 0."; 1144 } 1146 leaf priority-zero-pkts-sent { 1147 type yang:counter64; 1148 description 1149 "The total number of VRRP packets sent by the 1150 virtual router with a priority of 0."; 1151 } 1153 leaf invalid-type-pkts-rcvd { 1154 type yang:counter64; 1155 description 1156 "The number of VRRP packets received by the virtual 1157 router with an invalid value in the 'type' field."; 1158 } 1160 leaf address-list-errors { 1161 if-feature validate-address-list-errors; 1162 type yang:counter64; 1163 description 1164 "The total number of packets received with an 1165 address list that does not match the locally 1166 configured address list for the virtual router."; 1167 } 1169 leaf packet-length-errors { 1170 type yang:counter64; 1171 description 1172 "The total number of packets received with a packet 1173 length less than the length of the VRRP header."; 1174 } 1175 } // container statistics 1176 } // grouping vrrp-state-attributes 1178 grouping vrrp-global-state-attributes { 1179 description 1180 "Group of VRRP global state attributes."; 1182 leaf virtual-routers { 1183 type uint32; 1184 description "Number of configured virtual routers."; 1185 } 1187 leaf interfaces { 1188 type uint32; 1189 description "Number of interface with VRRP configured."; 1190 } 1192 container statistics { 1193 description 1194 "VRRP global statistics."; 1196 leaf discontinuity-datetime { 1197 type yang:date-and-time; 1198 description 1199 "The time on the most recent occasion at which one of 1200 checksum-errors, version-errors, vrid-errors, and 1201 ip-ttl-errors suffered a discontinuity. 1203 If no such discontinuities have occurred since the last 1204 re-initialization of the local management subsystem, 1205 then this node contains the time that the local management 1206 subsystem re-initialized itself."; 1207 } 1209 leaf checksum-errors { 1210 type yang:counter64; 1211 description 1212 "The total number of VRRP packets received with an invalid 1213 VRRP checksum value."; 1214 reference "RFC 5798, Section 5.2.8"; 1215 } 1217 leaf version-errors { 1218 type yang:counter64; 1219 description 1220 "The total number of VRRP packets received with an unknown 1221 or unsupported version number."; 1222 reference "RFC 5798, Section 5.2.1"; 1223 } 1225 leaf vrid-errors { 1226 type yang:counter64; 1227 description 1228 "The total number of VRRP packets received with a VRID that 1229 is not valid for any virtual router on this router."; 1230 reference "RFC 5798, Section 5.2.3"; 1231 } 1233 leaf ip-ttl-errors { 1234 type yang:counter64; 1235 description 1236 "The total number of VRRP packets received by the 1237 virtual router with IP TTL (Time-To-Live) not equal 1238 to 255."; 1239 reference "RFC 5798, Sections 5.1.1.3 and 5.1.2.3."; 1240 } 1241 } // statistics 1242 } // vrrp-global-state-attributes 1244 /* 1245 * Configuration data and operational state data nodes 1246 */ 1248 augment "/if:interfaces/if:interface/ip:ipv4" { 1249 description "Augment IPv4 interface."; 1251 container vrrp { 1252 description 1253 "Configures the Virtual Router Redundancy Protocol (VRRP) 1254 version 2 or version 3 for IPv4."; 1256 list vrrp-instance { 1257 key "vrid"; 1258 description 1259 "Defines a virtual router, identified by a virtual router 1260 identifier (VRID), within IPv4 address space."; 1262 uses vrrp-ipv4-attributes; 1263 uses vrrp-state-attributes; 1264 } 1265 } 1266 } // augment ipv4 1268 augment "/if:interfaces/if:interface/ip:ipv6" { 1269 description "Augment IPv6 interface."; 1271 container vrrp { 1272 description 1273 "Configures the Virtual Router Redundancy Protocol (VRRP) 1274 version 3 for IPv6."; 1276 list vrrp-instance { 1277 must "derived-from-or-self(version, 'vrrp-v3')" { 1278 description 1279 "IPv6 is only supported by version 3."; 1280 } 1281 key "vrid"; 1282 description 1283 "Defines a virtual router, identified by a virtual router 1284 identifier (VRID), within IPv6 address space."; 1286 uses vrrp-ipv6-attributes; 1287 uses vrrp-state-attributes; 1288 } // list vrrp-instance 1289 } // container vrrp 1290 } // augment ipv6 1292 container vrrp { 1293 config false; 1294 description "VRRP data at the global level."; 1296 uses vrrp-global-state-attributes; 1297 } 1299 /* 1300 * Notifications 1301 */ 1303 notification vrrp-new-master-event { 1304 description 1305 "Notification event for a change of VRRP new master."; 1306 leaf master-ip-address { 1307 type inet:ip-address; 1308 mandatory true; 1309 description 1310 "IPv4 or IPv6 address of the new master."; 1311 } 1312 leaf new-master-reason { 1313 type new-master-reason-type; 1314 mandatory true; 1315 description 1316 "Indicates the reason for the virtual router to transition 1317 to master state."; 1318 } 1319 } 1321 notification vrrp-protocol-error-event { 1322 description 1323 "Notification event for a VRRP protocol error."; 1324 leaf protocol-error-reason { 1325 type identityref { 1326 base vrrp:vrrp-error-global; 1327 } 1328 mandatory true; 1329 description 1330 "Indicates the reason for the protocol error."; 1331 } 1332 } 1334 notification vrrp-virtual-router-error-event { 1335 description 1336 "Notification event for an error happened on a virtual 1337 router."; 1338 leaf interface { 1339 type if:interface-ref; 1340 mandatory true; 1341 description 1342 "Indicates the interface for which statistics area 1343 to be cleared."; 1344 } 1346 choice ip-version { 1347 mandatory true; 1348 description 1349 "The error may have happened on either an IPv4 virtual 1350 router or an IPv6 virtual router. The information 1351 related to a specific IP version is provided by one of 1352 the following cases."; 1353 case ipv4 { 1354 description "IPv4"; 1355 container ipv4 { 1356 description 1357 "Error information for IPv4."; 1358 leaf vrid { 1359 type leafref { 1360 path "/if:interfaces/if:interface" 1361 + "[if:name = current()/../../vrrp:interface]/" 1362 + "ip:ipv4/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid"; 1363 } 1364 mandatory true; 1365 description 1366 "Indicates the virtual router on which the event has 1367 occurred."; 1368 } 1369 } 1370 } 1371 case ipv6 { 1372 description "IPv6"; 1373 container ipv6 { 1374 description 1375 "Error information for IPv6."; 1376 leaf vrid { 1377 type leafref { 1378 path "/if:interfaces/if:interface" 1379 + "[if:name = current()/../../vrrp:interface]/" 1380 + "ip:ipv6/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid"; 1381 } 1382 mandatory true; 1383 description 1384 "Indicates the virtual router on which the event has 1385 occurred."; 1386 } 1387 } 1388 } 1389 } 1390 leaf virtual-router-error-reason { 1391 type identityref { 1392 base vrrp:vrrp-error-virtual-router; 1393 } 1394 mandatory true; 1395 description 1396 "Indicates the reason for the virtual router error."; 1397 } 1398 } 1399 } 1400 1402 4. IANA Considerations 1404 RFC Ed.: In this section, replace all occurrences of 'XXXX' with the 1405 actual RFC number (and remove this note). 1407 This document registers the following namespace URIs in the IETF XML 1408 registry [RFC3688]: 1410 -------------------------------------------------------------------- 1411 URI: urn:ietf:params:xml:ns:yang:ietf-vrrp 1412 Registrant Contact: The IESG. 1413 XML: N/A, the requested URI is an XML namespace. 1414 -------------------------------------------------------------------- 1416 This document registers the following YANG modules in the YANG Module 1417 Names registry [RFC7950]: 1419 -------------------------------------------------------------------- 1420 name: ietf-vrrp 1421 namespace: urn:ietf:params:xml:ns:yang:ietf-vrrp 1422 prefix: vrrp 1423 reference: RFC XXXX 1424 -------------------------------------------------------------------- 1426 5. Security Considerations 1428 The configuration, state, and action data defined in this document 1429 are designed to be accessed via a management protocol with a secure 1430 transport layer, such as NETCONF [RFC6241]. The NETCONF access 1431 control model [RFC6536] provides the means to restrict access for 1432 particular NETCONF users to a preconfigured subset of all available 1433 NETCONF protocol operations and contents. 1435 A number of configuration data nodes defined in this document are 1436 writable/creatable/deletable (i.e., "config true" in YANG terms, 1437 which is the default). These data nodes may be considered sensitive 1438 or vulnerable in some network environments. Write operations to 1439 these data nodes, such as "edit-config" in NETCONF, can have negative 1440 effects on the network if the protocol operations are not properly 1441 protected. The vulnerable "config true" parameters and subtrees are 1442 the following: 1444 /if:interfaces/if:interface/ip:ipv4/vrrp:vrrp/vrrp:vrrp-instance 1446 /if:interfaces/if:interface/ip:ipv6/vrrp:vrrp/vrrp:vrrp-instance 1448 Unauthorized access to any node of these can adversely affect the 1449 routing subsystem of both the local device and the network. This may 1450 lead to network malfunctions, delivery of packets to inappropriate 1451 destinations, and other problems. 1453 6. References 1455 6.1. Normative References 1457 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1458 Requirement Levels", BCP 14, RFC 2119, 1459 DOI 10.17487/RFC2119, March 1997, . 1462 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1463 DOI 10.17487/RFC3688, January 2004, . 1466 [RFC5798] Nadas, S., Ed., "Virtual Router Redundancy Protocol (VRRP) 1467 Version 3 for IPv4 and IPv6", RFC 5798, 1468 DOI 10.17487/RFC5798, March 2010, . 1471 [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for 1472 the Network Configuration Protocol (NETCONF)", RFC 6020, 1473 DOI 10.17487/RFC6020, October 2010, . 1476 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 1477 and A. Bierman, Ed., "Network Configuration Protocol 1478 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 1479 . 1481 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 1482 RFC 6991, DOI 10.17487/RFC6991, July 2013, 1483 . 1485 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 1486 RFC 7950, DOI 10.17487/RFC7950, August 2016, 1487 . 1489 [I-D.bjorklund-netmod-rfc7223bis] 1490 Bjorklund, M., "A YANG Data Model for Interface 1491 Management", draft-bjorklund-netmod-rfc7223bis-00 (work in 1492 progress), August 2017. 1494 [I-D.bjorklund-netmod-rfc7277bis] 1495 Bjorklund, M., "A YANG Data Model for IP Management", 1496 draft-bjorklund-netmod-rfc7277bis-00 (work in progress), 1497 August 2017. 1499 [I-D.ietf-netmod-revised-datastores] 1500 Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 1501 and R. Wilton, "Network Management Datastore 1502 Architecture", draft-ietf-netmod-revised-datastores-05 1503 (work in progress), October 2017. 1505 6.2. Informative References 1507 [RFC3768] Hinden, R., Ed., "Virtual Router Redundancy Protocol 1508 (VRRP)", RFC 3768, DOI 10.17487/RFC3768, April 2004, 1509 . 1511 [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration 1512 Protocol (NETCONF) Access Control Model", RFC 6536, 1513 DOI 10.17487/RFC6536, March 2012, . 1516 [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG", 1517 RFC 7951, DOI 10.17487/RFC7951, August 2016, 1518 . 1520 [I-D.ietf-netconf-rfc5277bis] 1521 Clemm, A., Prieto, A., Voit, E., Nilsen-Nygaard, E., 1522 Tripathy, A., Chisholm, S., and H. Trevino, "Subscribing 1523 to Event Notifications", draft-ietf-netconf-rfc5277bis-01 1524 (work in progress), October 2016. 1526 [I-D.ietf-netconf-yang-push] 1527 Clemm, A., Voit, E., Prieto, A., Tripathy, A., Nilsen- 1528 Nygaard, E., Bierman, A., and B. Lengyel, "Subscribing to 1529 YANG datastore push updates", draft-ietf-netconf-yang- 1530 push-10 (work in progress), October 2017. 1532 [I-D.ietf-netmod-rfc6087bis] 1533 Bierman, A., "Guidelines for Authors and Reviewers of YANG 1534 Data Model Documents", draft-ietf-netmod-rfc6087bis-14 1535 (work in progress), September 2017. 1537 Appendix A. Complete Model Tree Structure 1539 The VRRP YANG data model defined in this document has the following 1540 tree structure: 1542 module: ietf-vrrp 1543 +--ro vrrp 1544 +--ro virtual-routers? uint32 1545 +--ro interfaces? uint32 1546 +--ro statistics 1547 +--ro discontinuity-datetime? yang:date-and-time 1548 +--ro checksum-errors? yang:counter64 1549 +--ro version-errors? yang:counter64 1550 +--ro vrid-errors? yang:counter64 1551 +--ro ip-ttl-errors? yang:counter64 1552 augment /if:interfaces/if:interface/ip:ipv4: 1553 +--rw vrrp 1554 +--rw vrrp-instance* [vrid] 1555 +--rw vrid uint8 1556 +--rw version identityref 1557 +--rw log-state-change? boolean 1558 +--rw preempt 1559 | +--rw enabled? boolean 1560 | +--rw hold-time? uint16 1561 +--rw priority? uint8 1562 +--rw accept-mode? boolean 1563 +--rw (advertise-interval-choice)? 1564 | +--:(v2) 1565 | | +--rw advertise-interval-sec? uint8 1566 | +--:(v3) 1567 | +--rw advertise-interval-centi-sec? uint16 1568 +--rw track 1569 | +--rw interfaces 1570 | | +--rw interface* [interface] 1571 | | +--rw interface if:interface-ref 1572 | | +--rw priority-decrement? uint8 1573 | +--rw networks 1574 | +--rw network* [prefix] 1575 | +--rw prefix inet:ipv4-prefix 1576 | +--rw priority-decrement? uint8 1577 +--rw virtual-ipv4-addresses 1578 | +--rw virtual-ipv4-address* [ipv4-address] 1579 | +--rw ipv4-address inet:ipv4-address 1580 +--ro state? identityref 1581 +--ro is-owner? boolean 1582 +--ro last-adv-source? inet:ip-address 1583 +--ro up-datetime? yang:date-and-time 1584 +--ro master-down-interval? uint32 1585 +--ro skew-time? uint32 1586 +--ro last-event? identityref 1587 +--ro new-master-reason? 1588 new-master-reason-type 1589 +--ro statistics 1590 +--ro discontinuity-datetime? yang:date-and-time 1591 +--ro master-transitions? yang:counter32 1592 +--ro advertisement-recv? yang:counter64 1593 +--ro advertisement-sent? yang:counter64 1594 +--ro interval-errors? yang:counter64 1595 {validate-interval-errors}? 1596 +--ro priority-zero-pkts-rcvd? yang:counter64 1597 +--ro priority-zero-pkts-sent? yang:counter64 1598 +--ro invalid-type-pkts-rcvd? yang:counter64 1599 +--ro address-list-errors? yang:counter64 1600 {validate-address-list-errors}? 1601 +--ro packet-length-errors? yang:counter64 1602 augment /if:interfaces/if:interface/ip:ipv6: 1603 +--rw vrrp 1604 +--rw vrrp-instance* [vrid] 1605 +--rw vrid uint8 1606 +--rw version identityref 1607 +--rw log-state-change? boolean 1608 +--rw preempt 1609 | +--rw enabled? boolean 1610 | +--rw hold-time? uint16 1611 +--rw priority? uint8 1612 +--rw accept-mode? boolean 1613 +--rw advertise-interval-centi-sec? uint16 1614 +--rw track 1615 | +--rw interfaces 1616 | | +--rw interface* [interface] 1617 | | +--rw interface if:interface-ref 1618 | | +--rw priority-decrement? uint8 1619 | +--rw networks 1620 | +--rw network* [prefix] 1621 | +--rw prefix inet:ipv6-prefix 1622 | +--rw priority-decrement? uint8 1623 +--rw virtual-ipv6-addresses 1624 | +--rw virtual-ipv6-address* [ipv6-address] 1625 | +--rw ipv6-address inet:ipv6-address 1626 +--ro state? identityref 1627 +--ro is-owner? boolean 1628 +--ro last-adv-source? inet:ip-address 1629 +--ro up-datetime? yang:date-and-time 1630 +--ro master-down-interval? uint32 1631 +--ro skew-time? uint32 1632 +--ro last-event? identityref 1633 +--ro new-master-reason? 1634 new-master-reason-type 1635 +--ro statistics 1636 +--ro discontinuity-datetime? yang:date-and-time 1637 +--ro master-transitions? yang:counter32 1638 +--ro advertisement-recv? yang:counter64 1639 +--ro advertisement-sent? yang:counter64 1640 +--ro interval-errors? yang:counter64 1641 {validate-interval-errors}? 1642 +--ro priority-zero-pkts-rcvd? yang:counter64 1643 +--ro priority-zero-pkts-sent? yang:counter64 1644 +--ro invalid-type-pkts-rcvd? yang:counter64 1645 +--ro address-list-errors? yang:counter64 1646 {validate-address-list-errors}? 1647 +--ro packet-length-errors? yang:counter64 1649 notifications: 1650 +---n vrrp-new-master-event 1651 | +--ro master-ip-address inet:ip-address 1652 | +--ro new-master-reason new-master-reason-type 1653 +---n vrrp-protocol-error-event 1654 | +--ro protocol-error-reason identityref 1655 +---n vrrp-virtual-router-error-event 1656 +--ro interface if:interface-ref 1657 +--ro (ip-version) 1658 | +--:(ipv4) 1659 | | +--ro ipv4 1660 | | +--ro vrid -> /if:interfaces/interface[if:name = 1661 current()/../../vrrp:interface]/ip:ipv4/vrrp:vrrp/vrrp-instance/vrid 1662 | +--:(ipv6) 1663 | +--ro ipv6 1664 | +--ro vrid -> /if:interfaces/interface[if:name = 1665 current()/../../vrrp:interface]/ip:ipv6/vrrp:vrrp/vrrp-instance/vrid 1666 +--ro virtual-router-error-reason identityref 1668 Appendix B. Data Tree Example 1670 This section contains an example of an instance data tree in the JSON 1671 encoding [RFC7951], containing both configuration and state data. 1673 Virtual router IP address: 192.0.2.1 1674 +-----------------+ +-----------------+ 1675 | | | | 1676 | Router 1 | | Router 2 | 1677 | | | | 1678 +--------+--------+ +--------+--------+ 1679 |eth1 |eth1 1680 |192.0.2.11 |192.0.2.12 1681 -------+--------------------------+------- 1682 | | 1683 |192.0.2.51 |192.0.2.52 1684 +--------+--------+ +--------+--------+ 1685 | Host 1 | | Host 2 | 1686 | Default gateway:| | Default gateway:| 1687 | 192.0.2.1 | | 192.0.2.1 | 1688 +-----------------+ +-----------------+ 1690 The configuration instance data for Router 1 in the above figure 1691 could be as follows: 1693 { 1694 "ietf-interfaces:interfaces": { 1695 "interface": [ 1696 { 1697 "name": "eth1", 1698 "type": "iana-if-type:ethernetCsmacd", 1699 "description": "An interface with VRRP enabled.", 1700 "ietf-ip:ipv4": { 1701 "address": [ 1702 { 1703 "ip": "192.0.2.11", 1704 "prefix-length": 24 1705 } 1706 ], 1707 "forwarding": true, 1708 "ietf-vrrp:vrrp": { 1709 "vrrp-instance": [ 1710 { 1711 "vrid": 1, 1712 "version": "vrrp-v3", 1713 "priority": 200, 1714 "advertise-interval-centi-sec": 50, 1715 "virtual-ipv4-addresses": { 1716 "virtual-ipv4-address": [ 1717 "ipv4-address": "192.0.2.1" 1718 ] 1719 } 1720 } 1721 ] 1722 } 1723 } 1724 } 1725 ] 1726 } 1727 } 1729 The cooresponding operational state data for Router 1 could be as 1730 follows: 1732 { 1733 "ietf-interfaces:interfaces": { 1734 "interface": [ 1735 { 1736 "name": "eth1", 1737 "type": "iana-if-type:ethernetCsmacd", 1738 "phys-address": "00:0C:42:E5:B1:E9", 1739 "oper-status": "up", 1740 "statistics": { 1741 "discontinuity-time": "2016-10-24T17:11:27+02:00" 1742 }, 1743 "ietf-ip:ipv4": { 1744 "forwarding": true, 1745 "mtu": 1500, 1746 "address": [ 1747 { 1748 "ip": "192.0.2.11", 1749 "prefix-length": 24 1750 } 1751 ] 1752 "ietf-vrrp:vrrp": { 1753 "vrrp-instance": [ 1754 { 1755 "vrid": 1, 1756 "version": "vrrp-v3", 1757 "log-state-change": false, 1758 "preempt": { 1759 "enabled": true, 1760 "hold-time": 0 1761 } 1762 "priority": 200, 1763 "accept-mode": false, 1764 "advertise-interval-centi-sec": 50, 1765 "virtual-ipv4-addresses": { 1766 "virtual-ipv4-address": [ 1767 "ipv4-address": "192.0.2.1" 1768 ] 1769 }, 1770 "state": "master", 1771 "is-owner": false, 1772 "last-adv-source": "192.0.2.11", 1773 "up-datetime": "2016-10-24T17:11:27+02:00", 1774 "master-down-interval": 161, 1775 "skew-time": 11, 1776 "last-event": "vrrp-event-interface-up", 1777 "new-master-reason": "priority", 1778 "statistics": { 1779 "discontinuity-datetime": 1780 "2016-10-24T17:11:27+02:00", 1781 "master-transitions": 2, 1782 "advertisement-recv": 20, 1783 "advertisement-sent": 12, 1784 "interval-errors": 0, 1785 "priority-zero-pkts-rcvd": 0, 1786 "priority-zero-pkts-sent": 0, 1787 "invalid-type-pkts-rcvd": 0, 1788 "address-list-errors": 0, 1789 "packet-length-errors": 1 1790 } 1791 } 1792 ] 1793 } 1794 } 1795 } 1796 ] 1797 } 1798 } 1800 { 1801 "ietf-vrrp:vrrp": { 1802 "virtual-routers": 3, 1803 "interfaces": 2, 1804 "statistics": { 1805 "discontinuity-datetime": "2016-10-24T17:11:27+02:00", 1806 "checksum-errors": 2, 1807 "version-errors": 0, 1808 "vrid-errors": 0, 1809 "ip-ttl-errors": 1 1810 } 1811 } 1812 } 1814 Authors' Addresses 1816 Xufeng Liu (editor) 1817 Jabil 1818 8281 Greensboro Drive, Suite 200 1819 McLean VA 22102 1820 USA 1822 EMail: Xufeng_Liu@jabil.com 1824 Athanasios Kyparlis 1825 Jabil 1826 8281 Greensboro Drive, Suite 200 1827 McLean VA 22102 1828 USA 1830 EMail: Athanasios_Kyparlis@jabil.com 1831 Ravi Parikh 1832 VMware 1833 3425 Hillview Avenue 1834 Palo Alto CA 94304 1835 USA 1837 EMail: parikhr@vmware.com 1839 Acee Lindem 1840 Cisco Systems 1841 301 Midenhall Way 1842 Cary NC 27513 1843 USA 1845 EMail: acee@cisco.com 1847 Mingui Zhang 1848 Huawei Technologies 1849 No. 156 Beiqing Rd. Haidian District 1850 Beijing 100095 1851 P.R. China 1853 EMail: zhangmingui@huawei.com