]> git.proxmox.com Git - mirror_frr.git/blame - yang/frr-bfdd.yang
bgpd: evpn route-map match ead type-1 route-type
[mirror_frr.git] / yang / frr-bfdd.yang
CommitLineData
990e89e5
RZ
1module frr-bfdd {
2 yang-version 1.1;
3 namespace "http://frrouting.org/yang/bfdd";
4 prefix frr-bfdd;
5
6 import ietf-inet-types {
7 prefix inet;
8 }
9 import ietf-yang-types {
10 prefix yang;
11 }
12 import frr-interface {
13 prefix frr-interface;
14 }
806defc8
IR
15 import frr-vrf {
16 prefix frr-vrf;
17 }
990e89e5
RZ
18 import frr-route-types {
19 prefix frr-route-types;
20 }
21
8678d638 22 organization "FRRouting";
990e89e5
RZ
23 contact
24 "FRR Users List: <mailto:frog@lists.frrouting.org>
25 FRR Development List: <mailto:dev@lists.frrouting.org>";
26 description
fe3b629a
RW
27 "This module defines a model for managing FRR bfdd daemon.
28
29 Copyright 2020 FRRouting
30
31 Redistribution and use in source and binary forms, with or without
32 modification, are permitted provided that the following conditions
33 are met:
34
35 1. Redistributions of source code must retain the above copyright notice,
36 this list of conditions and the following disclaimer.
37
38 2. Redistributions in binary form must reproduce the above copyright
39 notice, this list of conditions and the following disclaimer in the
40 documentation and/or other materials provided with the distribution.
41
42 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
43 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
44 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
45 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
46 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
47 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
48 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
49 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
50 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
51 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
52 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
990e89e5
RZ
53
54 revision 2019-05-09 {
55 description "Initial revision.";
56 reference
57 "RFC 5880: Bidirectional Forwarding Detection (BFD).
58 RFC 5881: Bidirectional Forwarding Detection (BFD)
59 for IPv4 and IPv6 (Single Hop).
0ff1fb53 60 RFC 5883: Bidirectional Forwarding Detection (BFD) for Multihop Paths.";
990e89e5
RZ
61 }
62
63
64 /*
65 * BFD types declaration.
66 */
67 typedef multiplier {
68 description "Detection multiplier";
69 type uint8 {
0c91b419 70 range "2..255";
990e89e5
RZ
71 }
72 }
73
74 typedef discriminator {
75 description "BFD session identification";
76 type uint32 {
0c91b419 77 range "1..4294967295";
990e89e5
RZ
78 }
79 }
80
81 typedef state {
82 description "BFD session state";
83 type enumeration {
84 enum admin-down {
85 value 0;
86 description "Administratively down";
87 }
88 enum down {
89 value 1;
90 description "Down";
91 }
92 enum init {
93 value 2;
94 description "Initializing";
95 }
96 enum up {
97 value 3;
98 description "Up";
99 }
100 }
101 }
102
103 typedef diagnostic {
104 description "BFD session diagnostic";
105 type enumeration {
106 enum ok {
107 value 0;
108 description "Ok";
109 }
110 enum control-expired {
111 value 1;
112 description "Control timer expired";
113 }
114 enum echo-failed {
115 value 2;
116 description "Echo function failed";
117 }
118 enum neighbor-down {
119 value 3;
120 description "Neighbor signaled session down";
121 }
122 enum forwarding-reset {
123 value 4;
124 description "Forwarding plane reset";
125 }
126 enum path-down {
127 value 5;
128 description "Path down";
129 }
130 enum concatenated-path-down {
131 value 6;
132 description "Concatenated path down";
133 }
134 enum administratively-down {
135 value 7;
136 description "Administratively down";
137 }
138 enum reverse-concat-path-down {
139 value 8;
140 description "Reverse concatenated path down";
141 }
142 }
143 }
144
abf1ba08
RZ
145 typedef profile-name {
146 type string {
147 length "1..64";
148 }
149 description "Profile name format";
150 }
151
152 typedef profile-ref {
153 type leafref {
154 path "/frr-bfdd:bfdd/frr-bfdd:bfd/frr-bfdd:profile/frr-bfdd:name";
155 require-instance false;
156 }
157 description "Reference to a BFD profile";
158 }
159
990e89e5
RZ
160 /*
161 * Shared BFD items.
162 */
163 grouping session-common {
164 description "Common BFD session settings";
165
166 leaf detection-multiplier {
167 type multiplier;
168 default 3;
169 description "Local session detection multiplier";
170 }
171
172 leaf desired-transmission-interval {
ebf8b885 173 type uint32 {
174 range "10000..60000000";
175 }
8a676ce6
RZ
176 units microseconds;
177 default 300000;
990e89e5
RZ
178 description "Minimum desired control packet transmission interval";
179 }
180
181 leaf required-receive-interval {
ebf8b885 182 type uint32 {
183 range "10000..60000000";
184 }
8a676ce6
RZ
185 units microseconds;
186 default 300000;
990e89e5
RZ
187 description "Minimum required control packet receive interval";
188 }
189
190 leaf administrative-down {
191 type boolean;
59dad813 192 default false;
990e89e5
RZ
193 description "Disables or enables the session administratively";
194 }
8733bc48
RZ
195
196 leaf passive-mode {
197 type boolean;
198 default false;
199 description
200 "Don't attempt to start session establishment.";
201 }
990e89e5
RZ
202 }
203
204 grouping session-echo {
205 description "BFD session echo settings";
206
207 leaf echo-mode {
208 type boolean;
209 default false;
210 description "Use echo packets to detect failures";
211 }
212
213 leaf desired-echo-transmission-interval {
ebf8b885 214 type uint32 {
215 range "10000..60000000";
216 }
8a676ce6
RZ
217 units microseconds;
218 default 50000;
4df3e31c
IR
219 description "Minimum desired echo packet transmission interval";
220 }
221
222 leaf required-echo-receive-interval {
ebf8b885 223 type uint32 {
224 range "0 | 10000..60000000";
225 }
4df3e31c
IR
226 units microseconds;
227 default 50000;
228 description "Minimum required echo packet receive interval";
990e89e5
RZ
229 }
230 }
231
8733bc48
RZ
232 grouping session-multi-hop {
233 description "BFD session multi hop settings.";
234
235 leaf minimum-ttl {
236 type uint8 {
0c91b419 237 range "1..254";
8733bc48 238 }
0c91b419 239 default "254";
8733bc48
RZ
240 description
241 "Minimum expected TTL on received packets.";
242 }
243 }
244
990e89e5
RZ
245 grouping session-states {
246 /*
247 * Local settings.
248 */
249 leaf local-discriminator {
250 type discriminator;
251 description "Local session identifier";
252 }
253
254 leaf local-state {
255 type state;
256 description "Local session state";
257 }
258
259 leaf local-diagnostic {
260 type diagnostic;
261 description "Local session diagnostic";
262 }
263
264 leaf local-multiplier {
265 type multiplier;
266 description "Local session current multiplier";
267 }
268
269 /*
270 * Remote settings.
271 */
272 leaf remote-discriminator {
273 type discriminator;
274 description "Remote session identifier";
275 }
276
277 leaf remote-state {
278 type state;
279 description "Remote session state";
280 }
281
282 leaf remote-diagnostic {
283 type diagnostic;
284 description "Local session diagnostic";
285 }
286
287 leaf remote-multiplier {
288 type multiplier;
289 description "Remote session detection multiplier";
290 }
291
292 /*
293 * Negotiated settings.
294 */
295 leaf negotiated-transmission-interval {
296 description "Negotiated transmit interval";
297 type uint32;
8a676ce6 298 units microseconds;
990e89e5
RZ
299 }
300
301 leaf negotiated-receive-interval {
302 description "Negotiated receive interval";
303 type uint32;
8a676ce6 304 units microseconds;
990e89e5
RZ
305 }
306
307 leaf detection-mode {
308 description "Detection mode";
309
310 type enumeration {
311 enum async-with-echo {
312 value "1";
313 description "Async with echo";
314 }
315 enum async-without-echo {
316 value "2";
317 description "Async without echo";
318 }
319 enum demand-with-echo {
320 value "3";
321 description "Demand with echo";
322 }
323 enum demand-without-echo {
324 value "4";
325 description "Demand without echo";
326 }
327 }
328 }
329
330 /*
331 * Statistics.
332 */
333 leaf last-down-time {
334 type yang:date-and-time;
335 description "Time and date of the last time session was down";
336 }
337
338 leaf last-up-time {
339 type yang:date-and-time;
340 description "Time and date of the last time session was up";
341 }
342
343 leaf session-down-count {
344 type uint32;
f79f7a7b 345 description "Number of times the session went down";
990e89e5
RZ
346 }
347
348 leaf session-up-count {
349 type uint32;
f79f7a7b 350 description "Number of times the session went up";
990e89e5
RZ
351 }
352
353 leaf control-packet-input-count {
354 type uint64;
f79f7a7b 355 description "Number of control packets received";
990e89e5
RZ
356 }
357
358 leaf control-packet-output-count {
359 type uint64;
f79f7a7b 360 description "Number of control packets sent";
990e89e5
RZ
361 }
362
363 /*
364 * Echo mode operational data.
365 */
366 leaf negotiated-echo-transmission-interval {
367 type uint32;
8a676ce6 368 units microseconds;
990e89e5
RZ
369 description "Negotiated echo transmit interval";
370 }
371
372 /*
373 * Statistics.
374 */
375 leaf echo-packet-input-count {
376 type uint64;
f79f7a7b 377 description "Number of echo packets received";
990e89e5
RZ
378 }
379
380 leaf echo-packet-output-count {
381 type uint64;
f79f7a7b 382 description "Number of echo packets sent";
990e89e5
RZ
383 }
384 }
385
386 /*
387 * BFD operational.
388 */
389 container bfdd {
390 container bfd {
391 presence "Present if the BFD protocol is enabled";
392
abf1ba08
RZ
393 list profile {
394 key "name";
395 description "BFD pre configuration profiles";
396
397 leaf name {
398 type profile-name;
399 description "Profile name";
400 }
401
402 uses session-common;
403 uses session-echo;
8733bc48 404 uses session-multi-hop;
abf1ba08
RZ
405 }
406
990e89e5
RZ
407 container sessions {
408 list single-hop {
409 key "dest-addr interface vrf";
410 description "List of single hop sessions";
411
990e89e5
RZ
412 leaf dest-addr {
413 type inet:ip-address;
414 description "IP address of the peer";
415 }
416
417 leaf interface {
806defc8 418 type frr-interface:interface-ref;
990e89e5
RZ
419 description "Interface to use to contact peer";
420 }
421
422 leaf vrf {
806defc8 423 type frr-vrf:vrf-ref;
990e89e5
RZ
424 description "Virtual Routing Domain name";
425 }
426
7f121ef7
RZ
427 leaf source-addr {
428 type inet:ip-address;
429 description "Local IP address";
430 }
431
abf1ba08
RZ
432 leaf profile {
433 type profile-ref;
434 description "Override defaults with profile.";
435 }
436
990e89e5
RZ
437 uses session-common;
438 uses session-echo;
439
440 container stats {
441 uses session-states;
442 config false;
443 }
444 }
445
446 list multi-hop {
874ca769 447 key "source-addr dest-addr vrf";
990e89e5
RZ
448 description "List of multi hop sessions";
449
450 leaf source-addr {
451 type inet:ip-address;
452 description "Local IP address";
453 }
454
455 leaf dest-addr {
456 type inet:ip-address;
457 description "IP address of the peer";
458 }
459
990e89e5 460 leaf vrf {
806defc8 461 type frr-vrf:vrf-ref;
990e89e5
RZ
462 description "Virtual Routing Domain name";
463 }
464
abf1ba08
RZ
465 leaf profile {
466 type profile-ref;
467 description "Override defaults with profile.";
468 }
469
990e89e5 470 uses session-common;
8733bc48 471 uses session-multi-hop;
990e89e5
RZ
472
473 container stats {
474 uses session-states;
475 config false;
476 }
477 }
478 }
479 }
480 }
481}