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