1 // SPDX-License-Identifier: BSD-2-Clause
4 namespace "http://frrouting.org/yang/ripd";
7 import ietf-inet-types {
10 import ietf-yang-types {
13 import frr-interface {
22 import frr-route-map {
25 import frr-route-types {
26 prefix frr-route-types;
32 "FRR Users List: <mailto:frog@lists.frrouting.org>
33 FRR Development List: <mailto:dev@lists.frrouting.org>";
35 "This module defines a model for managing FRR ripd daemon.
37 Copyright 2020 FRRouting
39 Redistribution and use in source and binary forms, with or without
40 modification, are permitted provided that the following conditions
43 1. Redistributions of source code must retain the above copyright notice,
44 this list of conditions and the following disclaimer.
46 2. Redistributions in binary form must reproduce the above copyright
47 notice, this list of conditions and the following disclaimer in the
48 documentation and/or other materials provided with the distribution.
50 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
51 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
52 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
53 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
54 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
55 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
56 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
57 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
58 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
59 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
60 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
64 "Changed interface references to use
65 frr-interface:interface-ref typedef";
66 reference "FRRouting";
72 "RFC 1058: Routing Information Protocol.
73 RFC 2453: RIP Version 2.";
76 typedef rip-route-type {
80 description "Normal RIP route type.";
84 description "Static RIP route type.";
88 description "Default RIP route type.";
92 description "Redistribute RIP route type.";
96 description "Interface RIP route type.";
100 "Types of RIP routes.";
104 description "rip routing instance data";
108 "RIP routing instance.";
111 type frr-vrf:vrf-ref;
119 "Allow equal-cost multi-path.";
121 leaf default-information-originate {
125 "Control distribution of default route.";
127 leaf default-metric {
133 "Default metric of redistributed routes.";
137 "Administrative distance.";
144 "Default administrative distance.";
149 "Custom administrative distance per IP prefix.";
151 type inet:ipv4-prefix;
161 "Administrative distance.";
170 leaf-list explicit-neighbor {
171 type inet:ipv4-address;
173 "Specifies the RIP neighbors. Useful for a
174 non-broadcast multiple access (NBMA) network.";
177 type inet:ipv4-prefix;
179 "Enable RIP on the specified IP network.";
181 leaf-list interface {
182 type frr-interface:interface-ref;
184 "Enable RIP on the specified interface.";
187 key "interface direction";
189 "Offset-list to modify route metric.";
192 type frr-interface:interface-ref;
196 "Match all interfaces.";
201 "Interface to match. Use '*' to match all interfaces.";
217 "Incoming or outgoing updates.";
234 leaf passive-default {
238 "Control whether interfaces are in the passive mode
241 leaf-list passive-interface {
242 when "../passive-default = 'false'";
243 type frr-interface:interface-ref;
245 "A list of interfaces where the sending of RIP packets
248 leaf-list non-passive-interface {
249 when "../passive-default = 'true'";
250 type frr-interface:interface-ref;
252 "A list of interfaces where the sending of RIP packets
258 "Redistributes routes learned from other routing protocols.";
260 type frr-route-types:frr-route-types-v4;
266 type frr-route-map:route-map-ref;
268 "Applies the conditions of the specified route-map to
269 routes that are redistributed into the RIP routing
277 "Metric used for the redistributed route. If a metric is
278 not specified, the metric configured with the
279 default-metric attribute in RIP router configuration is
280 used. If the default-metric attribute has not been
281 configured, the default metric for redistributed routes
285 leaf-list static-route {
286 type inet:ipv4-prefix;
288 "RIP static routes.";
292 "Settings of basic timers";
293 leaf flush-interval {
295 range "5..2147483647";
300 "Interval before a route is flushed from the routing
303 leaf holddown-interval {
305 range "5..2147483647";
310 "Interval before better routes are released.";
312 leaf update-interval {
314 range "5..2147483647";
319 "Interval at which RIP updates are sent.";
323 description "version of rip";
329 "Accept RIPv1 updates only.";
334 "Accept RIPv2 updates only.";
339 "Accept both RIPv1 and RIPv2 updates.";
343 '(. = "1" and ../send = "1") or ' +
344 '(. = "2" and ../send = "2") or ' +
345 '(. = "1-2" and ../send = "2")';
348 "Advertisement reception - Version control.";
355 "Send RIPv1 updates only.";
360 "Send RIPv2 updates only.";
364 '(../receive = "1" and . = "1") or ' +
365 '(../receive = "2" and . = "2") or ' +
366 '(../receive = "1-2" and . = "2")';
369 "Advertisement transmission - Version control.";
381 container neighbors {
383 "Neighbor information.";
389 type inet:ipv4-address;
391 "IP address that a RIP neighbor is using as its
395 type yang:date-and-time;
397 "The time when the most recent RIP update was
398 received from this neighbor.";
400 leaf bad-packets-rcvd {
403 "The number of RIP invalid packets received from
404 this neighbor which were subsequently discarded
405 for any reason (e.g. a version 0 packet, or an
406 unknown command type).";
408 leaf bad-routes-rcvd {
411 "The number of routes received from this neighbor,
412 in valid RIP packets, which were ignored for any
413 reason (e.g. unknown address family, or invalid
420 "Route information.";
426 type inet:ipv4-prefix;
428 "IP address (in the form A.B.C.D) and prefix length,
429 separated by the slash (/) character. The range of
430 values for the prefix-length is 0 to 32.";
433 description "container of nexthops";
435 description "A list of nexthop objects.";
437 type frr-nexthop:nexthop-type;
443 type frr-route-types:frr-route-types-v4;
445 "The protocol originating this route.";
450 "The RIP type of route.";
453 type inet:ipv4-address;
455 "The nexthop gateway address.";
458 type frr-interface:interface-ref;
460 "The nexthop egress interface.";
463 type inet:ipv4-address;
465 "The nexthop gateway address.";
473 leaf external-metric {
476 "External metric if learned from external protocol.";
481 "Seconds before route expires.";
493 * Replaced by container `nexthops` above.
496 type inet:ipv4-address;
499 "Next hop IPv4 address.";
502 type frr-interface:interface-ref;
505 "The interface that the route uses.";
514 * Per-interface configuration data
516 augment "/frr-interface:lib/frr-interface:interface" {
517 description "rip interface data";
520 "RIP interface parameters.";
526 "Disables split-horizon processing.";
531 "Enables simple split-horizon processing.";
533 enum "poison-reverse" {
536 "Enables split-horizon processing with poison
542 "Controls RIP split-horizon processing on the specified
549 "Send IP broadcast v2 update.";
551 leaf version-receive {
556 "Inherit configuration from the routing instance.";
561 "Accept RIPv1 updates only.";
566 "Accept RIPv2 updates only.";
571 "Accept both RIPv1 and RIPv2 updates.";
576 "Do not accept neither RIPv1 nor RIPv2 updates.";
579 default "unspecified";
581 "Advertisement reception - Version control.";
588 "Inherit configuration from the routing instance.";
593 "Send RIPv1 updates only.";
598 "Send RIPv2 updates only.";
603 "Send both RIPv1 and RIPv2 updates.";
608 "Do not send neither RIPv1 nor RIPv2 updates.";
611 default "unspecified";
613 "Advertisement transmission - Version control.";
615 container authentication-scheme {
617 "Specify the authentication scheme for the RIP interface";
623 "No authentication.";
628 "Plain-text authentication.";
633 "MD5 authentication.";
638 "Specify the authentication mode.";
640 leaf md5-auth-length {
641 when "../mode = 'md5'";
651 "Old ripd compatible.";
656 "MD5 authentication data length.";
659 choice authentication-data {
661 "Choose whether to use a simple password or a key-chain.";
662 leaf authentication-password {
667 "Authentication string.";
669 leaf authentication-key-chain {
681 rpc clear-rip-route {
683 "Clears RIP routes from the IP routing table and routes
684 redistributed into the RIP protocol.";
688 type frr-vrf:vrf-ref;
690 "VRF name identifying a specific RIP instance.
691 This leaf is optional for the rpc.
692 If it is specified, the rpc will clear all routes in the
693 specified RIP instance;
694 if it is not specified, the rpc will clear all routes in
703 notification authentication-type-failure {
705 "This notification is sent when the system
706 receives a PDU with the wrong authentication type
708 leaf interface-name {
709 type frr-interface:interface-ref;
711 "Describes the name of the RIP interface.";
719 notification authentication-failure {
721 "This notification is sent when the system
722 receives a PDU with the wrong authentication
724 leaf interface-name {
725 type frr-interface:interface-ref;
727 "Describes the name of the RIP interface.";