idnits 2.17.1 draft-ietf-rtgwg-yang-vrrp-01.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 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 487: '... Advertisements MUST NOT be dropped w...' Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 130 has weird spacing: '...address ine...' == Line 154 has weird spacing: '...address ine...' == Line 181 has weird spacing: '...address ine...' == Line 225 has weird spacing: '...address ine...' -- The document date (December 1, 2016) is 2695 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 79, but not defined ** Obsolete undefined reference: RFC 3768 (Obsoleted by RFC 5798) == Missing Reference: 'RFC2119' is mentioned on line 88, but not defined == Missing Reference: 'RFC3688' is mentioned on line 1181, but not defined == Unused Reference: 'RFC6021' is defined on line 1216, but no explicit reference was found in the text == Unused Reference: 'RFC2234' is defined on line 1223, but no explicit reference was found in the text == Unused Reference: 'RFC2338' is defined on line 1227, but no explicit reference was found in the text == Unused Reference: 'RFC2787' is defined on line 1231, but no explicit reference was found in the text == Unused Reference: 'RFC6527' is defined on line 1238, but no explicit reference was found in the text == Unused Reference: 'RFC6087' is defined on line 1244, 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: 6 errors (**), 0 flaws (~~), 14 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 Kuatro Technologies 4 Expires: June 1, 2017 R. Parikh 5 VMware 6 A. Lindem 7 Cisco Systems 8 M. Zhang 9 Huawei Technologies 10 December 1, 2016 12 A YANG Data Model for Virtual Router Redundancy Protocol (VRRP) 13 draft-ietf-rtgwg-yang-vrrp-01 15 Abstract 17 This document describes a data model for Virtual Router Redundancy 18 Protocol (VRRP). Both version 2 and version 3 of VRRP are covered. 20 Status of this Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF), its areas, and its working groups. Note that 27 other groups may also distribute working documents as Internet- 28 Drafts. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 The list of current Internet-Drafts can be accessed at 36 http://www.ietf.org/ietf/1id-abstracts.txt 38 The list of Internet-Draft Shadow Directories can be accessed at 39 http://www.ietf.org/shadow.html 41 This Internet-Draft will expire on June 1, 2017. 43 Copyright Notice 45 Copyright (c) 2016 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction...................................................2 61 1.1. Terminology...............................................2 62 2. VRRP YANG model overview.......................................3 63 3. VRRP YANG module...............................................7 64 4. IANA Considerations...........................................29 65 5. Security Considerations.......................................29 66 6. References....................................................30 67 6.1. Normative References.....................................30 68 6.2. Informative References...................................30 70 1. Introduction 72 This document introduces a YANG [RFC6020] data model for Virtual 73 Router Redundancy Protocol (VRRP) [RFC3768][RFC5798]. VRRP provides 74 higher resiliency by specifying an election protocol that dynamically 75 assigns responsibility for a virtual router to one of the VRRP 76 routers on a LAN. 78 This YANG model supports both version 2 and version 3 of VRRP. VRRP 79 version 2 defined in [RFC3768] supports IPv4. VRRP version 3 defined 80 in [RFC5798] supports both IPv4 and IPv6. 82 1.1. Terminology 84 The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 85 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 86 "OPTIONAL" in this document are to be interpreted as described in BCP 87 14, [RFC2119]. 89 The following terms are defined in [RFC6020] and are not redefined 90 here: 92 o augment 94 o data model 96 o data node 98 2. VRRP YANG model overview 100 This document defines the YANG module "ietf-vrrp", which has the 101 following structure: 103 module: ietf-vrrp 104 augment /if:interfaces/if:interface/ip:ipv4: 105 +--rw vrrp 106 +--rw vrrp-instance* [vrid] 107 +--rw vrid uint8 108 +--rw version? enumeration 109 +--rw log-state-change? boolean 110 +--rw preempt! 111 | +--rw hold-time? uint16 112 +--rw priority? uint8 113 +--rw accept-mode? boolean 114 +--rw (advertise-interval-choice)? 115 | +--:(v2) 116 | | +--rw advertise-interval-sec? uint8 117 | +--:(v3) 118 | +--rw advertise-interval-centi-sec? uint16 119 +--rw track 120 | +--rw interfaces 121 | | +--rw interface* [interface] 122 | | +--rw interface if:interface-ref 123 | | +--rw priority-decrement? uint8 124 | +--rw networks 125 | +--rw network* [network] 126 | +--rw network inet:ipv4-prefix 127 | +--rw priority-decrement? uint8 128 +--rw virtual-ipv4-addresses 129 +--rw virtual-ipv4-address* [ipv4-address] 130 +--rw ipv4-address inet:ipv4-address 132 augment /if:interfaces/if:interface/ip:ipv6: 133 +--rw vrrp 134 +--rw vrrp-instance* [vrid] 135 +--rw vrid uint8 136 +--rw version? enumeration 137 +--rw log-state-change? boolean 138 +--rw preempt! 139 | +--rw hold-time? uint16 140 +--rw priority? uint8 141 +--rw accept-mode? boolean 142 +--rw advertise-interval-centi-sec? uint16 143 +--rw track 144 | +--rw interfaces 145 | | +--rw interface* [interface] 146 | | +--rw interface if:interface-ref 147 | | +--rw priority-decrement? uint8 148 | +--rw networks 149 | +--rw network* [network] 150 | +--rw network inet:ipv6-prefix 151 | +--rw priority-decrement? uint8 152 +--rw virtual-ipv6-addresses 153 +--rw virtual-ipv6-address* [ipv6-address] 154 +--rw ipv6-address inet:ipv6-address 155 augment /if:interfaces-state/if:interface/ip:ipv4: 156 +--ro vrrp 157 +--ro vrrp-instance* [vrid] 158 +--ro vrid uint8 159 +--ro version? enumeration 160 +--ro log-state-change? boolean 161 +--ro preempt! 162 | +--ro hold-time? uint16 163 +--ro priority? uint8 164 +--ro accept-mode? boolean 165 +--ro (advertise-interval-choice)? 166 | +--:(v2) 167 | | +--ro advertise-interval-sec? uint8 168 | +--:(v3) 169 | +--ro advertise-interval-centi-sec? uint16 170 +--ro track 171 | +--ro interfaces 172 | | +--ro interface* [interface] 173 | | +--ro interface if:interface-ref 174 | | +--ro priority-decrement? uint8 175 | +--ro networks 176 | +--ro network* [network] 177 | +--ro network inet:ipv4-prefix 178 | +--ro priority-decrement? uint8 179 +--ro virtual-ipv4-addresses 180 | +--ro virtual-ipv4-address* [ipv4-address] 181 | +--ro ipv4-address inet:ipv4-address 182 +--ro state? identityref 183 +--ro is-owner? boolean 184 +--ro last-adv-source? inet:ip-address 185 +--ro up-time? yang:date-and-time 186 +--ro master-down-interval? uint32 187 +--ro skew-time? uint32 188 +--ro last-event? string 189 +--ro new-master-reason? new-master-reason-type 190 +--ro statistics 191 +--ro discontinuity-time? yang:date-and-time 192 +--ro master-transitions? yang:counter32 193 +--ro advertisement-recv? yang:counter64 194 +--ro advertisement-sent? yang:counter64 195 +--ro interval-errors? yang:counter64 196 {validate-interval-errors}? 197 +--ro priority-zero-pkts-rcvd? yang:counter64 198 +--ro priority-zero-pkts-sent? yang:counter64 199 +--ro invalid-type-pkts-rcvd? yang:counter64 200 +--ro address-list-errors? yang:counter64 201 {validate-address-list-errors}? 202 +--ro packet-length-errors? yang:counter64 203 augment /if:interfaces-state/if:interface/ip:ipv6: 204 +--ro vrrp 205 +--ro vrrp-instance* [vrid] 206 +--ro vrid uint8 207 +--ro version? enumeration 208 +--ro log-state-change? boolean 209 +--ro preempt! 210 | +--ro hold-time? uint16 211 +--ro priority? uint8 212 +--ro accept-mode? boolean 213 +--ro advertise-interval-centi-sec? uint16 214 +--ro track 215 | +--ro interfaces 216 | | +--ro interface* [interface] 217 | | +--ro interface if:interface-ref 218 | | +--ro priority-decrement? uint8 219 | +--ro networks 220 | +--ro network* [network] 221 | +--ro network inet:ipv6-prefix 222 | +--ro priority-decrement? uint8 223 +--ro virtual-ipv6-addresses 224 | +--ro virtual-ipv6-address* [ipv6-address] 225 | +--ro ipv6-address inet:ipv6-address 226 +--ro state? identityref 227 +--ro is-owner? boolean 228 +--ro last-adv-source? inet:ip-address 229 +--ro up-time? yang:date-and-time 230 +--ro master-down-interval? uint32 231 +--ro skew-time? uint32 232 +--ro last-event? string 233 +--ro new-master-reason? new-master-reason-type 234 +--ro statistics 235 +--ro discontinuity-time? yang:date-and-time 236 +--ro master-transitions? yang:counter32 237 +--ro advertisement-recv? yang:counter64 238 +--ro advertisement-sent? yang:counter64 239 +--ro interval-errors? yang:counter64 240 {validate-interval-errors}? 241 +--ro priority-zero-pkts-rcvd? yang:counter64 242 +--ro priority-zero-pkts-sent? yang:counter64 243 +--ro invalid-type-pkts-rcvd? yang:counter64 244 +--ro address-list-errors? yang:counter64 245 {validate-address-list-errors}? 246 +--ro packet-length-errors? yang:counter64 247 augment /if:interfaces-state: 248 +--ro vrrp-global 249 +--ro virtual-routers? uint32 250 +--ro interfaces? uint32 251 +--ro checksum-errors? yang:counter64 252 +--ro version-errors? yang:counter64 253 +--ro vrid-errors? yang:counter64 254 +--ro ip-ttl-errors? yang:counter64 255 +--ro global-statistics-discontinuity-time? yang:date-and- 256 time 257 notifications: 258 +---n vrrp-new-master-event 259 | +--ro master-ipaddr? inet:ipv4-address 260 | +--ro new-master-reason? new-master-reason-type 261 +---n vrrp-protocol-error-event 262 | +--ro protocol-error-reason? enumeration 263 +---n vrrp-virtual-router-error-event 264 +--ro interface? if:interface-ref 265 +--ro ip-version? enumeration 266 +--ro vrid-v4? leafref 267 +--ro vrid-v6? leafref 268 +--ro virtual-router-error-reason? enumeration 270 3. VRRP YANG module 272 file "ietf-vrrp@2016-12-01.yang" 273 module ietf-vrrp { 274 namespace "urn:ietf:params:xml:ns:yang:ietf-vrrp"; 275 prefix "vrrp"; 277 import ietf-inet-types { 278 prefix "inet"; 279 } 281 import ietf-yang-types { 282 prefix "yang"; 283 } 285 import ietf-interfaces { 286 prefix "if"; 287 } 289 import ietf-ip { 290 prefix "ip"; 291 } 293 organization 294 "IETF Routing Area Working Group (RTGWG)"; 295 contact 296 "WG Web: 297 WG List: 299 WG Chair: Jeff Tantsura 300 302 WG Chair: Chris Bowers 303 305 Editor: Xufeng Liu 306 308 Editor: Athanasios Kyparlis 309 311 Editor: Ravi Parikh 312 314 Editor: Acee Lindem 315 317 Editor: Mingui Zhang 318 "; 320 description 321 "This YANG module defines a model for managing Virtual Router 322 Redundancy Protocol (VRRP) version 2 and version 3."; 324 revision 2016-12-01 { 325 description "Initial revision"; 326 reference 327 "RFC 2787: Definitions of Managed Objects for the Virtual 328 Router Redundancy Protocol. 329 RFC 3768: Virtual Router Redundancy Protocol (VRRP). 330 RFC 5798: Virtual Router Redundancy Protocol (VRRP) Version 3. 331 RFC 6527: Definitions of Managed Objects for the Virtual 332 Router Redundancy Protocol Version 3 (VRRPv3)."; 333 } 335 /* 336 * Features 337 */ 339 feature validate-interval-errors { 340 description 341 "This feature indicates that the system validates that 342 the advertisement interval from advertisement packets 343 received is the same as the one configured for the local 344 VRRP router."; 345 } 347 feature validate-address-list-errors { 348 description 349 "This feature indicates that the system validates that 350 the address list from received packets matches the 351 locally configured list for the VRRP router."; 352 } 354 /* 355 * Typedefs 356 */ 358 typedef new-master-reason-type { 359 type enumeration { 360 enum not-master { 361 description 362 "The virtual router has never transitioned to master 363 state,"; 364 } 365 enum priority { 366 description "Priority was higher."; 367 } 368 enum preempted { 369 description "The master was preempted."; 370 } 371 enum master-no-response { 372 description "Previous master did not respond."; 373 } 374 } 375 description 376 "The reason for the virtual router to transition to master 377 state."; 379 } // new-master-reason-type 381 /* 382 * Identities 383 */ 385 identity vrrp-state-type { 386 description 387 "The type to indicate the state of a virtual router."; 388 } 389 identity initialize { 390 base vrrp-state-type; 391 description 392 "Indicates that the virtual router is waiting 393 for a startup event."; 394 } 395 identity backup { 396 base vrrp-state-type; 397 description 398 "Indicates that the virtual router is monitoring the 399 availability of the master router."; 400 } 401 identity master { 402 base vrrp-state-type; 403 description 404 "Indicates that the virtual router is forwarding 405 packets for IP addresses that are associated with 406 this virtual router."; 407 } 409 /* 410 * Groupings 411 */ 413 grouping vrrp-common-attributes { 414 description 415 "Group of VRRP attributes common to version 2 and version 3"; 417 leaf vrid { 418 type uint8 { 419 range 1..255; 421 } 422 description "Virtual router ID."; 423 } 425 leaf version { 426 type enumeration { 427 enum 2 { 428 description "VRRP version 2."; 429 } 430 enum 3 { 431 description "VRRP version 3."; 432 } 433 } 434 description "Version 2 or version 3 of VRRP."; 435 } 437 leaf log-state-change { 438 type boolean; 439 description 440 "Generates VRRP state change messages each time the VRRP 441 instance changes state (from up to down or down to up)."; 442 } 444 container preempt { 445 presence "Present if preempt is enabled."; 446 description 447 "Enables a higher priority Virtual Router Redundancy 448 Protocol (VRRP) backup router to preempt a lower priority 449 VRRP master."; 450 leaf hold-time { 451 type uint16; 452 description 453 "Hold time, in seconds, for which a higher priority VRRP 454 backup router must wait before preempting a lower priority 455 VRRP master."; 456 } 457 } 459 leaf priority { 460 type uint8 { 461 range 1..254; 463 } 464 default 100; 465 description 466 "Configures the Virtual Router Redundancy Protocol (VRRP) 467 election priority for the backup virtual router."; 468 } 469 } // vrrp-common-attributes 471 grouping vrrp-v3-attributes { 472 description 473 "Group of VRRP version 3 attributes."; 475 leaf accept-mode { 476 type boolean; 477 default false; 478 description 479 "Controls whether a virtual router in Master state will 480 accept packets addressed to the address owner's IPvX address 481 as its own if it is not the IPvX address owner. The default 482 is false. Deployments that rely on, for example, pinging the 483 address owner's IPvX address may wish to configure 484 accept-mode to true. 486 Note: IPv6 Neighbor Solicitations and Neighbor 487 Advertisements MUST NOT be dropped when accept-mode is 488 false."; 489 } 490 } 492 grouping vrrp-ipv4-attributes { 493 description 494 "Group of VRRP attributes for IPv4."; 496 uses vrrp-common-attributes; 498 uses vrrp-v3-attributes { 499 when "version = 3" { 500 description "Applicable only to version 3."; 501 } 502 } 503 choice advertise-interval-choice { 504 description 505 "The options for the advertisement interval at which VRRPv2 506 or VRRPv3 advertisements are sent from the specified 507 interface."; 509 case v2 { 510 when "version = '2'" { 511 description "Applicable only to version 2."; 512 } 513 leaf advertise-interval-sec { 514 type uint8 { 515 range 1..254; 516 } 517 default 1; 518 description 519 "Configures the interval that Virtual Router 520 Redundancy Protocol Version 2 (VRRPv2) advertisements 521 are sent from the specified interface."; 522 } 523 } 525 case v3 { 526 when "version = '3'" { 527 description "Applicable only to version 3."; 528 } 529 leaf advertise-interval-centi-sec { 530 type uint16 { 531 range 1..4095; 532 } 533 units centiseconds; 534 default 100; 535 description 536 "Configures the interval that Virtual Router 537 Redundancy Protocol version 3 (VRRPv3) advertisements 538 are sent from the specified interface."; 539 } 540 } 541 } // advertise-interval-choice 543 container track { 544 description 545 "Enables the specified VRRP instance to track interfaces 546 or networks."; 547 container interfaces { 548 description 549 "Enables the specified Virtual Router Redundancy Protocol 550 version 2 (VRRP) or version 3 (VRRPv3) instance to track 551 an interface."; 553 list interface { 554 key "interface"; 555 description 556 "Interface to track."; 558 leaf interface { 559 type if:interface-ref; 560 must "/if:interfaces/if:interface[if:name=.]/ip:ipv4" { 561 description "Interface is IPv4."; 562 } 563 description 564 "Interface to track."; 565 } 567 leaf priority-decrement { 568 type uint8 { 569 range 1..254; 570 } 571 description 572 "Specifies how much to decrement the priority of the 573 VRRP instance if the interface goes down."; 574 } 575 } // track-interface 576 } // track-interfaces 578 container networks { 579 description 580 "Enables the backup Virtual Router Redundancy Protocol 581 version 2 (VRRP) or version 3 (VRRPv3) router to track a 582 specified network through the IP network prefix of that 583 network."; 584 list network { 585 key "network"; 586 description 587 "Enables the specified Virtual Router Redundancy 588 Protocol version 2 (VRRP) or version 3 (VRRPv3) 589 instance to track an interface."; 591 leaf network { 592 type inet:ipv4-prefix; 593 description 594 "Network to track."; 595 } 597 leaf priority-decrement { 598 type uint8 { 599 range 1..254; 600 } 601 default 10; 602 description 603 "Specifies how much to decrement the priority of the 604 backup VRRP router if there is a failure in the IP 605 network."; 606 } 607 } // track-network 608 } // track-networks 609 } // track 611 container virtual-ipv4-addresses { 612 description 613 "Configures the virtual IP address for the Virtual Router 614 Redundancy Protocol (VRRP) interface."; 616 list virtual-ipv4-address { 617 key "ipv4-address"; 618 max-elements 16; 619 description 620 "Virtual IP addresses for a single VRRP instance. For a 621 VRRP owner router, the virtual address must match one 622 of the IP addresses configured on the interface 623 corresponding to the virtual router."; 625 leaf ipv4-address { 626 type inet:ipv4-address; 627 description 628 "Virtual IPv4 address."; 629 } 630 } // virtual-ipv4-address 631 } // virtual-ipv4-addresses 632 } // grouping vrrp-ipv4-attributes 634 grouping vrrp-ipv6-attributes { 635 description 636 "Group of VRRP attributes for IPv6."; 638 uses vrrp-common-attributes; 640 uses vrrp-v3-attributes { 641 when "version = 3" { 642 description "Uses VRRP version 3 attributes."; 643 } 644 } // uses vrrp-v3-attributes 646 leaf advertise-interval-centi-sec { 647 type uint16 { 648 range 1..4095; 649 } 650 units centiseconds; 651 default 100; 652 description 653 "Configures the interval that Virtual Router 654 Redundancy Protocol version 3 (VRRPv3) advertisements 655 are sent from the specified interface."; 656 } 658 container track { 659 description 660 "Enables the specified VRRP instance to track interfaces 661 or networks."; 662 container interfaces { 663 description 664 "Enables the specified Virtual Router Redundancy Protocol 665 version 2 (VRRP) or version 3 (VRRPv3) instance to track 666 an interface."; 668 list interface { 669 key "interface"; 670 description 671 "Interface to track."; 673 leaf interface { 674 type if:interface-ref; 675 must "/if:interfaces/if:interface[if:name=.]/ip:ipv6" { 676 description "Interface is IPv6."; 677 } 678 description 679 "Interface to track."; 680 } 682 leaf priority-decrement { 683 type uint8 { 684 range 1..254; 685 } 686 description 687 "Specifies how much to decrement the priority of the 688 VRRP instance if the interface goes down."; 689 } 690 } // track-interface 691 } // track-interfaces 693 container networks { 694 description 695 "Enables the backup Virtual Router Redundancy Protocol 696 version 2 (VRRP) or version 3 (VRRPv3) router to track a 697 specified network through the IP network prefix of that 698 network."; 699 list network { 700 key "network"; 701 description 702 "Enables the specified Virtual Router Redundancy 703 Protocol version 2 (VRRP) or version 3 (VRRPv3) 704 instance to track an interface."; 706 leaf network { 707 type inet:ipv6-prefix; 708 description 709 "Network to track."; 710 } 712 leaf priority-decrement { 713 type uint8 { 714 range 1..254; 715 } 716 default 10; 717 description 718 "Specifies how much to decrement the priority of the 719 backup VRRP router if there is a failure in the IP 720 network."; 721 } 722 } // track-network 723 } // track-networks 724 } // track 726 container virtual-ipv6-addresses { 727 description 728 "Configures the virtual IP address for the Virtual Router 729 Redundancy Protocol (VRRP) interface."; 730 list virtual-ipv6-address { 731 key "ipv6-address"; 732 max-elements 2; 733 description 734 "Two IPv6 addresses are allowed. The first one must be 735 a link-local address and the second one can be a 736 link-local or global address."; 738 leaf ipv6-address { 739 type inet:ipv6-address; 740 description 741 "Virtual IPv6 address."; 742 } 743 } // virtual-ipv6-address 744 } // virtual-ipv6-addresses 745 } // grouping vrrp-ipv6-attributes 747 grouping vrrp-state-attributes { 748 description 749 "Group of VRRP state attributes."; 751 leaf state { 752 type identityref { 753 base vrrp-state-type; 754 } 755 description 756 "Operational state."; 757 } 759 leaf is-owner { 760 type boolean; 761 description 762 "Set to true if this virtual router is owner."; 763 } 765 leaf last-adv-source { 766 type inet:ip-address; 767 description 768 "Last advertised IPv4/IPv6 source address"; 769 } 771 leaf up-time { 772 type yang:date-and-time; 773 description 774 "The time when this virtual router 775 transitioned out of init state."; 776 } 778 leaf master-down-interval { 779 type uint32; 780 units centiseconds; 781 description 782 "Time interval for backup virtual router to declare 783 Master down."; 784 } 786 leaf skew-time { 787 type uint32; 788 units microseconds; 789 description 790 "Calculated based on the priority and advertisement 791 interval configuration command parameters. See RFC 3768."; 792 } 794 leaf last-event { 795 type string; 796 description 797 "Last reported event."; 798 } 800 leaf new-master-reason { 801 type new-master-reason-type; 802 description 803 "Indicates the reason for the virtual router to transition 804 to master state."; 805 } 807 container statistics { 808 description 809 "VRRP statistics."; 811 leaf discontinuity-time { 812 type yang:date-and-time; 813 description 814 "The time on the most recent occasion at which any one or 815 more of the VRRP statistic counters suffered a 816 discontinuity. If no such discontinuities have occurred 817 since the last re-initialization of the local management 818 subsystem, then this node contains the time that the 819 local management subsystem re-initialized itself."; 820 } 822 leaf master-transitions { 823 type yang:counter32; 824 description 825 "The total number of times that this virtual router's 826 state has transitioned to master"; 827 } 829 leaf advertisement-recv { 830 type yang:counter64; 831 description 832 "The total number of VRRP advertisements received by 833 this virtual router."; 834 } 836 leaf advertisement-sent { 837 type yang:counter64; 838 description 839 "The total number of VRRP advertisements sent by 840 this virtual router."; 841 } 843 leaf interval-errors { 844 if-feature validate-interval-errors; 845 type yang:counter64; 846 description 847 "The total number of VRRP advertisement packets 848 received with an advertisement interval 849 different than the one configured for the local 850 virtual router"; 851 } 853 leaf priority-zero-pkts-rcvd { 854 type yang:counter64; 855 description 856 "The total number of VRRP packets received by the 857 virtual router with a priority of 0."; 858 } 860 leaf priority-zero-pkts-sent { 861 type yang:counter64; 862 description 863 "The total number of VRRP packets sent by the 864 virtual router with a priority of 0."; 865 } 867 leaf invalid-type-pkts-rcvd { 868 type yang:counter64; 869 description 870 "The number of VRRP packets received by the virtual 871 router with an invalid value in the 'type' field."; 872 } 873 leaf address-list-errors { 874 if-feature validate-address-list-errors; 875 type yang:counter64; 876 description 877 "The total number of packets received with an 878 address list that does not match the locally 879 configured address list for the virtual router."; 880 } 882 leaf packet-length-errors { 883 type yang:counter64; 884 description 885 "The total number of packets received with a packet 886 length less than the length of the VRRP header."; 887 } 888 } // container statistics 889 } // grouping vrrp-state-attributes 891 grouping vrrp-global-state-attributes { 892 description 893 "Group of VRRP global state attributes."; 895 leaf virtual-routers { 896 type uint32; 897 description "Number of configured virtual routers."; 898 } 900 leaf interfaces { 901 type uint32; 902 description "Number of interface with VRRP configured."; 903 } 905 leaf checksum-errors { 906 type yang:counter64; 907 description 908 "The total number of VRRP packets received with an invalid 909 VRRP checksum value."; 910 reference "RFC 5798, Section 5.2.8"; 911 } 912 leaf version-errors { 913 type yang:counter64; 914 description 915 "The total number of VRRP packets received with an unknown 916 or unsupported version number."; 917 reference "RFC 5798, Section 5.2.1"; 918 } 920 leaf vrid-errors { 921 type yang:counter64; 922 description 923 "The total number of VRRP packets received with a VRID that 924 is not valid for any virtual router on this router."; 925 reference "RFC 5798, Section 5.2.3"; 926 } 928 leaf ip-ttl-errors { 929 type yang:counter64; 930 description 931 "The total number of VRRP packets received by the 932 virtual router with IP TTL (Time-To-Live) not equal 933 to 255."; 934 reference "RFC 5798, Sections 5.1.1.3 and 5.1.2.3."; 935 } 937 leaf global-statistics-discontinuity-time { 938 type yang:date-and-time; 939 description 940 "The time on the most recent occasion at which one of 941 router-checksum-errors, router-version-errors, 942 router-vrid-errors, and ip-ttl-errors suffered a 943 discontinuity. 945 If no such discontinuities have occurred since the last 946 re-initialization of the local management subsystem, 947 then this object will be 0."; 948 } 949 } // vrrp-global-state-attributes 951 /* 952 * Configuration data nodes 953 */ 955 augment "/if:interfaces/if:interface/ip:ipv4" { 956 description "Augment IPv4 interface."; 958 container vrrp { 959 description 960 "Configures the Virtual Router Redundancy Protocol (VRRP) 961 version 2 or version 3 for IPv4."; 963 list vrrp-instance { 964 key vrid; 965 description 966 "Defines a virtual router, identified by a virtual router 967 identifier (VRID), within IPv4 address space."; 969 uses vrrp-ipv4-attributes; 970 } 971 } 972 } // augment ipv4 974 augment "/if:interfaces/if:interface/ip:ipv6" { 975 description "Augment IPv6 interface."; 977 container vrrp { 978 description 979 "Configures the Virtual Router Redundancy Protocol (VRRP) 980 version 3 for IPv6."; 982 list vrrp-instance { 983 must "version = '3'" { 984 description 985 "IPv6 is only supported by version 3."; 986 } 987 key vrid; 988 description 989 "Defines a virtual router, identified by a virtual router 990 identifier (VRID), within IPv6 address space."; 992 uses vrrp-ipv6-attributes; 993 } // list vrrp-instance 995 } // container vrrp 996 } // augment ipv6 998 /* 999 * Operational state data nodes 1000 */ 1002 augment "/if:interfaces-state/if:interface/ip:ipv4" { 1003 description "Augment IPv4 interface state."; 1005 container vrrp { 1006 description 1007 "State information for Virtual Router Redundancy Protocol 1008 (VRRP) version 2 for IPv4."; 1010 list vrrp-instance { 1011 key vrid; 1012 description 1013 "States of a virtual router, identified by a virtual router 1014 identifier (VRID), within IPv4 address space."; 1016 uses vrrp-ipv4-attributes; 1017 uses vrrp-state-attributes; 1018 } // list vrrp-instance 1019 } 1020 } 1022 augment "/if:interfaces-state/if:interface/ip:ipv6" { 1023 description "Augment IPv6 interface state."; 1025 container vrrp { 1026 description 1027 "State information of the Virtual Router Redundancy Protocol 1028 (VRRP) version 2 or version 3 for IPv6."; 1030 list vrrp-instance { 1031 key vrid; 1032 description 1033 "States of a virtual router, identified by a virtual router 1034 identifier (VRID), within IPv6 address space."; 1036 uses vrrp-ipv6-attributes; 1037 uses vrrp-state-attributes; 1038 } // list vrrp-instance 1039 } 1040 } 1042 augment "/if:interfaces-state" { 1043 description "Specify VRRP state data at the global level."; 1045 container vrrp-global { 1046 description 1047 "State information of the Virtual Router Redundancy Protocol 1048 (VRRP) at the global level"; 1050 uses vrrp-global-state-attributes; 1051 } 1052 } 1054 /* 1055 * Notifications 1056 */ 1058 notification vrrp-new-master-event { 1059 description 1060 "Notification event for a change of VRRP new master."; 1061 leaf master-ipaddr { 1062 type inet:ipv4-address; 1063 description 1064 "IPv4 or IPv6 address of the new master."; 1065 } 1066 leaf new-master-reason { 1067 type new-master-reason-type; 1068 description 1069 "Indicates the reason for the virtual router to transition 1070 to master state."; 1071 } 1072 } 1074 notification vrrp-protocol-error-event { 1075 description 1076 "Notification event for a VRRP protocol error."; 1078 leaf protocol-error-reason { 1079 type enumeration { 1080 enum checksum-error { 1081 description 1082 "A packet has been received with an invalid VRRP checksum 1083 value."; 1084 } 1085 enum version-error { 1086 description 1087 "A packet has been received with an unknown or 1088 unsupported version number."; 1089 } 1090 enum vrid-error { 1091 description 1092 "A packet has been received with a VRID that is not valid 1093 for any virtual router on this router."; 1094 } 1095 enum ip-ttl-error { 1096 description 1097 "A packet has been received with IP TTL (Time-To-Live) 1098 not equal to 255."; 1099 } 1100 } 1101 description 1102 "Indicates the reason for the protocol error."; 1103 } 1104 } 1106 notification vrrp-virtual-router-error-event { 1107 description 1108 "Notification event for an error happened on a virtual 1109 router."; 1110 leaf interface { 1111 type if:interface-ref; 1112 description 1113 "Indicates the interface for which statistics area 1114 to be cleared."; 1115 } 1116 leaf ip-version { 1117 type enumeration { 1118 enum 4 { 1119 description "IPv4"; 1120 } 1121 enum 6 { 1122 description "IPv6"; 1123 } 1124 } 1125 description "Indicates the IP version."; 1126 } 1127 leaf vrid-v4 { 1128 type leafref { 1129 path "/if:interfaces/if:interface" 1130 + "[if:name = current()/../interface]/ip:ipv4/vrrp/" 1131 + "vrrp-instance/vrid"; 1132 } 1133 description 1134 "Indicates the virtual router on which the event has 1135 occurred."; 1136 } 1138 leaf vrid-v6 { 1139 type leafref { 1140 path "/if:interfaces/if:interface" 1141 + "[if:name = current()/../interface]/ip:ipv6/vrrp/" 1142 + "vrrp-instance/vrid"; 1143 } 1144 description 1145 "Indicates the virtual router on which the event has 1146 occurred."; 1147 } 1148 leaf virtual-router-error-reason { 1149 type enumeration { 1150 enum interval-error { 1151 description 1152 "A packet has been received with an advertisement 1153 interval different than the one configured for the local 1154 virtual router"; 1155 } 1156 enum address-list-error { 1157 description 1158 "A packet has been received with an address list that 1159 does not match the locally configured address list for 1160 the virtual router."; 1161 } 1162 enum packet-length-error { 1163 description 1164 "A packet has been received with a packet length less 1165 than the length of the VRRP header."; 1166 } 1167 } 1168 description 1169 "Indicates the reason for the virtual router error."; 1170 } 1171 } 1172 } 1173 1175 4. IANA Considerations 1177 RFC Ed.: In this section, replace all occurrences of 'XXXX' with the 1178 actual RFC number (and remove this note). 1180 This document registers the following namespace URIs in the IETF XML 1181 registry [RFC3688]: 1183 -------------------------------------------------------------------- 1184 URI: urn:ietf:params:xml:ns:yang:ietf-vrrp 1185 Registrant Contact: The IESG. 1186 XML: N/A, the requested URI is an XML namespace. 1187 -------------------------------------------------------------------- 1189 This document registers the following YANG modules in the YANG Module 1190 Names registry [RFC6020]: 1192 -------------------------------------------------------------------- 1193 name: ietf-vrrp 1194 namespace: urn:ietf:params:xml:ns:yang:ietf-vrrp 1195 prefix: vrrp 1196 reference: RFC XXXX 1197 -------------------------------------------------------------------- 1199 5. Security Considerations 1201 The configuration, state, action and notification data defined in 1202 this document are designed to be accessed via the NETCONF protocol 1203 [RFC6241]. The data-model by itself does not create any security 1204 implications. The security considerations for the NETCONF protocol 1205 are applicable. The NETCONF protocol used for sending the data 1206 supports authentication and encryption. 1208 6. References 1210 6.1. Normative References 1212 [RFC6020] Bjorklund, M., "YANG - A Data Modeling Language for the 1213 Network Configuration Protocol (NETCONF)", RFC 6020, 1214 October 2010. 1216 [RFC6021] Schoenwaelder, J., "Common YANG Data Types", RFC 6021, 1217 October 2010. 1219 [RFC6241] Enns, R., Bjorklund, M., Schoenwaelder, J., and A. Bierman, 1220 "Network Configuration Protocol (NETCONF)", RFC 6241, June 1221 2011. 1223 [RFC2234] Crocker, D. and Overell, P.(Editors), "Augmented BNF for 1224 Syntax Specifications: ABNF", RFC 2234, Internet Mail 1225 Consortium and Demon Internet Ltd., November 1997. 1227 [RFC2338] Knight, S., Weaver, D., Whipple, D., Hinden, R., Mitzel, 1228 D., Hunt, P., Higginson, P., Shand, M., and A. Lindem, 1229 "Virtual Router Redundancy Protocol", RFC 2338, April 1998. 1231 [RFC2787] Jewell, B. and D. Chuang, "Definitions of Managed Objects 1232 for the Virtual Router Redundancy Protocol", RFC 2787, 1233 March 2000. 1235 [RFC5798] Nadas, S., Ed., "Virtual Router Redundancy Protocol (VRRP) 1236 Version 3 for IPv4 and IPv6", RFC 5798, March 2010. 1238 [RFC6527] Tata, K., Ed., "Definitions of Managed Objects for the 1239 Virtual Router Redundancy Protocol Version 3 (VRRPv3)", RFC 1240 6527, March 2012. 1242 6.2. Informative References 1244 [RFC6087] Bierman, A., "Guidelines for Authors and Reviewers of YANG 1245 Data Model Documents", RFC 6087, January 2011. 1247 Authors' Addresses 1249 Xufeng Liu (Editor) 1250 Kuatro Technologies 1251 8281 Greensboro Drive, Suite 200 1252 McLean, VA 22102 1253 USA 1255 Email: xliu@kuatrotech.com 1257 Athanasios Kyparlis 1258 Kuatro Technologies 1259 8281 Greensboro Drive, Suite 200 1260 McLean, VA 22102 1261 USA 1263 Email: akyparlis@kuatrotech.com 1265 Ravi Parikh 1266 VMware 1267 3425 Hillview Avenue 1268 Palo Alto, CA 94304 1269 USA 1271 Email: parikhr@vmware.com 1273 Acee Lindem 1274 Cisco Systems 1275 301 Midenhall Way 1276 Cary, NC 27513 1277 USA 1279 Email: acee@cisco.com 1281 Mingui Zhang 1282 Huawei Technologies 1283 No. 156 Beiqing Rd. Haidian District 1284 Beijing 100095 1285 P.R. China 1287 Email: zhangmingui@huawei.com