]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-pim.yang
Merge pull request #8616 from donaldsharp/pim_ordering
[mirror_frr.git] / yang / frr-pim.yang
1 module 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
24 "FRRouting";
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
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.";
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 {
85 type boolean;
86 default "false";
87 description
88 "Enable PIM ECMP.";
89 }
90
91 leaf ecmp-rebalance {
92 type boolean;
93 default "false";
94 description
95 "Enable PIM ECMP Rebalance.";
96 }
97
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 }
115 }
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 }
125 type boolean;
126 default "true";
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 {
219 presence
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 {
278 type boolean;
279 default "false";
280 description
281 "Enable PIM flag on the interface.";
282 }
283
284 leaf hello-interval {
285 type uint8 {
286 range "1..180";
287 }
288 default "30";
289 description
290 "Hello interval";
291 }
292
293 leaf hello-holdtime {
294 type uint8 {
295 range "1..180";
296 }
297 must ". > ./../hello-interval" {
298 error-message "HoldTime must be greater than Hello";
299 }
300 description
301 "Hello holdtime";
302 }
303
304 container bfd {
305 presence
306 "Enable BFD support on the interface.";
307
308 leaf min-rx-interval {
309 type uint16 {
310 range "50..60000";
311 }
312 default "300";
313 description
314 "Required min receive interval";
315 }
316
317 leaf min-tx-interval {
318 type uint16 {
319 range "50..60000";
320 }
321 default "300";
322 description
323 "Desired min transmit interval";
324 }
325
326 leaf detect_mult {
327 type uint8 {
328 range "2..255";
329 }
330 default "3";
331 description
332 "Detect Multiplier";
333 }
334
335 leaf profile {
336 type string;
337 description
338 "Use a preconfigure BFD profile.";
339 }
340 }
341
342 leaf bsm {
343 type boolean;
344 default "true";
345 description
346 "Enables BSM support on the interface.";
347 }
348
349 leaf unicast-bsm {
350 type boolean;
351 default "true";
352 description
353 "Accept/Send unicast BSM on the interface.";
354 }
355
356 leaf active-active {
357 type boolean;
358 default "false";
359 description
360 "Mark interface as Active-Active for MLAG operations.";
361 }
362
363 leaf dr-priority {
364 type uint32 {
365 range "1..4294967295";
366 }
367 default 1;
368 description
369 "DR (Designated Router) priority";
370 }
371 } // interface-pim-config-attributes
372
373 grouping per-af-interface-pim-config-attributes {
374 description
375 "A grouping defining pim interface attributes per address family.";
376
377 leaf use-source {
378 type inet:ip-address;
379 description
380 "Primary address of the interface set by user.";
381 }
382
383 leaf multicast-boundary-oil {
384 type plist-ref;
385 description
386 "Prefix-List to define multicast boundary";
387 }
388
389 list mroute {
390 key "source-addr group-addr";
391 description
392 "Add multicast route.";
393
394 leaf oif {
395 type frr-interface:interface-ref;
396 description
397 "Outgoing interface name.";
398 }
399
400 leaf source-addr {
401 type inet:ip-address;
402 description
403 "Multicast source address.";
404 }
405
406 leaf group-addr {
407 type rt-types:ip-multicast-group-address;
408 description
409 "Multicast group address.";
410 }
411 }
412 } // per-af-interface-pim-config-attributes
413
414 /*
415 * Global Configuration data nodes
416 */
417 augment "/frr-rt:routing/frr-rt:control-plane-protocols/"
418 + "frr-rt:control-plane-protocol" {
419 container pim {
420 when "../frr-rt:type = 'frr-pim:pimd'" {
421 description
422 "This container is only valid for the 'pim' routing
423 protocol.";
424 }
425 description
426 "PIM configuration data.";
427
428 uses global-pim-config-attributes;
429
430 list address-family {
431 key "address-family";
432 description
433 "Each list entry for one address family.";
434 uses frr-rt:address-family;
435 uses per-af-global-pim-config-attributes;
436
437 } //address-family
438 } // pim
439 } // augment
440
441 /*
442 * Per-interface configuration data
443 */
444 augment "/frr-interface:lib/frr-interface:interface" {
445 container pim {
446 presence
447 "Configure PIM on an interface.";
448 uses interface-pim-config-attributes;
449 list address-family {
450 key "address-family";
451 description
452 "Each list entry for one address family.";
453 uses frr-rt:address-family;
454 uses per-af-interface-pim-config-attributes;
455 }
456 }
457 }
458
459 container pim {
460 description
461 "PIM router parameters.";
462 leaf packets {
463 type uint8 {
464 range "1..100";
465 }
466 default "3";
467 description
468 "Number of packets to process at one time per fd.";
469 }
470 leaf join-prune-interval {
471 type uint16 {
472 range "60..600";
473 }
474 default "60";
475 description
476 "Join Prune Send Interval in seconds.";
477 }
478 leaf register-suppress-time {
479 type uint16 {
480 range "5..60000";
481 }
482 default "60";
483 description
484 "Register Suppress Timer.";
485 }
486 }
487 }