]>
Commit | Line | Data |
---|---|---|
da787004 SP |
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 | |
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 | ||
0213a658 RZ |
177 | list msdp-mesh-groups { |
178 | key "name"; | |
179 | description | |
180 | "RFC 3618 Section 10.2. MSDP mesh-group semantics | |
181 | ||
182 | Groups multiple MSDP peers to reduce SA flooding typically used | |
183 | in intra-domain settings."; | |
da787004 | 184 | |
0213a658 RZ |
185 | leaf name { |
186 | type string { | |
187 | length 1..64; | |
188 | } | |
da787004 | 189 | description |
0213a658 | 190 | "The mesh group name."; |
da787004 SP |
191 | } |
192 | ||
0213a658 | 193 | leaf source { |
da787004 SP |
194 | type inet:ip-address; |
195 | description | |
0213a658 | 196 | "Source IP address for the TCP connections."; |
da787004 SP |
197 | } |
198 | ||
0213a658 RZ |
199 | list members { |
200 | key "address"; | |
201 | ||
202 | leaf address { | |
203 | type inet:ip-address; | |
204 | description | |
205 | "Peer member IP address."; | |
206 | } | |
da787004 SP |
207 | } |
208 | } | |
209 | ||
210 | list msdp-peer { | |
211 | key "peer-ip"; | |
212 | description | |
213 | "Configure MSDP peer."; | |
214 | ||
215 | leaf peer-ip { | |
216 | type inet:ip-address; | |
217 | description | |
218 | "MSDP peer IP address."; | |
219 | } | |
220 | ||
221 | leaf source-ip { | |
36df8a84 | 222 | mandatory true; |
da787004 SP |
223 | type inet:ip-address; |
224 | description | |
225 | "MSDP source IP address."; | |
226 | } | |
227 | } | |
228 | ||
229 | container mlag { | |
9dc9724e | 230 | presence |
da787004 SP |
231 | "Multi-chassis link aggregation."; |
232 | ||
233 | leaf peerlink-rif { | |
234 | type frr-interface:interface-ref; | |
235 | description | |
236 | "Outgoing interface name."; | |
237 | } | |
238 | ||
239 | leaf reg-address { | |
240 | type inet:ip-address; | |
241 | description | |
242 | "reg address."; | |
243 | } | |
244 | ||
245 | leaf my-role { | |
246 | type enumeration { | |
247 | enum "MLAG_ROLE_NONE" { | |
248 | value 0; | |
249 | description | |
250 | "MLAG role none."; | |
251 | } | |
252 | enum "MLAG_ROLE_PRIMARY" { | |
253 | value 1; | |
254 | description | |
255 | "MLAG role primary."; | |
256 | } | |
257 | ||
258 | enum "MLAG_ROLE_SECONDARY" { | |
259 | value 2; | |
260 | description | |
261 | "MLAG role secondary."; | |
262 | } | |
263 | } | |
264 | default "MLAG_ROLE_NONE"; | |
265 | description | |
266 | "Mlag role."; | |
267 | } | |
268 | ||
269 | leaf peer-state { | |
270 | type boolean; | |
271 | default "false"; | |
272 | description | |
273 | "Peer state"; | |
274 | } | |
275 | } | |
276 | ||
277 | leaf register-accept-list { | |
278 | type plist-ref; | |
279 | description | |
280 | "Only accept registers from a specific source prefix list."; | |
281 | } | |
282 | } // per-af-global-pim-config-attributes | |
283 | ||
284 | grouping interface-pim-config-attributes { | |
285 | description | |
286 | "A grouping defining pim interface attributes."; | |
287 | ||
288 | leaf pim-enable { | |
9dc9724e SP |
289 | type boolean; |
290 | default "false"; | |
da787004 SP |
291 | description |
292 | "Enable PIM flag on the interface."; | |
293 | } | |
294 | ||
da787004 | 295 | leaf hello-interval { |
9dc9724e | 296 | type uint8 { |
da787004 SP |
297 | range "1..180"; |
298 | } | |
299 | default "30"; | |
300 | description | |
301 | "Hello interval"; | |
302 | } | |
303 | ||
304 | leaf hello-holdtime { | |
9dc9724e | 305 | type uint8 { |
da787004 SP |
306 | range "1..180"; |
307 | } | |
899dd339 MR |
308 | must ". > ./../hello-interval" { |
309 | error-message "HoldTime must be greater than Hello"; | |
310 | } | |
da787004 SP |
311 | description |
312 | "Hello holdtime"; | |
313 | } | |
314 | ||
315 | container bfd { | |
316 | presence | |
317 | "Enable BFD support on the interface."; | |
318 | ||
319 | leaf min-rx-interval { | |
320 | type uint16 { | |
321 | range "50..60000"; | |
322 | } | |
323 | default "300"; | |
324 | description | |
325 | "Required min receive interval"; | |
326 | } | |
327 | ||
328 | leaf min-tx-interval { | |
329 | type uint16 { | |
330 | range "50..60000"; | |
331 | } | |
332 | default "300"; | |
333 | description | |
334 | "Desired min transmit interval"; | |
335 | } | |
336 | ||
337 | leaf detect_mult { | |
338 | type uint8 { | |
339 | range "2..255"; | |
340 | } | |
341 | default "3"; | |
342 | description | |
343 | "Detect Multiplier"; | |
344 | } | |
3544d257 RZ |
345 | |
346 | leaf profile { | |
347 | type string; | |
348 | description | |
349 | "Use a preconfigure BFD profile."; | |
350 | } | |
da787004 SP |
351 | } |
352 | ||
353 | leaf bsm { | |
9dc9724e | 354 | type boolean; |
3bb513c3 | 355 | default "true"; |
da787004 SP |
356 | description |
357 | "Enables BSM support on the interface."; | |
358 | } | |
359 | ||
360 | leaf unicast-bsm { | |
9dc9724e | 361 | type boolean; |
3bb513c3 | 362 | default "true"; |
da787004 SP |
363 | description |
364 | "Accept/Send unicast BSM on the interface."; | |
365 | } | |
366 | ||
367 | leaf active-active { | |
9dc9724e SP |
368 | type boolean; |
369 | default "false"; | |
da787004 SP |
370 | description |
371 | "Mark interface as Active-Active for MLAG operations."; | |
372 | } | |
9dc9724e SP |
373 | |
374 | leaf dr-priority { | |
375 | type uint32 { | |
376 | range "1..4294967295"; | |
377 | } | |
378 | default 1; | |
379 | description | |
380 | "DR (Designated Router) priority"; | |
381 | } | |
da787004 SP |
382 | } // interface-pim-config-attributes |
383 | ||
384 | grouping per-af-interface-pim-config-attributes { | |
385 | description | |
386 | "A grouping defining pim interface attributes per address family."; | |
387 | ||
388 | leaf use-source { | |
389 | type inet:ip-address; | |
390 | description | |
391 | "Primary address of the interface set by user."; | |
392 | } | |
393 | ||
394 | leaf multicast-boundary-oil { | |
395 | type plist-ref; | |
396 | description | |
397 | "Prefix-List to define multicast boundary"; | |
398 | } | |
399 | ||
400 | list mroute { | |
401 | key "source-addr group-addr"; | |
402 | description | |
403 | "Add multicast route."; | |
404 | ||
405 | leaf oif { | |
406 | type frr-interface:interface-ref; | |
407 | description | |
408 | "Outgoing interface name."; | |
409 | } | |
410 | ||
411 | leaf source-addr { | |
412 | type inet:ip-address; | |
413 | description | |
414 | "Multicast source address."; | |
415 | } | |
416 | ||
417 | leaf group-addr { | |
418 | type rt-types:ip-multicast-group-address; | |
419 | description | |
420 | "Multicast group address."; | |
421 | } | |
422 | } | |
423 | } // per-af-interface-pim-config-attributes | |
424 | ||
425 | /* | |
426 | * Global Configuration data nodes | |
427 | */ | |
428 | augment "/frr-rt:routing/frr-rt:control-plane-protocols/" | |
429 | + "frr-rt:control-plane-protocol" { | |
430 | container pim { | |
431 | when "../frr-rt:type = 'frr-pim:pimd'" { | |
432 | description | |
433 | "This container is only valid for the 'pim' routing | |
434 | protocol."; | |
435 | } | |
436 | description | |
437 | "PIM configuration data."; | |
438 | ||
439 | uses global-pim-config-attributes; | |
440 | ||
441 | list address-family { | |
442 | key "address-family"; | |
443 | description | |
444 | "Each list entry for one address family."; | |
445 | uses frr-rt:address-family; | |
446 | uses per-af-global-pim-config-attributes; | |
447 | ||
448 | } //address-family | |
449 | } // pim | |
450 | } // augment | |
451 | ||
452 | /* | |
453 | * Per-interface configuration data | |
454 | */ | |
455 | augment "/frr-interface:lib/frr-interface:interface" { | |
456 | container pim { | |
9dc9724e SP |
457 | presence |
458 | "Configure PIM on an interface."; | |
da787004 SP |
459 | uses interface-pim-config-attributes; |
460 | list address-family { | |
461 | key "address-family"; | |
462 | description | |
463 | "Each list entry for one address family."; | |
464 | uses frr-rt:address-family; | |
465 | uses per-af-interface-pim-config-attributes; | |
466 | } | |
467 | } | |
468 | } | |
da787004 | 469 | |
9dc9724e SP |
470 | container pim { |
471 | description | |
472 | "PIM router parameters."; | |
473 | leaf packets { | |
474 | type uint8 { | |
475 | range "1..100"; | |
476 | } | |
477 | default "3"; | |
478 | description | |
479 | "Number of packets to process at one time per fd."; | |
480 | } | |
481 | leaf join-prune-interval { | |
482 | type uint16 { | |
483 | range "60..600"; | |
484 | } | |
485 | default "60"; | |
486 | description | |
487 | "Join Prune Send Interval in seconds."; | |
488 | } | |
489 | leaf register-suppress-time { | |
490 | type uint16 { | |
491 | range "5..60000"; | |
492 | } | |
493 | default "60"; | |
494 | description | |
495 | "Register Suppress Timer."; | |
496 | } | |
497 | } | |
498 | } |