]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-vrrpd.yang
Merge pull request #5183 from opensourcerouting/zebra-route-map-nb
[mirror_frr.git] / yang / frr-vrrpd.yang
1 module frr-vrrpd {
2 yang-version 1.1;
3 namespace "http://frrouting.org/yang/vrrpd";
4 prefix frr-vrrpd;
5
6 import ietf-inet-types {
7 prefix inet;
8 }
9
10 import ietf-yang-types {
11 prefix yang;
12 }
13
14 import frr-interface {
15 prefix frr-interface;
16 }
17
18 organization
19 "FRRouting";
20 contact
21 "FRR Users List: <mailto:frog@lists.frrouting.org>
22 FRR Development List: <mailto:dev@lists.frrouting.org>";
23 description
24 "This module defines a model for managing FRR vrrpd daemon.";
25
26 revision 2019-09-09 {
27 description
28 "Initial revision.";
29 }
30
31 grouping ip-vrrp-config {
32 description
33 "Configuration data for VRRP on IP interfaces";
34 leaf virtual-router-id {
35 type uint8 {
36 range "1..255";
37 }
38 description
39 "Set the virtual router id for use by the VRRP group. This
40 usually also determines the virtual MAC address that is
41 generated for the VRRP group";
42 }
43
44 leaf version {
45 type enumeration {
46 enum "2" {
47 value 2;
48 description
49 "VRRP version 2.";
50 }
51 enum "3" {
52 value 3;
53 description
54 "VRRP version 3.";
55 }
56 }
57 default "3";
58 }
59
60 leaf priority {
61 type uint8 {
62 range "1..254";
63 }
64 default "100";
65 description
66 "Specifies the sending VRRP interface's priority
67 for the virtual router. Higher values equal higher
68 priority";
69 }
70
71 leaf preempt {
72 type boolean;
73 default "true";
74 description
75 "When set to true, enables preemption by a higher
76 priority backup router of a lower priority master router";
77 }
78
79 leaf accept-mode {
80 type boolean;
81 default "true";
82 description
83 "Configure whether packets destined for
84 virtual addresses are accepted even when the virtual
85 address is not owned by the router interface";
86 }
87
88 leaf advertisement-interval {
89 type uint16 {
90 range "1..4095";
91 }
92 units "centiseconds";
93 default "100";
94 description
95 "Sets the interval between successive VRRP
96 advertisements -- RFC 5798 defines this as a 12-bit
97 value expressed as 0.1 seconds, with default 100, i.e.,
98 1 second. Several implementation express this in units of
99 seconds";
100 }
101
102 leaf shutdown {
103 type boolean;
104 default "false";
105 description
106 "Administrative shutdown for this VRRP group.";
107 }
108 }
109
110 grouping ip-vrrp-state {
111 description
112 "Grouping for operational state data for a virtual router";
113 leaf current-priority {
114 type uint8;
115 config false;
116 description
117 "Operational value of the priority for the
118 interface in the VRRP group.";
119 }
120
121 leaf vrrp-interface {
122 type frr-interface:interface-ref;
123 config false;
124 description
125 "The interface used to transmit VRRP traffic.";
126 }
127
128 leaf source-address {
129 type inet:ip-address;
130 config false;
131 description
132 "The source IP address used for VRRP advertisements.";
133 }
134
135 leaf state {
136 type enumeration {
137 enum "Initialize" {
138 description
139 "State when virtual router is waiting for a Startup event.";
140 }
141 enum "Master" {
142 description
143 "State when virtual router is functioning as the forwarding router
144 for the virtual addresses.";
145 }
146 enum "Backup" {
147 description
148 "State when virtual router is monitoring the availability and state
149 of the Master router.";
150 }
151 }
152 config false;
153 }
154
155 leaf master-advertisement-interval {
156 type uint16 {
157 range "0..4095";
158 }
159 units "centiseconds";
160 config false;
161 description
162 "Advertisement interval contained in advertisements received from the Master.";
163 }
164
165 leaf skew-time {
166 type uint16;
167 units "centiseconds";
168 config false;
169 description
170 "Time to skew Master_Down_Interval.";
171 }
172
173 container counter {
174 config false;
175 leaf state-transition {
176 type yang:zero-based-counter32;
177 description
178 "Number of state transitions the virtual router has experienced.";
179 }
180
181 container tx {
182 leaf advertisement {
183 type yang:zero-based-counter32;
184 description
185 "Number of sent VRRP advertisements.";
186 }
187 }
188
189 container rx {
190 leaf advertisement {
191 type yang:zero-based-counter32;
192 description
193 "Number of received VRRP advertisements.";
194 }
195 }
196 }
197 }
198
199 grouping ip-vrrp-top {
200 description
201 "Top-level grouping for Virtual Router Redundancy Protocol";
202 container vrrp {
203 description
204 "Enclosing container for VRRP groups handled by this
205 IP interface";
206 reference
207 "RFC 5798 - Virtual Router Redundancy Protocol
208 (VRRP) Version 3 for IPv4 and IPv6";
209 list vrrp-group {
210 key "virtual-router-id";
211 description
212 "List of VRRP groups, keyed by virtual router id";
213 uses ip-vrrp-config;
214
215 container v4 {
216 leaf-list virtual-address {
217 type inet:ipv4-address;
218 description
219 "Configure one or more IPv4 virtual addresses for the
220 VRRP group";
221 }
222
223 uses ip-vrrp-state {
224 augment "./counter/tx" {
225 leaf gratuitous-arp {
226 type yang:zero-based-counter32;
227 description
228 "Number of sent gratuitous ARP requests.";
229 }
230 }
231 }
232 }
233
234 container v6 {
235 when "../version = 3";
236 leaf-list virtual-address {
237 type inet:ipv6-address;
238 description
239 "Configure one or more IPv6 virtual addresses for the
240 VRRP group";
241 }
242
243 uses ip-vrrp-state {
244 augment "./counter/tx" {
245 leaf neighbor-advertisement {
246 type yang:zero-based-counter32;
247 description
248 "Number of sent unsolicited Neighbor Advertisements.";
249 }
250 }
251 }
252 }
253 }
254 }
255 }
256
257 augment "/frr-interface:lib/frr-interface:interface" {
258 uses ip-vrrp-top;
259 }
260 }