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 session-states {
249 leaf local-discriminator {
251 description "Local session identifier";
256 description "Local session state";
259 leaf local-diagnostic {
261 description "Local session diagnostic";
264 leaf local-multiplier {
266 description "Local session current multiplier";
272 leaf remote-discriminator {
274 description "Remote session identifier";
279 description "Remote session state";
282 leaf remote-diagnostic {
284 description "Local session diagnostic";
287 leaf remote-multiplier {
289 description "Remote session detection multiplier";
293 * Negotiated settings.
295 leaf negotiated-transmission-interval {
296 description "Negotiated transmit interval";
301 leaf negotiated-receive-interval {
302 description "Negotiated receive interval";
307 leaf detection-mode {
308 description "Detection mode";
311 enum async-with-echo {
313 description "Async with echo";
315 enum async-without-echo {
317 description "Async without echo";
319 enum demand-with-echo {
321 description "Demand with echo";
323 enum demand-without-echo {
325 description "Demand without echo";
333 leaf last-down-time {
334 type yang:date-and-time;
335 description "Time and date of the last time session was down";
339 type yang:date-and-time;
340 description "Time and date of the last time session was up";
343 leaf session-down-count {
345 description "Number of times the session went down";
348 leaf session-up-count {
350 description "Number of times the session went up";
353 leaf control-packet-input-count {
355 description "Number of control packets received";
358 leaf control-packet-output-count {
360 description "Number of control packets sent";
364 * Echo mode operational data.
366 leaf negotiated-echo-transmission-interval {
369 description "Negotiated echo transmit interval";
375 leaf echo-packet-input-count {
377 description "Number of echo packets received";
380 leaf echo-packet-output-count {
382 description "Number of echo packets sent";
391 presence "Present if the BFD protocol is enabled";
395 description "BFD pre configuration profiles";
399 description "Profile name";
404 uses session-multi-hop;
409 key "dest-addr interface vrf";
410 description "List of single hop sessions";
413 type inet:ip-address;
414 description "IP address of the peer";
418 type frr-interface:interface-ref;
419 description "Interface to use to contact peer";
423 type frr-vrf:vrf-ref;
424 description "Virtual Routing Domain name";
428 type inet:ip-address;
429 description "Local IP address";
434 description "Override defaults with profile.";
447 key "source-addr dest-addr vrf";
448 description "List of multi hop sessions";
451 type inet:ip-address;
452 description "Local IP address";
456 type inet:ip-address;
457 description "IP address of the peer";
461 type frr-vrf:vrf-ref;
462 description "Virtual Routing Domain name";
467 description "Override defaults with profile.";
471 uses session-multi-hop;