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