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 {
19 import frr-route-map {
22 import frr-route-types {
23 prefix frr-route-types;
29 "FRR Users List: <mailto:frog@lists.frrouting.org>
30 FRR Development List: <mailto:dev@lists.frrouting.org>";
32 "This module defines a model for managing FRR ripd daemon.
34 Copyright 2020 FRRouting
36 Redistribution and use in source and binary forms, with or without
37 modification, are permitted provided that the following conditions
40 1. Redistributions of source code must retain the above copyright notice,
41 this list of conditions and the following disclaimer.
43 2. Redistributions in binary form must reproduce the above copyright
44 notice, this list of conditions and the following disclaimer in the
45 documentation and/or other materials provided with the distribution.
47 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
48 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
49 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
50 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
51 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
52 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
53 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
54 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
55 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
56 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
57 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
61 "Changed interface references to use
62 frr-interface:interface-ref typedef";
68 "RFC 1058: Routing Information Protocol.
69 RFC 2453: RIP Version 2.";
74 * Routing instance configuration.
79 "RIP routing instance.";
90 "Allow equal-cost multi-path.";
92 leaf default-information-originate {
96 "Control distribution of default route.";
104 "Default metric of redistributed routes.";
108 "Administrative distance.";
115 "Default administrative distance.";
120 "Custom administrative distance per IP prefix.";
122 type inet:ipv4-prefix;
132 "Administrative distance.";
141 leaf-list explicit-neighbor {
142 type inet:ipv4-address;
144 "Specifies the RIP neighbors. Useful for a
145 non-broadcast multiple access (NBMA) network.";
148 type inet:ipv4-prefix;
150 "Enable RIP on the specified IP network.";
152 leaf-list interface {
153 type frr-interface:interface-ref;
155 "Enable RIP on the specified interface.";
158 key "interface direction";
160 "Offset-list to modify route metric.";
163 type frr-interface:interface-ref;
167 "Match all interfaces.";
172 "Interface to match. Use '*' to match all interfaces.";
188 "Incoming or outgoing updates.";
205 leaf passive-default {
209 "Control whether interfaces are in the passive mode
212 leaf-list passive-interface {
213 when "../passive-default = 'false'";
214 type frr-interface:interface-ref;
216 "A list of interfaces where the sending of RIP packets
219 leaf-list non-passive-interface {
220 when "../passive-default = 'true'";
221 type frr-interface:interface-ref;
223 "A list of interfaces where the sending of RIP packets
229 "Redistributes routes learned from other routing protocols.";
231 type frr-route-types:frr-route-types-v4;
237 type frr-route-map:route-map-ref;
239 "Applies the conditions of the specified route-map to
240 routes that are redistributed into the RIP routing
248 "Metric used for the redistributed route. If a metric is
249 not specified, the metric configured with the
250 default-metric attribute in RIP router configuration is
251 used. If the default-metric attribute has not been
252 configured, the default metric for redistributed routes
256 leaf-list static-route {
257 type inet:ipv4-prefix;
259 "RIP static routes.";
263 "Settings of basic timers";
264 leaf flush-interval {
266 range "5..2147483647";
271 "Interval before a route is flushed from the routing
274 leaf holddown-interval {
276 range "5..2147483647";
281 "Interval before better routes are released.";
283 leaf update-interval {
285 range "5..2147483647";
290 "Interval at which RIP updates are sent.";
296 '(. = "1" and ../send = "1") or ' +
297 '(. = "2" and ../send = "2") or ' +
298 '(. = "1-2" and ../send = "2")';
303 "Accept RIPv1 updates only.";
308 "Accept RIPv2 updates only.";
313 "Accept both RIPv1 and RIPv2 updates.";
318 "Advertisement reception - Version control.";
322 '(../receive = "1" and . = "1") or ' +
323 '(../receive = "2" and . = "2") or ' +
324 '(../receive = "1-2" and . = "2")';
329 "Send RIPv1 updates only.";
334 "Send RIPv2 updates only.";
339 "Advertisement transmission - Version control.";
351 container neighbors {
353 "Neighbor information.";
359 type inet:ipv4-address;
361 "IP address that a RIP neighbor is using as its
365 type yang:date-and-time;
367 "The time when the most recent RIP update was
368 received from this neighbor.";
370 leaf bad-packets-rcvd {
373 "The number of RIP invalid packets received from
374 this neighbor which were subsequently discarded
375 for any reason (e.g. a version 0 packet, or an
376 unknown command type).";
378 leaf bad-routes-rcvd {
381 "The number of routes received from this neighbor,
382 in valid RIP packets, which were ignored for any
383 reason (e.g. unknown address family, or invalid
390 "Route information.";
396 type inet:ipv4-prefix;
398 "IP address (in the form A.B.C.D) and prefix length,
399 separated by the slash (/) character. The range of
400 values for the prefix-length is 0 to 32.";
403 type inet:ipv4-address;
405 "Next hop IPv4 address.";
408 type frr-interface:interface-ref;
410 "The interface that the route uses.";
426 * Per-interface configuration data
428 augment "/frr-interface:lib/frr-interface:interface" {
431 "RIP interface parameters.";
437 "Disables split-horizon processing.";
442 "Enables simple split-horizon processing.";
444 enum "poison-reverse" {
447 "Enables split-horizon processing with poison
453 "Controls RIP split-horizon processing on the specified
460 "Send IP broadcast v2 update.";
462 leaf version-receive {
467 "Inherit configuration from the routing instance.";
472 "Accept RIPv1 updates only.";
477 "Accept RIPv2 updates only.";
482 "Accept both RIPv1 and RIPv2 updates.";
487 "Do not accept neither RIPv1 nor RIPv2 updates.";
490 default "unspecified";
492 "Advertisement reception - Version control.";
499 "Inherit configuration from the routing instance.";
504 "Send RIPv1 updates only.";
509 "Send RIPv2 updates only.";
514 "Send both RIPv1 and RIPv2 updates.";
519 "Do not send neither RIPv1 nor RIPv2 updates.";
522 default "unspecified";
524 "Advertisement transmission - Version control.";
526 container authentication-scheme {
528 "Specify the authentication scheme for the RIP interface";
534 "No authentication.";
539 "Plain-text authentication.";
544 "MD5 authentication.";
549 "Specify the authentication mode.";
551 leaf md5-auth-length {
552 when "../mode = 'md5'";
562 "Old ripd compatible.";
567 "MD5 authentication data length.";
570 choice authentication-data {
572 "Choose whether to use a simple password or a key-chain.";
573 leaf authentication-password {
578 "Authentication string.";
580 leaf authentication-key-chain {
592 rpc clear-rip-route {
594 "Clears RIP routes from the IP routing table and routes
595 redistributed into the RIP protocol.";
599 type frr-vrf:vrf-ref;
601 "VRF name identifying a specific RIP instance.
602 This leaf is optional for the rpc.
603 If it is specified, the rpc will clear all routes in the
604 specified RIP instance;
605 if it is not specified, the rpc will clear all routes in
614 notification authentication-type-failure {
616 "This notification is sent when the system
617 receives a PDU with the wrong authentication type
619 leaf interface-name {
620 type frr-interface:interface-ref;
622 "Describes the name of the RIP interface.";
630 notification authentication-failure {
632 "This notification is sent when the system
633 receives a PDU with the wrong authentication
635 leaf interface-name {
636 type frr-interface:interface-ref;
638 "Describes the name of the RIP interface.";