draft-ietf-rtgwg-yang-vrrp-04.txt   draft-ietf-rtgwg-yang-vrrp-05.txt 
Network Working Group X. Liu, Ed. Network Working Group X. Liu, Ed.
Internet-Draft A. Kyparlis Internet-Draft A. Kyparlis
Intended status: Standards Track Jabil Intended status: Standards Track Jabil
Expires: December 1, 2017 R. Parikh Expires: April 3, 2018 R. Parikh
VMware VMware
A. Lindem A. Lindem
Cisco Systems Cisco Systems
M. Zhang M. Zhang
Huawei Technologies Huawei Technologies
May 30, 2017 September 30, 2017
A YANG Data Model for Virtual Router Redundancy Protocol (VRRP) A YANG Data Model for Virtual Router Redundancy Protocol (VRRP)
draft-ietf-rtgwg-yang-vrrp-04 draft-ietf-rtgwg-yang-vrrp-05
Abstract Abstract
This document describes a data model for Virtual Router Redundancy This document describes a data model for Virtual Router Redundancy
Protocol (VRRP). Both version 2 and version 3 of VRRP are covered. Protocol (VRRP). Both version 2 and version 3 of VRRP are covered.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
skipping to change at page 1, line 37 skipping to change at page 1, line 37
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on December 1, 2017. This Internet-Draft will expire on April 3, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 17 skipping to change at page 2, line 17
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2
1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 3 1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . 3
1.3. Prefixes in Data Node Names . . . . . . . . . . . . . . . 3 1.3. Prefixes in Data Node Names . . . . . . . . . . . . . . . 3
2. Design of the Data Model . . . . . . . . . . . . . . . . . . 4 2. Design of the Data Model . . . . . . . . . . . . . . . . . . 4
2.1. Scope of the Model . . . . . . . . . . . . . . . . . . . 4 2.1. Scope of the Model . . . . . . . . . . . . . . . . . . . 4
2.2. Relations with Interface Model and IP Model . . . . . . . 4 2.2. Relations with Interface Model and IP Model . . . . . . . 4
2.3. Protocol Configuration . . . . . . . . . . . . . . . . . 6 2.3. Protocol Configuration . . . . . . . . . . . . . . . . . 5
2.4. Protocol States . . . . . . . . . . . . . . . . . . . . . 8 2.4. Protocol States . . . . . . . . . . . . . . . . . . . . . 7
2.5. Notifications . . . . . . . . . . . . . . . . . . . . . . 9 2.5. Notifications . . . . . . . . . . . . . . . . . . . . . . 8
3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 10 3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 10
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 32 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 31
5. Security Considerations . . . . . . . . . . . . . . . . . . . 33 5. Security Considerations . . . . . . . . . . . . . . . . . . . 31
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 33 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.1. Normative References . . . . . . . . . . . . . . . . . . 33 6.1. Normative References . . . . . . . . . . . . . . . . . . 32
6.2. Informative References . . . . . . . . . . . . . . . . . 34 6.2. Informative References . . . . . . . . . . . . . . . . . 33
Appendix A. Complete Model Tree Structure . . . . . . . . . . . 36 Appendix A. Complete Model Tree Structure . . . . . . . . . . . 35
Appendix B. Data Tree Example . . . . . . . . . . . . . . . . . 39 Appendix B. Data Tree Example . . . . . . . . . . . . . . . . . 37
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 42 Appendix C. YANG Model for Non-NMDA Compliant Implementations . 41
C.1. Non-NMDA YANG Module . . . . . . . . . . . . . . . . . . 41
C.2. Non-NMDA Model Tree Structure . . . . . . . . . . . . . . 64
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 67
1. Introduction 1. Introduction
This document introduces a YANG [RFC6020][RFC7950] data model for This document introduces a YANG [RFC6020][RFC7950] data model for
Virtual Router Redundancy Protocol (VRRP) [RFC3768][RFC5798]. VRRP Virtual Router Redundancy Protocol (VRRP) [RFC3768][RFC5798]. VRRP
provides higher resiliency by specifying an election protocol that provides higher resiliency by specifying an election protocol that
dynamically assigns responsibility for a virtual router to one of the dynamically assigns responsibility for a virtual router to one of the
VRRP routers on a LAN. VRRP routers on a LAN.
This YANG model supports both version 2 and version 3 of VRRP. VRRP This YANG model supports both version 2 and version 3 of VRRP. VRRP
skipping to change at page 3, line 39 skipping to change at page 4, line 5
shown. shown.
1.3. Prefixes in Data Node Names 1.3. Prefixes in Data Node Names
In this document, names of data nodes, actions, and other data model In this document, names of data nodes, actions, and other data model
objects are often used without a prefix, as long as it is clear from objects are often used without a prefix, as long as it is clear from
the context in which YANG module each name is defined. Otherwise, the context in which YANG module each name is defined. Otherwise,
names are prefixed using the standard prefix associated with the names are prefixed using the standard prefix associated with the
corresponding YANG module, as shown in Table 1. corresponding YANG module, as shown in Table 1.
+--------+-----------------+-----------+ +--------+-----------------+-----------------------------------+
| Prefix | YANG module | Reference | | Prefix | YANG module | Reference |
+--------+-----------------+-----------+ +--------+-----------------+-----------------------------------+
| yang | ietf-yang-types | [RFC6991] | | yang | ietf-yang-types | [RFC6991] |
| inet | ietf-inet-types | [RFC6991] | | inet | ietf-inet-types | [RFC6991] |
| if | ietf-interfaces | [RFC7223] | | if | ietf-interfaces | [I-D.bjorklund-netmod-rfc7223bis] |
| ip | ietf-ip | [RFC7277] | | ip | ietf-ip | [I-D.bjorklund-netmod-rfc7277bis] |
+--------+-----------------+-----------+ +--------+-----------------+-----------------------------------+
Table 1: Prefixes and Corresponding YANG Modules Table 1: Prefixes and Corresponding YANG Modules
2. Design of the Data Model 2. Design of the Data Model
2.1. Scope of the Model 2.1. Scope of the Model
The model covers VRRP version 2 [RFC3768] and VRRP version 3 The model covers VRRP version 2 [RFC3768] and VRRP version 3
[RFC5798] protocols. The model is designed to be implemented on a [RFC5798] protocols. The model is designed to be implemented on a
device where VRRP version 2 or version 3 is implemented. With the device where VRRP version 2 or version 3 is implemented. With the
skipping to change at page 4, line 26 skipping to change at page 4, line 37
o Manage the protocol operational behavior. o Manage the protocol operational behavior.
o Retrieve the protocol operational status. o Retrieve the protocol operational status.
o Receive the protocol notifications. o Receive the protocol notifications.
2.2. Relations with Interface Model and IP Model 2.2. Relations with Interface Model and IP Model
This model augments the interface data model "ietf-interfaces" This model augments the interface data model "ietf-interfaces"
[RFC7223] and the IP management model "ietf-ip" [RFC7277]. The [I-D.bjorklund-netmod-rfc7223bis] and the IP management model "ietf-
augmentation relations are shown as follows: ip" [I-D.bjorklund-netmod-rfc7277bis]. The augmentation relations
are shown as follows:
module: ietf-interfaces module: ietf-interfaces
+--rw interfaces +--rw interfaces
| +--rw interface* [name] +--rw interface* [name]
...
| +--rw ip:ipv4!
| | +--rw ip:address* [ip]
...
| | +--rw vrrp:vrrp
| | +--rw vrrp:vrrp-instance* [vrid]
| | +--rw vrrp:vrid uint8
| | +--rw vrrp:virtual-ipv4-addresses
...
| +--rw ip:ipv6!
| +--rw ip:address* [ip]
...
| +--rw vrrp:vrrp
| +--rw vrrp:vrrp-instance* [vrid]
| +--rw vrrp:vrid uint8
| +--rw vrrp:virtual-ipv6-addresses
...
+--ro interfaces-state
+--ro interface* [name]
... ...
| +--ro ip:ipv4! +--rw ip:ipv4!
| | +--ro ip:address* [ip] | +--rw ip:address* [ip]
... ...
| | +--ro vrrp:vrrp | +--rw vrrp:vrrp
| | +--ro vrrp:vrrp-instance* [vrid] | +--rw vrrp:vrrp-instance* [vrid]
| | +--ro vrrp:vrid uint8 | +--rw vrrp:vrid uint8
| | +--ro vrrp:virtual-ipv4-addresses | +--rw vrrp:virtual-ipv4-addresses
... ...
| +--ro ip:ipv6! +--rw ip:ipv6!
| +--ro ip:address* [ip] +--rw ip:address* [ip]
... ...
| +--ro vrrp:vrrp +--rw vrrp:vrrp
| +--ro vrrp:vrrp-instance* [vrid] +--rw vrrp:vrrp-instance* [vrid]
| +--ro vrrp:vrid uint8 +--rw vrrp:vrid uint8
| +--ro vrrp:virtual-ipv6-addresses +--rw vrrp:virtual-ipv6-addresses
... ...
+--ro vrrp:vrrp-global
...
In the above figure, a tree node without a prefix is from the model In the above figure, a tree node without a prefix is from the model
"ietf-interfaces". A tree node with prefix "ip:" is from the model "ietf-interfaces". A tree node with prefix "ip:" is from the model
"ietf-ip". A tree node with prefix "vrrp:" is from the VRRP model "ietf-ip". A tree node with prefix "vrrp:" is from the VRRP model
specified in this document. specified in this document.
The "vrrp" container contains a list of vrrp-instance nodes, which The "vrrp" container contains a list of vrrp-instance nodes, which
are instantiated under an interface for a specified address family are instantiated under an interface for a specified address family
(IPv4 or IPv6). (IPv4 or IPv6).
skipping to change at page 8, line 9 skipping to change at page 7, line 9
o Virtual IPv4 or IPv6 address associated with a virtual router. o Virtual IPv4 or IPv6 address associated with a virtual router.
o Tracking interface, to detect interface connectivity failures. o Tracking interface, to detect interface connectivity failures.
o Tracking network, to detect interface connectivity failures. o Tracking network, to detect interface connectivity failures.
2.4. Protocol States 2.4. Protocol States
The model structure for the protocol states is as shown below: The model structure for the protocol states is as shown below:
augment /if:interfaces-state/if:interface/ip:ipv4: module: ietf-vrrp
+--ro vrrp +--rw vrrp
+--ro vrrp-instance* [vrid] +--ro <global operational states>
+--ro vrid uint8 +--ro statistics
+--ro discontinuity-datetime? yang:date-and-time
+--ro <global statistics>
augment /if:interfaces/if:interface/ip:ipv4:
+--rw vrrp
+--rw vrrp-instance* [vrid]
+--rw vrid uint8
| ... | ...
+--ro track +--rw track
| +--ro interfaces | +--rw interfaces
| | +--ro interface* [interface] | | +--rw interface* [interface]
| | +--ro interface if:interface-ref | | +--rw interface if:interface-ref
| | ... | | ...
| +--ro networks | +--rw networks
| +--ro network* [prefix] | +--rw network* [prefix]
| +--ro prefix inet:ipv4-prefix | +--wo prefix inet:ipv4-prefix
| ... | ...
+--ro virtual-ipv4-addresses +--rw virtual-ipv4-addresses
| +--ro virtual-ipv4-address* [ipv4-address] | +--rw virtual-ipv4-address* [ipv4-address]
| +--ro ipv4-address inet:ipv4-address | +--rw ipv4-address inet:ipv4-address
| |
+--ro <per instance operational states> +--ro <per instance operational states>
+--ro statistics +--ro statistics
+--ro <per instance statistics> +--ro <per instance statistics>
augment /if:interfaces-state/if:interface/ip:ipv6: augment /if:interfaces/if:interface/ip:ipv6:
+--ro vrrp +--rw vrrp
+--ro vrrp-instance* [vrid] +--rw vrrp-instance* [vrid]
+--ro vrid uint8 +--rw vrid uint8
+ ... + ...
+--ro track +--rw track
| +--ro interfaces | +--rw interfaces
| | +--ro interface* [interface] | | +--rw interface* [interface]
| | +--ro interface if:interface-ref | | +--rw interface if:interface-ref
| | ... | | ...
| +--ro networks | +--rw networks
| +--ro network* [prefix] | +--rw network* [prefix]
| +--ro prefix inet:ipv6-prefix | +--rw prefix inet:ipv6-prefix
| ... | ...
+--ro virtual-ipv6-addresses
| +--ro virtual-ipv6-address* [ipv6-address] +--rw virtual-ipv6-addresses
| +--ro ipv6-address inet:ipv6-address | +--rw virtual-ipv6-address* [ipv6-address]
| +--rw ipv6-address inet:ipv6-address
| |
+--ro <per instance operational states> +--ro <per instance operational states>
+--ro statistics +--ro statistics
+--ro <per instance statistics> +--ro <per instance statistics>
augment /if:interfaces-state: This model conforms to the Network Management Datastore Architecture
+--ro vrrp-global (NMDA) [I-D.ietf-netmod-revised-datastores]. The operational state
+--ro <global operational states> data is combined with the associated configuration data in the same
+--ro statistics hierarchy [I-D.ietf-netmod-rfc6087bis]. When protocol states are
+--ro <global statistics> retrieved from the NMDA operational state datastore, the returned
states cover all "config true" (rw) and "config false" (ro) nodes
defined in the schema.
The model allows to retrieve protocol states at the following levels: The model allows to retrieve protocol states at the following levels:
o VRRP instance (version 2 or version 3), representing a VRRP o VRRP instance (version 2 or version 3), representing a VRRP
router. router.
o Virtual IPv4 or IPv6 address associated with a virtual router. o Virtual IPv4 or IPv6 address associated with a virtual router.
o Tracking interface, to detect interface connectivity failures. o Tracking interface, to detect interface connectivity failures.
skipping to change at page 10, line 29 skipping to change at page 10, line 7
o Subscribe notifications on a per client basis. o Subscribe notifications on a per client basis.
o Specify subtree filters or xpath filters so that only interested o Specify subtree filters or xpath filters so that only interested
contents will be sent. contents will be sent.
o Specify either periodic or on-demand notifications. o Specify either periodic or on-demand notifications.
3. YANG Module 3. YANG Module
<CODE BEGINS> file "ietf-vrrp@2017-04-27.yang" <CODE BEGINS> file "ietf-vrrp@2017-09-25.yang"
module ietf-vrrp { module ietf-vrrp {
yang-version 1.1; yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-vrrp"; namespace "urn:ietf:params:xml:ns:yang:ietf-vrrp";
prefix "vrrp"; prefix "vrrp";
import ietf-inet-types { import ietf-inet-types {
prefix "inet"; prefix "inet";
} }
import ietf-yang-types { import ietf-yang-types {
skipping to change at page 11, line 35 skipping to change at page 11, line 12
Editor: Acee Lindem Editor: Acee Lindem
<mailto:acee@cisco.com> <mailto:acee@cisco.com>
Editor: Mingui Zhang Editor: Mingui Zhang
<mailto:zhangmingui@huawei.com>"; <mailto:zhangmingui@huawei.com>";
description description
"This YANG module defines a model for managing Virtual Router "This YANG module defines a model for managing Virtual Router
Redundancy Protocol (VRRP) version 2 and version 3."; Redundancy Protocol (VRRP) version 2 and version 3.";
revision 2017-04-27 { revision 2017-09-25 {
description "Initial revision"; description "Initial revision";
reference reference
"RFC XXXX: A YANG Data Model for Virtual Router Redundancy "RFC XXXX: A YANG Data Model for Virtual Router Redundancy
Protocol (VRRP). Protocol (VRRP).
RFC 2787: Definitions of Managed Objects for the Virtual RFC 2787: Definitions of Managed Objects for the Virtual
Router Redundancy Protocol. Router Redundancy Protocol.
RFC 3768: Virtual Router Redundancy Protocol (VRRP). RFC 3768: Virtual Router Redundancy Protocol (VRRP).
RFC 5798: Virtual Router Redundancy Protocol (VRRP) Version 3. RFC 5798: Virtual Router Redundancy Protocol (VRRP) Version 3.
RFC 6527: Definitions of Managed Objects for the Virtual RFC 6527: Definitions of Managed Objects for the Virtual
Router Redundancy Protocol Version 3 (VRRPv3)."; Router Redundancy Protocol Version 3 (VRRPv3).";
skipping to change at page 17, line 13 skipping to change at page 16, line 37
type uint8 { type uint8 {
range 1..255; range 1..255;
} }
description "Virtual router ID."; description "Virtual router ID.";
} }
leaf version { leaf version {
type identityref { type identityref {
base vrrp:vrrp-version; base vrrp:vrrp-version;
} }
mandatory "true"; mandatory true;
description "Version 2 or version 3 of VRRP."; description "Version 2 or version 3 of VRRP.";
} }
leaf log-state-change { leaf log-state-change {
type boolean; type boolean;
default "false"; default "false";
description description
"Generates VRRP state change messages each time the VRRP "Generates VRRP state change messages each time the VRRP
instance changes state (from up to down or down to up)."; instance changes state (from up to down or down to up).";
} }
skipping to change at page 18, line 14 skipping to change at page 17, line 38
description description
"Configures the Virtual Router Redundancy Protocol (VRRP) "Configures the Virtual Router Redundancy Protocol (VRRP)
election priority for the backup virtual router."; election priority for the backup virtual router.";
} }
leaf accept-mode { leaf accept-mode {
when "derived-from-or-self(current()/../version, 'vrrp-v3')" { when "derived-from-or-self(current()/../version, 'vrrp-v3')" {
description "Applicable only to version 3."; description "Applicable only to version 3.";
} }
type boolean; type boolean;
default false; default "false";
description description
"Controls whether a virtual router in Master state will "Controls whether a virtual router in Master state will
accept packets addressed to the address owner's IPvX address accept packets addressed to the address owner's IPvX address
as its own if it is not the IPvX address owner. The default as its own if it is not the IPvX address owner. The default
is false. Deployments that rely on, for example, pinging the is false. Deployments that rely on, for example, pinging the
address owner's IPvX address may wish to configure address owner's IPvX address may wish to configure
accept-mode to true. accept-mode to true.
Note: IPv6 Neighbor Solicitations and Neighbor Note: IPv6 Neighbor Solicitations and Neighbor
Advertisements MUST NOT be dropped when accept-mode is Advertisements MUST NOT be dropped when accept-mode is
skipping to change at page 24, line 4 skipping to change at page 23, line 28
} // grouping vrrp-ipv6-attributes } // grouping vrrp-ipv6-attributes
grouping vrrp-state-attributes { grouping vrrp-state-attributes {
description description
"Group of VRRP state attributes."; "Group of VRRP state attributes.";
leaf state { leaf state {
type identityref { type identityref {
base vrrp:vrrp-state-type; base vrrp:vrrp-state-type;
} }
config false;
description description
"Operational state."; "Operational state.";
} }
leaf is-owner { leaf is-owner {
type boolean; type boolean;
config false;
description description
"Set to true if this virtual router is owner."; "Set to true if this virtual router is owner.";
} }
leaf last-adv-source { leaf last-adv-source {
type inet:ip-address; type inet:ip-address;
config false;
description description
"Last advertised IPv4/IPv6 source address"; "Last advertised IPv4/IPv6 source address";
} }
leaf up-datetime { leaf up-datetime {
type yang:date-and-time; type yang:date-and-time;
config false;
description description
"The date and time when this virtual router "The date and time when this virtual router
transitioned out of init state."; transitioned out of init state.";
} }
leaf master-down-interval { leaf master-down-interval {
type uint32; type uint32;
units centiseconds; units centiseconds;
config false;
description description
"Time interval for backup virtual router to declare "Time interval for backup virtual router to declare
Master down."; Master down.";
} }
leaf skew-time { leaf skew-time {
type uint32; type uint32;
units microseconds; units microseconds;
config false;
description description
"Calculated based on the priority and advertisement "Calculated based on the priority and advertisement
interval configuration command parameters. See RFC 3768."; interval configuration command parameters. See RFC 3768.";
} }
leaf last-event { leaf last-event {
type identityref { type identityref {
base vrrp:vrrp-event-type; base vrrp:vrrp-event-type;
} }
config false;
description description
"Last reported event."; "Last reported event.";
} }
leaf new-master-reason { leaf new-master-reason {
type new-master-reason-type; type new-master-reason-type;
config false;
description description
"Indicates the reason for the virtual router to transition "Indicates the reason for the virtual router to transition
to master state."; to master state.";
} }
container statistics { container statistics {
config false;
description description
"VRRP statistics."; "VRRP statistics.";
leaf discontinuity-datetime { leaf discontinuity-datetime {
type yang:date-and-time; type yang:date-and-time;
description description
"The time on the most recent occasion at which any one or "The time on the most recent occasion at which any one or
more of the VRRP statistic counters suffered a more of the VRRP statistic counters suffered a
discontinuity. If no such discontinuities have occurred discontinuity. If no such discontinuities have occurred
since the last re-initialization of the local management since the last re-initialization of the local management
skipping to change at page 27, line 5 skipping to change at page 26, line 38
} }
} // container statistics } // container statistics
} // grouping vrrp-state-attributes } // grouping vrrp-state-attributes
grouping vrrp-global-state-attributes { grouping vrrp-global-state-attributes {
description description
"Group of VRRP global state attributes."; "Group of VRRP global state attributes.";
leaf virtual-routers { leaf virtual-routers {
type uint32; type uint32;
config false;
description "Number of configured virtual routers."; description "Number of configured virtual routers.";
} }
leaf interfaces { leaf interfaces {
type uint32; type uint32;
config false;
description "Number of interface with VRRP configured."; description "Number of interface with VRRP configured.";
} }
container statistics { container statistics {
config false;
description description
"VRRP global statistics."; "VRRP global statistics.";
leaf discontinuity-datetime { leaf discontinuity-datetime {
type yang:date-and-time; type yang:date-and-time;
description description
"The time on the most recent occasion at which one of "The time on the most recent occasion at which one of
checksum-errors, version-errors, vrid-errors, and checksum-errors, version-errors, vrid-errors, and
ip-ttl-errors suffered a discontinuity. ip-ttl-errors suffered a discontinuity.
skipping to change at page 28, line 17 skipping to change at page 28, line 4
leaf ip-ttl-errors { leaf ip-ttl-errors {
type yang:counter64; type yang:counter64;
description description
"The total number of VRRP packets received by the "The total number of VRRP packets received by the
virtual router with IP TTL (Time-To-Live) not equal virtual router with IP TTL (Time-To-Live) not equal
to 255."; to 255.";
reference "RFC 5798, Sections 5.1.1.3 and 5.1.2.3."; reference "RFC 5798, Sections 5.1.1.3 and 5.1.2.3.";
} }
} // statistics } // statistics
} // vrrp-global-state-attributes } // vrrp-global-state-attributes
/* /*
* Configuration data nodes * Configuration data and operational state data nodes
*/ */
augment "/if:interfaces/if:interface/ip:ipv4" { augment "/if:interfaces/if:interface/ip:ipv4" {
description "Augment IPv4 interface."; description "Augment IPv4 interface.";
container vrrp { container vrrp {
description description
"Configures the Virtual Router Redundancy Protocol (VRRP) "Configures the Virtual Router Redundancy Protocol (VRRP)
version 2 or version 3 for IPv4."; version 2 or version 3 for IPv4.";
list vrrp-instance { list vrrp-instance {
key vrid; key "vrid";
description description
"Defines a virtual router, identified by a virtual router "Defines a virtual router, identified by a virtual router
identifier (VRID), within IPv4 address space."; identifier (VRID), within IPv4 address space.";
uses vrrp-ipv4-attributes; uses vrrp-ipv4-attributes;
uses vrrp-state-attributes;
} }
} }
} // augment ipv4 } // augment ipv4
augment "/if:interfaces/if:interface/ip:ipv6" { augment "/if:interfaces/if:interface/ip:ipv6" {
description "Augment IPv6 interface."; description "Augment IPv6 interface.";
container vrrp { container vrrp {
description description
"Configures the Virtual Router Redundancy Protocol (VRRP) "Configures the Virtual Router Redundancy Protocol (VRRP)
skipping to change at page 29, line 4 skipping to change at page 28, line 40
container vrrp { container vrrp {
description description
"Configures the Virtual Router Redundancy Protocol (VRRP) "Configures the Virtual Router Redundancy Protocol (VRRP)
version 3 for IPv6."; version 3 for IPv6.";
list vrrp-instance { list vrrp-instance {
must "derived-from-or-self(version, 'vrrp-v3')" { must "derived-from-or-self(version, 'vrrp-v3')" {
description description
"IPv6 is only supported by version 3."; "IPv6 is only supported by version 3.";
} }
key vrid; key "vrid";
description description
"Defines a virtual router, identified by a virtual router "Defines a virtual router, identified by a virtual router
identifier (VRID), within IPv6 address space."; identifier (VRID), within IPv6 address space.";
uses vrrp-ipv6-attributes; uses vrrp-ipv6-attributes;
uses vrrp-state-attributes;
} // list vrrp-instance } // list vrrp-instance
} // container vrrp } // container vrrp
} // augment ipv6 } // augment ipv6
container vrrp {
description "VRRP data at the global level.";
/* uses vrrp-global-state-attributes;
* Operational state data nodes
*/
augment "/if:interfaces-state/if:interface/ip:ipv4" {
description "Augment IPv4 interface state.";
container vrrp {
description
"State information for Virtual Router Redundancy Protocol
(VRRP) version 2 for IPv4.";
list vrrp-instance {
key vrid;
description
"States of a virtual router, identified by a virtual router
identifier (VRID), within IPv4 address space.";
uses vrrp-ipv4-attributes;
uses vrrp-state-attributes;
} // list vrrp-instance
}
}
augment "/if:interfaces-state/if:interface/ip:ipv6" {
description "Augment IPv6 interface state.";
container vrrp {
description
"State information of the Virtual Router Redundancy Protocol
(VRRP) version 2 or version 3 for IPv6.";
list vrrp-instance {
key vrid;
description
"States of a virtual router, identified by a virtual router
identifier (VRID), within IPv6 address space.";
uses vrrp-ipv6-attributes;
uses vrrp-state-attributes;
} // list vrrp-instance
}
}
augment "/if:interfaces-state" {
description "Specify VRRP state data at the global level.";
container vrrp-global {
description
"State information of the Virtual Router Redundancy Protocol
(VRRP) at the global level";
uses vrrp-global-state-attributes;
}
} }
/* /*
* Notifications * Notifications
*/ */
notification vrrp-new-master-event { notification vrrp-new-master-event {
description description
"Notification event for a change of VRRP new master."; "Notification event for a change of VRRP new master.";
leaf master-ip-address { leaf master-ip-address {
type inet:ip-address; type inet:ip-address;
mandatory "true"; mandatory true;
description description
"IPv4 or IPv6 address of the new master."; "IPv4 or IPv6 address of the new master.";
} }
leaf new-master-reason { leaf new-master-reason {
type new-master-reason-type; type new-master-reason-type;
mandatory "true"; mandatory true;
description description
"Indicates the reason for the virtual router to transition "Indicates the reason for the virtual router to transition
to master state."; to master state.";
} }
} }
notification vrrp-protocol-error-event { notification vrrp-protocol-error-event {
description description
"Notification event for a VRRP protocol error."; "Notification event for a VRRP protocol error.";
leaf protocol-error-reason { leaf protocol-error-reason {
type identityref { type identityref {
base vrrp:vrrp-error-global; base vrrp:vrrp-error-global;
} }
mandatory "true"; mandatory true;
description description
"Indicates the reason for the protocol error."; "Indicates the reason for the protocol error.";
} }
} }
notification vrrp-virtual-router-error-event { notification vrrp-virtual-router-error-event {
description description
"Notification event for an error happened on a virtual "Notification event for an error happened on a virtual
router."; router.";
leaf interface { leaf interface {
type if:interface-ref; type if:interface-ref;
mandatory "true"; mandatory true;
description description
"Indicates the interface for which statistics area "Indicates the interface for which statistics area
to be cleared."; to be cleared.";
} }
choice ip-version { choice ip-version {
mandatory "true"; mandatory true;
description description
"The error may have happened on either an IPv4 virtual "The error may have happened on either an IPv4 virtual
router or an IPv6 virtual router. The information router or an IPv6 virtual router. The information
related to a specific IP version is provided by one of related to a specific IP version is provided by one of
the following cases."; the following cases.";
case ipv4 { case ipv4 {
description "IPv4"; description "IPv4";
container ipv4 { container ipv4 {
description description
"Error information for IPv4."; "Error information for IPv4.";
leaf vrid { leaf vrid {
type leafref { type leafref {
path "/if:interfaces/if:interface" path "/if:interfaces/if:interface"
+ "[if:name = current()/../../vrrp:interface]/" + "[if:name = current()/../../vrrp:interface]/"
+ "ip:ipv4/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid"; + "ip:ipv4/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid";
} }
mandatory "true"; mandatory true;
description description
"Indicates the virtual router on which the event has "Indicates the virtual router on which the event has
occurred."; occurred.";
} }
} }
} }
case ipv6 { case ipv6 {
description "IPv6"; description "IPv6";
container ipv6 { container ipv6 {
description description
"Error information for IPv6."; "Error information for IPv6.";
leaf vrid { leaf vrid {
type leafref { type leafref {
path "/if:interfaces/if:interface" path "/if:interfaces/if:interface"
+ "[if:name = current()/../../vrrp:interface]/" + "[if:name = current()/../../vrrp:interface]/"
+ "ip:ipv6/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid"; + "ip:ipv6/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid";
} }
mandatory "true"; mandatory true;
description description
"Indicates the virtual router on which the event has "Indicates the virtual router on which the event has
occurred."; occurred.";
} }
} }
} }
} }
leaf virtual-router-error-reason { leaf virtual-router-error-reason {
type identityref { type identityref {
base vrrp:vrrp-error-virtual-router; base vrrp:vrrp-error-virtual-router;
} }
mandatory "true"; mandatory true;
description description
"Indicates the reason for the virtual router error."; "Indicates the reason for the virtual router error.";
} }
} }
} }
<CODE ENDS> <CODE ENDS>
4. IANA Considerations 4. IANA Considerations
RFC Ed.: In this section, replace all occurrences of 'XXXX' with the RFC Ed.: In this section, replace all occurrences of 'XXXX' with the
skipping to change at page 33, line 19 skipping to change at page 31, line 50
reference: RFC XXXX reference: RFC XXXX
-------------------------------------------------------------------- --------------------------------------------------------------------
5. Security Considerations 5. Security Considerations
The configuration, state, and action data defined in this document The configuration, state, and action data defined in this document
are designed to be accessed via a management protocol with a secure are designed to be accessed via a management protocol with a secure
transport layer, such as NETCONF [RFC6241]. The NETCONF access transport layer, such as NETCONF [RFC6241]. The NETCONF access
control model [RFC6536] provides the means to restrict access for control model [RFC6536] provides the means to restrict access for
particular NETCONF users to a preconfigured subset of all available particular NETCONF users to a preconfigured subset of all available
NETCONF protocol operations and content. NETCONF protocol operations and contents.
A number of configuration data nodes defined in this document are A number of configuration data nodes defined in this document are
writable/creatable/deletable (i.e., "config true" in YANG terms, writable/creatable/deletable (i.e., "config true" in YANG terms,
which is the default). These data nodes may be considered sensitive which is the default). These data nodes may be considered sensitive
or vulnerable in some network environments. Write operations to or vulnerable in some network environments. Write operations to
these data nodes, such as "edit-config" in NETCONF, can have negative these data nodes, such as "edit-config" in NETCONF, can have negative
effects on the network if the protocol operations are not properly effects on the network if the protocol operations are not properly
protected. The vulnerable "config true" parameters and subtrees are protected. The vulnerable "config true" parameters and subtrees are
the following: the following:
skipping to change at page 33, line 45 skipping to change at page 32, line 29
routing subsystem of both the local device and the network. This may routing subsystem of both the local device and the network. This may
lead to network malfunctions, delivery of packets to inappropriate lead to network malfunctions, delivery of packets to inappropriate
destinations, and other problems. destinations, and other problems.
6. References 6. References
6.1. Normative References 6.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-
<http://www.rfc-editor.org/info/rfc2119>. editor.org/info/rfc2119>.
[RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
DOI 10.17487/RFC3688, January 2004, DOI 10.17487/RFC3688, January 2004, <https://www.rfc-
<http://www.rfc-editor.org/info/rfc3688>. editor.org/info/rfc3688>.
[RFC5798] Nadas, S., Ed., "Virtual Router Redundancy Protocol (VRRP) [RFC5798] Nadas, S., Ed., "Virtual Router Redundancy Protocol (VRRP)
Version 3 for IPv4 and IPv6", RFC 5798, Version 3 for IPv4 and IPv6", RFC 5798,
DOI 10.17487/RFC5798, March 2010, DOI 10.17487/RFC5798, March 2010, <https://www.rfc-
<http://www.rfc-editor.org/info/rfc5798>. editor.org/info/rfc5798>.
[RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for [RFC6020] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
the Network Configuration Protocol (NETCONF)", RFC 6020, the Network Configuration Protocol (NETCONF)", RFC 6020,
DOI 10.17487/RFC6020, October 2010, DOI 10.17487/RFC6020, October 2010, <https://www.rfc-
<http://www.rfc-editor.org/info/rfc6020>. editor.org/info/rfc6020>.
[RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
<http://www.rfc-editor.org/info/rfc6241>. <https://www.rfc-editor.org/info/rfc6241>.
[RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types",
RFC 6991, DOI 10.17487/RFC6991, July 2013, RFC 6991, DOI 10.17487/RFC6991, July 2013,
<http://www.rfc-editor.org/info/rfc6991>. <https://www.rfc-editor.org/info/rfc6991>.
[RFC7223] Bjorklund, M., "A YANG Data Model for Interface
Management", RFC 7223, DOI 10.17487/RFC7223, May 2014,
<http://www.rfc-editor.org/info/rfc7223>.
[RFC7277] Bjorklund, M., "A YANG Data Model for IP Management",
RFC 7277, DOI 10.17487/RFC7277, June 2014,
<http://www.rfc-editor.org/info/rfc7277>.
[RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
RFC 7950, DOI 10.17487/RFC7950, August 2016, RFC 7950, DOI 10.17487/RFC7950, August 2016,
<http://www.rfc-editor.org/info/rfc7950>. <https://www.rfc-editor.org/info/rfc7950>.
[I-D.bjorklund-netmod-rfc7223bis]
Bjorklund, M., "A YANG Data Model for Interface
Management", draft-bjorklund-netmod-rfc7223bis-00 (work in
progress), August 2017.
[I-D.bjorklund-netmod-rfc7277bis]
Bjorklund, M., "A YANG Data Model for IP Management",
draft-bjorklund-netmod-rfc7277bis-00 (work in progress),
August 2017.
[I-D.ietf-netmod-revised-datastores]
Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
and R. Wilton, "Network Management Datastore
Architecture", draft-ietf-netmod-revised-datastores-04
(work in progress), August 2017.
6.2. Informative References 6.2. Informative References
[RFC3768] Hinden, R., Ed., "Virtual Router Redundancy Protocol [RFC3768] Hinden, R., Ed., "Virtual Router Redundancy Protocol
(VRRP)", RFC 3768, DOI 10.17487/RFC3768, April 2004, (VRRP)", RFC 3768, DOI 10.17487/RFC3768, April 2004,
<http://www.rfc-editor.org/info/rfc3768>. <https://www.rfc-editor.org/info/rfc3768>.
[RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration [RFC6536] Bierman, A. and M. Bjorklund, "Network Configuration
Protocol (NETCONF) Access Control Model", RFC 6536, Protocol (NETCONF) Access Control Model", RFC 6536,
DOI 10.17487/RFC6536, March 2012, DOI 10.17487/RFC6536, March 2012, <https://www.rfc-
<http://www.rfc-editor.org/info/rfc6536>. editor.org/info/rfc6536>.
[RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG", [RFC7951] Lhotka, L., "JSON Encoding of Data Modeled with YANG",
RFC 7951, DOI 10.17487/RFC7951, August 2016, RFC 7951, DOI 10.17487/RFC7951, August 2016,
<http://www.rfc-editor.org/info/rfc7951>. <https://www.rfc-editor.org/info/rfc7951>.
[I-D.ietf-netconf-rfc5277bis] [I-D.ietf-netconf-rfc5277bis]
Clemm, A., Prieto, A., Voit, E., Nilsen-Nygaard, E., Clemm, A., Prieto, A., Voit, E., Nilsen-Nygaard, E.,
Tripathy, A., Chisholm, S., and H. Trevino, "Subscribing Tripathy, A., Chisholm, S., and H. Trevino, "Subscribing
to Event Notifications", draft-ietf-netconf-rfc5277bis-01 to Event Notifications", draft-ietf-netconf-rfc5277bis-01
(work in progress), October 2016. (work in progress), October 2016.
[I-D.ietf-netconf-yang-push] [I-D.ietf-netconf-yang-push]
Clemm, A., Voit, E., Prieto, A., Tripathy, A., Nilsen- Clemm, A., Voit, E., Prieto, A., Tripathy, A., Nilsen-
Nygaard, E., Bierman, A., and B. Lengyel, "Subscribing to Nygaard, E., Bierman, A., and B. Lengyel, "Subscribing to
YANG datastore push updates", draft-ietf-netconf-yang- YANG datastore push updates", draft-ietf-netconf-yang-
push-06 (work in progress), April 2017. push-09 (work in progress), September 2017.
[I-D.ietf-netmod-rfc6087bis]
Bierman, A., "Guidelines for Authors and Reviewers of YANG
Data Model Documents", draft-ietf-netmod-rfc6087bis-14
(work in progress), September 2017.
Appendix A. Complete Model Tree Structure Appendix A. Complete Model Tree Structure
The VRRP YANG data model defined in this document has the following The VRRP YANG data model defined in this document has the following
tree structure: tree structure:
module: ietf-vrrp module: ietf-vrrp
augment /if:interfaces/if:interface/ip:ipv4: +--rw vrrp
+--rw vrrp +--ro virtual-routers? uint32
+--rw vrrp-instance* [vrid] +--ro interfaces? uint32
+--rw vrid uint8 +--ro statistics
+--rw version identityref +--ro discontinuity-datetime? yang:date-and-time
+--rw log-state-change? boolean +--ro checksum-errors? yang:counter64
+--rw preempt +--ro version-errors? yang:counter64
| +--rw enabled? boolean +--ro vrid-errors? yang:counter64
| +--rw hold-time? uint16 +--ro ip-ttl-errors? yang:counter64
+--rw priority? uint8 augment /if:interfaces/if:interface/ip:ipv4:
+--rw accept-mode? boolean +--rw vrrp
+--rw (advertise-interval-choice)? +--rw vrrp-instance* [vrid]
| +--:(v2) +--rw vrid uint8
| | +--rw advertise-interval-sec? uint8 +--rw version identityref
| +--:(v3) +--rw log-state-change? boolean
| +--rw advertise-interval-centi-sec? uint16 +--rw preempt
+--rw track | +--rw enabled? boolean
| +--rw interfaces | +--rw hold-time? uint16
| | +--rw interface* [interface] +--rw priority? uint8
| | +--rw interface if:interface-ref +--rw accept-mode? boolean
| | +--rw priority-decrement? uint8 +--rw (advertise-interval-choice)?
| +--rw networks | +--:(v2)
| +--rw network* [prefix] | | +--rw advertise-interval-sec? uint8
| +--rw prefix inet:ipv4-prefix | +--:(v3)
| +--rw priority-decrement? uint8 | +--rw advertise-interval-centi-sec? uint16
+--rw virtual-ipv4-addresses +--rw track
+--rw virtual-ipv4-address* [ipv4-address] | +--rw interfaces
+--rw ipv4-address inet:ipv4-address | | +--rw interface* [interface]
augment /if:interfaces/if:interface/ip:ipv6: | | +--rw interface if:interface-ref
+--rw vrrp | | +--rw priority-decrement? uint8
+--rw vrrp-instance* [vrid] | +--rw networks
+--rw vrid uint8 | +--rw network* [prefix]
+--rw version identityref | +--rw prefix inet:ipv4-prefix
+--rw log-state-change? boolean | +--rw priority-decrement? uint8
+--rw preempt +--rw virtual-ipv4-addresses
| +--rw enabled? boolean | +--rw virtual-ipv4-address* [ipv4-address]
| +--rw hold-time? uint16 | +--rw ipv4-address inet:ipv4-address
+--rw priority? uint8 +--ro state? identityref
+--rw accept-mode? boolean +--ro is-owner? boolean
+--rw advertise-interval-centi-sec? uint16 +--ro last-adv-source? inet:ip-address
+--rw track +--ro up-datetime? yang:date-and-time
| +--rw interfaces +--ro master-down-interval? uint32
| | +--rw interface* [interface] +--ro skew-time? uint32
| | +--rw interface if:interface-ref +--ro last-event? identityref
| | +--rw priority-decrement? uint8 +--ro new-master-reason?
| +--rw networks new-master-reason-type
| +--rw network* [prefix] +--ro statistics
| +--rw prefix inet:ipv6-prefix +--ro discontinuity-datetime? yang:date-and-time
| +--rw priority-decrement? uint8 +--ro master-transitions? yang:counter32
+--rw virtual-ipv6-addresses +--ro advertisement-recv? yang:counter64
+--rw virtual-ipv6-address* [ipv6-address] +--ro advertisement-sent? yang:counter64
+--rw ipv6-address inet:ipv6-address +--ro interval-errors? yang:counter64
augment /if:interfaces-state/if:interface/ip:ipv4:
+--ro vrrp
+--ro vrrp-instance* [vrid]
+--ro vrid uint8
+--ro version identityref
+--ro log-state-change? boolean
+--ro preempt
| +--ro enabled? boolean
| +--ro hold-time? uint16
+--ro priority? uint8
+--ro accept-mode? boolean
+--ro (advertise-interval-choice)?
| +--:(v2)
| | +--ro advertise-interval-sec? uint8
| +--:(v3)
| +--ro advertise-interval-centi-sec? uint16
+--ro track
| +--ro interfaces
| | +--ro interface* [interface]
| | +--ro interface if:interface-ref
| | +--ro priority-decrement? uint8
| +--ro networks
| +--ro network* [prefix]
| +--ro prefix inet:ipv4-prefix
| +--ro priority-decrement? uint8
+--ro virtual-ipv4-addresses
| +--ro virtual-ipv4-address* [ipv4-address]
| +--ro ipv4-address inet:ipv4-address
+--ro state? identityref
+--ro is-owner? boolean
+--ro last-adv-source? inet:ip-address
+--ro up-datetime? yang:date-and-time
+--ro master-down-interval? uint32
+--ro skew-time? uint32
+--ro last-event? identityref
+--ro new-master-reason? new-master-reason-type
+--ro statistics
+--ro discontinuity-datetime? yang:date-and-time
+--ro master-transitions? yang:counter32
+--ro advertisement-recv? yang:counter64
+--ro advertisement-sent? yang:counter64
+--ro interval-errors? yang:counter64
{validate-interval-errors}? {validate-interval-errors}?
+--ro priority-zero-pkts-rcvd? yang:counter64 +--ro priority-zero-pkts-rcvd? yang:counter64
+--ro priority-zero-pkts-sent? yang:counter64 +--ro priority-zero-pkts-sent? yang:counter64
+--ro invalid-type-pkts-rcvd? yang:counter64 +--ro invalid-type-pkts-rcvd? yang:counter64
+--ro address-list-errors? yang:counter64 +--ro address-list-errors? yang:counter64
{validate-address-list-errors}? {validate-address-list-errors}?
+--ro packet-length-errors? yang:counter64 +--ro packet-length-errors? yang:counter64
augment /if:interfaces-state/if:interface/ip:ipv6: augment /if:interfaces/if:interface/ip:ipv6:
+--ro vrrp +--rw vrrp
+--ro vrrp-instance* [vrid] +--rw vrrp-instance* [vrid]
+--ro vrid uint8 +--rw vrid uint8
+--ro version identityref +--rw version identityref
+--ro log-state-change? boolean +--rw log-state-change? boolean
+--ro preempt +--rw preempt
| +--ro enabled? boolean | +--rw enabled? boolean
| +--ro hold-time? uint16 | +--rw hold-time? uint16
+--ro priority? uint8 +--rw priority? uint8
+--ro accept-mode? boolean +--rw accept-mode? boolean
+--ro advertise-interval-centi-sec? uint16 +--rw advertise-interval-centi-sec? uint16
+--ro track +--rw track
| +--ro interfaces | +--rw interfaces
| | +--ro interface* [interface] | | +--rw interface* [interface]
| | +--ro interface if:interface-ref | | +--rw interface if:interface-ref
| | +--ro priority-decrement? uint8 | | +--rw priority-decrement? uint8
| +--ro networks | +--rw networks
| +--ro network* [prefix] | +--rw network* [prefix]
| +--ro prefix inet:ipv6-prefix | +--rw prefix inet:ipv6-prefix
| +--ro priority-decrement? uint8 | +--rw priority-decrement? uint8
+--ro virtual-ipv6-addresses +--rw virtual-ipv6-addresses
| +--ro virtual-ipv6-address* [ipv6-address] | +--rw virtual-ipv6-address* [ipv6-address]
| +--ro ipv6-address inet:ipv6-address | +--rw ipv6-address inet:ipv6-address
+--ro state? identityref +--ro state? identityref
+--ro is-owner? boolean +--ro is-owner? boolean
+--ro last-adv-source? inet:ip-address +--ro last-adv-source? inet:ip-address
+--ro up-datetime? yang:date-and-time +--ro up-datetime? yang:date-and-time
+--ro master-down-interval? uint32 +--ro master-down-interval? uint32
+--ro skew-time? uint32 +--ro skew-time? uint32
+--ro last-event? identityref +--ro last-event? identityref
+--ro new-master-reason? new-master-reason-type +--ro new-master-reason?
+--ro statistics new-master-reason-type
+--ro discontinuity-datetime? yang:date-and-time +--ro statistics
+--ro master-transitions? yang:counter32 +--ro discontinuity-datetime? yang:date-and-time
+--ro advertisement-recv? yang:counter64 +--ro master-transitions? yang:counter32
+--ro advertisement-sent? yang:counter64 +--ro advertisement-recv? yang:counter64
+--ro interval-errors? yang:counter64 +--ro advertisement-sent? yang:counter64
+--ro interval-errors? yang:counter64
{validate-interval-errors}? {validate-interval-errors}?
+--ro priority-zero-pkts-rcvd? yang:counter64 +--ro priority-zero-pkts-rcvd? yang:counter64
+--ro priority-zero-pkts-sent? yang:counter64 +--ro priority-zero-pkts-sent? yang:counter64
+--ro invalid-type-pkts-rcvd? yang:counter64 +--ro invalid-type-pkts-rcvd? yang:counter64
+--ro address-list-errors? yang:counter64 +--ro address-list-errors? yang:counter64
{validate-address-list-errors}? {validate-address-list-errors}?
+--ro packet-length-errors? yang:counter64 +--ro packet-length-errors? yang:counter64
augment /if:interfaces-state:
+--ro vrrp-global notifications:
+--ro virtual-routers? uint32 +---n vrrp-new-master-event
+--ro interfaces? uint32 | +--ro master-ip-address inet:ip-address
+--ro statistics | +--ro new-master-reason new-master-reason-type
+--ro discontinuity-datetime? yang:date-and-time +---n vrrp-protocol-error-event
+--ro checksum-errors? yang:counter64 | +--ro protocol-error-reason identityref
+--ro version-errors? yang:counter64 +---n vrrp-virtual-router-error-event
+--ro vrid-errors? yang:counter64 +--ro interface if:interface-ref
+--ro ip-ttl-errors? yang:counter64 +--ro (ip-version)
notifications: | +--:(ipv4)
+---n vrrp-new-master-event | | +--ro ipv4
| +--ro master-ip-address inet:ip-address | | +--ro vrid -> /if:interfaces/interface[if:name =
| +--ro new-master-reason new-master-reason-type current()/../../vrrp:interface]/ip:ipv4/vrrp:vrrp/vrrp-instance/vrid
+---n vrrp-protocol-error-event | +--:(ipv6)
| +--ro protocol-error-reason identityref | +--ro ipv6
+---n vrrp-virtual-router-error-event | +--ro vrid -> /if:interfaces/interface[if:name =
+--ro interface if:interface-ref current()/../../vrrp:interface]/ip:ipv6/vrrp:vrrp/vrrp-instance/vrid
+--ro (ip-version) +--ro virtual-router-error-reason identityref
| +--:(ipv4)
| | +--ro ipv4
| | +--ro vrid leafref
| +--:(ipv6)
| +--ro ipv6
| +--ro vrid leafref
+--ro virtual-router-error-reason identityref
Appendix B. Data Tree Example Appendix B. Data Tree Example
This section contains an example of an instance data tree in the JSON This section contains an example of an instance data tree in the JSON
encoding [RFC7951], containing both configuration and state data. encoding [RFC7951], containing both configuration and state data.
Virtual router IP address: 192.0.2.1 Virtual router IP address: 192.0.2.1
+-----------------+ +-----------------+ +-----------------+ +-----------------+
| | | | | | | |
| Router 1 | | Router 2 | | Router 1 | | Router 2 |
skipping to change at page 40, line 22 skipping to change at page 38, line 22
|192.0.2.11 |192.0.2.12 |192.0.2.11 |192.0.2.12
-------+--------------------------+------- -------+--------------------------+-------
| | | |
|192.0.2.51 |192.0.2.52 |192.0.2.51 |192.0.2.52
+--------+--------+ +--------+--------+ +--------+--------+ +--------+--------+
| Host 1 | | Host 2 | | Host 1 | | Host 2 |
| Default gateway:| | Default gateway:| | Default gateway:| | Default gateway:|
| 192.0.2.1 | | 192.0.2.1 | | 192.0.2.1 | | 192.0.2.1 |
+-----------------+ +-----------------+ +-----------------+ +-----------------+
The instance data tree for Router 1 in the above figure could be as The configuration instance data for Router 1 in the above figure
follows: could be as follows:
{ {
"ietf-interfaces:interfaces": { "ietf-interfaces:interfaces": {
"interface": [ "interface": [
{ {
"name": "eth1", "name": "eth1",
"type": "iana-if-type:ethernetCsmacd", "type": "iana-if-type:ethernetCsmacd",
"description": "An interface with VRRP enabled.", "description": "An interface with VRRP enabled.",
"ietf-ip:ipv4": { "ietf-ip:ipv4": {
"address": [ "address": [
skipping to change at page 41, line 4 skipping to change at page 39, line 33
"vrid": 1, "vrid": 1,
"version": "vrrp-v3", "version": "vrrp-v3",
"priority": 200, "priority": 200,
"advertise-interval-centi-sec": 50, "advertise-interval-centi-sec": 50,
"virtual-ipv4-addresses": { "virtual-ipv4-addresses": {
"virtual-ipv4-address": [ "virtual-ipv4-address": [
"ipv4-address": "192.0.2.1" "ipv4-address": "192.0.2.1"
] ]
} }
} }
] ]
} }
} }
} }
] ]
}, }
"ietf-interfaces:interfaces-state": { }
The cooresponding operational state data for Router 1 could be as
follows:
{
"ietf-interfaces:interfaces": {
"interface": [ "interface": [
{ {
"name": "eth1", "name": "eth1",
"type": "iana-if-type:ethernetCsmacd", "type": "iana-if-type:ethernetCsmacd",
"phys-address": "00:0C:42:E5:B1:E9", "phys-address": "00:0C:42:E5:B1:E9",
"oper-status": "up", "oper-status": "up",
"statistics": { "statistics": {
"discontinuity-time": "2016-10-24T17:11:27+02:00" "discontinuity-time": "2016-10-24T17:11:27+02:00"
}, },
"ietf-ip:ipv4": { "ietf-ip:ipv4": {
skipping to change at page 42, line 25 skipping to change at page 41, line 12
"priority-zero-pkts-sent": 0, "priority-zero-pkts-sent": 0,
"invalid-type-pkts-rcvd": 0, "invalid-type-pkts-rcvd": 0,
"address-list-errors": 0, "address-list-errors": 0,
"packet-length-errors": 1 "packet-length-errors": 1
} }
} }
] ]
} }
} }
} }
], ]
"vrrp-global": { }
"virtual-routers": 3, }
"interfaces": 2,
"statistics": { {
"discontinuity-datetime": "2016-10-24T17:11:27+02:00", "ietf-vrrp:vrrp": {
"checksum-errors": 2, "virtual-routers": 3,
"version-errors": 0, "interfaces": 2,
"vrid-errors": 0, "statistics": {
"ip-ttl-errors": 1 "discontinuity-datetime": "2016-10-24T17:11:27+02:00",
"checksum-errors": 2,
"version-errors": 0,
"vrid-errors": 0,
"ip-ttl-errors": 1
}
}
}
Appendix C. YANG Model for Non-NMDA Compliant Implementations
The YANG data model defined so far in this document is designed to be
used in conjunction with implementations that support the Network
Management Datastore Architecture (NMDA) defined in
[I-D.ietf-netmod-revised-datastores]. However, currently there are
existing implementations that are not NMDA compliant. In order for
such implementations to be used temporarily until NMDA
implementations are available, this section describes the following
non-NMDA version of the equivalent model.
C.1. Non-NMDA YANG Module
<CODE BEGINS> file "ietf-vrrp@2017-09-22.yang"
module ietf-vrrp {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-vrrp";
prefix "vrrp";
import ietf-inet-types {
prefix "inet";
}
import ietf-yang-types {
prefix "yang";
}
import ietf-interfaces {
prefix "if";
}
import ietf-ip {
prefix "ip";
}
organization
"IETF Routing Area Working Group (RTGWG)";
contact
"WG Web: <https://datatracker.ietf.org/wg/rtgwg/>
WG List: <mailto:rtgwg@ietf.org>
WG Chair: Jeff Tantsura
<mailto:jefftant.ietf@gmail.com>
WG Chair: Chris Bowers
<mailto:cbowers@juniper.net>
Editor: Xufeng Liu
<mailto:Xufeng_Liu@jabil.com>
Editor: Athanasios Kyparlis
<mailto:Athanasios_Kyparlis@jabil.com>
Editor: Ravi Parikh
<mailto:parikhr@vmware.com>
Editor: Acee Lindem
<mailto:acee@cisco.com>
Editor: Mingui Zhang
<mailto:zhangmingui@huawei.com>";
description
"This YANG module defines a model for managing Virtual Router
Redundancy Protocol (VRRP) version 2 and version 3.";
revision 2017-09-22 {
description "Initial revision";
reference
"RFC XXXX: A YANG Data Model for Virtual Router Redundancy
Protocol (VRRP).
RFC 2787: Definitions of Managed Objects for the Virtual
Router Redundancy Protocol.
RFC 3768: Virtual Router Redundancy Protocol (VRRP).
RFC 5798: Virtual Router Redundancy Protocol (VRRP) Version 3.
RFC 6527: Definitions of Managed Objects for the Virtual
Router Redundancy Protocol Version 3 (VRRPv3).";
}
/*
* Features
*/
feature validate-interval-errors {
description
"This feature indicates that the system validates that
the advertisement interval from advertisement packets
received is the same as the one configured for the local
VRRP router.";
}
feature validate-address-list-errors {
description
"This feature indicates that the system validates that
the address list from received packets matches the
locally configured list for the VRRP router.";
}
/*
* Typedefs
*/
typedef new-master-reason-type {
type enumeration {
enum not-master {
description
"The virtual router has never transitioned to master
state,";
}
enum priority {
description "Priority was higher.";
}
enum preempted {
description "The master was preempted.";
}
enum no-response {
description "Previous master did not respond.";
} }
} }
description
"The reason for the virtual router to transition to master
state.";
} // new-master-reason-type
/*
* Identities
*/
/* vrrp-event-type identity and its derivatives. */
identity vrrp-event-type {
description
"The type to indicate the type of a VRRP protocol event.";
}
identity vrrp-event-none {
base vrrp-event-type;
description
"Indicates a non-meaningful event.";
}
identity vrrp-event-startup {
base vrrp-event-type;
description
"Indicates that a VRRP router has initiated the protocol.";
}
identity vrrp-event-shutdown {
base vrrp-event-type;
description
"Indicates that a VRRP router has closed down the protocol.";
}
identity vrrp-event-higher-priority-backup {
base vrrp-event-type;
description
"Indicates that a backup router has a higher priority than
the current master.";
}
identity vrrp-event-master-timeout {
base vrrp-event-type;
description
"Indicates that the current master has not sent an
advertisement within the limit of master-down-interval.";
}
identity vrrp-event-interface-up {
base vrrp-event-type;
description
"Indicates that the VRRP enabled interface has become
operational up.";
}
identity vrrp-event-interface-down {
base vrrp-event-type;
description
"Indicates that the VRRP enabled interface has become
operational down.";
}
identity vrrp-event-no-primary-ip-address {
base vrrp-event-type;
description
"Indicates that the primary IP address on the VRRP enabled
interface has become unavailable.";
}
identity vrrp-event-primary-ip-address {
base vrrp-event-type;
description
"Indicates that the primary IP address on the VRRP enabled
interface has become available.";
}
identity vrrp-event-no-virtual-ip-addresses {
base vrrp-event-type;
description
"Indicates that there are no virtual IP addresses on the
virtual router.";
}
identity vrrp-event-virtual-ip-addresses {
base vrrp-event-type;
description
"Indicates that there are virtual IP addresses on the
virtual router.";
}
identity vrrp-event-preempt-hold-timeout {
base vrrp-event-type;
description
"Indicates that the configured preemption hold time has
passed.";
}
identity vrrp-event-lower-priority-master {
base vrrp-event-type;
description
"Indicates that there is a lower priority VRRP master.";
}
identity vrrp-event-owner-preempt {
base vrrp-event-type;
description
"Indicates that the owner has preempted another router to
become the master.";
}
/* vrrp-error-global identity and its derivatives. */
identity vrrp-error-global {
description
"The type to indicate the type of a VRRP error that occurs
for a packet before it reaches a VRRP router.";
}
identity checksum-error {
base vrrp-error-global;
description
"A packet has been received with an invalid VRRP checksum
value.";
}
identity ip-ttl-error {
base vrrp-error-global;
description
"A packet has been received with IP TTL (Time-To-Live)
not equal to 255.";
}
identity version-error {
base vrrp-error-global;
description
"A packet has been received with an unknown or unsupported
version number.";
}
identity vrid-error {
base vrrp-error-global;
description
"A packet has been received with a VRID that is not valid
for any virtual router on this router.";
}
/* vrrp-error-virtual-router identity and its derivatives. */
identity vrrp-error-virtual-router {
description
"The type to indicate the type of a VRRP error that occurs
after a packet reaches a VRRP router.";
}
identity address-list-error {
base vrrp-error-virtual-router;
description
"A packet has been received with an address list that
does not match the locally configured address list for
the virtual router.";
}
identity interval-error {
base vrrp-error-virtual-router;
description
"A packet has been received with an advertisement
interval different than the one configured for the local
virtual router";
}
identity packet-length-error {
base vrrp-error-virtual-router;
description
"A packet has been received with a packet length less
than the length of the VRRP header.";
}
/* vrrp-state-type identity and its derivatives. */
identity vrrp-state-type {
description
"The type to indicate the state of a virtual router.";
}
identity initialize {
base vrrp-state-type;
description
"Indicates that the virtual router is waiting
for a startup event.";
}
identity backup {
base vrrp-state-type;
description
"Indicates that the virtual router is monitoring the
availability of the master router.";
}
identity master {
base vrrp-state-type;
description
"Indicates that the virtual router is forwarding
packets for IP addresses that are associated with
this virtual router.";
}
/* vrrp-version identity and its derivatives. */
identity vrrp-version {
description
"The version of the VRRP protocol.";
}
identity vrrp-v2 {
base vrrp-version;
description
"Indicates version 2 of the VRRP protocol.";
}
identity vrrp-v3 {
base vrrp-version;
description
"Indicates version 3 of the VRRP protocol.";
}
/*
* Groupings
*/
grouping vrrp-common-attributes {
description
"Group of VRRP attributes common to version 2 and version 3";
leaf vrid {
type uint8 {
range 1..255;
}
description "Virtual router ID.";
}
leaf version {
type identityref {
base vrrp:vrrp-version;
}
mandatory true;
description "Version 2 or version 3 of VRRP.";
}
leaf log-state-change {
type boolean;
default "false";
description
"Generates VRRP state change messages each time the VRRP
instance changes state (from up to down or down to up).";
}
container preempt {
description
"Enables a higher priority Virtual Router Redundancy
Protocol (VRRP) backup router to preempt a lower priority
VRRP master.";
leaf enabled {
type boolean;
default "true";
description
"'true' if preemption is enabled.";
}
leaf hold-time {
type uint16;
units seconds;
default 0;
description
"Hold time, in seconds, for which a higher priority VRRP
backup router must wait before preempting a lower priority
VRRP master.";
}
}
leaf priority {
type uint8 {
range 1..254;
}
default 100;
description
"Configures the Virtual Router Redundancy Protocol (VRRP)
election priority for the backup virtual router.";
}
leaf accept-mode {
when "derived-from-or-self(current()/../version, 'vrrp-v3')" {
description "Applicable only to version 3.";
}
type boolean;
default "false";
description
"Controls whether a virtual router in Master state will
accept packets addressed to the address owner's IPvX address
as its own if it is not the IPvX address owner. The default
is false. Deployments that rely on, for example, pinging the
address owner's IPvX address may wish to configure
accept-mode to true.
Note: IPv6 Neighbor Solicitations and Neighbor
Advertisements MUST NOT be dropped when accept-mode is
false.";
}
} // vrrp-common-attributes
grouping vrrp-ipv4-attributes {
description
"Group of VRRP attributes for IPv4.";
uses vrrp-common-attributes;
choice advertise-interval-choice {
description
"The options for the advertisement interval at which VRRPv2
or VRRPv3 advertisements are sent from the specified
interface.";
case v2 {
when "derived-from-or-self(version, 'vrrp-v2')" {
description "Applicable only to version 2.";
}
leaf advertise-interval-sec {
type uint8 {
range 1..254;
}
units seconds;
default 1;
description
"Configures the interval that Virtual Router
Redundancy Protocol Version 2 (VRRPv2) advertisements
are sent from the specified interface.";
}
}
case v3 {
when "derived-from-or-self(version, 'vrrp-v3')" {
description "Applicable only to version 3.";
}
leaf advertise-interval-centi-sec {
type uint16 {
range 1..4095;
}
units centiseconds;
default 100;
description
"Configures the interval that Virtual Router
Redundancy Protocol version 3 (VRRPv3) advertisements
are sent from the specified interface.";
}
}
} // advertise-interval-choice
container track {
description
"Enables the specified VRRP instance to track interfaces
or networks.";
container interfaces {
description
"Enables the specified Virtual Router Redundancy Protocol
version 2 (VRRP) or version 3 (VRRPv3) instance to track
an interface.";
list interface {
key "interface";
description
"Interface to track.";
leaf interface {
type if:interface-ref;
must "/if:interfaces/if:interface[if:name=current()]/"
+ "ip:ipv4" {
description "Interface is IPv4.";
}
description
"Interface to track.";
}
leaf priority-decrement {
type uint8 {
range 1..254;
}
default 10;
description
"Specifies how much to decrement the priority of the
VRRP instance if the interface goes down.";
}
} // interface
} // interfaces
container networks {
description
"Enables the backup Virtual Router Redundancy Protocol
version 2 (VRRP) or version 3 (VRRPv3) router to track a
specified network through the IP network prefix of that
network.";
list network {
key "prefix";
description
"Enables the specified Virtual Router Redundancy
Protocol version 2 (VRRP) or version 3 (VRRPv3)
instance to track an IP network, by specifying the
prefix of the IP network.";
leaf prefix {
type inet:ipv4-prefix;
description
"The prefix of the network to track.";
}
leaf priority-decrement {
type uint8 {
range 1..254;
}
default 10;
description
"Specifies how much to decrement the priority of the
backup VRRP router if there is a failure in the IP
network.";
}
} // track-network
} // track-networks
} // track
container virtual-ipv4-addresses {
description
"Configures the virtual IP address for the Virtual Router
Redundancy Protocol (VRRP) interface.";
list virtual-ipv4-address {
key "ipv4-address";
max-elements 16;
description
"Virtual IP addresses for a single VRRP instance. For a
VRRP owner router, the virtual address must match one
of the IP addresses configured on the interface
corresponding to the virtual router.";
leaf ipv4-address {
type inet:ipv4-address;
description
"An IPv4 address associated with a virtual router.";
reference
"RFC 5798: Virtual Router Redundancy Protocol (VRRP)
Version 3. Section 1.2.";
}
} // virtual-ipv4-address
} // virtual-ipv4-addresses
} // grouping vrrp-ipv4-attributes
grouping vrrp-ipv6-attributes {
description
"Group of VRRP attributes for IPv6.";
uses vrrp-common-attributes;
leaf advertise-interval-centi-sec {
type uint16 {
range 1..4095;
}
units centiseconds;
default 100;
description
"Configures the interval that Virtual Router
Redundancy Protocol version 3 (VRRPv3) advertisements
are sent from the specified interface.";
}
container track {
description
"Enables the specified VRRP instance to track interfaces
or networks.";
container interfaces {
description
"Enables the specified Virtual Router Redundancy Protocol
version 2 (VRRP) or version 3 (VRRPv3) instance to track
an interface.";
list interface {
key "interface";
description
"Interface to track.";
leaf interface {
type if:interface-ref;
must "/if:interfaces/if:interface[if:name=current()]/"
+ "ip:ipv6" {
description "Interface is IPv6.";
}
description
"Interface to track.";
}
leaf priority-decrement {
type uint8 {
range 1..254;
}
default 10;
description
"Specifies how much to decrement the priority of the
VRRP instance if the interface goes down.";
}
} // interface
} // interfaces
container networks {
description
"Enables the backup Virtual Router Redundancy Protocol
version 2 (VRRP) or version 3 (VRRPv3) router to track a
specified network through the IP network prefix of that
network.";
list network {
key "prefix";
description
"Enables the specified Virtual Router Redundancy
Protocol version 2 (VRRP) or version 3 (VRRPv3)
instance to track an IP network, by specifying the
prefix of the IP network.";
leaf prefix {
type inet:ipv6-prefix;
description
"The prefix of the network to track.";
}
leaf priority-decrement {
type uint8 {
range 1..254;
}
default 10;
description
"Specifies how much to decrement the priority of the
backup VRRP router if there is a failure in the IP
network.";
}
} // track-network
} // track-networks
} // track
container virtual-ipv6-addresses {
description
"Configures the virtual IP address for the Virtual Router
Redundancy Protocol (VRRP) interface.";
list virtual-ipv6-address {
key "ipv6-address";
max-elements 2;
description
"Two IPv6 addresses are allowed. The first one must be
a link-local address and the second one can be a
link-local or global address.";
leaf ipv6-address {
type inet:ipv6-address;
description
"An IPv6 address associated with a virtual router.";
reference
"RFC 5798: Virtual Router Redundancy Protocol (VRRP)
Version 3. Section 1.3.";
}
} // virtual-ipv6-address
} // virtual-ipv6-addresses
} // grouping vrrp-ipv6-attributes
grouping vrrp-state-attributes {
description
"Group of VRRP state attributes.";
leaf state {
type identityref {
base vrrp:vrrp-state-type;
}
description
"Operational state.";
}
leaf is-owner {
type boolean;
description
"Set to true if this virtual router is owner.";
}
leaf last-adv-source {
type inet:ip-address;
description
"Last advertised IPv4/IPv6 source address";
}
leaf up-datetime {
type yang:date-and-time;
description
"The date and time when this virtual router
transitioned out of init state.";
}
leaf master-down-interval {
type uint32;
units centiseconds;
description
"Time interval for backup virtual router to declare
Master down.";
}
leaf skew-time {
type uint32;
units microseconds;
description
"Calculated based on the priority and advertisement
interval configuration command parameters. See RFC 3768.";
}
leaf last-event {
type identityref {
base vrrp:vrrp-event-type;
}
description
"Last reported event.";
}
leaf new-master-reason {
type new-master-reason-type;
description
"Indicates the reason for the virtual router to transition
to master state.";
}
container statistics {
description
"VRRP statistics.";
leaf discontinuity-datetime {
type yang:date-and-time;
description
"The time on the most recent occasion at which any one or
more of the VRRP statistic counters suffered a
discontinuity. If no such discontinuities have occurred
since the last re-initialization of the local management
subsystem, then this node contains the time that the
local management subsystem re-initialized itself.";
}
leaf master-transitions {
type yang:counter32;
description
"The total number of times that this virtual router's
state has transitioned to master";
}
leaf advertisement-recv {
type yang:counter64;
description
"The total number of VRRP advertisements received by
this virtual router.";
}
leaf advertisement-sent {
type yang:counter64;
description
"The total number of VRRP advertisements sent by
this virtual router.";
}
leaf interval-errors {
if-feature validate-interval-errors;
type yang:counter64;
description
"The total number of VRRP advertisement packets
received with an advertisement interval
different than the one configured for the local
virtual router";
}
leaf priority-zero-pkts-rcvd {
type yang:counter64;
description
"The total number of VRRP packets received by the
virtual router with a priority of 0.";
}
leaf priority-zero-pkts-sent {
type yang:counter64;
description
"The total number of VRRP packets sent by the
virtual router with a priority of 0.";
}
leaf invalid-type-pkts-rcvd {
type yang:counter64;
description
"The number of VRRP packets received by the virtual
router with an invalid value in the 'type' field.";
}
leaf address-list-errors {
if-feature validate-address-list-errors;
type yang:counter64;
description
"The total number of packets received with an
address list that does not match the locally
configured address list for the virtual router.";
}
leaf packet-length-errors {
type yang:counter64;
description
"The total number of packets received with a packet
length less than the length of the VRRP header.";
}
} // container statistics
} // grouping vrrp-state-attributes
grouping vrrp-global-state-attributes {
description
"Group of VRRP global state attributes.";
leaf virtual-routers {
type uint32;
description "Number of configured virtual routers.";
}
leaf interfaces {
type uint32;
description "Number of interface with VRRP configured.";
}
container statistics {
description
"VRRP global statistics.";
leaf discontinuity-datetime {
type yang:date-and-time;
description
"The time on the most recent occasion at which one of
checksum-errors, version-errors, vrid-errors, and
ip-ttl-errors suffered a discontinuity.
If no such discontinuities have occurred since the last
re-initialization of the local management subsystem,
then this node contains the time that the local management
subsystem re-initialized itself.";
}
leaf checksum-errors {
type yang:counter64;
description
"The total number of VRRP packets received with an invalid
VRRP checksum value.";
reference "RFC 5798, Section 5.2.8";
}
leaf version-errors {
type yang:counter64;
description
"The total number of VRRP packets received with an unknown
or unsupported version number.";
reference "RFC 5798, Section 5.2.1";
}
leaf vrid-errors {
type yang:counter64;
description
"The total number of VRRP packets received with a VRID that
is not valid for any virtual router on this router.";
reference "RFC 5798, Section 5.2.3";
}
leaf ip-ttl-errors {
type yang:counter64;
description
"The total number of VRRP packets received by the
virtual router with IP TTL (Time-To-Live) not equal
to 255.";
reference "RFC 5798, Sections 5.1.1.3 and 5.1.2.3.";
}
} // statistics
} // vrrp-global-state-attributes
/*
* Configuration data nodes
*/
augment "/if:interfaces/if:interface/ip:ipv4" {
description "Augment IPv4 interface.";
container vrrp {
description
"Configures the Virtual Router Redundancy Protocol (VRRP)
version 2 or version 3 for IPv4.";
list vrrp-instance {
key "vrid";
description
"Defines a virtual router, identified by a virtual router
identifier (VRID), within IPv4 address space.";
uses vrrp-ipv4-attributes;
}
}
} // augment ipv4
augment "/if:interfaces/if:interface/ip:ipv6" {
description "Augment IPv6 interface.";
container vrrp {
description
"Configures the Virtual Router Redundancy Protocol (VRRP)
version 3 for IPv6.";
list vrrp-instance {
must "derived-from-or-self(version, 'vrrp-v3')" {
description
"IPv6 is only supported by version 3.";
}
key "vrid";
description
"Defines a virtual router, identified by a virtual router
identifier (VRID), within IPv6 address space.";
uses vrrp-ipv6-attributes;
} // list vrrp-instance
} // container vrrp
} // augment ipv6
/*
* Operational state data nodes
*/
augment "/if:interfaces-state/if:interface/ip:ipv4" {
description "Augment IPv4 interface state.";
container vrrp {
description
"State information for Virtual Router Redundancy Protocol
(VRRP) version 2 for IPv4.";
list vrrp-instance {
key "vrid";
description
"States of a virtual router, identified by a virtual router
identifier (VRID), within IPv4 address space.";
uses vrrp-ipv4-attributes;
uses vrrp-state-attributes;
} // list vrrp-instance
}
}
augment "/if:interfaces-state/if:interface/ip:ipv6" {
description "Augment IPv6 interface state.";
container vrrp {
description
"State information of the Virtual Router Redundancy Protocol
(VRRP) version 2 or version 3 for IPv6.";
list vrrp-instance {
key "vrid";
description
"States of a virtual router, identified by a virtual router
identifier (VRID), within IPv6 address space.";
uses vrrp-ipv6-attributes;
uses vrrp-state-attributes;
} // list vrrp-instance
}
}
augment "/if:interfaces-state" {
description "Specify VRRP state data at the global level.";
container vrrp-global {
description
"State information of the Virtual Router Redundancy Protocol
(VRRP) at the global level";
uses vrrp-global-state-attributes;
}
}
/*
* Notifications
*/
notification vrrp-new-master-event {
description
"Notification event for a change of VRRP new master.";
leaf master-ip-address {
type inet:ip-address;
mandatory true;
description
"IPv4 or IPv6 address of the new master.";
}
leaf new-master-reason {
type new-master-reason-type;
mandatory true;
description
"Indicates the reason for the virtual router to transition
to master state.";
}
}
notification vrrp-protocol-error-event {
description
"Notification event for a VRRP protocol error.";
leaf protocol-error-reason {
type identityref {
base vrrp:vrrp-error-global;
}
mandatory true;
description
"Indicates the reason for the protocol error.";
}
}
notification vrrp-virtual-router-error-event {
description
"Notification event for an error happened on a virtual
router.";
leaf interface {
type if:interface-ref;
mandatory true;
description
"Indicates the interface for which statistics area
to be cleared.";
}
choice ip-version {
mandatory true;
description
"The error may have happened on either an IPv4 virtual
router or an IPv6 virtual router. The information
related to a specific IP version is provided by one of
the following cases.";
case ipv4 {
description "IPv4";
container ipv4 {
description
"Error information for IPv4.";
leaf vrid {
type leafref {
path "/if:interfaces/if:interface"
+ "[if:name = current()/../../vrrp:interface]/"
+ "ip:ipv4/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid";
}
mandatory true;
description
"Indicates the virtual router on which the event has
occurred.";
}
}
}
case ipv6 {
description "IPv6";
container ipv6 {
description
"Error information for IPv6.";
leaf vrid {
type leafref {
path "/if:interfaces/if:interface"
+ "[if:name = current()/../../vrrp:interface]/"
+ "ip:ipv6/vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid";
}
mandatory true;
description
"Indicates the virtual router on which the event has
occurred.";
}
}
}
}
leaf virtual-router-error-reason {
type identityref {
base vrrp:vrrp-error-virtual-router;
}
mandatory true;
description
"Indicates the reason for the virtual router error.";
}
} }
} }
<CODE ENDS>
C.2. Non-NMDA Model Tree Structure
module: ietf-vrrp
augment /if:interfaces/if:interface/ip:ipv4:
+--rw vrrp
+--rw vrrp-instance* [vrid]
+--rw vrid uint8
+--rw version identityref
+--rw log-state-change? boolean
+--rw preempt
| +--rw enabled? boolean
| +--rw hold-time? uint16
+--rw priority? uint8
+--rw accept-mode? boolean
+--rw (advertise-interval-choice)?
| +--:(v2)
| | +--rw advertise-interval-sec? uint8
| +--:(v3)
| +--rw advertise-interval-centi-sec? uint16
+--rw track
| +--rw interfaces
| | +--rw interface* [interface]
| | +--rw interface if:interface-ref
| | +--rw priority-decrement? uint8
| +--rw networks
| +--rw network* [prefix]
| +--rw prefix inet:ipv4-prefix
| +--rw priority-decrement? uint8
+--rw virtual-ipv4-addresses
+--rw virtual-ipv4-address* [ipv4-address]
+--rw ipv4-address inet:ipv4-address
augment /if:interfaces/if:interface/ip:ipv6:
+--rw vrrp
+--rw vrrp-instance* [vrid]
+--rw vrid uint8
+--rw version identityref
+--rw log-state-change? boolean
+--rw preempt
| +--rw enabled? boolean
| +--rw hold-time? uint16
+--rw priority? uint8
+--rw accept-mode? boolean
+--rw advertise-interval-centi-sec? uint16
+--rw track
| +--rw interfaces
| | +--rw interface* [interface]
| | +--rw interface if:interface-ref
| | +--rw priority-decrement? uint8
| +--rw networks
| +--rw network* [prefix]
| +--rw prefix inet:ipv6-prefix
| +--rw priority-decrement? uint8
+--rw virtual-ipv6-addresses
+--rw virtual-ipv6-address* [ipv6-address]
+--rw ipv6-address inet:ipv6-address
augment /if:interfaces-state/if:interface/ip:ipv4:
+--ro vrrp
+--ro vrrp-instance* [vrid]
+--ro vrid uint8
+--ro version identityref
+--ro log-state-change? boolean
+--ro preempt
| +--ro enabled? boolean
| +--ro hold-time? uint16
+--ro priority? uint8
+--ro accept-mode? boolean
+--ro (advertise-interval-choice)?
| +--:(v2)
| | +--ro advertise-interval-sec? uint8
| +--:(v3)
| +--ro advertise-interval-centi-sec? uint16
+--ro track
| +--ro interfaces
| | +--ro interface* [interface]
| | +--ro interface if:interface-ref
| | +--ro priority-decrement? uint8
| +--ro networks
| +--ro network* [prefix]
| +--ro prefix inet:ipv4-prefix
| +--ro priority-decrement? uint8
+--ro virtual-ipv4-addresses
| +--ro virtual-ipv4-address* [ipv4-address]
| +--ro ipv4-address inet:ipv4-address
+--ro state? identityref
+--ro is-owner? boolean
+--ro last-adv-source? inet:ip-address
+--ro up-datetime? yang:date-and-time
+--ro master-down-interval? uint32
+--ro skew-time? uint32
+--ro last-event? identityref
+--ro new-master-reason?
new-master-reason-type
+--ro statistics
+--ro discontinuity-datetime? yang:date-and-time
+--ro master-transitions? yang:counter32
+--ro advertisement-recv? yang:counter64
+--ro advertisement-sent? yang:counter64
+--ro interval-errors? yang:counter64
{validate-interval-errors}?
+--ro priority-zero-pkts-rcvd? yang:counter64
+--ro priority-zero-pkts-sent? yang:counter64
+--ro invalid-type-pkts-rcvd? yang:counter64
+--ro address-list-errors? yang:counter64
{validate-address-list-errors}?
+--ro packet-length-errors? yang:counter64
augment /if:interfaces-state/if:interface/ip:ipv6:
+--ro vrrp
+--ro vrrp-instance* [vrid]
+--ro vrid uint8
+--ro version identityref
+--ro log-state-change? boolean
+--ro preempt
| +--ro enabled? boolean
| +--ro hold-time? uint16
+--ro priority? uint8
+--ro accept-mode? boolean
+--ro advertise-interval-centi-sec? uint16
+--ro track
| +--ro interfaces
| | +--ro interface* [interface]
| | +--ro interface if:interface-ref
| | +--ro priority-decrement? uint8
| +--ro networks
| +--ro network* [prefix]
| +--ro prefix inet:ipv6-prefix
| +--ro priority-decrement? uint8
+--ro virtual-ipv6-addresses
| +--ro virtual-ipv6-address* [ipv6-address]
| +--ro ipv6-address inet:ipv6-address
+--ro state? identityref
+--ro is-owner? boolean
+--ro last-adv-source? inet:ip-address
+--ro up-datetime? yang:date-and-time
+--ro master-down-interval? uint32
+--ro skew-time? uint32
+--ro last-event? identityref
+--ro new-master-reason?
new-master-reason-type
+--ro statistics
+--ro discontinuity-datetime? yang:date-and-time
+--ro master-transitions? yang:counter32
+--ro advertisement-recv? yang:counter64
+--ro advertisement-sent? yang:counter64
+--ro interval-errors? yang:counter64
{validate-interval-errors}?
+--ro priority-zero-pkts-rcvd? yang:counter64
+--ro priority-zero-pkts-sent? yang:counter64
+--ro invalid-type-pkts-rcvd? yang:counter64
+--ro address-list-errors? yang:counter64
{validate-address-list-errors}?
+--ro packet-length-errors? yang:counter64
augment /if:interfaces-state:
+--ro vrrp-global
+--ro virtual-routers? uint32
+--ro interfaces? uint32
+--ro statistics
+--ro discontinuity-datetime? yang:date-and-time
+--ro checksum-errors? yang:counter64
+--ro version-errors? yang:counter64
+--ro vrid-errors? yang:counter64
+--ro ip-ttl-errors? yang:counter64
notifications:
+---n vrrp-new-master-event
| +--ro master-ip-address inet:ip-address
| +--ro new-master-reason new-master-reason-type
+---n vrrp-protocol-error-event
| +--ro protocol-error-reason identityref
+---n vrrp-virtual-router-error-event
+--ro interface if:interface-ref
+--ro (ip-version)
| +--:(ipv4)
| | +--ro ipv4
| | +--ro vrid -> /if:interfaces/interface[if:name =
current()/../../vrrp:interface]/ip:ipv4/vrrp:vrrp/vrrp-instance/vrid
| +--:(ipv6)
| +--ro ipv6
| +--ro vrid -> /if:interfaces/interface[if:name =
current()/../../vrrp:interface]/ip:ipv6/vrrp:vrrp/vrrp-instance/vrid
+--ro virtual-router-error-reason identityref
Authors' Addresses Authors' Addresses
Xufeng Liu (editor) Xufeng Liu (editor)
Jabil Jabil
8281 Greensboro Drive, Suite 200 8281 Greensboro Drive, Suite 200
McLean VA 22102 McLean VA 22102
USA USA
EMail: Xufeng_Liu@jabil.com EMail: Xufeng_Liu@jabil.com
 End of changes. 80 change blocks. 
371 lines changed or deleted 1555 lines changed or added

This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/