]> git.proxmox.com Git - mirror_frr.git/blame - yang/frr-ripngd.yang
Merge pull request #13455 from sri-mohan1/srib-ldpd
[mirror_frr.git] / yang / frr-ripngd.yang
CommitLineData
41db488c 1// SPDX-License-Identifier: BSD-2-Clause
e9ce224b
RW
2module frr-ripngd {
3 yang-version 1.1;
4 namespace "http://frrouting.org/yang/ripngd";
5 prefix frr-ripngd;
6
7 import ietf-inet-types {
8 prefix inet;
9 }
10 import ietf-yang-types {
11 prefix yang;
12 }
e40c4208
CH
13 import frr-if-rmap {
14 prefix frr-if-rmap;
15 }
e9ce224b
RW
16 import frr-interface {
17 prefix frr-interface;
18 }
806defc8
IR
19 import frr-vrf {
20 prefix frr-vrf;
21 }
22 import frr-route-map {
23 prefix frr-route-map;
24 }
e9ce224b
RW
25 import frr-route-types {
26 prefix frr-route-types;
27 }
28
29 organization
8678d638 30 "FRRouting";
e9ce224b
RW
31 contact
32 "FRR Users List: <mailto:frog@lists.frrouting.org>
33 FRR Development List: <mailto:dev@lists.frrouting.org>";
34 description
fe3b629a
RW
35 "This module defines a model for managing FRR ripngd daemon.
36
37 Copyright 2020 FRRouting
38
39 Redistribution and use in source and binary forms, with or without
40 modification, are permitted provided that the following conditions
41 are met:
42
43 1. Redistributions of source code must retain the above copyright notice,
44 this list of conditions and the following disclaimer.
45
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.
49
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.";
e9ce224b 61
f22b9250
QY
62 revision 2019-09-09 {
63 description
64 "Changed interface references to use
65 frr-interface:interface-ref typedef";
66 }
e9ce224b
RW
67 revision 2018-11-27 {
68 description
69 "Initial revision.";
70 reference
71 "RFC 2080: RIPng for IPv6.";
72 }
73
74 container ripngd {
75 /*
dde7b15b 76 * Routing instance configuration.
e9ce224b 77 */
dde7b15b
RW
78 list instance {
79 key "vrf";
e9ce224b
RW
80 description
81 "RIPng routing instance.";
82
dde7b15b 83 leaf vrf {
806defc8 84 type frr-vrf:vrf-ref;
dde7b15b
RW
85 description
86 "VRF name.";
87 }
e9ce224b
RW
88 leaf allow-ecmp {
89 type boolean;
90 default "false";
91 description
92 "Allow equal-cost multi-path.";
93 }
94 leaf default-information-originate {
95 type boolean;
96 default "false";
97 description
98 "Control distribution of default route.";
99 }
100 leaf default-metric {
101 type uint8 {
102 range "1..16";
103 }
104 default "1";
105 description
106 "Default metric of redistributed routes.";
107 }
108 leaf-list network {
109 type inet:ipv6-prefix;
110 description
111 "Enable RIPng on the specified IPv6 network.";
112 }
113 leaf-list interface {
240b7826 114 type frr-interface:interface-ref;
e9ce224b
RW
115 description
116 "Enable RIPng on the specified interface.";
117 }
118 list offset-list {
119 key "interface direction";
120 description
121 "Offset-list to modify route metric.";
122 leaf interface {
f22b9250
QY
123 type union {
124 type frr-interface:interface-ref;
125 type enumeration {
126 enum '*' {
127 description
128 "Match all interfaces.";
129 }
130 }
131 }
e9ce224b
RW
132 description
133 "Interface to match. Use '*' to match all interfaces.";
134 }
135 leaf direction {
136 type enumeration {
137 enum in {
138 value 0;
139 description
140 "Incoming updates.";
141 }
142 enum out {
143 value 1;
144 description
145 "Outgoing updates.";
146 }
147 }
148 description
149 "Incoming or outgoing updates.";
150 }
151 leaf access-list {
152 type string;
153 mandatory true;
154 description
155 "Access-list name.";
156 }
157 leaf metric {
158 type uint8 {
159 range "0..16";
160 }
161 mandatory true;
162 description
163 "Route metric.";
164 }
165 }
166 leaf-list passive-interface {
f22b9250 167 type frr-interface:interface-ref;
e9ce224b
RW
168 description
169 "A list of interfaces where the sending of RIPng packets
170 is disabled.";
171 }
172 list redistribute {
173 key "protocol";
174 description
175 "Redistributes routes learned from other routing protocols.";
176 leaf protocol {
177 type frr-route-types:frr-route-types-v6;
178 description
179 "Routing protocol.";
180 must '. != "ripng"';
181 }
182 leaf route-map {
806defc8 183 type frr-route-map:route-map-ref;
e9ce224b
RW
184 description
185 "Applies the conditions of the specified route-map to
186 routes that are redistributed into the RIPng routing
187 instance.";
188 }
189 leaf metric {
190 type uint8 {
191 range "0..16";
192 }
193 description
194 "Metric used for the redistributed route. If a metric is
195 not specified, the metric configured with the
196 default-metric attribute in RIPng router configuration is
197 used. If the default-metric attribute has not been
198 configured, the default metric for redistributed routes
199 is 0.";
200 }
201 }
e40c4208
CH
202
203 uses frr-if-rmap:if-route-maps-group;
204
e9ce224b
RW
205 leaf-list static-route {
206 type inet:ipv6-prefix;
207 description
208 "RIPng static routes.";
209 }
210 leaf-list aggregate-address {
211 type inet:ipv6-prefix;
212 description
213 "RIPng aggregate route announcement.";
214 }
215 container timers {
216 description
217 "Settings of basic timers";
218 leaf flush-interval {
219 type uint16 {
220 range "1..65535";
221 }
222 units "seconds";
223 default "120";
224 description
225 "Interval before a route is flushed from the routing
226 table.";
227 }
228 leaf holddown-interval {
229 type uint16 {
230 range "1..65535";
231 }
232 units "seconds";
233 default "180";
234 description
235 "Interval before better routes are released.";
236 }
237 leaf update-interval {
238 type uint16 {
239 range "1..65535";
240 }
241 units "seconds";
242 default "30";
243 description
244 "Interval at which RIPng updates are sent.";
245 }
246 }
e9ce224b 247
80cf4e45
RW
248 /*
249 * Operational data.
250 */
251 container state {
252 config false;
e9ce224b 253 description
80cf4e45
RW
254 "Operational data.";
255
256 container neighbors {
e9ce224b 257 description
80cf4e45
RW
258 "Neighbor information.";
259 list neighbor {
260 key "address";
e9ce224b 261 description
80cf4e45
RW
262 "A RIPng neighbor.";
263 leaf address {
264 type inet:ipv6-address;
265 description
266 "IPv6 address that a RIPng neighbor is using as its
267 source address.";
268 }
269 leaf last-update {
270 type yang:date-and-time;
271 description
272 "The time when the most recent RIPng update was
273 received from this neighbor.";
274 }
275 leaf bad-packets-rcvd {
276 type yang:counter32;
277 description
278 "The number of RIPng invalid packets received from
279 this neighbor which were subsequently discarded
280 for any reason (e.g. a version 0 packet, or an
281 unknown command type).";
282 }
283 leaf bad-routes-rcvd {
284 type yang:counter32;
285 description
286 "The number of routes received from this neighbor,
287 in valid RIPng packets, which were ignored for any
288 reason (e.g. unknown address family, or invalid
289 metric).";
290 }
e9ce224b
RW
291 }
292 }
80cf4e45 293 container routes {
e9ce224b 294 description
80cf4e45
RW
295 "Route information.";
296 list route {
297 key "prefix";
e9ce224b 298 description
80cf4e45
RW
299 "A RIPng IPv6 route.";
300 leaf prefix {
301 type inet:ipv6-prefix;
302 description
303 "IPv6 address and prefix length, in the format
304 specified in RFC6991.";
305 }
306 leaf next-hop {
307 type inet:ipv6-address;
308 description
309 "Next hop IPv6 address.";
310 }
311 leaf interface {
806defc8 312 type frr-interface:interface-ref;
80cf4e45
RW
313 description
314 "The interface that the route uses.";
315 }
316 leaf metric {
317 type uint8 {
318 range "0..16";
319 }
320 description
321 "Route metric.";
e9ce224b 322 }
e9ce224b
RW
323 }
324 }
325 }
326 }
327 }
328
329 /*
330 * Per-interface configuration data
331 */
332 augment "/frr-interface:lib/frr-interface:interface" {
333 container ripng {
334 description
335 "RIPng interface parameters.";
336 leaf split-horizon {
337 type enumeration {
338 enum "disabled" {
339 value 0;
340 description
341 "Disables split-horizon processing.";
342 }
343 enum "simple" {
344 value 1;
345 description
346 "Enables simple split-horizon processing.";
347 }
348 enum "poison-reverse" {
349 value 2;
350 description
351 "Enables split-horizon processing with poison
352 reverse.";
353 }
354 }
355 default "simple";
356 description
357 "Controls RIPng split-horizon processing on the specified
358 interface.";
359 }
360 }
361 }
362
363 /*
364 * RPCs
365 */
366 rpc clear-ripng-route {
367 description
368 "Clears RIPng routes from the IPv6 routing table and routes
369 redistributed into the RIPng protocol.";
c5b2b5f6
RW
370
371 input {
372 leaf vrf {
806defc8 373 type frr-vrf:vrf-ref;
c5b2b5f6
RW
374 description
375 "VRF name identifying a specific RIPng instance.
376 This leaf is optional for the rpc.
377 If it is specified, the rpc will clear all routes in the
378 specified RIPng instance;
379 if it is not specified, the rpc will clear all routes in
380 all RIPng instances.";
381 }
382 }
e9ce224b
RW
383 }
384}