1 // SPDX-License-Identifier: BSD-2-Clause
4 namespace "http://frrouting.org/yang/vrrpd";
7 import ietf-inet-types {
11 import ietf-yang-types {
15 import frr-interface {
22 "FRR Users List: <mailto:frog@lists.frrouting.org>
23 FRR Development List: <mailto:dev@lists.frrouting.org>";
25 "This module defines a model for managing FRR vrrpd daemon.
27 Copyright 2020 FRRouting
29 Redistribution and use in source and binary forms, with or without
30 modification, are permitted provided that the following conditions
33 1. Redistributions of source code must retain the above copyright notice,
34 this list of conditions and the following disclaimer.
36 2. Redistributions in binary form must reproduce the above copyright
37 notice, this list of conditions and the following disclaimer in the
38 documentation and/or other materials provided with the distribution.
40 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
41 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
42 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
43 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
44 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
45 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
46 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
47 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
48 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
49 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
50 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
57 grouping ip-vrrp-config {
59 "Configuration data for VRRP on IP interfaces";
60 leaf virtual-router-id {
65 "Set the virtual router id for use by the VRRP group. This
66 usually also determines the virtual MAC address that is
67 generated for the VRRP group";
92 "Specifies the sending VRRP interface's priority
93 for the virtual router. Higher values equal higher
101 "When set to true, enables preemption by a higher
102 priority backup router of a lower priority master router";
109 "Configure whether packets destined for
110 virtual addresses are accepted even when the virtual
111 address is not owned by the router interface";
114 leaf checksum-with-ipv4-pseudoheader {
118 "Enabled if VRRPv3 checksum for IPv4 involves pseudoheader";
121 leaf advertisement-interval {
125 units "centiseconds";
128 "Sets the interval between successive VRRP
129 advertisements -- RFC 5798 defines this as a 12-bit
130 value expressed as 0.1 seconds, with default 100, i.e.,
131 1 second. Several implementation express this in units of
139 "Administrative shutdown for this VRRP group.";
143 grouping ip-vrrp-state {
145 "Grouping for operational state data for a virtual router";
146 leaf current-priority {
150 "Operational value of the priority for the
151 interface in the VRRP group.";
154 leaf vrrp-interface {
155 type frr-interface:interface-ref;
158 "The interface used to transmit VRRP traffic.";
161 leaf source-address {
162 type inet:ip-address;
165 "The source IP address used for VRRP advertisements.";
172 "State when virtual router is waiting for a Startup event.";
176 "State when virtual router is functioning as the forwarding router
177 for the virtual addresses.";
181 "State when virtual router is monitoring the availability and state
182 of the Master router.";
188 leaf master-advertisement-interval {
192 units "centiseconds";
195 "Advertisement interval contained in advertisements received from the Master.";
200 units "centiseconds";
203 "Time to skew Master_Down_Interval.";
208 leaf state-transition {
209 type yang:zero-based-counter32;
211 "Number of state transitions the virtual router has experienced.";
216 type yang:zero-based-counter32;
218 "Number of sent VRRP advertisements.";
224 type yang:zero-based-counter32;
226 "Number of received VRRP advertisements.";
232 grouping ip-vrrp-top {
234 "Top-level grouping for Virtual Router Redundancy Protocol";
237 "Enclosing container for VRRP groups handled by this
240 "RFC 5798 - Virtual Router Redundancy Protocol
241 (VRRP) Version 3 for IPv4 and IPv6";
243 key "virtual-router-id";
245 "List of VRRP groups, keyed by virtual router id";
249 leaf-list virtual-address {
250 type inet:ipv4-address;
252 "Configure one or more IPv4 virtual addresses for the
257 augment "counter/tx" {
258 leaf gratuitous-arp {
259 type yang:zero-based-counter32;
261 "Number of sent gratuitous ARP requests.";
268 when "../version = 3";
269 leaf-list virtual-address {
270 type inet:ipv6-address;
272 "Configure one or more IPv6 virtual addresses for the
277 augment "counter/tx" {
278 leaf neighbor-advertisement {
279 type yang:zero-based-counter32;
281 "Number of sent unsolicited Neighbor Advertisements.";
290 augment "/frr-interface:lib/frr-interface:interface" {