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";
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 {
176 description "Minimum desired control packet transmission interval";
179 leaf required-receive-interval {
183 description "Minimum required control packet receive interval";
186 leaf administrative-down {
189 description "Disables or enables the session administratively";
196 "Don't attempt to start session establishment.";
200 grouping session-echo {
201 description "BFD session echo settings";
206 description "Use echo packets to detect failures";
209 leaf desired-echo-transmission-interval {
213 description "Minimum desired echo packet transmission interval";
216 leaf required-echo-receive-interval {
220 description "Minimum required echo packet receive interval";
224 grouping session-multi-hop {
225 description "BFD session multi hop settings.";
232 "Minimum expected TTL on received packets.";
236 grouping session-states {
240 leaf local-discriminator {
242 description "Local session identifier";
247 description "Local session state";
250 leaf local-diagnostic {
252 description "Local session diagnostic";
255 leaf local-multiplier {
257 description "Local session current multiplier";
263 leaf remote-discriminator {
265 description "Remote session identifier";
270 description "Remote session state";
273 leaf remote-diagnostic {
275 description "Local session diagnostic";
278 leaf remote-multiplier {
280 description "Remote session detection multiplier";
284 * Negotiated settings.
286 leaf negotiated-transmission-interval {
287 description "Negotiated transmit interval";
292 leaf negotiated-receive-interval {
293 description "Negotiated receive interval";
298 leaf detection-mode {
299 description "Detection mode";
302 enum async-with-echo {
304 description "Async with echo";
306 enum async-without-echo {
308 description "Async without echo";
310 enum demand-with-echo {
312 description "Demand with echo";
314 enum demand-without-echo {
316 description "Demand without echo";
324 leaf last-down-time {
325 type yang:date-and-time;
326 description "Time and date of the last time session was down";
330 type yang:date-and-time;
331 description "Time and date of the last time session was up";
334 leaf session-down-count {
336 description "Number of times the session went down";
339 leaf session-up-count {
341 description "Number of times the session went up";
344 leaf control-packet-input-count {
346 description "Number of control packets received";
349 leaf control-packet-output-count {
351 description "Number of control packets sent";
355 * Echo mode operational data.
357 leaf negotiated-echo-transmission-interval {
360 description "Negotiated echo transmit interval";
366 leaf echo-packet-input-count {
368 description "Number of echo packets received";
371 leaf echo-packet-output-count {
373 description "Number of echo packets sent";
382 presence "Present if the BFD protocol is enabled";
386 description "BFD pre configuration profiles";
390 description "Profile name";
395 uses session-multi-hop;
400 key "dest-addr interface vrf";
401 description "List of single hop sessions";
404 type inet:ip-address;
405 description "IP address of the peer";
409 type frr-interface:interface-ref;
410 description "Interface to use to contact peer";
414 type frr-vrf:vrf-ref;
415 description "Virtual Routing Domain name";
419 type inet:ip-address;
420 description "Local IP address";
425 description "Override defaults with profile.";
438 key "source-addr dest-addr vrf";
439 description "List of multi hop sessions";
442 type inet:ip-address;
443 description "Local IP address";
447 type inet:ip-address;
448 description "IP address of the peer";
452 type frr-vrf:vrf-ref;
453 description "Virtual Routing Domain name";
458 description "Override defaults with profile.";
462 uses session-multi-hop;