]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-ripd.yang
Merge pull request #4564 from pguibert6WIND/misc_vrf_update_name
[mirror_frr.git] / yang / frr-ripd.yang
1 module frr-ripd {
2 yang-version 1.1;
3 namespace "http://frrouting.org/yang/ripd";
4 prefix frr-ripd;
5
6 import ietf-inet-types {
7 prefix inet;
8 }
9 import ietf-yang-types {
10 prefix yang;
11 }
12 import frr-interface {
13 prefix frr-interface;
14 }
15 import frr-route-types {
16 prefix frr-route-types;
17 }
18
19 organization
20 "Free Range Routing";
21 contact
22 "FRR Users List: <mailto:frog@lists.frrouting.org>
23 FRR Development List: <mailto:dev@lists.frrouting.org>";
24 description
25 "This module defines a model for managing FRR ripd daemon.";
26
27 revision 2019-09-09 {
28 description
29 "Changed interface references to use
30 frr-interface:interface-ref typedef";
31 }
32 revision 2017-12-06 {
33 description
34 "Initial revision.";
35 reference
36 "RFC 1058: Routing Information Protocol.
37 RFC 2453: RIP Version 2.";
38 }
39
40 container ripd {
41 /*
42 * Routing instance configuration.
43 */
44 list instance {
45 key "vrf";
46 description
47 "RIP routing instance.";
48
49 leaf vrf {
50 type string;
51 description
52 "VRF name.";
53 }
54 leaf allow-ecmp {
55 type boolean;
56 default "false";
57 description
58 "Allow equal-cost multi-path.";
59 }
60 leaf default-information-originate {
61 type boolean;
62 default "false";
63 description
64 "Control distribution of default route.";
65 }
66 leaf default-metric {
67 type uint8 {
68 range "1..16";
69 }
70 default "1";
71 description
72 "Default metric of redistributed routes.";
73 }
74 container distance {
75 description
76 "Administrative distance.";
77 leaf default {
78 type uint8 {
79 range "0..255";
80 }
81 default "0";
82 description
83 "Default administrative distance.";
84 }
85 list source {
86 key "prefix";
87 description
88 "Custom administrative distance per IP prefix.";
89 leaf prefix {
90 type inet:ipv4-prefix;
91 description
92 "Prefix.";
93 }
94 leaf distance {
95 type uint8 {
96 range "1..255";
97 }
98 mandatory true;
99 description
100 "Administrative distance.";
101 }
102 leaf access-list {
103 type string;
104 description
105 "Access-list name.";
106 }
107 }
108 }
109 leaf-list explicit-neighbor {
110 type inet:ipv4-address;
111 description
112 "Specifies the RIP neighbors. Useful for a
113 non-broadcast multiple access (NBMA) network.";
114 }
115 leaf-list network {
116 type inet:ipv4-prefix;
117 description
118 "Enable RIP on the specified IP network.";
119 }
120 leaf-list interface {
121 type frr-interface:interface-ref;
122 description
123 "Enable RIP on the specified interface.";
124 }
125 list offset-list {
126 key "interface direction";
127 description
128 "Offset-list to modify route metric.";
129 leaf interface {
130 type union {
131 type frr-interface:interface-ref;
132 type enumeration {
133 enum '*' {
134 description
135 "Match all interfaces.";
136 }
137 }
138 }
139 description
140 "Interface to match. Use '*' to match all interfaces.";
141 }
142 leaf direction {
143 type enumeration {
144 enum in {
145 value 0;
146 description
147 "Incoming updates.";
148 }
149 enum out {
150 value 1;
151 description
152 "Outgoing updates.";
153 }
154 }
155 description
156 "Incoming or outgoing updates.";
157 }
158 leaf access-list {
159 type string;
160 mandatory true;
161 description
162 "Access-list name.";
163 }
164 leaf metric {
165 type uint8 {
166 range "0..16";
167 }
168 mandatory true;
169 description
170 "Route metric.";
171 }
172 }
173 leaf passive-default {
174 type boolean;
175 default "false";
176 description
177 "Control whether interfaces are in the passive mode
178 by default or not.";
179 }
180 leaf-list passive-interface {
181 when "../passive-default = 'false'";
182 type frr-interface:interface-ref;
183 description
184 "A list of interfaces where the sending of RIP packets
185 is disabled.";
186 }
187 leaf-list non-passive-interface {
188 when "../passive-default = 'true'";
189 type frr-interface:interface-ref;
190 description
191 "A list of interfaces where the sending of RIP packets
192 is enabled.";
193 }
194 list redistribute {
195 key "protocol";
196 description
197 "Redistributes routes learned from other routing protocols.";
198 leaf protocol {
199 type frr-route-types:frr-route-types-v4;
200 description
201 "Routing protocol.";
202 must '. != "rip"';
203 }
204 leaf route-map {
205 type string {
206 length "1..max";
207 }
208 description
209 "Applies the conditions of the specified route-map to
210 routes that are redistributed into the RIP routing
211 instance.";
212 }
213 leaf metric {
214 type uint8 {
215 range "0..16";
216 }
217 description
218 "Metric used for the redistributed route. If a metric is
219 not specified, the metric configured with the
220 default-metric attribute in RIP router configuration is
221 used. If the default-metric attribute has not been
222 configured, the default metric for redistributed routes
223 is 0.";
224 }
225 }
226 leaf-list static-route {
227 type inet:ipv4-prefix;
228 description
229 "RIP static routes.";
230 }
231 container timers {
232 description
233 "Settings of basic timers";
234 leaf flush-interval {
235 type uint32 {
236 range "5..2147483647";
237 }
238 units "seconds";
239 default "120";
240 description
241 "Interval before a route is flushed from the routing
242 table.";
243 }
244 leaf holddown-interval {
245 type uint32 {
246 range "5..2147483647";
247 }
248 units "seconds";
249 default "180";
250 description
251 "Interval before better routes are released.";
252 }
253 leaf update-interval {
254 type uint32 {
255 range "5..2147483647";
256 }
257 units "seconds";
258 default "30";
259 description
260 "Interval at which RIP updates are sent.";
261 }
262 }
263 container version {
264 leaf receive {
265 type enumeration {
266 enum "1" {
267 value 1;
268 description
269 "Accept RIPv1 updates only.";
270 }
271 enum "2" {
272 value 2;
273 description
274 "Accept RIPv2 updates only.";
275 }
276 enum "1-2" {
277 value 3;
278 description
279 "Accept both RIPv1 and RIPv2 updates.";
280 }
281 }
282 default "1-2";
283 description
284 "Advertisement reception - Version control.";
285 }
286 leaf send {
287 type enumeration {
288 enum "1" {
289 value 1;
290 description
291 "Send RIPv1 updates only.";
292 }
293 enum "2" {
294 value 2;
295 description
296 "Send RIPv2 updates only.";
297 }
298 }
299 default "2";
300 description
301 "Advertisement transmission - Version control.";
302 }
303 must
304 '(./receive = "1" and ./send = "1") or ' +
305 '(./receive = "2" and ./send = "2") or ' +
306 '(./receive = "1-2" and ./send = "2")';
307 }
308
309 /*
310 * Operational data.
311 */
312 container state {
313 config false;
314 description
315 "Operational data.";
316
317 container neighbors {
318 description
319 "Neighbor information.";
320 list neighbor {
321 key "address";
322 description
323 "A RIP neighbor.";
324 leaf address {
325 type inet:ipv4-address;
326 description
327 "IP address that a RIP neighbor is using as its
328 source address.";
329 }
330 leaf last-update {
331 type yang:date-and-time;
332 description
333 "The time when the most recent RIP update was
334 received from this neighbor.";
335 }
336 leaf bad-packets-rcvd {
337 type yang:counter32;
338 description
339 "The number of RIP invalid packets received from
340 this neighbor which were subsequently discarded
341 for any reason (e.g. a version 0 packet, or an
342 unknown command type).";
343 }
344 leaf bad-routes-rcvd {
345 type yang:counter32;
346 description
347 "The number of routes received from this neighbor,
348 in valid RIP packets, which were ignored for any
349 reason (e.g. unknown address family, or invalid
350 metric).";
351 }
352 }
353 }
354 container routes {
355 description
356 "Route information.";
357 list route {
358 key "prefix";
359 description
360 "A RIP IPv4 route.";
361 leaf prefix {
362 type inet:ipv4-prefix;
363 description
364 "IP address (in the form A.B.C.D) and prefix length,
365 separated by the slash (/) character. The range of
366 values for the prefix-length is 0 to 32.";
367 }
368 leaf next-hop {
369 type inet:ipv4-address;
370 description
371 "Next hop IPv4 address.";
372 }
373 leaf interface {
374 type string;
375 description
376 "The interface that the route uses.";
377 }
378 leaf metric {
379 type uint8 {
380 range "0..16";
381 }
382 description
383 "Route metric.";
384 }
385 }
386 }
387 }
388 }
389 }
390
391 /*
392 * Per-interface configuration data
393 */
394 augment "/frr-interface:lib/frr-interface:interface" {
395 container rip {
396 description
397 "RIP interface parameters.";
398 leaf split-horizon {
399 type enumeration {
400 enum "disabled" {
401 value 0;
402 description
403 "Disables split-horizon processing.";
404 }
405 enum "simple" {
406 value 1;
407 description
408 "Enables simple split-horizon processing.";
409 }
410 enum "poison-reverse" {
411 value 2;
412 description
413 "Enables split-horizon processing with poison
414 reverse.";
415 }
416 }
417 default "simple";
418 description
419 "Controls RIP split-horizon processing on the specified
420 interface.";
421 }
422 leaf v2-broadcast {
423 type boolean;
424 default "false";
425 description
426 "Send IP broadcast v2 update.";
427 }
428 leaf version-receive {
429 type enumeration {
430 enum "unspecified" {
431 value 0;
432 description
433 "Inherit configuration from the routing instance.";
434 }
435 enum "1" {
436 value 1;
437 description
438 "Accept RIPv1 updates only.";
439 }
440 enum "2" {
441 value 2;
442 description
443 "Accept RIPv2 updates only.";
444 }
445 enum "both" {
446 value 3;
447 description
448 "Accept both RIPv1 and RIPv2 updates.";
449 }
450 enum "none" {
451 value 4;
452 description
453 "Do not accept neither RIPv1 nor RIPv2 updates.";
454 }
455 }
456 default "unspecified";
457 description
458 "Advertisement reception - Version control.";
459 }
460 leaf version-send {
461 type enumeration {
462 enum "unspecified" {
463 value 0;
464 description
465 "Inherit configuration from the routing instance.";
466 }
467 enum "1" {
468 value 1;
469 description
470 "Send RIPv1 updates only.";
471 }
472 enum "2" {
473 value 2;
474 description
475 "Send RIPv2 updates only.";
476 }
477 enum "both" {
478 value 3;
479 description
480 "Send both RIPv1 and RIPv2 updates.";
481 }
482 enum "none" {
483 value 4;
484 description
485 "Do not send neither RIPv1 nor RIPv2 updates.";
486 }
487 }
488 default "unspecified";
489 description
490 "Advertisement transmission - Version control.";
491 }
492 container authentication-scheme {
493 description
494 "Specify the authentication scheme for the RIP interface";
495 leaf mode {
496 type enumeration {
497 enum "none" {
498 value 0;
499 description
500 "No authentication.";
501 }
502 enum "plain-text" {
503 value 2;
504 description
505 "Plain-text authentication.";
506 }
507 enum "md5" {
508 value 3;
509 description
510 "MD5 authentication.";
511 }
512 }
513 default "none";
514 description
515 "Specify the authentication mode.";
516 }
517 leaf md5-auth-length {
518 when "../mode = 'md5'";
519 type enumeration {
520 enum "16" {
521 value 16;
522 description
523 "RFC compatible.";
524 }
525 enum "20" {
526 value 20;
527 description
528 "Old ripd compatible.";
529 }
530 }
531 default "20";
532 description
533 "MD5 authentication data length.";
534 }
535 }
536 choice authentication-data {
537 description
538 "Choose whether to use a simple password or a key-chain.";
539 leaf authentication-password {
540 type string {
541 length "1..16";
542 }
543 description
544 "Authentication string.";
545 }
546 leaf authentication-key-chain {
547 type string;
548 description
549 "Key-chain name.";
550 }
551 }
552 }
553 }
554
555 /*
556 * RPCs
557 */
558 rpc clear-rip-route {
559 description
560 "Clears RIP routes from the IP routing table and routes
561 redistributed into the RIP protocol.";
562
563 input {
564 leaf vrf {
565 type string;
566 description
567 "VRF name identifying a specific RIP instance.
568 This leaf is optional for the rpc.
569 If it is specified, the rpc will clear all routes in the
570 specified RIP instance;
571 if it is not specified, the rpc will clear all routes in
572 all RIP instances.";
573 }
574 }
575 }
576
577 /*
578 * Notifications
579 */
580 notification authentication-type-failure {
581 description
582 "This notification is sent when the system
583 receives a PDU with the wrong authentication type
584 field.";
585 leaf interface-name {
586 type string;
587 description
588 "Describes the name of the RIP interface.";
589 }
590 leaf raw-pdu {
591 type binary;
592 description
593 "Received raw PDU.";
594 }
595 }
596 notification authentication-failure {
597 description
598 "This notification is sent when the system
599 receives a PDU with the wrong authentication
600 information.";
601 leaf interface-name {
602 type string;
603 description
604 "Describes the name of the RIP interface.";
605 }
606 leaf raw-pdu {
607 type binary;
608 description
609 "Received raw PDU.";
610 }
611 }
612 }