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