]> git.proxmox.com Git - mirror_frr.git/blame - yang/frr-pim.yang
Merge pull request #8318 from qlyoung/improve-lua-autoconf-detection
[mirror_frr.git] / yang / frr-pim.yang
CommitLineData
da787004
SP
1module frr-pim {
2 yang-version "1.1";
3 namespace "http://frrouting.org/yang/pim";
4
5 prefix frr-pim;
6
7 import frr-interface {
8 prefix frr-interface;
9 }
10
11 import frr-routing {
12 prefix "frr-rt";
13 }
14
15 import ietf-routing-types {
16 prefix "rt-types";
17 }
18
19 import ietf-inet-types {
20 prefix "inet";
21 }
22
23 organization
78891caf 24 "FRRouting";
da787004
SP
25
26 contact
27 "FRR Users List: <mailto:frog@lists.frrouting.org>
28 FRR Development List: <mailto:dev@lists.frrouting.org>";
29
30 description
31 "The module defines a collection of YANG definitions common for
fe3b629a
RW
32 PIM (Protocol Independent Multicast) model.
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.";
da787004
SP
58
59 revision 2017-03-09 {
60 description
61 "Initial revision.";
62 reference
63 "RFC XXXX: A YANG Data Model for PIM";
64 }
65
66 identity pimd {
67 base frr-rt:routing-protocol;
68 description
69 "'Pim' routing pseudo-protocol.";
70 }
71
72 typedef plist-ref {
73 type string;
74 }
75
76 /*
77 * Groupings
78 */
79
80 grouping global-pim-config-attributes {
81 description
82 "A grouping defining pim global attributes.";
83
84 leaf ecmp {
9dc9724e
SP
85 type boolean;
86 default "false";
da787004
SP
87 description
88 "Enable PIM ECMP.";
89 }
90
91 leaf ecmp-rebalance {
9dc9724e
SP
92 type boolean;
93 default "false";
da787004
SP
94 description
95 "Enable PIM ECMP Rebalance.";
96 }
97
da787004
SP
98 leaf keep-alive-timer {
99 type uint16 {
100 range "31..60000";
101 }
102 default "210";
103 description
104 "Keep alive Timer in seconds.";
105 }
106
107 leaf rp-keep-alive-timer {
108 type uint16 {
109 range "31..60000";
110 }
111 default "210";
112 description
113 "RP keep alive Timer in seconds.";
114 }
da787004 115 }
da787004
SP
116 grouping per-af-global-pim-config-attributes {
117 description
118 "A grouping defining per address family pim global attributes";
119
120 leaf send-v6-secondary {
121 when "../frr-pim:address-family = 'frr-rt:ipv4'" {
122 description
123 "Only applicable to IPv4 address family.";
124 }
9dc9724e
SP
125 type boolean;
126 default "true";
da787004
SP
127 description
128 "Send v6 secondary addresses.";
129 }
130
131 container spt-switchover {
132 description
133 "SPT-Switchover.";
134
135 leaf spt-action {
136 type enumeration {
137 enum "PIM_SPT_IMMEDIATE" {
138 value 0;
139 description
140 "Immediate switch to SPT Tree.";
141 }
142 enum "PIM_SPT_INFINITY" {
143 value 1;
144 description
145 "Never switch to SPT Tree.";
146 }
147 }
148 default "PIM_SPT_IMMEDIATE";
149 description
150 "SPT-Switchover action";
151 }
152
153 leaf spt-infinity-prefix-list {
154 when "../spt-action = 'PIM_SPT_INFINITY'" {
155 description
156 "This leaf is only valid when the spt action
157 is PIM_SPT_INFINITY.";
158 }
159 type plist-ref;
160 description
161 "Prefix-List to control which groups to switch.";
162 }
163 }
164
165 leaf ssm-prefix-list {
166 type plist-ref;
167 description
168 "Prefix-list used to define Source-Specific Multicast address range.";
169 }
170
171 leaf-list ssm-pingd-source-ip {
172 type inet:ip-address;
173 description
174 "Enable ssmpingd operation.";
175 }
176
177 container msdp-mesh-group {
178 presence
179 "Configure MSDP mesh-group.";
180
181 leaf mesh-group-name {
182 type string;
183 description
184 "MSDP mesh group name.";
185 }
186
187 leaf-list member-ip {
188 type inet:ip-address;
189 description
190 "Peer ip address.";
191 }
192
193 leaf source-ip {
194 type inet:ip-address;
195 description
196 "Source ip address for the TCP connection.";
197 }
198 }
199
200 list msdp-peer {
201 key "peer-ip";
202 description
203 "Configure MSDP peer.";
204
205 leaf peer-ip {
206 type inet:ip-address;
207 description
208 "MSDP peer IP address.";
209 }
210
211 leaf source-ip {
212 type inet:ip-address;
213 description
214 "MSDP source IP address.";
215 }
216 }
217
218 container mlag {
9dc9724e 219 presence
da787004
SP
220 "Multi-chassis link aggregation.";
221
222 leaf peerlink-rif {
223 type frr-interface:interface-ref;
224 description
225 "Outgoing interface name.";
226 }
227
228 leaf reg-address {
229 type inet:ip-address;
230 description
231 "reg address.";
232 }
233
234 leaf my-role {
235 type enumeration {
236 enum "MLAG_ROLE_NONE" {
237 value 0;
238 description
239 "MLAG role none.";
240 }
241 enum "MLAG_ROLE_PRIMARY" {
242 value 1;
243 description
244 "MLAG role primary.";
245 }
246
247 enum "MLAG_ROLE_SECONDARY" {
248 value 2;
249 description
250 "MLAG role secondary.";
251 }
252 }
253 default "MLAG_ROLE_NONE";
254 description
255 "Mlag role.";
256 }
257
258 leaf peer-state {
259 type boolean;
260 default "false";
261 description
262 "Peer state";
263 }
264 }
265
266 leaf register-accept-list {
267 type plist-ref;
268 description
269 "Only accept registers from a specific source prefix list.";
270 }
271 } // per-af-global-pim-config-attributes
272
273 grouping interface-pim-config-attributes {
274 description
275 "A grouping defining pim interface attributes.";
276
277 leaf pim-enable {
9dc9724e
SP
278 type boolean;
279 default "false";
da787004
SP
280 description
281 "Enable PIM flag on the interface.";
282 }
283
da787004 284 leaf hello-interval {
9dc9724e 285 type uint8 {
da787004
SP
286 range "1..180";
287 }
288 default "30";
289 description
290 "Hello interval";
291 }
292
293 leaf hello-holdtime {
9dc9724e 294 type uint8 {
da787004
SP
295 range "1..180";
296 }
297 description
298 "Hello holdtime";
299 }
300
301 container bfd {
302 presence
303 "Enable BFD support on the interface.";
304
305 leaf min-rx-interval {
306 type uint16 {
307 range "50..60000";
308 }
309 default "300";
310 description
311 "Required min receive interval";
312 }
313
314 leaf min-tx-interval {
315 type uint16 {
316 range "50..60000";
317 }
318 default "300";
319 description
320 "Desired min transmit interval";
321 }
322
323 leaf detect_mult {
324 type uint8 {
325 range "2..255";
326 }
327 default "3";
328 description
329 "Detect Multiplier";
330 }
331 }
332
333 leaf bsm {
9dc9724e
SP
334 type boolean;
335 default "false";
da787004
SP
336 description
337 "Enables BSM support on the interface.";
338 }
339
340 leaf unicast-bsm {
9dc9724e
SP
341 type boolean;
342 default "false";
da787004
SP
343 description
344 "Accept/Send unicast BSM on the interface.";
345 }
346
347 leaf active-active {
9dc9724e
SP
348 type boolean;
349 default "false";
da787004
SP
350 description
351 "Mark interface as Active-Active for MLAG operations.";
352 }
9dc9724e
SP
353
354 leaf dr-priority {
355 type uint32 {
356 range "1..4294967295";
357 }
358 default 1;
359 description
360 "DR (Designated Router) priority";
361 }
da787004
SP
362 } // interface-pim-config-attributes
363
364 grouping per-af-interface-pim-config-attributes {
365 description
366 "A grouping defining pim interface attributes per address family.";
367
368 leaf use-source {
369 type inet:ip-address;
370 description
371 "Primary address of the interface set by user.";
372 }
373
374 leaf multicast-boundary-oil {
375 type plist-ref;
376 description
377 "Prefix-List to define multicast boundary";
378 }
379
380 list mroute {
381 key "source-addr group-addr";
382 description
383 "Add multicast route.";
384
385 leaf oif {
386 type frr-interface:interface-ref;
387 description
388 "Outgoing interface name.";
389 }
390
391 leaf source-addr {
392 type inet:ip-address;
393 description
394 "Multicast source address.";
395 }
396
397 leaf group-addr {
398 type rt-types:ip-multicast-group-address;
399 description
400 "Multicast group address.";
401 }
402 }
403 } // per-af-interface-pim-config-attributes
404
405 /*
406 * Global Configuration data nodes
407 */
408 augment "/frr-rt:routing/frr-rt:control-plane-protocols/"
409 + "frr-rt:control-plane-protocol" {
410 container pim {
411 when "../frr-rt:type = 'frr-pim:pimd'" {
412 description
413 "This container is only valid for the 'pim' routing
414 protocol.";
415 }
416 description
417 "PIM configuration data.";
418
419 uses global-pim-config-attributes;
420
421 list address-family {
422 key "address-family";
423 description
424 "Each list entry for one address family.";
425 uses frr-rt:address-family;
426 uses per-af-global-pim-config-attributes;
427
428 } //address-family
429 } // pim
430 } // augment
431
432 /*
433 * Per-interface configuration data
434 */
435 augment "/frr-interface:lib/frr-interface:interface" {
436 container pim {
9dc9724e
SP
437 presence
438 "Configure PIM on an interface.";
da787004
SP
439 uses interface-pim-config-attributes;
440 list address-family {
441 key "address-family";
442 description
443 "Each list entry for one address family.";
444 uses frr-rt:address-family;
445 uses per-af-interface-pim-config-attributes;
446 }
447 }
448 }
da787004 449
9dc9724e
SP
450 container pim {
451 description
452 "PIM router parameters.";
453 leaf packets {
454 type uint8 {
455 range "1..100";
456 }
457 default "3";
458 description
459 "Number of packets to process at one time per fd.";
460 }
461 leaf join-prune-interval {
462 type uint16 {
463 range "60..600";
464 }
465 default "60";
466 description
467 "Join Prune Send Interval in seconds.";
468 }
469 leaf register-suppress-time {
470 type uint16 {
471 range "5..60000";
472 }
473 default "60";
474 description
475 "Register Suppress Timer.";
476 }
477 }
478}