1 // SPDX-License-Identifier: BSD-2-Clause
4 namespace "http://frrouting.org/yang/ripd";
7 import ietf-inet-types {
10 import ietf-yang-types {
19 import frr-interface {
28 import frr-route-map {
31 import frr-route-types {
32 prefix frr-route-types;
38 "FRR Users List: <mailto:frog@lists.frrouting.org>
39 FRR Development List: <mailto:dev@lists.frrouting.org>";
41 "This module defines a model for managing FRR ripd daemon.
43 Copyright 2020 FRRouting
45 Redistribution and use in source and binary forms, with or without
46 modification, are permitted provided that the following conditions
49 1. Redistributions of source code must retain the above copyright notice,
50 this list of conditions and the following disclaimer.
52 2. Redistributions in binary form must reproduce the above copyright
53 notice, this list of conditions and the following disclaimer in the
54 documentation and/or other materials provided with the distribution.
56 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
57 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
58 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
59 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
60 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
61 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
62 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
63 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
64 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
65 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
66 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
70 "Changed interface references to use
71 frr-interface:interface-ref typedef";
72 reference "FRRouting";
78 "RFC 1058: Routing Information Protocol.
79 RFC 2453: RIP Version 2.";
82 typedef rip-route-type {
86 description "Normal RIP route type.";
90 description "Static RIP route type.";
94 description "Default RIP route type.";
98 description "Redistribute RIP route type.";
102 description "Interface RIP route type.";
106 "Types of RIP routes.";
110 description "rip routing instance data";
114 "RIP routing instance.";
117 type frr-vrf:vrf-ref;
125 "Allow equal-cost multi-path.";
127 leaf default-information-originate {
131 "Control distribution of default route.";
133 leaf default-metric {
139 "Default metric of redistributed routes.";
143 "Administrative distance.";
150 "Default administrative distance.";
155 "Custom administrative distance per IP prefix.";
157 type inet:ipv4-prefix;
167 "Administrative distance.";
176 leaf-list explicit-neighbor {
177 type inet:ipv4-address;
179 "Specifies the RIP neighbors. Useful for a
180 non-broadcast multiple access (NBMA) network.";
183 type inet:ipv4-prefix;
185 "Enable RIP on the specified IP network.";
187 leaf-list interface {
188 type frr-interface:interface-ref;
190 "Enable RIP on the specified interface.";
193 key "interface direction";
195 "Offset-list to modify route metric.";
198 type frr-interface:interface-ref;
202 "Match all interfaces.";
207 "Interface to match. Use '*' to match all interfaces.";
223 "Incoming or outgoing updates.";
240 leaf passive-default {
244 "Control whether interfaces are in the passive mode
247 leaf-list passive-interface {
248 when "../passive-default = 'false'";
249 type frr-interface:interface-ref;
251 "A list of interfaces where the sending of RIP packets
254 leaf-list non-passive-interface {
255 when "../passive-default = 'true'";
256 type frr-interface:interface-ref;
258 "A list of interfaces where the sending of RIP packets
264 "Redistributes routes learned from other routing protocols.";
266 type frr-route-types:frr-route-types-v4;
272 type frr-route-map:route-map-ref;
274 "Applies the conditions of the specified route-map to
275 routes that are redistributed into the RIP routing
283 "Metric used for the redistributed route. If a metric is
284 not specified, the metric configured with the
285 default-metric attribute in RIP router configuration is
286 used. If the default-metric attribute has not been
287 configured, the default metric for redistributed routes
292 uses frr-if-rmap:if-route-maps-group;
294 leaf-list static-route {
295 type inet:ipv4-prefix;
297 "RIP static routes.";
301 "Settings of basic timers";
302 leaf flush-interval {
304 range "5..2147483647";
309 "Interval before a route is flushed from the routing
312 leaf holddown-interval {
314 range "5..2147483647";
319 "Interval before better routes are released.";
321 leaf update-interval {
323 range "5..2147483647";
328 "Interval at which RIP updates are sent.";
332 description "version of rip";
338 "Accept RIPv1 updates only.";
343 "Accept RIPv2 updates only.";
348 "Accept both RIPv1 and RIPv2 updates.";
352 '(. = "1" and ../send = "1") or ' +
353 '(. = "2" and ../send = "2") or ' +
354 '(. = "1-2" and ../send = "2")';
357 "Advertisement reception - Version control.";
364 "Send RIPv1 updates only.";
369 "Send RIPv2 updates only.";
373 '(../receive = "1" and . = "1") or ' +
374 '(../receive = "2" and . = "2") or ' +
375 '(../receive = "1-2" and . = "2")';
378 "Advertisement transmission - Version control.";
382 leaf default-bfd-profile {
384 "Use this BFD profile for all peers by default.";
385 type frr-bfdd:profile-ref;
396 container neighbors {
398 "Neighbor information.";
404 type inet:ipv4-address;
406 "IP address that a RIP neighbor is using as its
410 type yang:date-and-time;
412 "The time when the most recent RIP update was
413 received from this neighbor.";
415 leaf bad-packets-rcvd {
418 "The number of RIP invalid packets received from
419 this neighbor which were subsequently discarded
420 for any reason (e.g. a version 0 packet, or an
421 unknown command type).";
423 leaf bad-routes-rcvd {
426 "The number of routes received from this neighbor,
427 in valid RIP packets, which were ignored for any
428 reason (e.g. unknown address family, or invalid
435 "Route information.";
441 type inet:ipv4-prefix;
443 "IP address (in the form A.B.C.D) and prefix length,
444 separated by the slash (/) character. The range of
445 values for the prefix-length is 0 to 32.";
448 description "container of nexthops";
450 description "A list of nexthop objects.";
452 type frr-nexthop:nexthop-type;
458 type frr-route-types:frr-route-types-v4;
460 "The protocol originating this route.";
465 "The RIP type of route.";
468 type inet:ipv4-address;
470 "The nexthop gateway address.";
473 type frr-interface:interface-ref;
475 "The nexthop egress interface.";
478 type inet:ipv4-address;
480 "The nexthop gateway address.";
488 leaf external-metric {
491 "External metric if learned from external protocol.";
496 "Seconds before route expires.";
508 * Replaced by container `nexthops` above.
511 type inet:ipv4-address;
514 "Next hop IPv4 address.";
517 type frr-interface:interface-ref;
520 "The interface that the route uses.";
529 * Per-interface configuration data
531 augment "/frr-interface:lib/frr-interface:interface" {
532 description "rip interface data";
535 "RIP interface parameters.";
541 "Disables split-horizon processing.";
546 "Enables simple split-horizon processing.";
548 enum "poison-reverse" {
551 "Enables split-horizon processing with poison
557 "Controls RIP split-horizon processing on the specified
564 "Send IP broadcast v2 update.";
566 leaf version-receive {
571 "Inherit configuration from the routing instance.";
576 "Accept RIPv1 updates only.";
581 "Accept RIPv2 updates only.";
586 "Accept both RIPv1 and RIPv2 updates.";
591 "Do not accept neither RIPv1 nor RIPv2 updates.";
594 default "unspecified";
596 "Advertisement reception - Version control.";
603 "Inherit configuration from the routing instance.";
608 "Send RIPv1 updates only.";
613 "Send RIPv2 updates only.";
618 "Send both RIPv1 and RIPv2 updates.";
623 "Do not send neither RIPv1 nor RIPv2 updates.";
626 default "unspecified";
628 "Advertisement transmission - Version control.";
630 container authentication-scheme {
632 "Specify the authentication scheme for the RIP interface";
638 "No authentication.";
643 "Plain-text authentication.";
648 "MD5 authentication.";
653 "Specify the authentication mode.";
655 leaf md5-auth-length {
656 when "../mode = 'md5'";
666 "Old ripd compatible.";
671 "MD5 authentication data length.";
674 choice authentication-data {
676 "Choose whether to use a simple password or a key-chain.";
677 leaf authentication-password {
682 "Authentication string.";
684 leaf authentication-key-chain {
691 container bfd-monitoring {
693 "Present if BFD is configured for RIP peers in this interface.";
698 "Enable/disable BFD monitoring.";
703 type frr-bfdd:profile-ref;
705 "BFD profile to use.";
714 rpc clear-rip-route {
716 "Clears RIP routes from the IP routing table and routes
717 redistributed into the RIP protocol.";
721 type frr-vrf:vrf-ref;
723 "VRF name identifying a specific RIP instance.
724 This leaf is optional for the rpc.
725 If it is specified, the rpc will clear all routes in the
726 specified RIP instance;
727 if it is not specified, the rpc will clear all routes in
736 notification authentication-type-failure {
738 "This notification is sent when the system
739 receives a PDU with the wrong authentication type
741 leaf interface-name {
742 type frr-interface:interface-ref;
744 "Describes the name of the RIP interface.";
752 notification authentication-failure {
754 "This notification is sent when the system
755 receives a PDU with the wrong authentication
757 leaf interface-name {
758 type frr-interface:interface-ref;
760 "Describes the name of the RIP interface.";