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