idnits 2.17.1 draft-liu-rtgwg-yang-vrrp-04.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 459: '... MUST NOT be dropped when ac...' Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 128 has weird spacing: '...address ine...' == Line 151 has weird spacing: '...address ine...' == Line 178 has weird spacing: '...address ine...' == Line 222 has weird spacing: '...address ine...' -- The document date (April 5, 2016) is 2933 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) == Missing Reference: 'RFC3768' is mentioned on line 78, but not defined ** Obsolete undefined reference: RFC 3768 (Obsoleted by RFC 5798) == Missing Reference: 'RFC2119' is mentioned on line 87, but not defined == Unused Reference: 'RFC6021' is defined on line 1172, but no explicit reference was found in the text == Unused Reference: 'RFC2234' is defined on line 1179, but no explicit reference was found in the text == Unused Reference: 'RFC2338' is defined on line 1183, but no explicit reference was found in the text == Unused Reference: 'RFC2787' is defined on line 1187, but no explicit reference was found in the text == Unused Reference: 'RFC6527' is defined on line 1194, but no explicit reference was found in the text == Unused Reference: 'RFC6087' is defined on line 1200, but no explicit reference was found in the text ** Obsolete normative reference: RFC 6021 (Obsoleted by RFC 6991) ** Obsolete normative reference: RFC 2234 (Obsoleted by RFC 4234) ** Obsolete normative reference: RFC 2338 (Obsoleted by RFC 3768) ** Obsolete normative reference: RFC 2787 (Obsoleted by RFC 6527) -- Obsolete informational reference (is this intentional?): RFC 6087 (Obsoleted by RFC 8407) Summary: 7 errors (**), 0 flaws (~~), 13 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Network Working Group X. Liu, Editor 2 Internet-Draft A. Kyparlis 3 Intended status: Standards Track R. Parikh 4 Expires: October 5, 2016 Ericsson 5 A. Lindem 6 Cisco Systems 7 M. Zhang 8 Huawei Technologies 9 April 5, 2016 11 A YANG Data Model for Virtual Router Redundancy Protocol (VRRP) 12 draft-liu-rtgwg-yang-vrrp-04.txt 14 Abstract 16 This document describes a data model for Virtual Router Redundancy 17 Protocol (VRRP). Both version 2 and version 3 of VRRP are covered. 19 Status of this Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF), its areas, and its working groups. Note that 26 other groups may also distribute working documents as Internet- 27 Drafts. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 The list of current Internet-Drafts can be accessed at 35 http://www.ietf.org/ietf/1id-abstracts.txt 37 The list of Internet-Draft Shadow Directories can be accessed at 38 http://www.ietf.org/shadow.html 40 This Internet-Draft will expire on October 5, 2016. 42 Copyright Notice 44 Copyright (c) 2016 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction...................................................2 60 1.1. Terminology...............................................2 61 2. VRRP YANG model overview.......................................3 62 3. VRRP YANG module...............................................7 63 4. Security Considerations.......................................28 64 5. Contributors..................................................28 65 6. References....................................................29 66 6.1. Normative References.....................................29 67 6.2. Informative References...................................29 69 1. Introduction 71 This document introduces a YANG [RFC6020] data model for Virtual 72 Router Redundancy Protocol (VRRP) [RFC3768][RFC5798]. VRRP provides 73 higher resiliency by specifying an election protocol that dynamically 74 assigns responsibility for a virtual router to one of the VRRP 75 routers on a LAN. 77 This YANG model supports both version 2 and version 3 of VRRP. VRRP 78 version 2 defined in [RFC3768] supports IPv4. VRRP version 3 defined 79 in [RFC5798] supports both IPv4 and IPv6. 81 1.1. Terminology 83 The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 84 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 85 "OPTIONAL" in this document are to be interpreted as described in BCP 86 14, [RFC2119]. 88 The following terms are defined in [RFC6020] and are not redefined 89 here: 91 o augment 92 o data model 94 o data node 96 2. VRRP YANG model overview 98 This document defines the YANG module "ietf-vrrp", which has the 99 following structure: 101 module: ietf-vrrp 102 augment /if:interfaces/if:interface/ip:ipv4: 103 +--rw vrrp 104 +--rw vrrp-instance* [vrid] 105 +--rw vrid uint8 106 +--rw version? enumeration 107 +--rw log-state-change? boolean 108 +--rw preempt! 109 | +--rw hold-time? uint16 110 +--rw priority? uint8 111 +--rw accept-mode? boolean 112 +--rw (advertise-interval-choice)? 113 | +--:(v2) 114 | | +--rw advertise-interval-sec? uint8 115 | +--:(v3) 116 | +--rw advertise-interval-centi-sec? uint16 117 +--rw track 118 | +--rw interfaces 119 | | +--rw interface* [interface] 120 | | +--rw interface if:interface-ref 121 | | +--rw priority-decrement? uint8 122 | +--rw networks 123 | +--rw network* [network] 124 | +--rw network inet:ipv4-prefix 125 | +--rw priority-decrement? uint8 126 +--rw virtual-ipv4-addresses 127 +--rw virtual-ipv4-address* [ipv4-address] 128 +--rw ipv4-address inet:ipv4-address 129 augment /if:interfaces/if:interface/ip:ipv6: 130 +--rw vrrp 131 +--rw vrrp-instance* [vrid] 132 +--rw vrid uint8 133 +--rw version? enumeration 134 +--rw log-state-change? boolean 135 +--rw preempt! 136 | +--rw hold-time? uint16 137 +--rw priority? uint8 138 +--rw accept-mode? boolean 139 +--rw advertise-interval-centi-sec? uint16 140 +--rw track 141 | +--rw interfaces 142 | | +--rw interface* [interface] 143 | | +--rw interface if:interface-ref 144 | | +--rw priority-decrement? uint8 145 | +--rw networks 146 | +--rw network* [network] 147 | +--rw network inet:ipv6-prefix 148 | +--rw priority-decrement? uint8 149 +--rw virtual-ipv6-addresses 150 +--rw virtual-ipv6-address* [ipv6-address] 151 +--rw ipv6-address inet:ipv6-address 152 augment /if:interfaces-state/if:interface/ip:ipv4: 153 +--ro vrrp 154 +--ro vrrp-instance* [vrid] 155 +--ro vrid uint8 156 +--ro version? enumeration 157 +--ro log-state-change? boolean 158 +--ro preempt! 159 | +--ro hold-time? uint16 160 +--ro priority? uint8 161 +--ro accept-mode? boolean 162 +--ro (advertise-interval-choice)? 163 | +--:(v2) 164 | | +--ro advertise-interval-sec? uint8 165 | +--:(v3) 166 | +--ro advertise-interval-centi-sec? uint16 167 +--ro track 168 | +--ro interfaces 169 | | +--ro interface* [interface] 170 | | +--ro interface if:interface-ref 171 | | +--ro priority-decrement? uint8 172 | +--ro networks 173 | +--ro network* [network] 174 | +--ro network inet:ipv4-prefix 175 | +--ro priority-decrement? uint8 176 +--ro virtual-ipv4-addresses 177 | +--ro virtual-ipv4-address* [ipv4-address] 178 | +--ro ipv4-address inet:ipv4-address 179 +--ro state? identityref 180 +--ro is-owner? boolean 181 +--ro last-adv-source? inet:ip-address 182 +--ro up-time? yang:date-and-time 183 +--ro master-down-interval? uint32 184 +--ro skew-time? uint32 185 +--ro last-event? string 186 +--ro new-master-reason? new-master-reason-type 187 +--ro statistics 188 +--ro discontinuity-time? yang:date-and-time 189 +--ro master-transitions? yang:counter32 190 +--ro advertisement-recv? yang:counter64 191 +--ro advertisement-sent? yang:counter64 192 +--ro interval-errors? yang:counter64 193 {validate-interval-errors}? 194 +--ro priority-zero-pkts-rcvd? yang:counter64 195 +--ro priority-zero-pkts-sent? yang:counter64 196 +--ro invalid-type-pkts-rcvd? yang:counter64 197 +--ro address-list-errors? yang:counter64 198 {validate-address-list-errors}? 199 +--ro packet-length-errors? yang:counter64 200 augment /if:interfaces-state/if:interface/ip:ipv6: 201 +--ro vrrp 202 +--ro vrrp-instance* [vrid] 203 +--ro vrid uint8 204 +--ro version? enumeration 205 +--ro log-state-change? boolean 206 +--ro preempt! 207 | +--ro hold-time? uint16 208 +--ro priority? uint8 209 +--ro accept-mode? boolean 210 +--ro advertise-interval-centi-sec? uint16 211 +--ro track 212 | +--ro interfaces 213 | | +--ro interface* [interface] 214 | | +--ro interface if:interface-ref 215 | | +--ro priority-decrement? uint8 216 | +--ro networks 217 | +--ro network* [network] 218 | +--ro network inet:ipv6-prefix 219 | +--ro priority-decrement? uint8 220 +--ro virtual-ipv6-addresses 221 | +--ro virtual-ipv6-address* [ipv6-address] 222 | +--ro ipv6-address inet:ipv6-address 223 +--ro state? identityref 224 +--ro is-owner? boolean 225 +--ro last-adv-source? inet:ip-address 226 +--ro up-time? yang:date-and-time 227 +--ro master-down-interval? uint32 228 +--ro skew-time? uint32 229 +--ro last-event? string 230 +--ro new-master-reason? new-master-reason-type 231 +--ro statistics 232 +--ro discontinuity-time? yang:date-and-time 233 +--ro master-transitions? yang:counter32 234 +--ro advertisement-recv? yang:counter64 235 +--ro advertisement-sent? yang:counter64 236 +--ro interval-errors? yang:counter64 237 {validate-interval-errors}? 238 +--ro priority-zero-pkts-rcvd? yang:counter64 239 +--ro priority-zero-pkts-sent? yang:counter64 240 +--ro invalid-type-pkts-rcvd? yang:counter64 241 +--ro address-list-errors? yang:counter64 242 {validate-address-list-errors}? 243 +--ro packet-length-errors? yang:counter64 244 augment /if:interfaces-state: 245 +--ro vrrp-global 246 +--ro virtual-routers? uint32 247 +--ro interfaces? uint32 248 +--ro checksum-errors? yang:counter64 249 +--ro version-errors? yang:counter64 250 +--ro vrid-errors? yang:counter64 251 +--ro ip-ttl-errors? yang:counter64 252 +--ro global-statistics-discontinuity-time? yang:date-and- 253 time 254 notifications: 255 +---n vrrp-new-master-event 256 | +--ro master-ipaddr? inet:ipv4-address 257 | +--ro new-master-reason? new-master-reason-type 258 +---n vrrp-protocol-error-event 259 | +--ro protocol-error-reason? enumeration 260 +---n vrrp-virtual-router-error-event 261 +--ro interface? if:interface-ref 262 +--ro ip-version? enumeration 263 +--ro vrid-v4? leafref 264 +--ro vrid-v6? leafref 265 +--ro virtual-router-error-reason? enumeration 267 3. VRRP YANG module 269 file "ietf-vrrp@2015-09-28.yang" 270 module ietf-vrrp { 271 namespace "urn:ietf:params:xml:ns:yang:ietf-vrrp"; 272 // replace with IANA namespace when assigned 273 prefix vrrp; 275 import ietf-inet-types { 276 prefix "inet"; 277 } 279 import ietf-yang-types { 280 prefix "yang"; 281 } 283 import ietf-interfaces { 284 prefix if; 285 } 287 import ietf-ip { 288 prefix ip; 289 } 291 organization "TBD"; 292 contact "TBD"; 293 description 294 "This YANG module defines a model for managing Virtual Router 295 Redundancy Protocol (VRRP) version 2 and version 3."; 297 revision "2015-09-28" { 298 description "Initial revision"; 299 reference 300 "RFC 2787: Definitions of Managed Objects for the Virtual 301 Router Redundancy Protocol. 302 RFC 3768: Virtual Router Redundancy Protocol (VRRP). 303 RFC 5798: Virtual Router Redundancy Protocol (VRRP) Version 304 3. 305 RFC 6527: Definitions of Managed Objects for the Virtual 306 Router Redundancy Protocol Version 3 (VRRPv3)."; 307 } 309 /* 310 * Features 311 */ 313 feature validate-interval-errors { 314 description 315 "This feature indicates that the system validates that 316 the advertisement interval from advertisement packets 317 received is the same as the one configured for the local 318 VRRP router."; 319 } 321 feature validate-address-list-errors { 322 description 323 "This feature indicates that the system validates that 324 the address list from received packets matches the 325 locally configured list for the VRRP router."; 326 } 328 /* 329 * Typedefs 330 */ 332 typedef new-master-reason-type { 333 type enumeration { 334 enum not-master { 335 description 336 "The virtual router has never transitioned to master 337 state,"; 338 } 339 enum priority { 340 description "Priority was higher."; 341 } 342 enum preempted { 343 description "The master was preempted."; 344 } 345 enum master-no-response { 346 description "Previous master did not respond."; 347 } 348 } 349 description 350 "The reason for the virtual router to transition to master 351 state."; 352 } // new-master-reason-type 354 /* 355 * Identities 356 */ 358 identity vrrp-state-type { 359 description 360 "The type to indicate the state of a virtual router."; 361 } 362 identity initialize { 363 base vrrp-state-type; 364 description 365 "Indicates that the virtual router is waiting 366 for a startup event."; 367 } 368 identity backup { 369 base vrrp-state-type; 370 description 371 "Indicates that the virtual router is monitoring the 372 availability of the master router."; 373 } 374 identity master { 375 base vrrp-state-type; 376 description 377 "Indicates that the virtual router is forwarding 378 packets for IP addresses that are associated with 379 this virtual router."; 381 } 383 /* 384 * Groupings 385 */ 387 grouping vrrp-common-attributes { 388 description 389 "Group of VRRP attributes common to version 2 and version 3"; 391 leaf vrid { 392 type uint8 { 393 range 1..255; 394 } 395 description "Virtual router ID."; 396 } 398 leaf version { 399 type enumeration { 400 enum 2 { 401 description "VRRP version 2."; 402 } 403 enum 3 { 404 description "VRRP version 3."; 405 } 406 } 407 description "Version 2 or version 3 of VRRP."; 408 } 410 leaf log-state-change { 411 type boolean; 412 description 413 "Generates VRRP state change messages each time the VRRP 414 instance changes state (from up to down or down to up)."; 415 } 417 container preempt { 418 presence "Present if preempt is enabled."; 419 description 420 "Enables a higher priority Virtual Router Redundancy 421 Protocol (VRRP) backup router to preempt a lower priority 422 VRRP master."; 423 leaf hold-time { 424 type uint16; 425 description 426 "Hold time, in seconds, for which a higher priority VRRP 427 backup router must wait before preempting a lower priority 428 VRRP master."; 429 } 430 } 432 leaf priority { 433 type uint8 { 434 range 1..254; 435 } 436 default 100; 437 description 438 "Configures the Virtual Router Redundancy Protocol (VRRP) 439 election priority for the backup virtual router."; 440 } 441 } // vrrp-common-attributes 443 grouping vrrp-v3-attributes { 444 description 445 "Group of VRRP versin 3 attributes."; 447 leaf accept-mode { 448 type boolean; 449 default false; 450 description 451 "Controls whether a virtual router in Master state will 452 accept packets addressed to the address owner's IPvX address 453 as its own if it is not the IPvX address owner. The default 454 is false. Deployments that rely on, for example, pinging the 455 address owner's IPvX address may wish to configure 456 accept-mode to true. 458 Note: IPv6 Neighbor Solicitations and Neighbor Advertisements 459 MUST NOT be dropped when accept-mode is false."; 460 } 461 } 462 grouping vrrp-ipv4-attributes { 463 description 464 "Group of VRRP attributes for IPv4."; 466 uses vrrp-common-attributes; 468 uses vrrp-v3-attributes { 469 when "version = 3" { 470 description "Applicable only to version 3."; 471 } 472 } 474 choice advertise-interval-choice { 475 description 476 "The options for the advertisement interval at which VRRPv2 477 or VRRPv3 advertisements are sent from the specified 478 interface."; 480 case v2 { 481 when "version = 2" { 482 description "Applicable only to version 2."; 483 } 484 leaf advertise-interval-sec { 485 type uint8 { 486 range 1..254; 487 } 488 default 1; 489 description 490 "Configures the interval that Virtual Router 491 Redundancy Protocol Version 2 (VRRPv2) advertisements 492 are sent from the specified interface."; 493 } 494 } 496 case v3 { 497 when "version = 3" { 498 description "Applicable only to version 3."; 499 } 500 leaf advertise-interval-centi-sec { 501 type uint16 { 502 range 1..4095; 504 } 505 units centiseconds; 506 default 100; 507 description 508 "Configures the interval that Virtual Router 509 Redundancy Protocol version 3 (VRRPv3) advertisements 510 are sent from the specified interface."; 511 } 512 } 513 } // advertise-interval-choice 515 container track { 516 description 517 "Enables the specified VRRP instance to track interfaces 518 or networks."; 519 container interfaces { 520 description 521 "Enables the specified Virtual Router Redundancy Protocol 522 version 2 (VRRP) or version 3 (VRRPv3) instance to track 523 an interface."; 525 list interface { 526 key "interface"; 527 description 528 "Interface to track."; 530 leaf interface { 531 type if:interface-ref; 532 must "../../../../../../../ipv4" { 533 description "Interface is IPv4."; 534 } 535 description 536 "Interface to track."; 537 } 539 leaf priority-decrement { 540 type uint8 { 541 range 1..254; 542 } 543 description 544 "Specifies how much to decrement the priority of the 545 VRRP instance if the interface goes down."; 546 } 547 } // track-interface 548 } // track-interfaces 550 container networks { 551 description 552 "Enables the backup Virtual Router Redundancy Protocol 553 version 2 (VRRP) or version 3 (VRRPv3) router to track a 554 specified network through the IP network prefix of that 555 network."; 556 list network { 557 key "network"; 558 description 559 "Enables the specified Virtual Router Redundancy 560 Protocol version 2 (VRRP) or version 3 (VRRPv3) 561 instance to track an interface."; 563 leaf network { 564 type inet:ipv4-prefix; 565 description 566 "Network to track."; 567 } 569 leaf priority-decrement { 570 type uint8 { 571 range 1..254; 572 } 573 default 10; 574 description 575 "Specifies how much to decrement the priority of the 576 backup VRRP router if there is a failure in the IP 577 network."; 578 } 579 } // track-network 580 } // track-networks 581 } // track 583 container virtual-ipv4-addresses { 584 description 585 "Configures the virtual IP address for the Virtual Router 586 Redundancy Protocol (VRRP) interface."; 588 list virtual-ipv4-address { 589 key "ipv4-address"; 590 max-elements 16; 591 description 592 "Virtual IP addresses for a single VRRP instance. For a 593 VRRP owner router, the virtual address must match one 594 of the IP addresses configured on the interface 595 corresponding to the virtual router."; 597 leaf ipv4-address { 598 type inet:ipv4-address; 599 description 600 "Virtual IPv4 address."; 601 } 602 } // virtual-ipv4-address 603 } // virtual-ipv4-addresses 604 } // grouping vrrp-ipv4-attributes 606 grouping vrrp-ipv6-attributes { 607 description 608 "Group of VRRP attributes for IPv6."; 610 uses vrrp-common-attributes; 612 uses vrrp-v3-attributes { 613 when "version = 3" { 614 description "Uses VRRP version 3 attributes."; 615 } 616 } // uses vrrp-v3-attributes 618 leaf advertise-interval-centi-sec { 619 type uint16 { 620 range 1..4095; 621 } 622 units centiseconds; 623 default 100; 624 description 625 "Configures the interval that Virtual Router 626 Redundancy Protocol version 3 (VRRPv3) advertisements 627 are sent from the specified interface."; 628 } 630 container track { 631 description 632 "Enables the specified VRRP instance to track interfaces 633 or networks."; 634 container interfaces { 635 description 636 "Enables the specified Virtual Router Redundancy Protocol 637 version 2 (VRRP) or version 3 (VRRPv3) instance to track 638 an interface."; 639 list interface { 640 key "interface"; 641 description 642 "Interface to track."; 644 leaf interface { 645 type if:interface-ref; 646 must "../../../../../../../ipv6" { 647 description "Interface is IPv6."; 648 } 649 description 650 "Interface to track."; 651 } 653 leaf priority-decrement { 654 type uint8 { 655 range 1..254; 656 } 657 description 658 "Specifies how much to decrement the priority of the 659 VRRP instance if the interface goes down."; 660 } 661 } // track-interface 662 } // track-interfaces 664 container networks { 665 description 666 "Enables the backup Virtual Router Redundancy Protocol 667 version 2 (VRRP) or version 3 (VRRPv3) router to track a 668 specified network through the IP network prefix of that 669 network."; 670 list network { 671 key "network"; 672 description 673 "Enables the specified Virtual Router Redundancy 674 Protocol version 2 (VRRP) or version 3 (VRRPv3) 675 instance to track an interface."; 677 leaf network { 678 type inet:ipv6-prefix; 679 description 680 "Network to track."; 681 } 683 leaf priority-decrement { 684 type uint8 { 685 range 1..254; 686 } 687 default 10; 688 description 689 "Specifies how much to decrement the priority of the 690 backup VRRP router if there is a failure in the IP 691 network."; 692 } 693 } // track-network 694 } // track-networks 695 } // track 697 container virtual-ipv6-addresses { 698 description 699 "Configures the virtual IP address for the Virtual Router 700 Redundancy Protocol (VRRP) interface."; 701 list virtual-ipv6-address { 702 key "ipv6-address"; 703 max-elements 2; 704 description 705 "Two IPv6 addresses are allowed. The first one must be 706 a link-local address and the second one can be a 707 link-local or global address."; 709 leaf ipv6-address { 710 type inet:ipv6-address; 711 description 712 "Virtual IPv6 address."; 713 } 714 } // virtual-ipv6-address 715 } // virtual-ipv6-addresses 716 } // grouping vrrp-ipv6-attributes 718 grouping vrrp-state-attributes { 719 description 720 "Group of VRRP state attributes."; 722 leaf state { 723 type identityref { 724 base vrrp-state-type; 725 } 726 description 727 "Operational state."; 728 } 730 leaf is-owner { 731 type boolean; 732 description 733 "Set to true if this virtual router is owner."; 734 } 736 leaf last-adv-source { 737 type inet:ip-address; 738 description 739 "Last advertised IPv4/IPv6 source address"; 740 } 742 leaf up-time { 743 type yang:date-and-time; 744 description 745 "The time when this virtual router 746 transitioned out of init state."; 747 } 749 leaf master-down-interval { 750 type uint32; 751 units centiseconds; 752 description 753 "Time interval for backup virtual router to declare 754 Master down."; 755 } 757 leaf skew-time { 758 type uint32; 759 units microseconds; 760 description 761 "Calculated based on the priority and advertisement 762 interval configuration command parameters. See RFC 3768."; 763 } 765 leaf last-event { 766 type string; 767 description 768 "Last reported event."; 769 } 771 leaf new-master-reason { 772 type new-master-reason-type; 773 description 774 "Indicates the reason for the virtual router to transition 775 to master state."; 776 } 778 container statistics { 779 description 780 "VRRP statistics."; 782 leaf discontinuity-time { 783 type yang:date-and-time; 784 description 785 "The time on the most recent occasion at which any one or 786 more of the VRRP statistic counters suffered a 787 discontinuity. If no such discontinuities have occurred 788 since the last re-initialization of the local management 789 subsystem, then this node contains the time that the 790 local management subsystem re-initialized itself."; 792 } 794 leaf master-transitions { 795 type yang:counter32; 796 description 797 "The total number of times that this virtual router's 798 state has transitioned to master"; 799 } 801 leaf advertisement-recv { 802 type yang:counter64; 803 description 804 "The total number of VRRP advertisements received by 805 this virtual router."; 806 } 808 leaf advertisement-sent { 809 type yang:counter64; 810 description 811 "The total number of VRRP advertisements sent by 812 this virtual router."; 813 } 815 leaf interval-errors { 816 if-feature validate-interval-errors; 817 type yang:counter64; 818 description 819 "The total number of VRRP advertisement packets 820 received with an advertisement interval 821 different than the one configured for the local 822 virtual router"; 823 } 825 leaf priority-zero-pkts-rcvd { 826 type yang:counter64; 827 description 828 "The total number of VRRP packets received by the 829 virtual router with a priority of 0."; 830 } 832 leaf priority-zero-pkts-sent { 833 type yang:counter64; 834 description 835 "The total number of VRRP packets sent by the 836 virtual router with a priority of 0."; 837 } 839 leaf invalid-type-pkts-rcvd { 840 type yang:counter64; 841 description 842 "The number of VRRP packets received by the virtual 843 router with an invalid value in the 'type' field."; 844 } 846 leaf address-list-errors { 847 if-feature validate-address-list-errors; 848 type yang:counter64; 849 description 850 "The total number of packets received with an 851 address list that does not match the locally 852 configured address list for the virtual router."; 853 } 855 leaf packet-length-errors { 856 type yang:counter64; 857 description 858 "The total number of packets received with a packet 859 length less than the length of the VRRP header."; 860 } 861 } // container statistics 862 } // grouping vrrp-state-attributes 864 grouping vrrp-global-state-attributes { 865 description 866 "Group of VRRP global state attributes."; 868 leaf virtual-routers { 869 type uint32; 870 description "Number of configured virtual routers."; 871 } 873 leaf interfaces { 874 type uint32; 875 description "Number of interface with VRRP configured."; 876 } 878 leaf checksum-errors { 879 type yang:counter64; 880 description 881 "The total number of VRRP packets received with an invalid 882 VRRP checksum value."; 883 reference "RFC 5798, Section 5.2.8"; 884 } 886 leaf version-errors { 887 type yang:counter64; 888 description 889 "The total number of VRRP packets received with an unknown 890 or unsupported version number."; 891 reference "RFC 5798, Section 5.2.1"; 892 } 894 leaf vrid-errors { 895 type yang:counter64; 896 description 897 "The total number of VRRP packets received with a VRID that 898 is not valid for any virtual router on this router."; 899 reference "RFC 5798, Section 5.2.3"; 900 } 902 leaf ip-ttl-errors { 903 type yang:counter64; 904 description 905 "The total number of VRRP packets received by the 906 virtual router with IP TTL (Time-To-Live) not equal 907 to 255."; 908 reference "RFC 5798, Sections 5.1.1.3 and 5.1.2.3."; 909 } 911 leaf global-statistics-discontinuity-time { 912 type yang:date-and-time; 913 description 914 "The time on the most recent occasion at which one of 915 router-checksum-errors, router-version-errors, 916 router-vrid-errors, and ip-ttl-errors suffered a 917 discontinuity. 919 If no such discontinuities have occurred since the last 920 re-initialization of the local management subsystem, 921 then this object will be 0."; 922 } 923 } // vrrp-global-state-attributes 925 /* 926 * Configuration data nodes 927 */ 929 augment "/if:interfaces/if:interface/ip:ipv4" { 930 description "Augment IPv4 interface."; 932 container vrrp { 933 description 934 "Configures the Virtual Router Redundancy Protocol (VRRP) 935 version 2 or version 3 for IPv4."; 937 list vrrp-instance { 938 key vrid; 939 description 940 "Defines a virtual router, identified by a virtual router 941 identifier (VRID), within IPv4 address space."; 943 uses vrrp-ipv4-attributes; 944 } 945 } 946 } // augment ipv4 948 augment "/if:interfaces/if:interface/ip:ipv6" { 949 description "Augment IPv6 interface."; 951 container vrrp { 952 description 953 "Configures the Virtual Router Redundancy Protocol (VRRP) 954 version 3 for IPv6."; 956 list vrrp-instance { 957 must "version = 3" { 958 description 959 "IPv6 is only supported by version 3."; 960 } 961 key vrid; 962 description 963 "Defines a virtual router, identified by a virtual router 964 identifier (VRID), within IPv6 address space."; 966 uses vrrp-ipv6-attributes; 967 } // list vrrp-instance 968 } // container vrrp 969 } // augment ipv6 971 /* 972 * Operational state data nodes 973 */ 975 augment "/if:interfaces-state/if:interface/ip:ipv4" { 976 description "Augment IPv4 interface state."; 978 container vrrp { 979 description 980 "State information for Virtual Router Redundancy Protocol 981 (VRRP) version 2 for IPv4."; 983 list vrrp-instance { 984 key vrid; 985 description 986 "States of a virtual router, identified by a virtual router 987 identifier (VRID), within IPv4 address space."; 989 uses vrrp-ipv4-attributes; 990 uses vrrp-state-attributes; 991 } // list vrrp-instance 992 } 993 } 995 augment "/if:interfaces-state/if:interface/ip:ipv6" { 996 description "Augment IPv6 interface state."; 997 container vrrp { 998 description 999 "State information of the Virtual Router Redundancy Protocol 1000 (VRRP) version 2 or version 3 for IPv6."; 1002 list vrrp-instance { 1003 key vrid; 1004 description 1005 "States of a virtual router, identified by a virtual router 1006 identifier (VRID), within IPv6 address space."; 1008 uses vrrp-ipv6-attributes; 1009 uses vrrp-state-attributes; 1010 } // list vrrp-instance 1011 } 1012 } 1014 augment "/if:interfaces-state" { 1015 description "Specify VRRP state data at the global level."; 1017 container vrrp-global { 1018 description 1019 "State information of the Virtual Router Redundancy Protocol 1020 (VRRP) at the global level"; 1022 uses vrrp-global-state-attributes; 1023 } 1024 } 1026 /* 1027 * Notifications 1028 */ 1030 notification vrrp-new-master-event { 1031 description 1032 "Notification event for a change of VRRP new master."; 1033 leaf master-ipaddr { 1034 type inet:ipv4-address; 1035 description 1036 "IPv4 or IPv6 address of the new master."; 1038 } 1039 leaf new-master-reason { 1040 type new-master-reason-type; 1041 description 1042 "Indicates the reason for the virtual router to transition 1043 to master state."; 1044 } 1045 } 1047 notification vrrp-protocol-error-event { 1048 description 1049 "Notification event for a VRRP protocol error."; 1050 leaf protocol-error-reason { 1051 type enumeration { 1052 enum checksum-error { 1053 description 1054 "A packet has been received with an invalid VRRP checksum 1055 value."; 1056 } 1057 enum version-error { 1058 description 1059 "A packet has been received with an unknown or 1060 unsupported version number."; 1061 } 1062 enum vrid-error { 1063 description 1064 "A packet has been received with a VRID that is not valid 1065 for any virtual router on this router."; 1066 } 1067 enum ip-ttl-error { 1068 description 1069 "A packet has been received with IP TTL (Time-To-Live) 1070 not equal to 255."; 1071 } 1072 } 1073 description 1074 "Indicates the reason for the protocol error."; 1075 } 1076 } 1078 notification vrrp-virtual-router-error-event { 1079 description 1080 "Notification event for a error happened on a virtual router."; 1081 leaf interface { 1082 type if:interface-ref; 1083 description 1084 "Indicates the interface for which statistics area 1085 to be cleared."; 1086 } 1087 leaf ip-version { 1088 type enumeration { 1089 enum 4 { 1090 description "IPv4"; 1091 } 1092 enum 6 { 1093 description "IPv6"; 1094 } 1095 } 1096 description "Indicates the IP version."; 1097 } 1098 leaf vrid-v4 { 1099 type leafref { 1100 path "/if:interfaces/if:interface" 1101 + "[if:name = current()/../interface]/ip:ipv4/vrrp/" 1102 + "vrrp-instance/vrid"; 1103 } 1104 description 1105 "Indicates the virtual router on which the event has 1106 occured."; 1107 } 1109 leaf vrid-v6 { 1110 type leafref { 1111 path "/if:interfaces/if:interface" 1112 + "[if:name = current()/../interface]/ip:ipv6/vrrp/" 1113 + "vrrp-instance/vrid"; 1114 } 1115 description 1116 "Indicates the virtual router on which the event has 1117 occured."; 1118 } 1119 leaf virtual-router-error-reason { 1120 type enumeration { 1121 enum interval-error { 1122 description 1123 "A packet has been received with an advertisement 1124 interval different than the one configured for the local 1125 virtual router"; 1126 } 1127 enum address-list-error { 1128 description 1129 "A packet has been received with an address list that 1130 does not match the locally configured address list for 1131 the virtual router."; 1132 } 1133 enum packet-length-error { 1134 description 1135 "A packet has been received with a packet length less 1136 than the length of the VRRP header."; 1137 } 1138 } 1139 description 1140 "Indicates the reason for the virtual router error."; 1141 } 1142 } 1143 } 1144 1146 4. Security Considerations 1148 The configuration, state, action and notification data defined in 1149 this document are designed to be accessed via the NETCONF protocol 1150 [RFC6241]. The data-model by itself does not create any security 1151 implications. The security considerations for the NETCONF protocol 1152 are applicable. The NETCONF protocol used for sending the data 1153 supports authentication and encryption. 1155 5. Contributors 1157 Yuyang Xie 1158 Huawei Technologies 1159 No. 156 Beiqing Rd. Haidian District 1160 Beijing 100095 1161 P.R. China 1162 Email: xieyuyang@huawei.com 1164 6. References 1166 6.1. Normative References 1168 [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the 1169 Network Configuration Protocol (NETCONF)", RFC 6020, 1170 October 2010. 1172 [RFC6021] Schoenwaelder, J., "Common YANG Data Types", RFC 6021, 1173 October 2010. 1175 [RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A. Bierman, 1176 "Network Configuration Protocol (NETCONF)", RFC 6241, June 1177 2011. 1179 [RFC2234] Crocker, D. and Overell, P.(Editors), "Augmented BNF for 1180 Syntax Specifications: ABNF", RFC 2234, Internet Mail 1181 Consortium and Demon Internet Ltd., November 1997. 1183 [RFC2338] Knight, S., Weaver, D., Whipple, D., Hinden, R., Mitzel, 1184 D., Hunt, P., Higginson, P., Shand, M., and A. Lindem, 1185 "Virtual Router Redundancy Protocol", RFC 2338, April 1998. 1187 [RFC2787] Jewell, B. and D. Chuang, "Definitions of Managed Objects 1188 for the Virtual Router Redundancy Protocol", RFC 2787, 1189 March 2000. 1191 [RFC5798] Nadas, S., Ed., "Virtual Router Redundancy Protocol (VRRP) 1192 Version 3 for IPv4 and IPv6", RFC 5798, March 2010. 1194 [RFC6527] Tata, K., Ed., "Definitions of Managed Objects for the 1195 Virtual Router Redundancy Protocol Version 3 (VRRPv3)", RFC 1196 6527, March 2012. 1198 6.2. Informative References 1200 [RFC6087] Bierman, A., "Guidelines for Authors and Reviewers of YANG 1201 Data Model Documents", RFC 6087, January 2011. 1203 Authors' Addresses 1205 Xufeng Liu (Editor) 1206 Ericsson 1207 1595 Spring Hill Road, Suite 500 1208 Vienna, VA 22182 1209 USA 1211 Email: xliu@kuatrotech.com 1213 Athanasios Kyparlis 1214 Ericsson 1215 1595 Spring Hill Road, Suite 500 1216 Vienna, VA 22182 1217 USA 1219 Email: athanasios.kyparlis@ericsson.com 1221 Ravi Parikh 1222 Ericsson 1223 300 Holger Way 1224 San Jose, CA 95134 1225 USA 1227 Email: ravi.parikh@ericsson.com 1229 Acee Lindem 1230 Cisco Systems 1231 301 Midenhall Way 1232 Cary, NC 27513 1233 USA 1235 Email: acee@cisco.com 1237 Mingui Zhang 1238 Huawei Technologies 1239 No. 156 Beiqing Rd. Haidian District 1240 Beijing 100095 1241 P.R. China 1243 Email: zhangmingui@huawei.com