Hi Alia, authors,
OK, so the tooling is still a bit rough and ready, but I've tweaked it a
bit and run it on the VRRP module.
The tooling itself:
(1) Alpha/beta level quality, generally it seems to work OK, but the
results need to be carefully checked (e.g. by diffing the old and new
modules to see what has changed).
(2) Is just a fork of pyang with some extra modules (it is sync'ed with
Martin's latest pyang github repository today).
(3) Current code is available at: https://github.com/rgwilton/pyang
- Feel free to clone, extend, pull requests, etc.
(4) How does it work?:
- It looks through the parallel config/state trees finding nodes with
the same names on equivalent paths.
- It that match then it checks description and reference and merges them
together. If it merges it flags it with a "FIX ME" comment.
- It also tries to handle augmentations and groupings, by heuristically
checking for "-state" in the grouping name.
(5) Stuff that is known not to work:
- It should, but currently doesn't, validate that the same type is used
between the config and state leaves!
- I've not tried it with submodules, I'm not sure how it will fare.
(6) Generically it is used like this (from the directory that contains
the split YANG module):
- clone the github repository above, and ensure pyang's normal
dependencies are available.
- run these commands:
cd <pyang directory>
source env.sh
cd <yang module directory>
"pyang -f yang --max-line-length 69 --ietf-split-to-combined-tree
--remove-state-nodes <src.yang> > <tgt.yang>"
(7) Actual example steps on VRRP (draft-ietf-rtgwg-yang-vrrp-04), module
extracted by rcfstrip:
# Generate a 'clean' tree for more informative diff (or else many
whitespace changes are reported).
pyang -f yang --ietf --max-line-length 69 [email protected] >
[email protected]
pyang -f yang --ietf-split-to-combined-tree --remove-state-nodes
--max-line-length 69 [email protected] >
[email protected]
diff [email protected] [email protected] >
vrrp-nmda.diff
# Checking the tree output is also sensible.
pyang -f tree [email protected] > [email protected]
pyang -f tree --ietf [email protected] >
[email protected]
diff [email protected] [email protected] >
vrrp-nmda-tree.diff
The new VRRP YANG module, New tree output, model diff, and tree diff are
all attached.
Requires manual fixing:
- revision date/history
- a few "FIX ME" comments to merge config/state description strings.
- check that leaf types match for any config/state nodes on equivalent
paths where the state leaf has been removed.
Thanks,
Rob
On 20/09/2017 17:35, Alia Atlas wrote:
As is customary, I have done my AD review of
draft-ietf-rtgwg-yang-vrrp-04. First, I would like to thank the
authors, Xufeng, Athanasios, Ravi, Acee,and Mingui, as well as the WG
for their work on this draft. It is clear and well-written.
My one issue is that it does not conform to the NMDA guidelines. I
know that the transformation can be done largely programmatically -
and Acee & Xufeng are quite familiar with the details. I've also cc'd
Rob Wilton who has some tooling to potentially help.
From the shepherd's report, I understand that there is an
implementation. That implies that the existing model should be in the
appendix.
I would be delighted to forward this draft to IETF Last Call (and my
apologies for the long delay in review) after it has been updated.
Thanks,
Alia
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
+--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/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
+--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:
+--rw 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
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:[email protected]>
WG Chair: Jeff Tantsura
<mailto:[email protected]>
WG Chair: Chris Bowers
<mailto:[email protected]>
Editor: Xufeng Liu
<mailto:[email protected]>
Editor: Athanasios Kyparlis
<mailto:[email protected]>
Editor: Ravi Parikh
<mailto:[email protected]>
Editor: Acee Lindem
<mailto:[email protected]>
Editor: Mingui Zhang
<mailto:[email protected]>";
description
"This YANG module defines a model for managing Virtual Router
Redundancy Protocol (VRRP) version 2 and version 3.";
revision 2017-04-27 {
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).";
}
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.";
}
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.";
}
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.";
}
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.";
}
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.";
}
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.";
}
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.";
}
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.";
}
}
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.";
}
}
}
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.";
}
}
}
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.";
}
}
}
}
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.";
}
}
}
}
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.";
}
}
}
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.";
}
}
}
}
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.";
}
}
}
}
grouping vrrp-state-attributes {
description
"Group of VRRP state attributes.";
leaf state {
type identityref {
base vrrp:vrrp-state-type;
}
config false;
description
"Operational state.";
}
leaf is-owner {
type boolean;
config false;
description
"Set to true if this virtual router is owner.";
}
leaf last-adv-source {
type inet:ip-address;
config false;
description
"Last advertised IPv4/IPv6 source address";
}
leaf up-datetime {
type yang:date-and-time;
config false;
description
"The date and time when this virtual router
transitioned out of init state.";
}
leaf master-down-interval {
type uint32;
units "centiseconds";
config false;
description
"Time interval for backup virtual router to declare
Master down.";
}
leaf skew-time {
type uint32;
units "microseconds";
config false;
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;
}
config false;
description
"Last reported event.";
}
leaf new-master-reason {
type new-master-reason-type;
config false;
description
"Indicates the reason for the virtual router to transition
to master state.";
}
container statistics {
config false;
description
"VRRP statistics.";
leaf discontinuity-datetime {
type yang:date-and-time;
config false;
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;
config false;
description
"The total number of times that this virtual router's
state has transitioned to master";
}
leaf advertisement-recv {
type yang:counter64;
config false;
description
"The total number of VRRP advertisements received by
this virtual router.";
}
leaf advertisement-sent {
type yang:counter64;
config false;
description
"The total number of VRRP advertisements sent by
this virtual router.";
}
leaf interval-errors {
if-feature "validate-interval-errors";
type yang:counter64;
config false;
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;
config false;
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;
config false;
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;
config false;
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;
config false;
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;
config false;
description
"The total number of packets received with a packet
length less than the length of the VRRP header.";
}
}
}
grouping vrrp-global-state-attributes {
description
"Group of VRRP global state attributes.";
leaf virtual-routers {
type uint32;
config false;
description
"Number of configured virtual routers.";
}
leaf interfaces {
type uint32;
config false;
description
"Number of interface with VRRP configured.";
}
container statistics {
config false;
description
"VRRP global statistics.";
leaf discontinuity-datetime {
type yang:date-and-time;
config false;
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;
config false;
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;
config false;
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;
config false;
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;
config false;
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.";
}
}
}
augment "/if:interfaces/if:interface/ip:ipv4" {
description
"Augment IPv4 interface.
FROM STATE TREE (FIX ME):
Augment IPv4 interface state.";
container vrrp {
description
"Configures the Virtual Router Redundancy Protocol (VRRP)
version 2 or version 3 for IPv4.
FROM STATE TREE (FIX ME):
State information for Virtual Router Redundancy Protocol
(VRRP) version 2 for IPv4.";
list vrrp-instance {
key "vrid";
description
"Defines a virtual router, identified by a virtual router
identifier (VRID), within IPv4 address space.
FROM STATE TREE (FIX ME):
States of a virtual router, identified by a virtual router
identifier (VRID), within IPv4 address space.";
uses vrrp-ipv4-attributes;
uses vrrp-state-attributes;
}
}
}
augment "/if:interfaces/if:interface/ip:ipv6" {
description
"Augment IPv6 interface.
FROM STATE TREE (FIX ME):
Augment IPv6 interface state.";
container vrrp {
description
"Configures the Virtual Router Redundancy Protocol (VRRP)
version 3 for IPv6.
FROM STATE TREE (FIX ME):
State information of the Virtual Router Redundancy Protocol
(VRRP) version 2 or 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.
FROM STATE TREE (FIX ME):
States of a virtual router, identified by a virtual router
identifier (VRID), within IPv6 address space.";
uses vrrp-ipv6-attributes;
uses vrrp-state-attributes;
}
}
}
augment "/if:interfaces" {
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;
}
}
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.";
}
}
}
625a626
> config false;
630a632
> config false;
635a638
> config false;
640a644
> config false;
647a652
> config false;
654a660
> config false;
662a669
> config false;
667a675
> config false;
672a681
> config false;
676a686
> config false;
686a697
> config false;
692a704
> config false;
698a711
> config false;
705a719
> config false;
713a728
> config false;
719a735
> config false;
725a742
> config false;
732a750
> config false;
739a758
> config false;
751a771
> config false;
756a777
> config false;
760a782
> config false;
764a787
> config false;
776a800
> config false;
783a808
> config false;
790a816
> config false;
797a824
> config false;
809c836,839
< "Augment IPv4 interface.";
---
> "Augment IPv4 interface.
>
> FROM STATE TREE (FIX ME):
> Augment IPv4 interface state.";
813c843,847
< version 2 or version 3 for IPv4.";
---
> version 2 or version 3 for IPv4.
>
> FROM STATE TREE (FIX ME):
> State information for Virtual Router Redundancy Protocol
> (VRRP) version 2 for IPv4.";
817a852,855
> identifier (VRID), within IPv4 address space.
>
> FROM STATE TREE (FIX ME):
> States of a virtual router, identified by a virtual router
819a858
> uses vrrp-state-attributes;
825c864,867
< "Augment IPv6 interface.";
---
> "Augment IPv6 interface.
>
> FROM STATE TREE (FIX ME):
> Augment IPv6 interface state.";
829c871,875
< version 3 for IPv6.";
---
> version 3 for IPv6.
>
> FROM STATE TREE (FIX ME):
> State information of the Virtual Router Redundancy Protocol
> (VRRP) version 2 or version 3 for IPv6.";
838,870c884,887
< identifier (VRID), within IPv6 address space.";
< uses vrrp-ipv6-attributes;
< }
< }
< }
< 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;
< }
< }
< }
< 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.
>
> FROM STATE TREE (FIX ME):
> States of a virtual router, identified by a virtual router
877c894
< augment "/if:interfaces-state" {
---
> augment "/if:interfaces" {
29,30c29,49
< +--rw virtual-ipv4-address* [ipv4-address]
< +--rw ipv4-address inet:ipv4-address
---
> | +--rw virtual-ipv4-address* [ipv4-address]
> | +--rw 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
53,125c72,73
< +--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
---
> | +--rw virtual-ipv6-address* [ipv6-address]
> | +--rw ipv6-address inet:ipv6-address
145,146c93,94
< augment /if:interfaces-state:
< +--ro vrrp-global
---
> augment /if:interfaces:
> +--rw vrrp-global
_______________________________________________
rtgwg mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/rtgwg