]> git.proxmox.com Git - mirror_frr.git/blame - yang/frr-ripngd.yang
Merge pull request #4253 from qlyoung/zapi-handler-args-macro
[mirror_frr.git] / yang / frr-ripngd.yang
CommitLineData
e9ce224b
RW
1module 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 }
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 ripngd daemon.";
26
27 revision 2018-11-27 {
28 description
29 "Initial revision.";
30 reference
31 "RFC 2080: RIPng for IPv6.";
32 }
33
34 container ripngd {
35 /*
dde7b15b 36 * Routing instance configuration.
e9ce224b 37 */
dde7b15b
RW
38 list instance {
39 key "vrf";
e9ce224b
RW
40 description
41 "RIPng routing instance.";
42
dde7b15b
RW
43 leaf vrf {
44 type string;
45 description
46 "VRF name.";
47 }
e9ce224b
RW
48 leaf allow-ecmp {
49 type boolean;
50 default "false";
51 description
52 "Allow equal-cost multi-path.";
53 }
54 leaf default-information-originate {
55 type boolean;
56 default "false";
57 description
58 "Control distribution of default route.";
59 }
60 leaf default-metric {
61 type uint8 {
62 range "1..16";
63 }
64 default "1";
65 description
66 "Default metric of redistributed routes.";
67 }
68 leaf-list network {
69 type inet:ipv6-prefix;
70 description
71 "Enable RIPng on the specified IPv6 network.";
72 }
73 leaf-list interface {
74 type string {
75 length "1..16";
76 }
77 description
78 "Enable RIPng on the specified interface.";
79 }
80 list offset-list {
81 key "interface direction";
82 description
83 "Offset-list to modify route metric.";
84 leaf interface {
85 type string;
86 description
87 "Interface to match. Use '*' to match all interfaces.";
88 }
89 leaf direction {
90 type enumeration {
91 enum in {
92 value 0;
93 description
94 "Incoming updates.";
95 }
96 enum out {
97 value 1;
98 description
99 "Outgoing updates.";
100 }
101 }
102 description
103 "Incoming or outgoing updates.";
104 }
105 leaf access-list {
106 type string;
107 mandatory true;
108 description
109 "Access-list name.";
110 }
111 leaf metric {
112 type uint8 {
113 range "0..16";
114 }
115 mandatory true;
116 description
117 "Route metric.";
118 }
119 }
120 leaf-list passive-interface {
121 type string {
122 length "1..16";
123 }
124 description
125 "A list of interfaces where the sending of RIPng packets
126 is disabled.";
127 }
128 list redistribute {
129 key "protocol";
130 description
131 "Redistributes routes learned from other routing protocols.";
132 leaf protocol {
133 type frr-route-types:frr-route-types-v6;
134 description
135 "Routing protocol.";
136 must '. != "ripng"';
137 }
138 leaf route-map {
139 type string {
140 length "1..max";
141 }
142 description
143 "Applies the conditions of the specified route-map to
144 routes that are redistributed into the RIPng routing
145 instance.";
146 }
147 leaf metric {
148 type uint8 {
149 range "0..16";
150 }
151 description
152 "Metric used for the redistributed route. If a metric is
153 not specified, the metric configured with the
154 default-metric attribute in RIPng router configuration is
155 used. If the default-metric attribute has not been
156 configured, the default metric for redistributed routes
157 is 0.";
158 }
159 }
160 leaf-list static-route {
161 type inet:ipv6-prefix;
162 description
163 "RIPng static routes.";
164 }
165 leaf-list aggregate-address {
166 type inet:ipv6-prefix;
167 description
168 "RIPng aggregate route announcement.";
169 }
170 container timers {
171 description
172 "Settings of basic timers";
173 leaf flush-interval {
174 type uint16 {
175 range "1..65535";
176 }
177 units "seconds";
178 default "120";
179 description
180 "Interval before a route is flushed from the routing
181 table.";
182 }
183 leaf holddown-interval {
184 type uint16 {
185 range "1..65535";
186 }
187 units "seconds";
188 default "180";
189 description
190 "Interval before better routes are released.";
191 }
192 leaf update-interval {
193 type uint16 {
194 range "1..65535";
195 }
196 units "seconds";
197 default "30";
198 description
199 "Interval at which RIPng updates are sent.";
200 }
201 }
e9ce224b 202
80cf4e45
RW
203 /*
204 * Operational data.
205 */
206 container state {
207 config false;
e9ce224b 208 description
80cf4e45
RW
209 "Operational data.";
210
211 container neighbors {
e9ce224b 212 description
80cf4e45
RW
213 "Neighbor information.";
214 list neighbor {
215 key "address";
e9ce224b 216 description
80cf4e45
RW
217 "A RIPng neighbor.";
218 leaf address {
219 type inet:ipv6-address;
220 description
221 "IPv6 address that a RIPng neighbor is using as its
222 source address.";
223 }
224 leaf last-update {
225 type yang:date-and-time;
226 description
227 "The time when the most recent RIPng update was
228 received from this neighbor.";
229 }
230 leaf bad-packets-rcvd {
231 type yang:counter32;
232 description
233 "The number of RIPng invalid packets received from
234 this neighbor which were subsequently discarded
235 for any reason (e.g. a version 0 packet, or an
236 unknown command type).";
237 }
238 leaf bad-routes-rcvd {
239 type yang:counter32;
240 description
241 "The number of routes received from this neighbor,
242 in valid RIPng packets, which were ignored for any
243 reason (e.g. unknown address family, or invalid
244 metric).";
245 }
e9ce224b
RW
246 }
247 }
80cf4e45 248 container routes {
e9ce224b 249 description
80cf4e45
RW
250 "Route information.";
251 list route {
252 key "prefix";
e9ce224b 253 description
80cf4e45
RW
254 "A RIPng IPv6 route.";
255 leaf prefix {
256 type inet:ipv6-prefix;
257 description
258 "IPv6 address and prefix length, in the format
259 specified in RFC6991.";
260 }
261 leaf next-hop {
262 type inet:ipv6-address;
263 description
264 "Next hop IPv6 address.";
265 }
266 leaf interface {
267 type string;
268 description
269 "The interface that the route uses.";
270 }
271 leaf metric {
272 type uint8 {
273 range "0..16";
274 }
275 description
276 "Route metric.";
e9ce224b 277 }
e9ce224b
RW
278 }
279 }
280 }
281 }
282 }
283
284 /*
285 * Per-interface configuration data
286 */
287 augment "/frr-interface:lib/frr-interface:interface" {
288 container ripng {
289 description
290 "RIPng interface parameters.";
291 leaf split-horizon {
292 type enumeration {
293 enum "disabled" {
294 value 0;
295 description
296 "Disables split-horizon processing.";
297 }
298 enum "simple" {
299 value 1;
300 description
301 "Enables simple split-horizon processing.";
302 }
303 enum "poison-reverse" {
304 value 2;
305 description
306 "Enables split-horizon processing with poison
307 reverse.";
308 }
309 }
310 default "simple";
311 description
312 "Controls RIPng split-horizon processing on the specified
313 interface.";
314 }
315 }
316 }
317
318 /*
319 * RPCs
320 */
321 rpc clear-ripng-route {
322 description
323 "Clears RIPng routes from the IPv6 routing table and routes
324 redistributed into the RIPng protocol.";
c5b2b5f6
RW
325
326 input {
327 leaf vrf {
328 type string;
329 description
330 "VRF name identifying a specific RIPng instance.
331 This leaf is optional for the rpc.
332 If it is specified, the rpc will clear all routes in the
333 specified RIPng instance;
334 if it is not specified, the rpc will clear all routes in
335 all RIPng instances.";
336 }
337 }
e9ce224b
RW
338 }
339}