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.";
298 "Accept RIPv1 updates only.";
303 "Accept RIPv2 updates only.";
308 "Accept both RIPv1 and RIPv2 updates.";
313 "Advertisement reception - Version control.";
320 "Send RIPv1 updates only.";
325 "Send RIPv2 updates only.";
330 "Advertisement transmission - Version control.";
333 '(./receive = "1" and ./send = "1") or ' +
334 '(./receive = "2" and ./send = "2") or ' +
335 '(./receive = "1-2" and ./send = "2")';
346 container neighbors {
348 "Neighbor information.";
354 type inet:ipv4-address;
356 "IP address that a RIP neighbor is using as its
360 type yang:date-and-time;
362 "The time when the most recent RIP update was
363 received from this neighbor.";
365 leaf bad-packets-rcvd {
368 "The number of RIP invalid packets received from
369 this neighbor which were subsequently discarded
370 for any reason (e.g. a version 0 packet, or an
371 unknown command type).";
373 leaf bad-routes-rcvd {
376 "The number of routes received from this neighbor,
377 in valid RIP packets, which were ignored for any
378 reason (e.g. unknown address family, or invalid
385 "Route information.";
391 type inet:ipv4-prefix;
393 "IP address (in the form A.B.C.D) and prefix length,
394 separated by the slash (/) character. The range of
395 values for the prefix-length is 0 to 32.";
398 type inet:ipv4-address;
400 "Next hop IPv4 address.";
403 type frr-interface:interface-ref;
405 "The interface that the route uses.";
421 * Per-interface configuration data
423 augment "/frr-interface:lib/frr-interface:interface" {
426 "RIP interface parameters.";
432 "Disables split-horizon processing.";
437 "Enables simple split-horizon processing.";
439 enum "poison-reverse" {
442 "Enables split-horizon processing with poison
448 "Controls RIP split-horizon processing on the specified
455 "Send IP broadcast v2 update.";
457 leaf version-receive {
462 "Inherit configuration from the routing instance.";
467 "Accept RIPv1 updates only.";
472 "Accept RIPv2 updates only.";
477 "Accept both RIPv1 and RIPv2 updates.";
482 "Do not accept neither RIPv1 nor RIPv2 updates.";
485 default "unspecified";
487 "Advertisement reception - Version control.";
494 "Inherit configuration from the routing instance.";
499 "Send RIPv1 updates only.";
504 "Send RIPv2 updates only.";
509 "Send both RIPv1 and RIPv2 updates.";
514 "Do not send neither RIPv1 nor RIPv2 updates.";
517 default "unspecified";
519 "Advertisement transmission - Version control.";
521 container authentication-scheme {
523 "Specify the authentication scheme for the RIP interface";
529 "No authentication.";
534 "Plain-text authentication.";
539 "MD5 authentication.";
544 "Specify the authentication mode.";
546 leaf md5-auth-length {
547 when "../mode = 'md5'";
557 "Old ripd compatible.";
562 "MD5 authentication data length.";
565 choice authentication-data {
567 "Choose whether to use a simple password or a key-chain.";
568 leaf authentication-password {
573 "Authentication string.";
575 leaf authentication-key-chain {
587 rpc clear-rip-route {
589 "Clears RIP routes from the IP routing table and routes
590 redistributed into the RIP protocol.";
594 type frr-vrf:vrf-ref;
596 "VRF name identifying a specific RIP instance.
597 This leaf is optional for the rpc.
598 If it is specified, the rpc will clear all routes in the
599 specified RIP instance;
600 if it is not specified, the rpc will clear all routes in
609 notification authentication-type-failure {
611 "This notification is sent when the system
612 receives a PDU with the wrong authentication type
614 leaf interface-name {
615 type frr-interface:interface-ref;
617 "Describes the name of the RIP interface.";
625 notification authentication-failure {
627 "This notification is sent when the system
628 receives a PDU with the wrong authentication
630 leaf interface-name {
631 type frr-interface:interface-ref;
633 "Describes the name of the RIP interface.";