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 control packet transmission interval";
217 grouping session-multi-hop {
218 description "BFD session multi hop settings.";
225 "Minimum expected TTL on received packets.";
229 grouping session-states {
233 leaf local-discriminator {
235 description "Local session identifier";
240 description "Local session state";
243 leaf local-diagnostic {
245 description "Local session diagnostic";
248 leaf local-multiplier {
250 description "Local session current multiplier";
256 leaf remote-discriminator {
258 description "Remote session identifier";
263 description "Remote session state";
266 leaf remote-diagnostic {
268 description "Local session diagnostic";
271 leaf remote-multiplier {
273 description "Remote session detection multiplier";
277 * Negotiated settings.
279 leaf negotiated-transmission-interval {
280 description "Negotiated transmit interval";
285 leaf negotiated-receive-interval {
286 description "Negotiated receive interval";
291 leaf detection-mode {
292 description "Detection mode";
295 enum async-with-echo {
297 description "Async with echo";
299 enum async-without-echo {
301 description "Async without echo";
303 enum demand-with-echo {
305 description "Demand with echo";
307 enum demand-without-echo {
309 description "Demand without echo";
317 leaf last-down-time {
318 type yang:date-and-time;
319 description "Time and date of the last time session was down";
323 type yang:date-and-time;
324 description "Time and date of the last time session was up";
327 leaf session-down-count {
329 description "Number of times the session went down";
332 leaf session-up-count {
334 description "Number of times the session went up";
337 leaf control-packet-input-count {
339 description "Number of control packets received";
342 leaf control-packet-output-count {
344 description "Number of control packets sent";
348 * Echo mode operational data.
350 leaf negotiated-echo-transmission-interval {
353 description "Negotiated echo transmit interval";
359 leaf echo-packet-input-count {
361 description "Number of echo packets received";
364 leaf echo-packet-output-count {
366 description "Number of echo packets sent";
375 presence "Present if the BFD protocol is enabled";
379 description "BFD pre configuration profiles";
383 description "Profile name";
388 uses session-multi-hop;
393 key "dest-addr interface vrf";
394 description "List of single hop sessions";
397 type inet:ip-address;
398 description "IP address of the peer";
402 type frr-interface:interface-ref;
403 description "Interface to use to contact peer";
407 type frr-vrf:vrf-ref;
408 description "Virtual Routing Domain name";
412 type inet:ip-address;
413 description "Local IP address";
418 description "Override defaults with profile.";
431 key "source-addr dest-addr interface vrf";
432 description "List of multi hop sessions";
435 type inet:ip-address;
436 description "Local IP address";
440 type inet:ip-address;
441 description "IP address of the peer";
445 type frr-interface:interface-ref;
446 description "Interface to use to contact peer";
450 type frr-vrf:vrf-ref;
451 description "Virtual Routing Domain name";
456 description "Override defaults with profile.";
460 uses session-multi-hop;