idnits 2.17.00 (12 Aug 2021) /tmp/idnits60103/draft-ietf-rtgwg-yang-vrrp-00.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 457: '... 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 127 has weird spacing: '...address ine...' == Line 150 has weird spacing: '...address ine...' == Line 177 has weird spacing: '...address ine...' == Line 221 has weird spacing: '...address ine...' -- The document date (June 27, 2016) is 2154 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 77, but not defined ** Obsolete undefined reference: RFC 3768 (Obsoleted by RFC 5798) == Missing Reference: 'RFC2119' is mentioned on line 86, but not defined == Unused Reference: 'RFC6021' is defined on line 1162, but no explicit reference was found in the text == Unused Reference: 'RFC2234' is defined on line 1169, but no explicit reference was found in the text == Unused Reference: 'RFC2338' is defined on line 1173, but no explicit reference was found in the text == Unused Reference: 'RFC2787' is defined on line 1177, but no explicit reference was found in the text == Unused Reference: 'RFC6527' is defined on line 1184, but no explicit reference was found in the text == Unused Reference: 'RFC6087' is defined on line 1190, 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: December 27, 2016 Ericsson 5 A. Lindem 6 Cisco Systems 7 M. Zhang 8 Huawei Technologies 9 June 27, 2016 11 A YANG Data Model for Virtual Router Redundancy Protocol (VRRP) 12 draft-ietf-rtgwg-yang-vrrp-00.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 December 27, 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. References....................................................28 65 5.1. Normative References.....................................28 66 5.2. Informative References...................................29 68 1. Introduction 70 This document introduces a YANG [RFC6020] data model for Virtual 71 Router Redundancy Protocol (VRRP) [RFC3768][RFC5798]. VRRP provides 72 higher resiliency by specifying an election protocol that dynamically 73 assigns responsibility for a virtual router to one of the VRRP 74 routers on a LAN. 76 This YANG model supports both version 2 and version 3 of VRRP. VRRP 77 version 2 defined in [RFC3768] supports IPv4. VRRP version 3 defined 78 in [RFC5798] supports both IPv4 and IPv6. 80 1.1. Terminology 82 The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 83 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 84 "OPTIONAL" in this document are to be interpreted as described in BCP 85 14, [RFC2119]. 87 The following terms are defined in [RFC6020] and are not redefined 88 here: 90 o augment 92 o data model 93 o data node 95 2. VRRP YANG model overview 97 This document defines the YANG module "ietf-vrrp", which has the 98 following structure: 100 module: ietf-vrrp 101 augment /if:interfaces/if:interface/ip:ipv4: 102 +--rw vrrp 103 +--rw vrrp-instance* [vrid] 104 +--rw vrid uint8 105 +--rw version? enumeration 106 +--rw log-state-change? boolean 107 +--rw preempt! 108 | +--rw hold-time? uint16 109 +--rw priority? uint8 110 +--rw accept-mode? boolean 111 +--rw (advertise-interval-choice)? 112 | +--:(v2) 113 | | +--rw advertise-interval-sec? uint8 114 | +--:(v3) 115 | +--rw advertise-interval-centi-sec? uint16 116 +--rw track 117 | +--rw interfaces 118 | | +--rw interface* [interface] 119 | | +--rw interface if:interface-ref 120 | | +--rw priority-decrement? uint8 121 | +--rw networks 122 | +--rw network* [network] 123 | +--rw network inet:ipv4-prefix 124 | +--rw priority-decrement? uint8 125 +--rw virtual-ipv4-addresses 126 +--rw virtual-ipv4-address* [ipv4-address] 127 +--rw ipv4-address inet:ipv4-address 128 augment /if:interfaces/if:interface/ip:ipv6: 129 +--rw vrrp 130 +--rw vrrp-instance* [vrid] 131 +--rw vrid uint8 132 +--rw version? enumeration 133 +--rw log-state-change? boolean 134 +--rw preempt! 135 | +--rw hold-time? uint16 136 +--rw priority? uint8 137 +--rw accept-mode? boolean 138 +--rw advertise-interval-centi-sec? uint16 139 +--rw track 140 | +--rw interfaces 141 | | +--rw interface* [interface] 142 | | +--rw interface if:interface-ref 143 | | +--rw priority-decrement? uint8 144 | +--rw networks 145 | +--rw network* [network] 146 | +--rw network inet:ipv6-prefix 147 | +--rw priority-decrement? uint8 148 +--rw virtual-ipv6-addresses 149 +--rw virtual-ipv6-address* [ipv6-address] 150 +--rw ipv6-address inet:ipv6-address 151 augment /if:interfaces-state/if:interface/ip:ipv4: 152 +--ro vrrp 153 +--ro vrrp-instance* [vrid] 154 +--ro vrid uint8 155 +--ro version? enumeration 156 +--ro log-state-change? boolean 157 +--ro preempt! 158 | +--ro hold-time? uint16 159 +--ro priority? uint8 160 +--ro accept-mode? boolean 161 +--ro (advertise-interval-choice)? 162 | +--:(v2) 163 | | +--ro advertise-interval-sec? uint8 164 | +--:(v3) 165 | +--ro advertise-interval-centi-sec? uint16 166 +--ro track 167 | +--ro interfaces 168 | | +--ro interface* [interface] 169 | | +--ro interface if:interface-ref 170 | | +--ro priority-decrement? uint8 171 | +--ro networks 172 | +--ro network* [network] 173 | +--ro network inet:ipv4-prefix 174 | +--ro priority-decrement? uint8 175 +--ro virtual-ipv4-addresses 176 | +--ro virtual-ipv4-address* [ipv4-address] 177 | +--ro ipv4-address inet:ipv4-address 178 +--ro state? identityref 179 +--ro is-owner? boolean 180 +--ro last-adv-source? inet:ip-address 181 +--ro up-time? yang:date-and-time 182 +--ro master-down-interval? uint32 183 +--ro skew-time? uint32 184 +--ro last-event? string 185 +--ro new-master-reason? new-master-reason-type 186 +--ro statistics 187 +--ro discontinuity-time? yang:date-and-time 188 +--ro master-transitions? yang:counter32 189 +--ro advertisement-recv? yang:counter64 190 +--ro advertisement-sent? yang:counter64 191 +--ro interval-errors? yang:counter64 192 {validate-interval-errors}? 193 +--ro priority-zero-pkts-rcvd? yang:counter64 194 +--ro priority-zero-pkts-sent? yang:counter64 195 +--ro invalid-type-pkts-rcvd? yang:counter64 196 +--ro address-list-errors? yang:counter64 197 {validate-address-list-errors}? 198 +--ro packet-length-errors? yang:counter64 199 augment /if:interfaces-state/if:interface/ip:ipv6: 200 +--ro vrrp 201 +--ro vrrp-instance* [vrid] 202 +--ro vrid uint8 203 +--ro version? enumeration 204 +--ro log-state-change? boolean 205 +--ro preempt! 206 | +--ro hold-time? uint16 207 +--ro priority? uint8 208 +--ro accept-mode? boolean 209 +--ro advertise-interval-centi-sec? uint16 210 +--ro track 211 | +--ro interfaces 212 | | +--ro interface* [interface] 213 | | +--ro interface if:interface-ref 214 | | +--ro priority-decrement? uint8 215 | +--ro networks 216 | +--ro network* [network] 217 | +--ro network inet:ipv6-prefix 218 | +--ro priority-decrement? uint8 219 +--ro virtual-ipv6-addresses 220 | +--ro virtual-ipv6-address* [ipv6-address] 221 | +--ro ipv6-address inet:ipv6-address 222 +--ro state? identityref 223 +--ro is-owner? boolean 224 +--ro last-adv-source? inet:ip-address 225 +--ro up-time? yang:date-and-time 226 +--ro master-down-interval? uint32 227 +--ro skew-time? uint32 228 +--ro last-event? string 229 +--ro new-master-reason? new-master-reason-type 230 +--ro statistics 231 +--ro discontinuity-time? yang:date-and-time 232 +--ro master-transitions? yang:counter32 233 +--ro advertisement-recv? yang:counter64 234 +--ro advertisement-sent? yang:counter64 235 +--ro interval-errors? yang:counter64 236 {validate-interval-errors}? 237 +--ro priority-zero-pkts-rcvd? yang:counter64 238 +--ro priority-zero-pkts-sent? yang:counter64 239 +--ro invalid-type-pkts-rcvd? yang:counter64 240 +--ro address-list-errors? yang:counter64 241 {validate-address-list-errors}? 242 +--ro packet-length-errors? yang:counter64 243 augment /if:interfaces-state: 244 +--ro vrrp-global 245 +--ro virtual-routers? uint32 246 +--ro interfaces? uint32 247 +--ro checksum-errors? yang:counter64 248 +--ro version-errors? yang:counter64 249 +--ro vrid-errors? yang:counter64 250 +--ro ip-ttl-errors? yang:counter64 251 +--ro global-statistics-discontinuity-time? yang:date-and- 252 time 253 notifications: 254 +---n vrrp-new-master-event 255 | +--ro master-ipaddr? inet:ipv4-address 256 | +--ro new-master-reason? new-master-reason-type 257 +---n vrrp-protocol-error-event 258 | +--ro protocol-error-reason? enumeration 259 +---n vrrp-virtual-router-error-event 260 +--ro interface? if:interface-ref 261 +--ro ip-version? enumeration 262 +--ro vrid-v4? leafref 263 +--ro vrid-v6? leafref 264 +--ro virtual-router-error-reason? enumeration 266 3. VRRP YANG module 268 file "ietf-vrrp@2015-09-28.yang" 269 module ietf-vrrp { 270 namespace "urn:ietf:params:xml:ns:yang:ietf-vrrp"; 271 // replace with IANA namespace when assigned 272 prefix vrrp; 274 import ietf-inet-types { 275 prefix "inet"; 276 } 278 import ietf-yang-types { 279 prefix "yang"; 280 } 282 import ietf-interfaces { 283 prefix if; 284 } 286 import ietf-ip { 287 prefix ip; 288 } 290 organization "TBD"; 291 contact "TBD"; 292 description 293 "This YANG module defines a model for managing Virtual Router 294 Redundancy Protocol (VRRP) version 2 and version 3."; 296 revision "2015-09-28" { 297 description "Initial revision"; 298 reference 299 "RFC 2787: Definitions of Managed Objects for the Virtual 300 Router Redundancy Protocol. 301 RFC 3768: Virtual Router Redundancy Protocol (VRRP). 302 RFC 5798: Virtual Router Redundancy Protocol (VRRP) Version 303 3. 304 RFC 6527: Definitions of Managed Objects for the Virtual 305 Router Redundancy Protocol Version 3 (VRRPv3)."; 306 } 308 /* 309 * Features 310 */ 312 feature validate-interval-errors { 313 description 314 "This feature indicates that the system validates that 315 the advertisement interval from advertisement packets 316 received is the same as the one configured for the local 317 VRRP router."; 318 } 320 feature validate-address-list-errors { 321 description 322 "This feature indicates that the system validates that 323 the address list from received packets matches the 324 locally configured list for the VRRP router."; 325 } 327 /* 328 * Typedefs 329 */ 331 typedef new-master-reason-type { 332 type enumeration { 333 enum not-master { 334 description 335 "The virtual router has never transitioned to master 336 state,"; 337 } 338 enum priority { 339 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."; 380 } 381 /* 382 * Groupings 383 */ 385 grouping vrrp-common-attributes { 386 description 387 "Group of VRRP attributes common to version 2 and version 3"; 389 leaf vrid { 390 type uint8 { 391 range 1..255; 392 } 393 description "Virtual router ID."; 394 } 396 leaf version { 397 type enumeration { 398 enum 2 { 399 description "VRRP version 2."; 400 } 401 enum 3 { 402 description "VRRP version 3."; 403 } 404 } 405 description "Version 2 or version 3 of VRRP."; 406 } 408 leaf log-state-change { 409 type boolean; 410 description 411 "Generates VRRP state change messages each time the VRRP 412 instance changes state (from up to down or down to up)."; 413 } 415 container preempt { 416 presence "Present if preempt is enabled."; 417 description 418 "Enables a higher priority Virtual Router Redundancy 419 Protocol (VRRP) backup router to preempt a lower priority 420 VRRP master."; 421 leaf hold-time { 422 type uint16; 423 description 424 "Hold time, in seconds, for which a higher priority VRRP 425 backup router must wait before preempting a lower priority 426 VRRP master."; 427 } 428 } 430 leaf priority { 431 type uint8 { 432 range 1..254; 433 } 434 default 100; 435 description 436 "Configures the Virtual Router Redundancy Protocol (VRRP) 437 election priority for the backup virtual router."; 438 } 439 } // vrrp-common-attributes 441 grouping vrrp-v3-attributes { 442 description 443 "Group of VRRP versin 3 attributes."; 445 leaf accept-mode { 446 type boolean; 447 default false; 448 description 449 "Controls whether a virtual router in Master state will 450 accept packets addressed to the address owner's IPvX address 451 as its own if it is not the IPvX address owner. The default 452 is false. Deployments that rely on, for example, pinging the 453 address owner's IPvX address may wish to configure 454 accept-mode to true. 456 Note: IPv6 Neighbor Solicitations and Neighbor Advertisements 457 MUST NOT be dropped when accept-mode is false."; 458 } 459 } 461 grouping vrrp-ipv4-attributes { 462 description 463 "Group of VRRP attributes for IPv4."; 465 uses vrrp-common-attributes; 467 uses vrrp-v3-attributes { 468 when "version = 3" { 469 description "Applicable only to version 3."; 470 } 471 } 473 choice advertise-interval-choice { 474 description 475 "The options for the advertisement interval at which VRRPv2 476 or VRRPv3 advertisements are sent from the specified 477 interface."; 479 case v2 { 480 when "version = 2" { 481 description "Applicable only to version 2."; 482 } 483 leaf advertise-interval-sec { 484 type uint8 { 485 range 1..254; 486 } 487 default 1; 488 description 489 "Configures the interval that Virtual Router 490 Redundancy Protocol Version 2 (VRRPv2) advertisements 491 are sent from the specified interface."; 492 } 493 } 495 case v3 { 496 when "version = 3" { 497 description "Applicable only to version 3."; 498 } 499 leaf advertise-interval-centi-sec { 500 type uint16 { 501 range 1..4095; 502 } 503 units centiseconds; 504 default 100; 505 description 506 "Configures the interval that Virtual Router 507 Redundancy Protocol version 3 (VRRPv3) advertisements 508 are sent from the specified interface."; 509 } 510 } 511 } // advertise-interval-choice 513 container track { 514 description 515 "Enables the specified VRRP instance to track interfaces 516 or networks."; 517 container interfaces { 518 description 519 "Enables the specified Virtual Router Redundancy Protocol 520 version 2 (VRRP) or version 3 (VRRPv3) instance to track 521 an interface."; 523 list interface { 524 key "interface"; 525 description 526 "Interface to track."; 528 leaf interface { 529 type if:interface-ref; 530 must "../../../../../../../ipv4" { 531 description "Interface is IPv4."; 532 } 533 description 534 "Interface to track."; 535 } 537 leaf priority-decrement { 538 type uint8 { 539 range 1..254; 540 } 541 description 542 "Specifies how much to decrement the priority of the 543 VRRP instance if the interface goes down."; 544 } 546 } // track-interface 547 } // track-interfaces 549 container networks { 550 description 551 "Enables the backup Virtual Router Redundancy Protocol 552 version 2 (VRRP) or version 3 (VRRPv3) router to track a 553 specified network through the IP network prefix of that 554 network."; 555 list network { 556 key "network"; 557 description 558 "Enables the specified Virtual Router Redundancy 559 Protocol version 2 (VRRP) or version 3 (VRRPv3) 560 instance to track an interface."; 562 leaf network { 563 type inet:ipv4-prefix; 564 description 565 "Network to track."; 566 } 568 leaf priority-decrement { 569 type uint8 { 570 range 1..254; 571 } 572 default 10; 573 description 574 "Specifies how much to decrement the priority of the 575 backup VRRP router if there is a failure in the IP 576 network."; 577 } 578 } // track-network 579 } // track-networks 580 } // track 582 container virtual-ipv4-addresses { 583 description 584 "Configures the virtual IP address for the Virtual Router 585 Redundancy Protocol (VRRP) interface."; 587 list virtual-ipv4-address { 588 key "ipv4-address"; 589 max-elements 16; 590 description 591 "Virtual IP addresses for a single VRRP instance. For a 592 VRRP owner router, the virtual address must match one 593 of the IP addresses configured on the interface 594 corresponding to the virtual router."; 596 leaf ipv4-address { 597 type inet:ipv4-address; 598 description 599 "Virtual IPv4 address."; 600 } 601 } // virtual-ipv4-address 602 } // virtual-ipv4-addresses 603 } // grouping vrrp-ipv4-attributes 605 grouping vrrp-ipv6-attributes { 606 description 607 "Group of VRRP attributes for IPv6."; 609 uses vrrp-common-attributes; 611 uses vrrp-v3-attributes { 612 when "version = 3" { 613 description "Uses VRRP version 3 attributes."; 614 } 615 } // uses vrrp-v3-attributes 617 leaf advertise-interval-centi-sec { 618 type uint16 { 619 range 1..4095; 620 } 621 units centiseconds; 622 default 100; 623 description 624 "Configures the interval that Virtual Router 625 Redundancy Protocol version 3 (VRRPv3) advertisements 626 are sent from the specified interface."; 627 } 628 container track { 629 description 630 "Enables the specified VRRP instance to track interfaces 631 or networks."; 632 container interfaces { 633 description 634 "Enables the specified Virtual Router Redundancy Protocol 635 version 2 (VRRP) or version 3 (VRRPv3) instance to track 636 an interface."; 637 list interface { 638 key "interface"; 639 description 640 "Interface to track."; 642 leaf interface { 643 type if:interface-ref; 644 must "../../../../../../../ipv6" { 645 description "Interface is IPv6."; 646 } 647 description 648 "Interface to track."; 649 } 651 leaf priority-decrement { 652 type uint8 { 653 range 1..254; 654 } 655 description 656 "Specifies how much to decrement the priority of the 657 VRRP instance if the interface goes down."; 658 } 659 } // track-interface 660 } // track-interfaces 662 container networks { 663 description 664 "Enables the backup Virtual Router Redundancy Protocol 665 version 2 (VRRP) or version 3 (VRRPv3) router to track a 666 specified network through the IP network prefix of that 667 network."; 669 list network { 670 key "network"; 671 description 672 "Enables the specified Virtual Router Redundancy 673 Protocol version 2 (VRRP) or version 3 (VRRPv3) 674 instance to track an interface."; 676 leaf network { 677 type inet:ipv6-prefix; 678 description 679 "Network to track."; 680 } 682 leaf priority-decrement { 683 type uint8 { 684 range 1..254; 685 } 686 default 10; 687 description 688 "Specifies how much to decrement the priority of the 689 backup VRRP router if there is a failure in the IP 690 network."; 691 } 692 } // track-network 693 } // track-networks 694 } // track 696 container virtual-ipv6-addresses { 697 description 698 "Configures the virtual IP address for the Virtual Router 699 Redundancy Protocol (VRRP) interface."; 700 list virtual-ipv6-address { 701 key "ipv6-address"; 702 max-elements 2; 703 description 704 "Two IPv6 addresses are allowed. The first one must be 705 a link-local address and the second one can be a 706 link-local or global address."; 708 leaf ipv6-address { 709 type inet:ipv6-address; 710 description 711 "Virtual IPv6 address."; 712 } 713 } // virtual-ipv6-address 714 } // virtual-ipv6-addresses 715 } // grouping vrrp-ipv6-attributes 717 grouping vrrp-state-attributes { 718 description 719 "Group of VRRP state attributes."; 721 leaf state { 722 type identityref { 723 base vrrp-state-type; 724 } 725 description 726 "Operational state."; 727 } 729 leaf is-owner { 730 type boolean; 731 description 732 "Set to true if this virtual router is owner."; 733 } 735 leaf last-adv-source { 736 type inet:ip-address; 737 description 738 "Last advertised IPv4/IPv6 source address"; 739 } 741 leaf up-time { 742 type yang:date-and-time; 743 description 744 "The time when this virtual router 745 transitioned out of init state."; 746 } 748 leaf master-down-interval { 749 type uint32; 750 units centiseconds; 751 description 752 "Time interval for backup virtual router to declare 753 Master down."; 754 } 756 leaf skew-time { 757 type uint32; 758 units microseconds; 759 description 760 "Calculated based on the priority and advertisement 761 interval configuration command parameters. See RFC 3768."; 762 } 764 leaf last-event { 765 type string; 766 description 767 "Last reported event."; 768 } 770 leaf new-master-reason { 771 type new-master-reason-type; 772 description 773 "Indicates the reason for the virtual router to transition 774 to master state."; 775 } 777 container statistics { 778 description 779 "VRRP statistics."; 781 leaf discontinuity-time { 782 type yang:date-and-time; 783 description 784 "The time on the most recent occasion at which any one or 785 more of the VRRP statistic counters suffered a 786 discontinuity. If no such discontinuities have occurred 787 since the last re-initialization of the local management 788 subsystem, then this node contains the time that the 789 local management subsystem re-initialized itself."; 790 } 791 leaf master-transitions { 792 type yang:counter32; 793 description 794 "The total number of times that this virtual router's 795 state has transitioned to master"; 796 } 798 leaf advertisement-recv { 799 type yang:counter64; 800 description 801 "The total number of VRRP advertisements received by 802 this virtual router."; 803 } 805 leaf advertisement-sent { 806 type yang:counter64; 807 description 808 "The total number of VRRP advertisements sent by 809 this virtual router."; 810 } 812 leaf interval-errors { 813 if-feature validate-interval-errors; 814 type yang:counter64; 815 description 816 "The total number of VRRP advertisement packets 817 received with an advertisement interval 818 different than the one configured for the local 819 virtual router"; 820 } 822 leaf priority-zero-pkts-rcvd { 823 type yang:counter64; 824 description 825 "The total number of VRRP packets received by the 826 virtual router with a priority of 0."; 827 } 829 leaf priority-zero-pkts-sent { 830 type yang:counter64; 831 description 832 "The total number of VRRP packets sent by the 833 virtual router with a priority of 0."; 834 } 836 leaf invalid-type-pkts-rcvd { 837 type yang:counter64; 838 description 839 "The number of VRRP packets received by the virtual 840 router with an invalid value in the 'type' field."; 841 } 843 leaf address-list-errors { 844 if-feature validate-address-list-errors; 845 type yang:counter64; 846 description 847 "The total number of packets received with an 848 address list that does not match the locally 849 configured address list for the virtual router."; 850 } 852 leaf packet-length-errors { 853 type yang:counter64; 854 description 855 "The total number of packets received with a packet 856 length less than the length of the VRRP header."; 857 } 858 } // container statistics 859 } // grouping vrrp-state-attributes 861 grouping vrrp-global-state-attributes { 862 description 863 "Group of VRRP global state attributes."; 865 leaf virtual-routers { 866 type uint32; 867 description "Number of configured virtual routers."; 868 } 870 leaf interfaces { 871 type uint32; 872 description "Number of interface with VRRP configured."; 874 } 876 leaf checksum-errors { 877 type yang:counter64; 878 description 879 "The total number of VRRP packets received with an invalid 880 VRRP checksum value."; 881 reference "RFC 5798, Section 5.2.8"; 882 } 884 leaf version-errors { 885 type yang:counter64; 886 description 887 "The total number of VRRP packets received with an unknown 888 or unsupported version number."; 889 reference "RFC 5798, Section 5.2.1"; 890 } 892 leaf vrid-errors { 893 type yang:counter64; 894 description 895 "The total number of VRRP packets received with a VRID that 896 is not valid for any virtual router on this router."; 897 reference "RFC 5798, Section 5.2.3"; 898 } 900 leaf ip-ttl-errors { 901 type yang:counter64; 902 description 903 "The total number of VRRP packets received by the 904 virtual router with IP TTL (Time-To-Live) not equal 905 to 255."; 906 reference "RFC 5798, Sections 5.1.1.3 and 5.1.2.3."; 907 } 909 leaf global-statistics-discontinuity-time { 910 type yang:date-and-time; 911 description 912 "The time on the most recent occasion at which one of 913 router-checksum-errors, router-version-errors, 914 router-vrid-errors, and ip-ttl-errors suffered a 915 discontinuity. 917 If no such discontinuities have occurred since the last 918 re-initialization of the local management subsystem, 919 then this object will be 0."; 920 } 921 } // vrrp-global-state-attributes 923 /* 924 * Configuration data nodes 925 */ 927 augment "/if:interfaces/if:interface/ip:ipv4" { 928 description "Augment IPv4 interface."; 930 container vrrp { 931 description 932 "Configures the Virtual Router Redundancy Protocol (VRRP) 933 version 2 or version 3 for IPv4."; 935 list vrrp-instance { 936 key vrid; 937 description 938 "Defines a virtual router, identified by a virtual router 939 identifier (VRID), within IPv4 address space."; 941 uses vrrp-ipv4-attributes; 942 } 943 } 944 } // augment ipv4 946 augment "/if:interfaces/if:interface/ip:ipv6" { 947 description "Augment IPv6 interface."; 949 container vrrp { 950 description 951 "Configures the Virtual Router Redundancy Protocol (VRRP) 952 version 3 for IPv6."; 954 list vrrp-instance { 955 must "version = 3" { 956 description 957 "IPv6 is only supported by version 3."; 958 } 959 key vrid; 960 description 961 "Defines a virtual router, identified by a virtual router 962 identifier (VRID), within IPv6 address space."; 964 uses vrrp-ipv6-attributes; 965 } // list vrrp-instance 966 } // container vrrp 967 } // augment ipv6 969 /* 970 * Operational state data nodes 971 */ 973 augment "/if:interfaces-state/if:interface/ip:ipv4" { 974 description "Augment IPv4 interface state."; 976 container vrrp { 977 description 978 "State information for Virtual Router Redundancy Protocol 979 (VRRP) version 2 for IPv4."; 981 list vrrp-instance { 982 key vrid; 983 description 984 "States of a virtual router, identified by a virtual router 985 identifier (VRID), within IPv4 address space."; 987 uses vrrp-ipv4-attributes; 988 uses vrrp-state-attributes; 989 } // list vrrp-instance 990 } 991 } 993 augment "/if:interfaces-state/if:interface/ip:ipv6" { 994 description "Augment IPv6 interface state."; 996 container vrrp { 997 description 998 "State information of the Virtual Router Redundancy Protocol 999 (VRRP) version 2 or version 3 for IPv6."; 1001 list vrrp-instance { 1002 key vrid; 1003 description 1004 "States of a virtual router, identified by a virtual router 1005 identifier (VRID), within IPv6 address space."; 1007 uses vrrp-ipv6-attributes; 1008 uses vrrp-state-attributes; 1009 } // list vrrp-instance 1010 } 1011 } 1013 augment "/if:interfaces-state" { 1014 description "Specify VRRP state data at the global level."; 1016 container vrrp-global { 1017 description 1018 "State information of the Virtual Router Redundancy Protocol 1019 (VRRP) at the global level"; 1021 uses vrrp-global-state-attributes; 1022 } 1023 } 1025 /* 1026 * Notifications 1027 */ 1029 notification vrrp-new-master-event { 1030 description 1031 "Notification event for a change of VRRP new master."; 1032 leaf master-ipaddr { 1033 type inet:ipv4-address; 1034 description 1035 "IPv4 or IPv6 address of the new master."; 1036 } 1037 leaf new-master-reason { 1038 type new-master-reason-type; 1039 description 1040 "Indicates the reason for the virtual router to transition 1041 to master state."; 1042 } 1043 } 1045 notification vrrp-protocol-error-event { 1046 description 1047 "Notification event for a VRRP protocol error."; 1048 leaf protocol-error-reason { 1049 type enumeration { 1050 enum checksum-error { 1051 description 1052 "A packet has been received with an invalid VRRP checksum 1053 value."; 1054 } 1055 enum version-error { 1056 description 1057 "A packet has been received with an unknown or 1058 unsupported version number."; 1059 } 1060 enum vrid-error { 1061 description 1062 "A packet has been received with a VRID that is not valid 1063 for any virtual router on this router."; 1064 } 1065 enum ip-ttl-error { 1066 description 1067 "A packet has been received with IP TTL (Time-To-Live) 1068 not equal to 255."; 1069 } 1070 } 1071 description 1072 "Indicates the reason for the protocol error."; 1073 } 1074 } 1076 notification vrrp-virtual-router-error-event { 1077 description 1078 "Notification event for a error happened on a virtual router."; 1080 leaf interface { 1081 type if:interface-ref; 1082 description 1083 "Indicates the interface for which statistics area 1084 to be cleared."; 1085 } 1086 leaf ip-version { 1087 type enumeration { 1088 enum 4 { 1089 description "IPv4"; 1090 } 1091 enum 6 { 1092 description "IPv6"; 1093 } 1094 } 1095 description "Indicates the IP version."; 1096 } 1097 leaf vrid-v4 { 1098 type leafref { 1099 path "/if:interfaces/if:interface" 1100 + "[if:name = current()/../interface]/ip:ipv4/vrrp/" 1101 + "vrrp-instance/vrid"; 1102 } 1103 description 1104 "Indicates the virtual router on which the event has 1105 occured."; 1106 } 1108 leaf vrid-v6 { 1109 type leafref { 1110 path "/if:interfaces/if:interface" 1111 + "[if:name = current()/../interface]/ip:ipv6/vrrp/" 1112 + "vrrp-instance/vrid"; 1113 } 1114 description 1115 "Indicates the virtual router on which the event has 1116 occured."; 1117 } 1118 leaf virtual-router-error-reason { 1119 type enumeration { 1120 enum interval-error { 1121 description 1122 "A packet has been received with an advertisement 1123 interval different than the one configured for the local 1124 virtual router"; 1125 } 1126 enum address-list-error { 1127 description 1128 "A packet has been received with an address list that 1129 does not match the locally configured address list for 1130 the virtual router."; 1131 } 1132 enum packet-length-error { 1133 description 1134 "A packet has been received with a packet length less 1135 than the length of the VRRP header."; 1136 } 1137 } 1138 description 1139 "Indicates the reason for the virtual router error."; 1140 } 1141 } 1142 } 1143 1145 4. Security Considerations 1147 The configuration, state, action and notification data defined in 1148 this document are designed to be accessed via the NETCONF protocol 1149 [RFC6241]. The data-model by itself does not create any security 1150 implications. The security considerations for the NETCONF protocol 1151 are applicable. The NETCONF protocol used for sending the data 1152 supports authentication and encryption. 1154 5. References 1156 5.1. Normative References 1158 [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the 1159 Network Configuration Protocol (NETCONF)", RFC 6020, 1160 October 2010. 1162 [RFC6021] Schoenwaelder, J., "Common YANG Data Types", RFC 6021, 1163 October 2010. 1165 [RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A. Bierman, 1166 "Network Configuration Protocol (NETCONF)", RFC 6241, June 1167 2011. 1169 [RFC2234] Crocker, D. and Overell, P.(Editors), "Augmented BNF for 1170 Syntax Specifications: ABNF", RFC 2234, Internet Mail 1171 Consortium and Demon Internet Ltd., November 1997. 1173 [RFC2338] Knight, S., Weaver, D., Whipple, D., Hinden, R., Mitzel, 1174 D., Hunt, P., Higginson, P., Shand, M., and A. Lindem, 1175 "Virtual Router Redundancy Protocol", RFC 2338, April 1998. 1177 [RFC2787] Jewell, B. and D. Chuang, "Definitions of Managed Objects 1178 for the Virtual Router Redundancy Protocol", RFC 2787, 1179 March 2000. 1181 [RFC5798] Nadas, S., Ed., "Virtual Router Redundancy Protocol (VRRP) 1182 Version 3 for IPv4 and IPv6", RFC 5798, March 2010. 1184 [RFC6527] Tata, K., Ed., "Definitions of Managed Objects for the 1185 Virtual Router Redundancy Protocol Version 3 (VRRPv3)", RFC 1186 6527, March 2012. 1188 5.2. Informative References 1190 [RFC6087] Bierman, A., "Guidelines for Authors and Reviewers of YANG 1191 Data Model Documents", RFC 6087, January 2011. 1193 Authors' Addresses 1195 Xufeng Liu (Editor) 1196 Ericsson 1197 1595 Spring Hill Road, Suite 500 1198 Vienna, VA 22182 1199 USA 1201 Email: xliu@kuatrotech.com 1203 Athanasios Kyparlis 1204 Ericsson 1205 1595 Spring Hill Road, Suite 500 1206 Vienna, VA 22182 1207 USA 1209 Email: akyparlis@kuatrotech.com 1211 Ravi Parikh 1212 Ericsson 1213 300 Holger Way 1214 San Jose, CA 95134 1215 USA 1217 Email: ravi.parikh@ericsson.com 1219 Acee Lindem 1220 Cisco Systems 1221 301 Midenhall Way 1222 Cary, NC 27513 1223 USA 1225 Email: acee@cisco.com 1227 Mingui Zhang 1228 Huawei Technologies 1229 No. 156 Beiqing Rd. Haidian District 1230 Beijing 100095 1231 P.R. China 1233 Email: zhangmingui@huawei.com