3 namespace "http://frrouting.org/yang/bfdd";
6 import ietf-inet-types {
9 import ietf-yang-types {
12 import frr-interface {
18 import frr-route-types {
19 prefix frr-route-types;
22 organization "FRRouting";
24 "FRR Users List: <mailto:frog@lists.frrouting.org>
25 FRR Development List: <mailto:dev@lists.frrouting.org>";
27 "This module defines a model for managing FRR bfdd daemon.
29 Copyright 2020 FRRouting
31 Redistribution and use in source and binary forms, with or without
32 modification, are permitted provided that the following conditions
35 1. Redistributions of source code must retain the above copyright notice,
36 this list of conditions and the following disclaimer.
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.
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.";
55 description "Initial revision.";
57 "RFC 5880: Bidirectional Forwarding Detection (BFD).
58 RFC 5881: Bidirectional Forwarding Detection (BFD)
59 for IPv4 and IPv6 (Single Hop).
60 RFC 5883: Bidirectional Forwarding Detection (BFD) for Multihop Paths.";
65 * BFD types declaration.
68 description "Detection multiplier";
74 typedef discriminator {
75 description "BFD session identification";
77 range "1..4294967295";
82 description "BFD session state";
86 description "Administratively down";
94 description "Initializing";
104 description "BFD session diagnostic";
110 enum control-expired {
112 description "Control timer expired";
116 description "Echo function failed";
120 description "Neighbor signaled session down";
122 enum forwarding-reset {
124 description "Forwarding plane reset";
128 description "Path down";
130 enum concatenated-path-down {
132 description "Concatenated path down";
134 enum administratively-down {
136 description "Administratively down";
138 enum reverse-concat-path-down {
140 description "Reverse concatenated path down";
145 typedef profile-name {
149 description "Profile name format";
152 typedef profile-ref {
154 path "/frr-bfdd:bfdd/frr-bfdd:bfd/frr-bfdd:profile/frr-bfdd:name";
155 require-instance false;
157 description "Reference to a BFD profile";
163 grouping session-common {
164 description "Common BFD session settings";
166 leaf detection-multiplier {
169 description "Local session detection multiplier";
172 leaf desired-transmission-interval {
174 range "10000..60000000";
178 description "Minimum desired control packet transmission interval";
181 leaf required-receive-interval {
183 range "10000..60000000";
187 description "Minimum required control packet receive interval";
190 leaf administrative-down {
193 description "Disables or enables the session administratively";
200 "Don't attempt to start session establishment.";
204 grouping session-echo {
205 description "BFD session echo settings";
210 description "Use echo packets to detect failures";
213 leaf desired-echo-transmission-interval {
215 range "10000..60000000";
219 description "Minimum desired echo packet transmission interval";
222 leaf required-echo-receive-interval {
224 range "0 | 10000..60000000";
228 description "Minimum required echo packet receive interval";
232 grouping session-multi-hop {
233 description "BFD session multi hop settings.";
241 "Minimum expected TTL on received packets.";
245 grouping bfd-monitoring {
247 "BFD monitoring template for protocol integration.";
250 type inet:ip-address;
252 "Source address to use for liveness check.
254 When source is not set and multi-hop is `false` the source
255 address will be `0.0.0.0` (any).
257 When source is not set and multi-hop is `true` the source
258 address will be automatic selected through Next Hop Tracking (NHT).";
263 "Use multi hop session instead of single hop.";
270 "BFD pre configured profile.";
271 type frr-bfdd:profile-ref;
275 grouping session-states {
279 leaf local-discriminator {
281 description "Local session identifier";
286 description "Local session state";
289 leaf local-diagnostic {
291 description "Local session diagnostic";
294 leaf local-multiplier {
296 description "Local session current multiplier";
302 leaf remote-discriminator {
304 description "Remote session identifier";
309 description "Remote session state";
312 leaf remote-diagnostic {
314 description "Local session diagnostic";
317 leaf remote-multiplier {
319 description "Remote session detection multiplier";
323 * Negotiated settings.
325 leaf negotiated-transmission-interval {
326 description "Negotiated transmit interval";
331 leaf negotiated-receive-interval {
332 description "Negotiated receive interval";
337 leaf detection-mode {
338 description "Detection mode";
341 enum async-with-echo {
343 description "Async with echo";
345 enum async-without-echo {
347 description "Async without echo";
349 enum demand-with-echo {
351 description "Demand with echo";
353 enum demand-without-echo {
355 description "Demand without echo";
363 leaf last-down-time {
364 type yang:date-and-time;
365 description "Time and date of the last time session was down";
369 type yang:date-and-time;
370 description "Time and date of the last time session was up";
373 leaf session-down-count {
375 description "Number of times the session went down";
378 leaf session-up-count {
380 description "Number of times the session went up";
383 leaf control-packet-input-count {
385 description "Number of control packets received";
388 leaf control-packet-output-count {
390 description "Number of control packets sent";
394 * Echo mode operational data.
396 leaf negotiated-echo-transmission-interval {
399 description "Negotiated echo transmit interval";
405 leaf echo-packet-input-count {
407 description "Number of echo packets received";
410 leaf echo-packet-output-count {
412 description "Number of echo packets sent";
421 presence "Present if the BFD protocol is enabled";
425 description "BFD pre configuration profiles";
429 description "Profile name";
434 uses session-multi-hop;
439 key "dest-addr interface vrf";
440 description "List of single hop sessions";
443 type inet:ip-address;
444 description "IP address of the peer";
448 type frr-interface:interface-ref;
449 description "Interface to use to contact peer";
453 type frr-vrf:vrf-ref;
454 description "Virtual Routing Domain name";
458 type inet:ip-address;
459 description "Local IP address";
464 description "Override defaults with profile.";
477 key "source-addr dest-addr vrf";
478 description "List of multi hop sessions";
481 type inet:ip-address;
482 description "Local IP address";
486 type inet:ip-address;
487 description "IP address of the peer";
491 type frr-vrf:vrf-ref;
492 description "Virtual Routing Domain name";
497 description "Override defaults with profile.";
501 uses session-multi-hop;