1 // SPDX-License-Identifier: BSD-2-Clause
4 namespace "http://frrouting.org/yang/ripd";
7 import ietf-inet-types {
10 import ietf-yang-types {
16 import frr-interface {
25 import frr-route-map {
28 import frr-route-types {
29 prefix frr-route-types;
35 "FRR Users List: <mailto:frog@lists.frrouting.org>
36 FRR Development List: <mailto:dev@lists.frrouting.org>";
38 "This module defines a model for managing FRR ripd daemon.
40 Copyright 2020 FRRouting
42 Redistribution and use in source and binary forms, with or without
43 modification, are permitted provided that the following conditions
46 1. Redistributions of source code must retain the above copyright notice,
47 this list of conditions and the following disclaimer.
49 2. Redistributions in binary form must reproduce the above copyright
50 notice, this list of conditions and the following disclaimer in the
51 documentation and/or other materials provided with the distribution.
53 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
54 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
55 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
56 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
57 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
58 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
59 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
60 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
61 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
62 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
63 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
67 "Changed interface references to use
68 frr-interface:interface-ref typedef";
69 reference "FRRouting";
75 "RFC 1058: Routing Information Protocol.
76 RFC 2453: RIP Version 2.";
79 typedef rip-route-type {
83 description "Normal RIP route type.";
87 description "Static RIP route type.";
91 description "Default RIP route type.";
95 description "Redistribute RIP route type.";
99 description "Interface RIP route type.";
103 "Types of RIP routes.";
107 description "rip routing instance data";
111 "RIP routing instance.";
114 type frr-vrf:vrf-ref;
122 "Allow equal-cost multi-path.";
124 leaf default-information-originate {
128 "Control distribution of default route.";
130 leaf default-metric {
136 "Default metric of redistributed routes.";
140 "Administrative distance.";
147 "Default administrative distance.";
152 "Custom administrative distance per IP prefix.";
154 type inet:ipv4-prefix;
164 "Administrative distance.";
173 leaf-list explicit-neighbor {
174 type inet:ipv4-address;
176 "Specifies the RIP neighbors. Useful for a
177 non-broadcast multiple access (NBMA) network.";
180 type inet:ipv4-prefix;
182 "Enable RIP on the specified IP network.";
184 leaf-list interface {
185 type frr-interface:interface-ref;
187 "Enable RIP on the specified interface.";
190 key "interface direction";
192 "Offset-list to modify route metric.";
195 type frr-interface:interface-ref;
199 "Match all interfaces.";
204 "Interface to match. Use '*' to match all interfaces.";
220 "Incoming or outgoing updates.";
237 leaf passive-default {
241 "Control whether interfaces are in the passive mode
244 leaf-list passive-interface {
245 when "../passive-default = 'false'";
246 type frr-interface:interface-ref;
248 "A list of interfaces where the sending of RIP packets
251 leaf-list non-passive-interface {
252 when "../passive-default = 'true'";
253 type frr-interface:interface-ref;
255 "A list of interfaces where the sending of RIP packets
261 "Redistributes routes learned from other routing protocols.";
263 type frr-route-types:frr-route-types-v4;
269 type frr-route-map:route-map-ref;
271 "Applies the conditions of the specified route-map to
272 routes that are redistributed into the RIP routing
280 "Metric used for the redistributed route. If a metric is
281 not specified, the metric configured with the
282 default-metric attribute in RIP router configuration is
283 used. If the default-metric attribute has not been
284 configured, the default metric for redistributed routes
289 uses frr-if-rmap:if-route-maps-group;
291 leaf-list static-route {
292 type inet:ipv4-prefix;
294 "RIP static routes.";
298 "Settings of basic timers";
299 leaf flush-interval {
301 range "5..2147483647";
306 "Interval before a route is flushed from the routing
309 leaf holddown-interval {
311 range "5..2147483647";
316 "Interval before better routes are released.";
318 leaf update-interval {
320 range "5..2147483647";
325 "Interval at which RIP updates are sent.";
329 description "version of rip";
335 "Accept RIPv1 updates only.";
340 "Accept RIPv2 updates only.";
345 "Accept both RIPv1 and RIPv2 updates.";
349 '(. = "1" and ../send = "1") or ' +
350 '(. = "2" and ../send = "2") or ' +
351 '(. = "1-2" and ../send = "2")';
354 "Advertisement reception - Version control.";
361 "Send RIPv1 updates only.";
366 "Send RIPv2 updates only.";
370 '(../receive = "1" and . = "1") or ' +
371 '(../receive = "2" and . = "2") or ' +
372 '(../receive = "1-2" and . = "2")';
375 "Advertisement transmission - Version control.";
387 container neighbors {
389 "Neighbor information.";
395 type inet:ipv4-address;
397 "IP address that a RIP neighbor is using as its
401 type yang:date-and-time;
403 "The time when the most recent RIP update was
404 received from this neighbor.";
406 leaf bad-packets-rcvd {
409 "The number of RIP invalid packets received from
410 this neighbor which were subsequently discarded
411 for any reason (e.g. a version 0 packet, or an
412 unknown command type).";
414 leaf bad-routes-rcvd {
417 "The number of routes received from this neighbor,
418 in valid RIP packets, which were ignored for any
419 reason (e.g. unknown address family, or invalid
426 "Route information.";
432 type inet:ipv4-prefix;
434 "IP address (in the form A.B.C.D) and prefix length,
435 separated by the slash (/) character. The range of
436 values for the prefix-length is 0 to 32.";
439 description "container of nexthops";
441 description "A list of nexthop objects.";
443 type frr-nexthop:nexthop-type;
449 type frr-route-types:frr-route-types-v4;
451 "The protocol originating this route.";
456 "The RIP type of route.";
459 type inet:ipv4-address;
461 "The nexthop gateway address.";
464 type frr-interface:interface-ref;
466 "The nexthop egress interface.";
469 type inet:ipv4-address;
471 "The nexthop gateway address.";
479 leaf external-metric {
482 "External metric if learned from external protocol.";
487 "Seconds before route expires.";
499 * Replaced by container `nexthops` above.
502 type inet:ipv4-address;
505 "Next hop IPv4 address.";
508 type frr-interface:interface-ref;
511 "The interface that the route uses.";
520 * Per-interface configuration data
522 augment "/frr-interface:lib/frr-interface:interface" {
523 description "rip interface data";
526 "RIP interface parameters.";
532 "Disables split-horizon processing.";
537 "Enables simple split-horizon processing.";
539 enum "poison-reverse" {
542 "Enables split-horizon processing with poison
548 "Controls RIP split-horizon processing on the specified
555 "Send IP broadcast v2 update.";
557 leaf version-receive {
562 "Inherit configuration from the routing instance.";
567 "Accept RIPv1 updates only.";
572 "Accept RIPv2 updates only.";
577 "Accept both RIPv1 and RIPv2 updates.";
582 "Do not accept neither RIPv1 nor RIPv2 updates.";
585 default "unspecified";
587 "Advertisement reception - Version control.";
594 "Inherit configuration from the routing instance.";
599 "Send RIPv1 updates only.";
604 "Send RIPv2 updates only.";
609 "Send both RIPv1 and RIPv2 updates.";
614 "Do not send neither RIPv1 nor RIPv2 updates.";
617 default "unspecified";
619 "Advertisement transmission - Version control.";
621 container authentication-scheme {
623 "Specify the authentication scheme for the RIP interface";
629 "No authentication.";
634 "Plain-text authentication.";
639 "MD5 authentication.";
644 "Specify the authentication mode.";
646 leaf md5-auth-length {
647 when "../mode = 'md5'";
657 "Old ripd compatible.";
662 "MD5 authentication data length.";
665 choice authentication-data {
667 "Choose whether to use a simple password or a key-chain.";
668 leaf authentication-password {
673 "Authentication string.";
675 leaf authentication-key-chain {
687 rpc clear-rip-route {
689 "Clears RIP routes from the IP routing table and routes
690 redistributed into the RIP protocol.";
694 type frr-vrf:vrf-ref;
696 "VRF name identifying a specific RIP instance.
697 This leaf is optional for the rpc.
698 If it is specified, the rpc will clear all routes in the
699 specified RIP instance;
700 if it is not specified, the rpc will clear all routes in
709 notification authentication-type-failure {
711 "This notification is sent when the system
712 receives a PDU with the wrong authentication type
714 leaf interface-name {
715 type frr-interface:interface-ref;
717 "Describes the name of the RIP interface.";
725 notification authentication-failure {
727 "This notification is sent when the system
728 receives a PDU with the wrong authentication
730 leaf interface-name {
731 type frr-interface:interface-ref;
733 "Describes the name of the RIP interface.";