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