3 namespace "http://frrouting.org/yang/ripd";
6 import ietf-inet-types {
9 import ietf-yang-types {
12 import frr-interface {
18 import frr-route-map {
21 import frr-route-types {
22 prefix frr-route-types;
28 "FRR Users List: <mailto:frog@lists.frrouting.org>
29 FRR Development List: <mailto:dev@lists.frrouting.org>";
31 "This module defines a model for managing FRR ripd daemon.
33 Copyright 2020 FRRouting
35 Redistribution and use in source and binary forms, with or without
36 modification, are permitted provided that the following conditions
39 1. Redistributions of source code must retain the above copyright notice,
40 this list of conditions and the following disclaimer.
42 2. Redistributions in binary form must reproduce the above copyright
43 notice, this list of conditions and the following disclaimer in the
44 documentation and/or other materials provided with the distribution.
46 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
47 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
48 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
49 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
50 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
51 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
52 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
53 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
54 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
55 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
56 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
60 "Changed interface references to use
61 frr-interface:interface-ref typedef";
67 "RFC 1058: Routing Information Protocol.
68 RFC 2453: RIP Version 2.";
73 * Routing instance configuration.
78 "RIP routing instance.";
89 "Allow equal-cost multi-path.";
91 leaf default-information-originate {
95 "Control distribution of default route.";
103 "Default metric of redistributed routes.";
107 "Administrative distance.";
114 "Default administrative distance.";
119 "Custom administrative distance per IP prefix.";
121 type inet:ipv4-prefix;
131 "Administrative distance.";
140 leaf-list explicit-neighbor {
141 type inet:ipv4-address;
143 "Specifies the RIP neighbors. Useful for a
144 non-broadcast multiple access (NBMA) network.";
147 type inet:ipv4-prefix;
149 "Enable RIP on the specified IP network.";
151 leaf-list interface {
152 type frr-interface:interface-ref;
154 "Enable RIP on the specified interface.";
157 key "interface direction";
159 "Offset-list to modify route metric.";
162 type frr-interface:interface-ref;
166 "Match all interfaces.";
171 "Interface to match. Use '*' to match all interfaces.";
187 "Incoming or outgoing updates.";
204 leaf passive-default {
208 "Control whether interfaces are in the passive mode
211 leaf-list passive-interface {
212 when "../passive-default = 'false'";
213 type frr-interface:interface-ref;
215 "A list of interfaces where the sending of RIP packets
218 leaf-list non-passive-interface {
219 when "../passive-default = 'true'";
220 type frr-interface:interface-ref;
222 "A list of interfaces where the sending of RIP packets
228 "Redistributes routes learned from other routing protocols.";
230 type frr-route-types:frr-route-types-v4;
236 type frr-route-map:route-map-ref;
238 "Applies the conditions of the specified route-map to
239 routes that are redistributed into the RIP routing
247 "Metric used for the redistributed route. If a metric is
248 not specified, the metric configured with the
249 default-metric attribute in RIP router configuration is
250 used. If the default-metric attribute has not been
251 configured, the default metric for redistributed routes
255 leaf-list static-route {
256 type inet:ipv4-prefix;
258 "RIP static routes.";
262 "Settings of basic timers";
263 leaf flush-interval {
265 range "5..2147483647";
270 "Interval before a route is flushed from the routing
273 leaf holddown-interval {
275 range "5..2147483647";
280 "Interval before better routes are released.";
282 leaf update-interval {
284 range "5..2147483647";
289 "Interval at which RIP updates are sent.";
295 '(. = "1" and ../send = "1") or ' +
296 '(. = "2" and ../send = "2") or ' +
297 '(. = "1-2" and ../send = "2")';
302 "Accept RIPv1 updates only.";
307 "Accept RIPv2 updates only.";
312 "Accept both RIPv1 and RIPv2 updates.";
317 "Advertisement reception - Version control.";
321 '(../receive = "1" and . = "1") or ' +
322 '(../receive = "2" and . = "2") or ' +
323 '(../receive = "1-2" and . = "2")';
328 "Send RIPv1 updates only.";
333 "Send RIPv2 updates only.";
338 "Advertisement transmission - Version control.";
350 container neighbors {
352 "Neighbor information.";
358 type inet:ipv4-address;
360 "IP address that a RIP neighbor is using as its
364 type yang:date-and-time;
366 "The time when the most recent RIP update was
367 received from this neighbor.";
369 leaf bad-packets-rcvd {
372 "The number of RIP invalid packets received from
373 this neighbor which were subsequently discarded
374 for any reason (e.g. a version 0 packet, or an
375 unknown command type).";
377 leaf bad-routes-rcvd {
380 "The number of routes received from this neighbor,
381 in valid RIP packets, which were ignored for any
382 reason (e.g. unknown address family, or invalid
389 "Route information.";
395 type inet:ipv4-prefix;
397 "IP address (in the form A.B.C.D) and prefix length,
398 separated by the slash (/) character. The range of
399 values for the prefix-length is 0 to 32.";
402 type inet:ipv4-address;
404 "Next hop IPv4 address.";
407 type frr-interface:interface-ref;
409 "The interface that the route uses.";
425 * Per-interface configuration data
427 augment "/frr-interface:lib/frr-interface:interface" {
430 "RIP interface parameters.";
436 "Disables split-horizon processing.";
441 "Enables simple split-horizon processing.";
443 enum "poison-reverse" {
446 "Enables split-horizon processing with poison
452 "Controls RIP split-horizon processing on the specified
459 "Send IP broadcast v2 update.";
461 leaf version-receive {
466 "Inherit configuration from the routing instance.";
471 "Accept RIPv1 updates only.";
476 "Accept RIPv2 updates only.";
481 "Accept both RIPv1 and RIPv2 updates.";
486 "Do not accept neither RIPv1 nor RIPv2 updates.";
489 default "unspecified";
491 "Advertisement reception - Version control.";
498 "Inherit configuration from the routing instance.";
503 "Send RIPv1 updates only.";
508 "Send RIPv2 updates only.";
513 "Send both RIPv1 and RIPv2 updates.";
518 "Do not send neither RIPv1 nor RIPv2 updates.";
521 default "unspecified";
523 "Advertisement transmission - Version control.";
525 container authentication-scheme {
527 "Specify the authentication scheme for the RIP interface";
533 "No authentication.";
538 "Plain-text authentication.";
543 "MD5 authentication.";
548 "Specify the authentication mode.";
550 leaf md5-auth-length {
551 when "../mode = 'md5'";
561 "Old ripd compatible.";
566 "MD5 authentication data length.";
569 choice authentication-data {
571 "Choose whether to use a simple password or a key-chain.";
572 leaf authentication-password {
577 "Authentication string.";
579 leaf authentication-key-chain {
591 rpc clear-rip-route {
593 "Clears RIP routes from the IP routing table and routes
594 redistributed into the RIP protocol.";
598 type frr-vrf:vrf-ref;
600 "VRF name identifying a specific RIP instance.
601 This leaf is optional for the rpc.
602 If it is specified, the rpc will clear all routes in the
603 specified RIP instance;
604 if it is not specified, the rpc will clear all routes in
613 notification authentication-type-failure {
615 "This notification is sent when the system
616 receives a PDU with the wrong authentication type
618 leaf interface-name {
619 type frr-interface:interface-ref;
621 "Describes the name of the RIP interface.";
629 notification authentication-failure {
631 "This notification is sent when the system
632 receives a PDU with the wrong authentication
634 leaf interface-name {
635 type frr-interface:interface-ref;
637 "Describes the name of the RIP interface.";