]>
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 | |
24 | "Free Range Routing"; | |
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 | revision 2017-03-09 { | |
35 | description | |
36 | "Initial revision."; | |
37 | reference | |
38 | "RFC XXXX: A YANG Data Model for PIM"; | |
39 | } | |
40 | ||
41 | identity pimd { | |
42 | base frr-rt:routing-protocol; | |
43 | description | |
44 | "'Pim' routing pseudo-protocol."; | |
45 | } | |
46 | ||
47 | typedef plist-ref { | |
48 | type string; | |
49 | } | |
50 | ||
51 | /* | |
52 | * Groupings | |
53 | */ | |
54 | ||
55 | grouping global-pim-config-attributes { | |
56 | description | |
57 | "A grouping defining pim global attributes."; | |
58 | ||
59 | leaf ecmp { | |
60 | type empty; | |
61 | description | |
62 | "Enable PIM ECMP."; | |
63 | } | |
64 | ||
65 | leaf ecmp-rebalance { | |
66 | type empty; | |
67 | description | |
68 | "Enable PIM ECMP Rebalance."; | |
69 | } | |
70 | ||
71 | leaf join-prune-interval { | |
72 | type uint16 { | |
73 | range "60..600"; | |
74 | } | |
75 | default "60"; | |
76 | description | |
77 | "Join Prune Send Interval in seconds."; | |
78 | } | |
79 | ||
80 | leaf keep-alive-timer { | |
81 | type uint16 { | |
82 | range "31..60000"; | |
83 | } | |
84 | default "210"; | |
85 | description | |
86 | "Keep alive Timer in seconds."; | |
87 | } | |
88 | ||
89 | leaf rp-keep-alive-timer { | |
90 | type uint16 { | |
91 | range "31..60000"; | |
92 | } | |
93 | default "210"; | |
94 | description | |
95 | "RP keep alive Timer in seconds."; | |
96 | } | |
97 | ||
98 | leaf packets { | |
99 | type uint8 { | |
100 | range "1..100"; | |
101 | } | |
102 | default "3"; | |
103 | description | |
104 | "Number of packets to process at one time per fd."; | |
105 | } | |
106 | ||
107 | leaf register-suppress-time { | |
108 | type uint16 { | |
109 | range "5..60000"; | |
110 | } | |
111 | default "60"; | |
112 | description | |
113 | "Register Suppress Timer."; | |
114 | } | |
115 | } | |
116 | ||
117 | grouping per-af-global-pim-config-attributes { | |
118 | description | |
119 | "A grouping defining per address family pim global attributes"; | |
120 | ||
121 | leaf send-v6-secondary { | |
122 | when "../frr-pim:address-family = 'frr-rt:ipv4'" { | |
123 | description | |
124 | "Only applicable to IPv4 address family."; | |
125 | } | |
126 | type empty; | |
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 | description | |
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 empty; | |
279 | description | |
280 | "Enable PIM flag on the interface."; | |
281 | } | |
282 | ||
283 | leaf dr-priority { | |
284 | type uint32 { | |
285 | range "1..4294967295"; | |
286 | } | |
287 | default 1; | |
288 | description | |
289 | "DR (Designated Router) priority"; | |
290 | } | |
291 | ||
292 | leaf hello-interval { | |
293 | type uint16 { | |
294 | range "1..180"; | |
295 | } | |
296 | default "30"; | |
297 | description | |
298 | "Hello interval"; | |
299 | } | |
300 | ||
301 | leaf hello-holdtime { | |
302 | type uint16 { | |
303 | range "1..180"; | |
304 | } | |
305 | description | |
306 | "Hello holdtime"; | |
307 | } | |
308 | ||
309 | container bfd { | |
310 | presence | |
311 | "Enable BFD support on the interface."; | |
312 | ||
313 | leaf min-rx-interval { | |
314 | type uint16 { | |
315 | range "50..60000"; | |
316 | } | |
317 | default "300"; | |
318 | description | |
319 | "Required min receive interval"; | |
320 | } | |
321 | ||
322 | leaf min-tx-interval { | |
323 | type uint16 { | |
324 | range "50..60000"; | |
325 | } | |
326 | default "300"; | |
327 | description | |
328 | "Desired min transmit interval"; | |
329 | } | |
330 | ||
331 | leaf detect_mult { | |
332 | type uint8 { | |
333 | range "2..255"; | |
334 | } | |
335 | default "3"; | |
336 | description | |
337 | "Detect Multiplier"; | |
338 | } | |
339 | } | |
340 | ||
341 | leaf bsm { | |
342 | type empty; | |
343 | description | |
344 | "Enables BSM support on the interface."; | |
345 | } | |
346 | ||
347 | leaf unicast-bsm { | |
348 | type empty; | |
349 | description | |
350 | "Accept/Send unicast BSM on the interface."; | |
351 | } | |
352 | ||
353 | leaf active-active { | |
354 | type empty; | |
355 | description | |
356 | "Mark interface as Active-Active for MLAG operations."; | |
357 | } | |
358 | } // interface-pim-config-attributes | |
359 | ||
360 | grouping per-af-interface-pim-config-attributes { | |
361 | description | |
362 | "A grouping defining pim interface attributes per address family."; | |
363 | ||
364 | leaf use-source { | |
365 | type inet:ip-address; | |
366 | description | |
367 | "Primary address of the interface set by user."; | |
368 | } | |
369 | ||
370 | leaf multicast-boundary-oil { | |
371 | type plist-ref; | |
372 | description | |
373 | "Prefix-List to define multicast boundary"; | |
374 | } | |
375 | ||
376 | list mroute { | |
377 | key "source-addr group-addr"; | |
378 | description | |
379 | "Add multicast route."; | |
380 | ||
381 | leaf oif { | |
382 | type frr-interface:interface-ref; | |
383 | description | |
384 | "Outgoing interface name."; | |
385 | } | |
386 | ||
387 | leaf source-addr { | |
388 | type inet:ip-address; | |
389 | description | |
390 | "Multicast source address."; | |
391 | } | |
392 | ||
393 | leaf group-addr { | |
394 | type rt-types:ip-multicast-group-address; | |
395 | description | |
396 | "Multicast group address."; | |
397 | } | |
398 | } | |
399 | } // per-af-interface-pim-config-attributes | |
400 | ||
401 | /* | |
402 | * Global Configuration data nodes | |
403 | */ | |
404 | augment "/frr-rt:routing/frr-rt:control-plane-protocols/" | |
405 | + "frr-rt:control-plane-protocol" { | |
406 | container pim { | |
407 | when "../frr-rt:type = 'frr-pim:pimd'" { | |
408 | description | |
409 | "This container is only valid for the 'pim' routing | |
410 | protocol."; | |
411 | } | |
412 | description | |
413 | "PIM configuration data."; | |
414 | ||
415 | uses global-pim-config-attributes; | |
416 | ||
417 | list address-family { | |
418 | key "address-family"; | |
419 | description | |
420 | "Each list entry for one address family."; | |
421 | uses frr-rt:address-family; | |
422 | uses per-af-global-pim-config-attributes; | |
423 | ||
424 | } //address-family | |
425 | } // pim | |
426 | } // augment | |
427 | ||
428 | /* | |
429 | * Per-interface configuration data | |
430 | */ | |
431 | augment "/frr-interface:lib/frr-interface:interface" { | |
432 | container pim { | |
433 | description | |
434 | "PIM interface parameters."; | |
435 | uses interface-pim-config-attributes; | |
436 | list address-family { | |
437 | key "address-family"; | |
438 | description | |
439 | "Each list entry for one address family."; | |
440 | uses frr-rt:address-family; | |
441 | uses per-af-interface-pim-config-attributes; | |
442 | } | |
443 | } | |
444 | } | |
445 | } | |
446 |