]> git.proxmox.com Git - mirror_frr.git/blame - yang/frr-pim.yang
Merge pull request #9104 from idryzhov/topotest-multiline
[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 }
67aea150
RZ
116
117 grouping msdp-timers {
118 leaf hold-time {
119 type uint32 {
120 range 3..600;
121 }
122 units seconds;
123 default 75;
124 description
125 "Hold period is started at the MSDP peer connection establishment
126 and is reset every new message. When the period expires the
127 connection is closed.
128
129 This value needs to be greater than `keep-alive-period`.";
130 }
131
132 leaf keep-alive {
133 type uint32 {
134 range 2..600;
135 }
136 units seconds;
137 default 60;
138 description
139 "To maintain a connection established it is necessary to send
140 keep alive messages in a certain frequency and this allows its
141 configuration.
142
143 This value needs to be lesser than `hold-time-period`.";
144 }
145
146 leaf connection-retry {
147 type uint32 {
148 range 1..600;
149 }
150 units seconds;
151 default 30;
152 description
153 "This period is used in the MSDP peer with the highest IP value
154 in the pair and configures the interval between TCP connection
155 attempts.";
156 }
157 }
158
da787004
SP
159 grouping per-af-global-pim-config-attributes {
160 description
161 "A grouping defining per address family pim global attributes";
162
163 leaf send-v6-secondary {
164 when "../frr-pim:address-family = 'frr-rt:ipv4'" {
165 description
166 "Only applicable to IPv4 address family.";
167 }
9dc9724e
SP
168 type boolean;
169 default "true";
da787004
SP
170 description
171 "Send v6 secondary addresses.";
172 }
173
174 container spt-switchover {
175 description
176 "SPT-Switchover.";
177
178 leaf spt-action {
179 type enumeration {
180 enum "PIM_SPT_IMMEDIATE" {
181 value 0;
182 description
183 "Immediate switch to SPT Tree.";
184 }
185 enum "PIM_SPT_INFINITY" {
186 value 1;
187 description
188 "Never switch to SPT Tree.";
189 }
190 }
191 default "PIM_SPT_IMMEDIATE";
192 description
193 "SPT-Switchover action";
194 }
195
196 leaf spt-infinity-prefix-list {
197 when "../spt-action = 'PIM_SPT_INFINITY'" {
198 description
199 "This leaf is only valid when the spt action
200 is PIM_SPT_INFINITY.";
201 }
202 type plist-ref;
203 description
204 "Prefix-List to control which groups to switch.";
205 }
206 }
207
208 leaf ssm-prefix-list {
209 type plist-ref;
210 description
211 "Prefix-list used to define Source-Specific Multicast address range.";
212 }
213
214 leaf-list ssm-pingd-source-ip {
215 type inet:ip-address;
216 description
217 "Enable ssmpingd operation.";
218 }
219
67aea150
RZ
220 /* Global timers configuration. */
221 container msdp {
222 description "Global MSDP configuration.";
223 uses msdp-timers;
224 }
225
0213a658
RZ
226 list msdp-mesh-groups {
227 key "name";
228 description
229 "RFC 3618 Section 10.2. MSDP mesh-group semantics
230
231 Groups multiple MSDP peers to reduce SA flooding typically used
232 in intra-domain settings.";
da787004 233
0213a658
RZ
234 leaf name {
235 type string {
236 length 1..64;
237 }
da787004 238 description
0213a658 239 "The mesh group name.";
da787004
SP
240 }
241
0213a658 242 leaf source {
da787004
SP
243 type inet:ip-address;
244 description
0213a658 245 "Source IP address for the TCP connections.";
da787004
SP
246 }
247
0213a658
RZ
248 list members {
249 key "address";
250
251 leaf address {
252 type inet:ip-address;
253 description
254 "Peer member IP address.";
255 }
da787004
SP
256 }
257 }
258
259 list msdp-peer {
260 key "peer-ip";
261 description
262 "Configure MSDP peer.";
263
264 leaf peer-ip {
265 type inet:ip-address;
266 description
267 "MSDP peer IP address.";
268 }
269
270 leaf source-ip {
36df8a84 271 mandatory true;
da787004
SP
272 type inet:ip-address;
273 description
274 "MSDP source IP address.";
275 }
276 }
277
278 container mlag {
9dc9724e 279 presence
da787004
SP
280 "Multi-chassis link aggregation.";
281
282 leaf peerlink-rif {
283 type frr-interface:interface-ref;
284 description
285 "Outgoing interface name.";
286 }
287
288 leaf reg-address {
289 type inet:ip-address;
290 description
291 "reg address.";
292 }
293
294 leaf my-role {
295 type enumeration {
296 enum "MLAG_ROLE_NONE" {
297 value 0;
298 description
299 "MLAG role none.";
300 }
301 enum "MLAG_ROLE_PRIMARY" {
302 value 1;
303 description
304 "MLAG role primary.";
305 }
306
307 enum "MLAG_ROLE_SECONDARY" {
308 value 2;
309 description
310 "MLAG role secondary.";
311 }
312 }
313 default "MLAG_ROLE_NONE";
314 description
315 "Mlag role.";
316 }
317
318 leaf peer-state {
319 type boolean;
320 default "false";
321 description
322 "Peer state";
323 }
324 }
325
326 leaf register-accept-list {
327 type plist-ref;
328 description
329 "Only accept registers from a specific source prefix list.";
330 }
331 } // per-af-global-pim-config-attributes
332
333 grouping interface-pim-config-attributes {
334 description
335 "A grouping defining pim interface attributes.";
336
337 leaf pim-enable {
9dc9724e
SP
338 type boolean;
339 default "false";
da787004
SP
340 description
341 "Enable PIM flag on the interface.";
342 }
343
da787004 344 leaf hello-interval {
9dc9724e 345 type uint8 {
da787004
SP
346 range "1..180";
347 }
348 default "30";
349 description
350 "Hello interval";
351 }
352
353 leaf hello-holdtime {
14277453 354 type uint16 {
355 range "1..630";
da787004 356 }
899dd339
MR
357 must ". > ./../hello-interval" {
358 error-message "HoldTime must be greater than Hello";
359 }
da787004
SP
360 description
361 "Hello holdtime";
362 }
363
364 container bfd {
365 presence
366 "Enable BFD support on the interface.";
367
368 leaf min-rx-interval {
369 type uint16 {
370 range "50..60000";
371 }
372 default "300";
373 description
374 "Required min receive interval";
375 }
376
377 leaf min-tx-interval {
378 type uint16 {
379 range "50..60000";
380 }
381 default "300";
382 description
383 "Desired min transmit interval";
384 }
385
386 leaf detect_mult {
387 type uint8 {
388 range "2..255";
389 }
390 default "3";
391 description
392 "Detect Multiplier";
393 }
3544d257
RZ
394
395 leaf profile {
396 type string;
397 description
398 "Use a preconfigure BFD profile.";
399 }
da787004
SP
400 }
401
402 leaf bsm {
9dc9724e 403 type boolean;
3bb513c3 404 default "true";
da787004
SP
405 description
406 "Enables BSM support on the interface.";
407 }
408
409 leaf unicast-bsm {
9dc9724e 410 type boolean;
3bb513c3 411 default "true";
da787004
SP
412 description
413 "Accept/Send unicast BSM on the interface.";
414 }
415
416 leaf active-active {
9dc9724e
SP
417 type boolean;
418 default "false";
da787004
SP
419 description
420 "Mark interface as Active-Active for MLAG operations.";
421 }
9dc9724e
SP
422
423 leaf dr-priority {
424 type uint32 {
425 range "1..4294967295";
426 }
427 default 1;
428 description
429 "DR (Designated Router) priority";
430 }
da787004
SP
431 } // interface-pim-config-attributes
432
433 grouping per-af-interface-pim-config-attributes {
434 description
435 "A grouping defining pim interface attributes per address family.";
436
437 leaf use-source {
438 type inet:ip-address;
439 description
440 "Primary address of the interface set by user.";
441 }
442
443 leaf multicast-boundary-oil {
444 type plist-ref;
445 description
446 "Prefix-List to define multicast boundary";
447 }
448
449 list mroute {
450 key "source-addr group-addr";
451 description
452 "Add multicast route.";
453
454 leaf oif {
455 type frr-interface:interface-ref;
456 description
457 "Outgoing interface name.";
458 }
459
460 leaf source-addr {
461 type inet:ip-address;
462 description
463 "Multicast source address.";
464 }
465
466 leaf group-addr {
467 type rt-types:ip-multicast-group-address;
468 description
469 "Multicast group address.";
470 }
471 }
472 } // per-af-interface-pim-config-attributes
473
474 /*
475 * Global Configuration data nodes
476 */
477 augment "/frr-rt:routing/frr-rt:control-plane-protocols/"
478 + "frr-rt:control-plane-protocol" {
479 container pim {
480 when "../frr-rt:type = 'frr-pim:pimd'" {
481 description
482 "This container is only valid for the 'pim' routing
483 protocol.";
484 }
485 description
486 "PIM configuration data.";
487
488 uses global-pim-config-attributes;
489
490 list address-family {
491 key "address-family";
492 description
493 "Each list entry for one address family.";
494 uses frr-rt:address-family;
495 uses per-af-global-pim-config-attributes;
496
497 } //address-family
498 } // pim
499 } // augment
500
501 /*
502 * Per-interface configuration data
503 */
504 augment "/frr-interface:lib/frr-interface:interface" {
505 container pim {
9dc9724e
SP
506 presence
507 "Configure PIM on an interface.";
da787004
SP
508 uses interface-pim-config-attributes;
509 list address-family {
510 key "address-family";
511 description
512 "Each list entry for one address family.";
513 uses frr-rt:address-family;
514 uses per-af-interface-pim-config-attributes;
515 }
516 }
517 }
da787004 518
9dc9724e
SP
519 container pim {
520 description
521 "PIM router parameters.";
522 leaf packets {
523 type uint8 {
524 range "1..100";
525 }
526 default "3";
527 description
528 "Number of packets to process at one time per fd.";
529 }
530 leaf join-prune-interval {
531 type uint16 {
53dc1b16 532 range "5..600";
9dc9724e
SP
533 }
534 default "60";
535 description
536 "Join Prune Send Interval in seconds.";
537 }
538 leaf register-suppress-time {
539 type uint16 {
540 range "5..60000";
541 }
542 default "60";
543 description
544 "Register Suppress Timer.";
545 }
546 }
547}