draft-ietf-rtgwg-yang-vrrp-02.txt   draft-ietf-rtgwg-yang-vrrp-03.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: September 11, 2017 R. Parikh Expires: November 9, 2017 R. Parikh
VMware VMware
A. Lindem A. Lindem
Cisco Systems Cisco Systems
M. Zhang M. Zhang
Huawei Technologies Huawei Technologies
March 10, 2017 May 8, 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-02 draft-ietf-rtgwg-yang-vrrp-03
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 September 11, 2017. This Internet-Draft will expire on November 9, 2017.
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 . . . . . . . . . . . . . . . . . 5 2.3. Protocol Configuration . . . . . . . . . . . . . . . . . 6
2.4. Protocol States . . . . . . . . . . . . . . . . . . . . . 6 2.4. Protocol States . . . . . . . . . . . . . . . . . . . . . 8
2.5. Notifications . . . . . . . . . . . . . . . . . . . . . . 7 2.5. Notifications . . . . . . . . . . . . . . . . . . . . . . 9
3. Tree Structure . . . . . . . . . . . . . . . . . . . . . . . 8 3. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 10
4. YANG Module . . . . . . . . . . . . . . . . . . . . . . . . . 11 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 32
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 33 5. Security Considerations . . . . . . . . . . . . . . . . . . . 33
6. Security Considerations . . . . . . . . . . . . . . . . . . . 34 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 33
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 34 6.1. Normative References . . . . . . . . . . . . . . . . . . 33
7.1. Normative References . . . . . . . . . . . . . . . . . . 34 6.2. Informative References . . . . . . . . . . . . . . . . . 35
7.2. Informative References . . . . . . . . . . . . . . . . . 35 Appendix A. Complete Model Tree Structure . . . . . . . . . . . 36
Appendix A. Data Tree Example . . . . . . . . . . . . . . . . . 37 Appendix B. Data Tree Example . . . . . . . . . . . . . . . . . 39
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 39 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 42
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 4, line 26 skipping to change at page 4, line 26
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 IP management model "ietf-ip" [RFC7277]. The [RFC7223] and the IP management model "ietf-ip" [RFC7277]. The
augmentation relations are shown as follows: augmentation relations are shown as follows:
ietf-interfaces ietf-ip ietf-vrrp module: ietf-interfaces
=========================================================
+--rw interfaces +--rw interfaces
| +--rw interface* | +--rw interface* [name]
| +--------------rw ipv4 ...
| | +---------------rw vrrp | +--rw ip:ipv4!
| | +--rw vrrp-instance* | | +--rw ip:address* [ip]
| +--------------rw ipv6 ...
| +---------------rw vrrp | | +--rw vrrp:vrrp
| +--rw vrrp-instance* | | +--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 interfaces-state
+--ro interface* +--ro interface* [name]
| +--------------ro ipv4 ...
| | +---------------ro vrrp | +--ro ip:ipv4!
| | +--ro vrrp-instance* | | +--ro ip:address* [ip]
| +--------------ro ipv6 ...
| +---------------ro vrrp | | +--ro vrrp:vrrp
| +--ro vrrp-instance* | | +--ro vrrp:vrrp-instance* [vrid]
+---------------------------------ro vrrp-global | | +--ro vrrp:vrid uint8
| | +--ro vrrp:virtual-ipv4-addresses
...
| +--ro ip:ipv6!
| +--ro ip:address* [ip]
...
| +--ro vrrp:vrrp
| +--ro vrrp:vrrp-instance* [vrid]
| +--ro vrrp:vrid uint8
| +--ro vrrp:virtual-ipv6-addresses
...
+--ro vrrp:vrrp-global
...
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-ip". A tree node with prefix "vrrp:" is from the VRRP model
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).
Each vrrp-instance node represents a VRRP router state machine
described in Section 6.4 of [RFC5798], providing the configuration
and state information for the election process of a virtual router.
The IP addresses on the augmented interface are the real addresses
through which the VRRP router operates. The IPv4 or IPv6 address(es)
associated with a virtual router (described in Section 1 of
[RFC5798]) are modeled as a list of IPv4 or IPv6 addresses under the
vrrp-instance.
2.3. Protocol Configuration 2.3. Protocol Configuration
The model structure for the protocol configuration is as shown below: The model structure for the protocol configuration is as shown below:
augment /if:interfaces/if:interface/ip:ipv4: augment /if:interfaces/if:interface/ip:ipv4:
+--rw vrrp +--rw vrrp
+--rw vrrp-instance* [vrid] +--rw vrrp-instance* [vrid]
+--rw vrid uint8 +--rw vrid uint8
| ... | ...
+--rw track +--rw track
skipping to change at page 6, line 5 skipping to change at page 7, line 43
| +--rw networks | +--rw networks
| +--rw network* [prefix] | +--rw network* [prefix]
| +--rw prefix inet:ipv6-prefix | +--rw prefix inet:ipv6-prefix
| ... | ...
+--rw virtual-ipv6-addresses +--rw virtual-ipv6-addresses
+--rw virtual-ipv6-address* [ipv6-address] +--rw virtual-ipv6-address* [ipv6-address]
+--rw ipv6-address inet:ipv6-address +--rw ipv6-address inet:ipv6-address
The model allows to configure the following protocol entities: The model allows to configure the following protocol entities:
o VRRP instance (version 2 or version 3). o VRRP instance (version 2 or version 3), representing a VRRP
router.
o Virtual IPv4 or IPv6 address. o Virtual IPv4 or IPv6 address associated with a virtual router.
o Tracking interface. o Tracking interface, to detect interface connectivity failures.
o Tracking network. 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: augment /if:interfaces-state/if:interface/ip:ipv4:
+--ro vrrp +--ro vrrp
+--ro vrrp-instance* [vrid] +--ro vrrp-instance* [vrid]
+--ro vrid uint8 +--ro vrid uint8
| ... | ...
skipping to change at page 7, line 21 skipping to change at page 9, line 13
+--ro <per instance statistics> +--ro <per instance statistics>
augment /if:interfaces-state: augment /if:interfaces-state:
+--ro vrrp-global +--ro vrrp-global
+--ro <global operational states> +--ro <global operational states>
+--ro statistics +--ro statistics
+--ro <global statistics> +--ro <global statistics>
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). o VRRP instance (version 2 or version 3), representing a VRRP
router.
o Virtual IPv4 or IPv6 address. o Virtual IPv4 or IPv6 address associated with a virtual router.
o Tracking interface. o Tracking interface, to detect interface connectivity failures.
o Tracking network. o Tracking network, to detect interface connectivity failures.
o Global states and statistics summarizing all instances. o Global states and statistics summarizing all instances.
2.5. Notifications 2.5. Notifications
This model defines the following VRRP specific notifications: This model defines the following VRRP specific notifications:
o VRRP new master event. 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 leafref
| +--:(ipv6)
| +--ro ipv6
| +--ro vrid leafref
+--ro virtual-router-error-reason identityref
o VRRP protocol error event for a message that fails to reach a VRRP Each notification type is used to indicate a type of VRRP state
changes or error occurances:
vrrp-new-master-event
VRRP new master event, indicating that a new master has been
elected.
vrrp-protocol-error-event
VRRP protocol error event for a message that fails to reach a VRRP
instance to be processed. instance to be processed.
o VRRP virtual router error event for a message processed on a VRRP vrrp-virtual-router-error-event
VRRP virtual router error event for a message processed on a VRRP
instance. instance.
In addition to the notifications specified above, the mechanism In addition to the notifications specified above, the mechanism
defined in [I-D.ietf-netconf-yang-push] and defined in [I-D.ietf-netconf-yang-push] and
[I-D.ietf-netconf-rfc5277bis] can be used for other general [I-D.ietf-netconf-rfc5277bis] can be used for other general
notifications. This mechanism currently allows the user to: notifications. This mechanism currently allows the user to:
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. Tree Structure 3. YANG Module
This document defines the YANG module "ietf-vrrp", which has the
following 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 enumeration
+--ro vrid-v4? leafref
+--ro vrid-v6? leafref
+--ro virtual-router-error-reason identityref
4. YANG Module
<CODE BEGINS> file "ietf-vrrp@2017-02-21.yang" <CODE BEGINS> file "ietf-vrrp@2017-04-27.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 {
prefix "yang"; prefix "yang";
} }
import ietf-interfaces { import ietf-interfaces {
prefix "if"; prefix "if";
} }
skipping to change at page 12, line 50 skipping to change at page 11, line 35
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-02-21 { revision 2017-04-27 {
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 13, line 50 skipping to change at page 12, line 37
description description
"The virtual router has never transitioned to master "The virtual router has never transitioned to master
state,"; state,";
} }
enum priority { enum priority {
description "Priority was higher."; description "Priority was higher.";
} }
enum preempted { enum preempted {
description "The master was preempted."; description "The master was preempted.";
} }
enum master-no-response { enum no-response {
description "Previous master did not respond."; description "Previous master did not respond.";
} }
} }
description description
"The reason for the virtual router to transition to master "The reason for the virtual router to transition to master
state."; state.";
} // new-master-reason-type } // new-master-reason-type
/* /*
* Identities * Identities
*/ */
skipping to change at page 21, line 10 skipping to change at page 19, line 45
version 2 (VRRP) or version 3 (VRRPv3) instance to track version 2 (VRRP) or version 3 (VRRPv3) instance to track
an interface."; an interface.";
list interface { list interface {
key "interface"; key "interface";
description description
"Interface to track."; "Interface to track.";
leaf interface { leaf interface {
type if:interface-ref; type if:interface-ref;
must "/if:interfaces/if:interface[if:name=.]/ip:ipv4" { must "/if:interfaces/if:interface[if:name=current()]/"
+ "ip:ipv4" {
description "Interface is IPv4."; description "Interface is IPv4.";
} }
description description
"Interface to track."; "Interface to track.";
} }
leaf priority-decrement { leaf priority-decrement {
type uint8 { type uint8 {
range 1..254; range 1..254;
} }
default 10; default 10;
description description
"Specifies how much to decrement the priority of the "Specifies how much to decrement the priority of the
VRRP instance if the interface goes down."; VRRP instance if the interface goes down.";
} }
} // interface } // interface
skipping to change at page 21, line 40 skipping to change at page 20, line 27
description description
"Enables the backup Virtual Router Redundancy Protocol "Enables the backup Virtual Router Redundancy Protocol
version 2 (VRRP) or version 3 (VRRPv3) router to track a version 2 (VRRP) or version 3 (VRRPv3) router to track a
specified network through the IP network prefix of that specified network through the IP network prefix of that
network."; network.";
list network { list network {
key "prefix"; key "prefix";
description description
"Enables the specified Virtual Router Redundancy "Enables the specified Virtual Router Redundancy
Protocol version 2 (VRRP) or version 3 (VRRPv3) Protocol version 2 (VRRP) or version 3 (VRRPv3)
instance to track an IP network."; instance to track an IP network, by specifying the
prefix of the IP network.";
leaf prefix { leaf prefix {
type inet:ipv4-prefix; type inet:ipv4-prefix;
description description
"The prefix of the network to track."; "The prefix of the network to track.";
} }
leaf priority-decrement { leaf priority-decrement {
type uint8 { type uint8 {
range 1..254; range 1..254;
skipping to change at page 22, line 31 skipping to change at page 21, line 19
max-elements 16; max-elements 16;
description description
"Virtual IP addresses for a single VRRP instance. For a "Virtual IP addresses for a single VRRP instance. For a
VRRP owner router, the virtual address must match one VRRP owner router, the virtual address must match one
of the IP addresses configured on the interface of the IP addresses configured on the interface
corresponding to the virtual router."; corresponding to the virtual router.";
leaf ipv4-address { leaf ipv4-address {
type inet:ipv4-address; type inet:ipv4-address;
description description
"Virtual IPv4 address."; "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-address
} // virtual-ipv4-addresses } // virtual-ipv4-addresses
} // grouping vrrp-ipv4-attributes } // grouping vrrp-ipv4-attributes
grouping vrrp-ipv6-attributes { grouping vrrp-ipv6-attributes {
description description
"Group of VRRP attributes for IPv6."; "Group of VRRP attributes for IPv6.";
uses vrrp-common-attributes; uses vrrp-common-attributes;
skipping to change at page 23, line 23 skipping to change at page 22, line 14
"Enables the specified Virtual Router Redundancy Protocol "Enables the specified Virtual Router Redundancy Protocol
version 2 (VRRP) or version 3 (VRRPv3) instance to track version 2 (VRRP) or version 3 (VRRPv3) instance to track
an interface."; an interface.";
list interface { list interface {
key "interface"; key "interface";
description description
"Interface to track."; "Interface to track.";
leaf interface { leaf interface {
type if:interface-ref; type if:interface-ref;
must "/if:interfaces/if:interface[if:name=.]/ip:ipv6" { must "/if:interfaces/if:interface[if:name=current()]/"
+ "ip:ipv6" {
description "Interface is IPv6."; description "Interface is IPv6.";
} }
description description
"Interface to track."; "Interface to track.";
} }
leaf priority-decrement { leaf priority-decrement {
type uint8 { type uint8 {
range 1..254; range 1..254;
} }
skipping to change at page 24, line 5 skipping to change at page 22, line 45
description description
"Enables the backup Virtual Router Redundancy Protocol "Enables the backup Virtual Router Redundancy Protocol
version 2 (VRRP) or version 3 (VRRPv3) router to track a version 2 (VRRP) or version 3 (VRRPv3) router to track a
specified network through the IP network prefix of that specified network through the IP network prefix of that
network."; network.";
list network { list network {
key "prefix"; key "prefix";
description description
"Enables the specified Virtual Router Redundancy "Enables the specified Virtual Router Redundancy
Protocol version 2 (VRRP) or version 3 (VRRPv3) Protocol version 2 (VRRP) or version 3 (VRRPv3)
instance to track an IP network."; instance to track an IP network, by specifying the
prefix of the IP network.";
leaf prefix { leaf prefix {
type inet:ipv6-prefix; type inet:ipv6-prefix;
description description
"The prefix of the network to track."; "The prefix of the network to track.";
} }
leaf priority-decrement { leaf priority-decrement {
type uint8 { type uint8 {
range 1..254; range 1..254;
} }
default 10; default 10;
description description
"Specifies how much to decrement the priority of the "Specifies how much to decrement the priority of the
backup VRRP router if there is a failure in the IP backup VRRP router if there is a failure in the IP
skipping to change at page 24, line 42 skipping to change at page 23, line 36
key "ipv6-address"; key "ipv6-address";
max-elements 2; max-elements 2;
description description
"Two IPv6 addresses are allowed. The first one must be "Two IPv6 addresses are allowed. The first one must be
a link-local address and the second one can be a a link-local address and the second one can be a
link-local or global address."; link-local or global address.";
leaf ipv6-address { leaf ipv6-address {
type inet:ipv6-address; type inet:ipv6-address;
description description
"Virtual IPv6 address."; "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-address
} // virtual-ipv6-addresses } // virtual-ipv6-addresses
} // 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 {
skipping to change at page 32, line 26 skipping to change at page 31, line 20
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.";
} }
leaf ip-version {
type enumeration { choice ip-version {
enum 4 { mandatory "true";
description "IPv4"; description
} "The error may have happened on either an IPv4 virtual
enum 6 { router or an IPv6 virtual router. The information
description "IPv6"; 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.";
}
} }
} }
mandatory "true"; case ipv6 {
description "Indicates the IP version."; description "IPv6";
} container ipv6 {
leaf vrid-v4 { description
type leafref { "Error information for IPv6.";
path "/if:interfaces/if:interface" leaf vrid {
+ "[if:name = current()/../vrrp:interface]/ip:ipv4/" type leafref {
+ "vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid"; 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.";
}
}
} }
description
"Indicates the virtual router on which the event has
occurred.";
} }
leaf vrid-v6 {
type leafref {
path "/if:interfaces/if:interface"
+ "[if:name = current()/../vrrp:interface]/ip:ipv6/"
+ "vrrp:vrrp/vrrp:vrrp-instance/vrrp:vrid";
}
description
"Indicates the virtual router on which the event has
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>
5. 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
actual RFC number (and remove this note). actual RFC number (and remove this note).
This document registers the following namespace URIs in the IETF XML This document registers the following namespace URIs in the IETF XML
registry [RFC3688]: registry [RFC3688]:
-------------------------------------------------------------------- --------------------------------------------------------------------
URI: urn:ietf:params:xml:ns:yang:ietf-vrrp URI: urn:ietf:params:xml:ns:yang:ietf-vrrp
Registrant Contact: The IESG. Registrant Contact: The IESG.
skipping to change at page 34, line 5 skipping to change at page 33, line 12
This document registers the following YANG modules in the YANG Module This document registers the following YANG modules in the YANG Module
Names registry [RFC7950]: Names registry [RFC7950]:
-------------------------------------------------------------------- --------------------------------------------------------------------
name: ietf-vrrp name: ietf-vrrp
namespace: urn:ietf:params:xml:ns:yang:ietf-vrrp namespace: urn:ietf:params:xml:ns:yang:ietf-vrrp
prefix: vrrp prefix: vrrp
reference: RFC XXXX reference: RFC XXXX
-------------------------------------------------------------------- --------------------------------------------------------------------
6. 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 content.
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,
skipping to change at page 34, line 32 skipping to change at page 33, line 39
/if:interfaces/if:interface/ip:ipv4/vrrp:vrrp/vrrp:vrrp-instance /if:interfaces/if:interface/ip:ipv4/vrrp:vrrp/vrrp:vrrp-instance
/if:interfaces/if:interface/ip:ipv6/vrrp:vrrp/vrrp:vrrp-instance /if:interfaces/if:interface/ip:ipv6/vrrp:vrrp/vrrp:vrrp-instance
Unauthorized access to any node of these can adversely affect the Unauthorized access to any node of these can adversely affect the
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.
7. References 6. References
7.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,
<http://www.rfc-editor.org/info/rfc2119>. <http://www.rfc-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,
<http://www.rfc-editor.org/info/rfc3688>. <http://www.rfc-editor.org/info/rfc3688>.
skipping to change at page 35, line 41 skipping to change at page 34, line 50
[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-05 (work in progress), March 2017. push-06 (work in progress), April 2017.
7.2. Informative References 6.2. Informative References
[RFC6087] Bierman, A., "Guidelines for Authors and Reviewers of YANG [RFC6087] Bierman, A., "Guidelines for Authors and Reviewers of YANG
Data Model Documents", RFC 6087, DOI 10.17487/RFC6087, Data Model Documents", RFC 6087, DOI 10.17487/RFC6087,
January 2011, <http://www.rfc-editor.org/info/rfc6087>. January 2011, <http://www.rfc-editor.org/info/rfc6087>.
[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,
<http://www.rfc-editor.org/info/rfc6536>. <http://www.rfc-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>. <http://www.rfc-editor.org/info/rfc7951>.
Appendix A. Data Tree Example Appendix A. Complete Model Tree Structure
The VRRP YANG data model defined in this document has the following
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 leafref
| +--:(ipv6)
| +--ro ipv6
| +--ro vrid leafref
+--ro virtual-router-error-reason identityref
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: 10.0.0.1 Virtual router IP address: 10.0.0.1
+-----------------+ +-----------------+ +-----------------+ +-----------------+
| | | | | | | |
| Router 1.1.1.1 | | Router 1.1.1.2 | | Router 1.1.1.1 | | Router 1.1.1.2 |
| | | | | | | |
+--------+--------+ +--------+--------+ +--------+--------+ +--------+--------+
|eth0 |eth0 |eth1 |eth1
|10.0.1.1 |10.0.2.1 |10.0.1.1 |10.0.2.1
-------+--------------------------+------- -------+--------------------------+-------
| | | |
|10.0.2.1 |10.0.2.2 |10.0.2.1 |10.0.2.2
+--------+--------+ +--------+--------+ +--------+--------+ +--------+--------+
| Host 1 | | Host 2 | | Host 1 | | Host 2 |
| Default gateway:| | Default gateway:| | Default gateway:| | Default gateway:|
| 10.0.0.1 | | 10.0.0.1 | | 10.0.0.1 | | 10.0.0.1 |
+-----------------+ +-----------------+ +-----------------+ +-----------------+
 End of changes. 47 change blocks. 
269 lines changed or deleted 356 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/