]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-bgp-route-map.yang
Merge pull request #13506 from anlancs/fix/bfdd-vrf-check
[mirror_frr.git] / yang / frr-bgp-route-map.yang
1 module frr-bgp-route-map {
2 yang-version 1.1;
3 namespace "http://frrouting.org/yang/bgp-route-map";
4 prefix frr-bgp-route-map;
5
6 import ietf-inet-types {
7 prefix inet;
8 }
9
10 import frr-route-map {
11 prefix frr-route-map;
12 }
13
14 import frr-filter {
15 prefix filter;
16 }
17
18 import frr-bgp-filter {
19 prefix bgp-filter;
20 }
21
22 import ietf-routing-types {
23 prefix rt-types;
24 }
25
26 import frr-route-types {
27 prefix frr-route-types;
28 }
29
30 organization
31 "Free Range Routing";
32 contact
33 "FRR Users List: <mailto:frog@lists.frrouting.org>
34 FRR Development List: <mailto:dev@lists.frrouting.org>";
35 description
36 "This module defines bgp route map settings";
37
38 revision 2020-01-02 {
39 description
40 "Initial revision";
41 }
42
43 identity match-alias {
44 base frr-route-map:rmap-match-type;
45 description
46 "Match BGP community alias name";
47 }
48
49 identity match-local-preference {
50 base frr-route-map:rmap-match-type;
51 description
52 "Match local-preference of routes";
53 }
54
55 identity match-script {
56 base frr-route-map:rmap-match-type;
57 description
58 "Match script of routes";
59 }
60
61 identity match-origin {
62 base frr-route-map:rmap-match-type;
63 description
64 "Match BGP route origin code";
65 }
66
67 identity rpki {
68 base frr-route-map:rmap-match-type;
69 description
70 "Control rpki specific settings";
71 }
72
73 identity rpki-extcommunity {
74 base frr-route-map:rmap-match-type;
75 description
76 "Control rpki specific settings derived from extended community";
77 }
78
79 identity probability {
80 base frr-route-map:rmap-match-type;
81 description
82 "Match portion of routes defined by percentage value";
83 }
84
85 identity source-vrf {
86 base frr-route-map:rmap-match-type;
87 description
88 "Match source vrf of routes";
89 }
90
91 identity peer {
92 base frr-route-map:rmap-match-type;
93 description
94 "Match peer address";
95 }
96
97 identity mac-address-list {
98 base frr-route-map:rmap-match-type;
99 description
100 "Match MAC address access-list";
101 }
102
103 identity ip-route-source {
104 base frr-route-map:rmap-match-type;
105 description
106 "Match advertising source address of route";
107 }
108
109 identity ip-route-source-prefix-list {
110 base frr-route-map:rmap-match-type;
111 description
112 "Match advertising source address of route";
113 }
114
115 identity evpn-route-type {
116 base frr-route-map:rmap-match-type;
117 description
118 "Match EVPN route type";
119 }
120
121 identity evpn-default-route {
122 base frr-route-map:rmap-match-type;
123 description
124 "Match EVPN default Type-5 route";
125 }
126
127 identity evpn-vni {
128 base frr-route-map:rmap-match-type;
129 description
130 "Match EVPN VNI";
131 }
132
133 identity evpn-rd {
134 base frr-route-map:rmap-match-type;
135 description
136 "Match EVPN route distinguisher";
137 }
138
139 identity match-community {
140 base frr-route-map:rmap-match-type;
141 description
142 "Match BGP community list";
143 }
144
145 identity match-large-community {
146 base frr-route-map:rmap-match-type;
147 description
148 "Match BGP large-community list";
149 }
150
151 identity match-extcommunity {
152 base frr-route-map:rmap-match-type;
153 description
154 "Match BGP extcommunity list";
155 }
156
157 identity as-path-list {
158 base frr-route-map:rmap-match-type;
159 description
160 "Match BGP AS path list";
161 }
162
163 identity ipv4-nexthop {
164 base frr-route-map:rmap-match-type;
165 description
166 "Match IPv4 next hop address";
167 }
168
169 identity ipv6-nexthop {
170 base frr-route-map:rmap-match-type;
171 description
172 "Match IPv6 next hop address";
173 }
174
175 identity source-protocol {
176 base frr-route-map:rmap-match-type;
177 description
178 "Match protocol via which the route was learnt";
179 }
180
181 identity distance {
182 base frr-route-map:rmap-set-type;
183 description
184 "Set BGP administrative distance to use";
185 }
186
187 identity set-extcommunity-none {
188 base frr-route-map:rmap-set-type;
189 description
190 "Set BGP extended community attribute";
191 }
192
193 identity set-extcommunity-rt {
194 base frr-route-map:rmap-set-type;
195 description
196 "Set BGP extended community attribute";
197 }
198
199 identity set-extcommunity-nt {
200 base frr-route-map:rmap-set-type;
201 description
202 "Set BGP extended community attribute";
203 }
204
205 identity set-extcommunity-soo {
206 base frr-route-map:rmap-set-type;
207 description
208 "Set BGP extended community attribute";
209 }
210
211 identity set-extcommunity-lb {
212 base frr-route-map:rmap-set-type;
213 description
214 "Set BGP extended community attribute";
215 }
216
217 identity set-ipv4-nexthop {
218 base frr-route-map:rmap-set-type;
219 description
220 "Set the IPv4 next-hop to peer-address/unchanged";
221 }
222
223 identity ipv4-vpn-address {
224 base frr-route-map:rmap-set-type;
225 description
226 "Set IPv4 VPN next-hop address";
227 }
228
229 identity ipv6-nexthop-global {
230 base frr-route-map:rmap-set-type;
231 description
232 "Set IPv6 next-hop global address";
233 }
234
235 identity ipv6-prefer-global {
236 base frr-route-map:rmap-set-type;
237 description
238 "Set IPv6 next-hop to prefer global address";
239 }
240
241 identity ipv6-peer-address {
242 base frr-route-map:rmap-set-type;
243 description
244 "Set IPv6 next-hop peer address";
245 }
246
247 identity ipv6-vpn-address {
248 base frr-route-map:rmap-set-type;
249 description
250 "Set IPv6 VPN next-hop address";
251 }
252
253 identity label-index {
254 base frr-route-map:rmap-set-type;
255 description
256 "Set the label index to associate with the prefixs";
257 }
258
259 identity set-local-preference {
260 base frr-route-map:rmap-set-type;
261 description
262 "Set the BGP local preference path attribute";
263 }
264
265 identity set-origin {
266 base frr-route-map:rmap-set-type;
267 description
268 "Set BGP route origin code";
269 }
270
271 identity weight {
272 base frr-route-map:rmap-set-type;
273 description
274 "Set the BGP weight attribute";
275 }
276
277 identity originator-id {
278 base frr-route-map:rmap-set-type;
279 description
280 "Set the BGP originator ID attribute";
281 }
282
283 identity table {
284 base frr-route-map:rmap-set-type;
285 description
286 "Export route to non-main kernel table";
287 }
288
289 identity atomic-aggregate {
290 base frr-route-map:rmap-set-type;
291 description
292 "Set BGP atomic-aggregate attribute";
293 }
294
295 identity aigp-metric {
296 base frr-route-map:rmap-set-type;
297 description
298 "Set BGP AIGP attribute (AIGP TLV Metric)";
299 }
300
301 identity as-path-prepend {
302 base frr-route-map:rmap-set-type;
303 description
304 "Set the BGP AS-path attribute";
305 }
306
307 identity as-path-exclude {
308 base frr-route-map:rmap-set-type;
309 description
310 "Set the BGP AS-path attribute";
311 }
312
313 identity as-path-replace {
314 base frr-route-map:rmap-set-type;
315 description
316 "Replace ASNs to local AS number";
317 }
318
319 identity set-community {
320 base frr-route-map:rmap-set-type;
321 description
322 "Set the BGP community attribute";
323 }
324
325 identity set-large-community {
326 base frr-route-map:rmap-set-type;
327 description
328 "Set the BGP large-community attribute";
329 }
330
331 identity aggregator {
332 base frr-route-map:rmap-set-type;
333 description
334 "Set the BGP aggregator attribute";
335 }
336
337 identity comm-list-delete {
338 base frr-route-map:rmap-set-type;
339 description
340 "Set BGP community list (for deletion)";
341 }
342
343 identity large-comm-list-delete {
344 base frr-route-map:rmap-set-type;
345 description
346 "Set BGP large community list (for deletion)";
347 }
348
349 identity set-evpn-gateway-ip-ipv4 {
350 base frr-route-map:rmap-set-type;
351 description
352 "Set EVPN gateway IP overlay index IPv4";
353 }
354
355 identity set-evpn-gateway-ip-ipv6 {
356 base frr-route-map:rmap-set-type;
357 description
358 "Set EVPN gateway IP overlay index IPv6";
359 }
360
361 identity set-l3vpn-nexthop-encapsulation {
362 base frr-route-map:rmap-set-type;
363 description
364 "Accept L3VPN traffic over other than LSP encapsulation";
365 }
366
367 grouping extcommunity-non-transitive-types {
368 leaf two-octet-as-specific {
369 type boolean;
370 description
371 "Non-Transitive Two-Octet AS-Specific Extended Community";
372 }
373 }
374
375 typedef route-distinguisher {
376 type string {
377 pattern
378 '(0:(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
379 + '6[0-4][0-9]{3}|'
380 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|'
381 + '42949672[0-8][0-9]|'
382 + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|'
383 + '42949[0-5][0-9]{4}|'
384 + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|'
385 + '42[0-8][0-9]{7}|4[01][0-9]{8}|'
386 + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))|'
387 + '(1:((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|'
388 + '25[0-5])\.){3}([0-9]|[1-9][0-9]|'
389 + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|'
390 + '655[0-2][0-9]|'
391 + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|'
392 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
393 + '(2:(429496729[0-5]|42949672[0-8][0-9]|'
394 + '4294967[01][0-9]{2}|'
395 + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
396 + '4294[0-8][0-9]{5}|'
397 + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
398 + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):'
399 + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
400 + '6[0-4][0-9]{3}|'
401 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
402 + '(6(:[a-fA-F0-9]{2}){6})|'
403 + '(([3-57-9a-fA-F]|[1-9a-fA-F][0-9a-fA-F]{1,3}):'
404 + '[0-9a-fA-F]{1,12})|'
405 + '((6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
406 + '6[0-4][0-9]{3}|'
407 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):(429496729[0-5]|'
408 + '42949672[0-8][0-9]|'
409 + '4294967[01][0-9]{2}|429496[0-6][0-9]{3}|'
410 + '42949[0-5][0-9]{4}|'
411 + '4294[0-8][0-9]{5}|429[0-3][0-9]{6}|'
412 + '42[0-8][0-9]{7}|4[01][0-9]{8}|'
413 + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0)|'
414 + '((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|'
415 + '25[0-5])\.){3}([0-9]|[1-9][0-9]|'
416 + '1[0-9]{2}|2[0-4][0-9]|25[0-5])):(6553[0-5]|'
417 + '655[0-2][0-9]|'
418 + '65[0-4][0-9]{2}|6[0-4][0-9]{3}|'
419 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
420 + '((429496729[0-5]|42949672[0-8][0-9]|'
421 + '4294967[01][0-9]{2}|'
422 + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
423 + '4294[0-8][0-9]{5}|'
424 + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
425 + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0):'
426 + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
427 + '6[0-4][0-9]{3}|'
428 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))|'
429 + '((6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
430 + '6[0-4][0-9]{3}|'
431 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0).'
432 + '(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|'
433 + '6[0-4][0-9]{3}|'
434 + '[1-5][0-9]{4}|[1-9][0-9]{0,3}|0):'
435 + '(429496729[0-5]|42949672[0-8][0-9]|'
436 + '4294967[01][0-9]{2}|'
437 + '429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|'
438 + '4294[0-8][0-9]{5}|'
439 + '429[0-3][0-9]{6}|42[0-8][0-9]{7}|4[01][0-9]{8}|'
440 + '[1-3][0-9]{9}|[1-9][0-9]{0,8}|0))';
441 }
442
443 description
444 "A Route Distinguisher is an 8-octet value used to
445 distinguish routes from different BGP VPNs (RFC 4364).
446 A Route Distinguisher will have the same format as a
447 Route Target as per RFC 4360 and will consist of
448 two or three fields: a 2-octet Type field, an administrator
449 field, and, optionally, an assigned number field.
450 According to the data formats for types 0, 1, 2, and 6 as
451 defined in RFC 4360, RFC 5668, and RFC 7432, the encoding
452 pattern is defined as:
453 0:2-octet-asn:4-octet-number
454 1:4-octet-ipv4addr:2-octet-number
455 2:4-octet-asn:2-octet-number
456 6:6-octet-mac-address
457 Additionally, a generic pattern is defined for future
458 route discriminator types:
459 2-octet-other-hex-number:6-octet-hex-number
460 Some valid examples are 0:100:100, 1:1.1.1.1:100,
461 2:1234567890:203, and 6:26:00:08:92:78:00.
462 The following route distinguisher with two fields are also
463 accepted : 10000:44 1.2.3.4:44.";
464 reference
465 "RFC 4360: BGP Extended Communities Attribute.
466 RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs).
467 RFC 5668: 4-Octet AS Specific BGP Extended Community.
468 RFC 7432: BGP MPLS-Based Ethernet VPN.";
469 }
470
471 typedef extcommunity-lb-type {
472 type enumeration {
473 enum "explicit-bandwidth" {
474 value 0;
475 description
476 "Bandwidth value in Mbps";
477 }
478 enum "cumulative-bandwidth" {
479 value 1;
480 description
481 "Cumulative bandwidth of all multipaths (outbound-only)";
482 }
483 enum "computed-bandwidth" {
484 value 2;
485 description
486 "Internally computed bandwidth based on number of multipaths (outbound-only)";
487 }
488 }
489 description
490 "ext-community link bandwidth types.";
491 }
492
493 typedef asn-type {
494 type union {
495 type uint32 {
496 range "1..4294967295";
497 }
498 type string {
499 pattern '(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|'
500 + '6[0-4][0-9]{3}|65[0-4][0-9]{2}|'
501 + '655[0-2][0-9]|6553[0-5])\.'
502 + '(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|'
503 + '65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])' {
504 error-message "AS dot should be in the form [0..65535].[0..65535].";
505 }
506 pattern '^0\.0$' {
507 modifier "invert-match";
508 error-message "AS dot can't be equal to 0.0.";
509 }
510 }
511 }
512 }
513
514 augment "/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:rmap-match-condition/frr-route-map:match-condition" {
515 case local-preference {
516 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-local-preference')";
517 leaf local-preference {
518 type uint32 {
519 range "0..4294967295";
520 }
521 }
522 }
523
524 case alias {
525 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-alias')";
526 leaf alias {
527 type string;
528 }
529 }
530
531 case script {
532 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-script')";
533 leaf script {
534 type string;
535 }
536 }
537
538 case origin {
539 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-origin')";
540 leaf origin {
541 type enumeration {
542 enum "egp" {
543 value 0;
544 description
545 "Remote EGP";
546 }
547 enum "igp" {
548 value 1;
549 description
550 "Local IGP";
551 }
552 enum "incomplete" {
553 value 2;
554 description
555 "Unknown heritage";
556 }
557 }
558 }
559 }
560
561 case rpki {
562 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:rpki')";
563 leaf rpki {
564 type enumeration {
565 enum "invalid" {
566 value 0;
567 description
568 "Invalid prefix";
569 }
570 enum "notfound" {
571 value 1;
572 description
573 "Prefix not found";
574 }
575 enum "valid" {
576 value 2;
577 description
578 "Valid prefix";
579 }
580 }
581 }
582 }
583
584 case rpki-extcommunity {
585 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:rpki-extcommunity')";
586 leaf rpki-extcommunity {
587 type enumeration {
588 enum "valid" {
589 value 0;
590 description
591 "Valid prefix";
592 }
593 enum "notfound" {
594 value 1;
595 description
596 "Prefix not found";
597 }
598 enum "invalid" {
599 value 2;
600 description
601 "Invalid prefix";
602 }
603 }
604 }
605 }
606
607 case probability {
608 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:probability')";
609 leaf probability {
610 type uint8 {
611 range "0..100";
612 }
613 }
614 }
615
616 case source-vrf {
617 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:source-vrf')";
618 leaf source-vrf {
619 type string;
620 }
621 }
622
623 case peer {
624 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:peer')";
625 choice peer {
626 description
627 "Value of the peer";
628 case peer-ipv4-address {
629 description
630 "IP address of peer";
631 leaf peer-ipv4-address {
632 type inet:ipv4-address;
633 }
634 }
635
636 case peer-interface {
637 description
638 "Interface name of peer";
639 leaf peer-interface {
640 type string;
641 }
642 }
643
644 case peer-ipv6-address {
645 description
646 "IPv6 address of peer";
647 leaf peer-ipv6-address {
648 type inet:ipv6-address;
649 }
650 }
651
652 case peer-local {
653 description
654 "Static or Redistributed routes";
655 leaf peer-local {
656 type boolean;
657 }
658 }
659 }
660 }
661
662 case access-list-name {
663 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:mac-address-list') or "
664 + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:as-path-list') or "
665 + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:ip-route-source') or "
666 + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:ip-route-source-prefix-list')";
667 description
668 "Access-list name";
669 leaf list-name {
670 type filter:access-list-name;
671 }
672 }
673
674 case evpn-default-route {
675 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:evpn-default-route')";
676 description
677 "Match default EVPN type-5 route";
678 leaf evpn-default-route {
679 type empty;
680 }
681 }
682
683 case evpn-vni {
684 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:evpn-vni')";
685 description
686 "Match eVPN VNI";
687 leaf evpn-vni {
688 type uint32 {
689 range "1..16777215";
690 }
691 }
692 }
693
694 case evpn-route-type {
695 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:evpn-route-type')";
696 description
697 "Match eVPN route-type";
698 leaf evpn-route-type {
699 type enumeration {
700 enum "macip" {
701 value 0;
702 description
703 "Mac-IP route";
704 }
705 enum "multicast" {
706 value 1;
707 description
708 "IMET route";
709 }
710 enum "prefix" {
711 value 2;
712 description
713 "Prefix route";
714 }
715 enum "ead" {
716 value 3;
717 description
718 "Ethernet Auto-Discovery route";
719 }
720 enum "es" {
721 value 4;
722 description
723 "Ethernet Segment route";
724 }
725 }
726 }
727 }
728
729 case evpn-rd {
730 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:evpn-rd')";
731 description
732 "Match eVPN route-distinguisher";
733 leaf route-distinguisher {
734 type route-distinguisher;
735 }
736 }
737
738 case comm-list-name {
739 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-community') or "
740 + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-large-community') or "
741 + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-extcommunity')";
742 container comm-list {
743 leaf comm-list-name {
744 type bgp-filter:bgp-list-name;
745 }
746
747 leaf comm-list-name-exact-match {
748 type boolean;
749 description
750 "Do exact matching of communities";
751 }
752 }
753 }
754
755 case ipv4-address {
756 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:ipv4-nexthop')";
757 leaf ipv4-address {
758 type inet:ipv4-address;
759 description
760 "IPv4 address";
761 }
762 }
763
764 case ipv6-address {
765 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:ipv6-nexthop')";
766 leaf ipv6-address {
767 type inet:ipv6-address;
768 description
769 "IPv6 address";
770 }
771 }
772
773 case source-protocol {
774 when "derived-from-or-self(../frr-route-map:condition, 'frr-bgp-route-map:source-protocol')";
775 leaf source-protocol {
776 type frr-route-types:frr-route-types;
777 }
778 }
779 }
780
781 augment "/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:rmap-set-action/frr-route-map:set-action" {
782 case distance {
783 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:distance')";
784 leaf distance {
785 type uint8 {
786 range "1..255";
787 }
788 }
789 }
790
791 case extcommunity-none {
792 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-none')";
793 description
794 "Value of the BGP extended community attribute";
795 leaf extcommunity-none {
796 type boolean;
797 description "No extended community attribute";
798 }
799 }
800
801 case extcommunity-rt {
802 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-rt')";
803 description
804 "Value of the ext-community";
805 leaf extcommunity-rt {
806 type string;
807 description
808 "Set BGP ext-community route-target attribute";
809 }
810 }
811
812 case extcommunity-nt {
813 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-nt')";
814 description
815 "Value of the ext-community";
816 leaf extcommunity-nt {
817 type string;
818 description
819 "Set BGP ext-community node-target attribute";
820 }
821 }
822
823 case extcommunity-soo {
824 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-soo')";
825 description
826 "Value of the ext-community";
827 leaf extcommunity-soo {
828 type string;
829 description
830 "Set BGP ext-community site-of-origin attribute";
831 }
832 }
833
834 case extcommunity-lb {
835 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-lb')";
836 container extcommunity-lb {
837 description
838 "Value of the ext-community.";
839 leaf lb-type {
840 type frr-bgp-route-map:extcommunity-lb-type;
841 }
842
843 leaf bandwidth {
844 when "../lb-type = 'explicit-bandwidth'";
845 type uint16 {
846 range "1..25600";
847 }
848 description
849 "Bandwidth value in Mbps";
850 }
851 uses extcommunity-non-transitive-types;
852 }
853 }
854
855 case ipv4-address {
856 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:ipv4-vpn-address')";
857 description
858 "Set the IPv4 address";
859 leaf ipv4-address {
860 type inet:ipv4-address;
861 }
862 }
863
864 case ipv4-nexthop {
865 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-ipv4-nexthop')";
866 leaf ipv4-nexthop {
867 type string;
868 }
869 }
870
871 case ipv6-address {
872 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:ipv6-nexthop-global') or "
873 + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:ipv6-vpn-address')";
874 description
875 "Set the IPv6 address";
876 leaf ipv6-address {
877 type inet:ipv6-address;
878 }
879 }
880
881 case preference {
882 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:ipv6-prefer-global') or "
883 + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:ipv6-peer-address')";
884 leaf preference {
885 type boolean;
886 }
887 }
888
889 case label-index {
890 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:label-index')";
891 leaf label-index {
892 type uint32 {
893 range "0..1048560";
894 }
895 }
896 }
897
898 case local-pref {
899 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-local-preference')";
900 leaf local-pref {
901 type string;
902 }
903 }
904
905 case weight {
906 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:weight')";
907 leaf weight {
908 type uint32 {
909 range "0..4294967295";
910 }
911 }
912 }
913
914 case origin {
915 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-origin')";
916 leaf origin {
917 type enumeration {
918 enum "egp" {
919 value 0;
920 description
921 "Remote EGP";
922 }
923 enum "igp" {
924 value 1;
925 description
926 "Local IGP";
927 }
928 enum "incomplete" {
929 value 2;
930 description
931 "Unknown heritage";
932 }
933 }
934 }
935 }
936
937 case originator-id {
938 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:originator-id')";
939 leaf originator-id {
940 type inet:ipv4-address;
941 }
942 }
943
944 case table {
945 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:table')";
946 leaf table {
947 type uint32 {
948 range "1..4294967295";
949 }
950 }
951 }
952
953 case atomic-aggregate {
954 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:atomic-aggregate')";
955 leaf atomic-aggregate {
956 type empty;
957 }
958 }
959
960 case aigp-metric {
961 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:aigp-metric')";
962 leaf aigp-metric {
963 type string;
964 description
965 "Set BGP AIGP attribute (AIGP Metric TLV)";
966 }
967 }
968
969 case as-path-prepend {
970 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:as-path-prepend')";
971 choice as-path-prepend {
972 description
973 "Value of the BGP AS-path attribute";
974 case prepend-as {
975 description
976 "Prepend the mentioned AS-path";
977 leaf prepend-as-path {
978 type string;
979 }
980 }
981
982 case last-as {
983 description
984 "Prepend the last ASN in the AS-path";
985 leaf last-as {
986 type uint8 {
987 range "1..10";
988 }
989 }
990 }
991 }
992 }
993
994 case as-path-exclude {
995 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:as-path-exclude')";
996 leaf exclude-as-path {
997 type string;
998 description
999 "Exclude the mentioned AS-path";
1000 }
1001 }
1002
1003 case as-path-replace {
1004 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:as-path-replace')";
1005 leaf replace-as-path {
1006 type string;
1007 description
1008 "Replace ASNs to local AS number";
1009 }
1010 }
1011
1012 case community {
1013 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-community')";
1014 choice community {
1015 description
1016 "Value of the BGP community attribute";
1017 case none {
1018 description
1019 "No community attribute";
1020 leaf community-none {
1021 type boolean;
1022 }
1023 }
1024
1025 case community-string {
1026 description
1027 "Community string";
1028 leaf community-string {
1029 type string;
1030 }
1031 }
1032 }
1033 }
1034
1035 case large-community {
1036 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-large-community')";
1037 choice large-community {
1038 description
1039 "Value of the BGP large-community attribute";
1040 case none {
1041 description
1042 "No large-community attribute";
1043 leaf large-community-none {
1044 type boolean;
1045 }
1046 }
1047
1048 case large-community-string {
1049 description
1050 "Large-Community string";
1051 leaf large-community-string {
1052 type string;
1053 }
1054 }
1055 }
1056 }
1057
1058 case aggregator {
1059 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:aggregator')";
1060 container aggregator {
1061 leaf aggregator-asn {
1062 type asn-type;
1063 description
1064 "ASN of the aggregator";
1065 }
1066
1067 leaf aggregator-address {
1068 type inet:ipv4-address;
1069 description
1070 "IPv4 address of the aggregator";
1071 }
1072 }
1073 }
1074
1075 case comm-list-name {
1076 when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:comm-list-delete') or "
1077 + "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:large-comm-list-delete')";
1078 leaf comm-list-name {
1079 type bgp-filter:bgp-list-name;
1080 }
1081 }
1082 case evpn-gateway-ip-ipv4 {
1083 when
1084 "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action,
1085 'frr-bgp-route-map:set-evpn-gateway-ip-ipv4')";
1086 description
1087 "Set EVPN gateway IP overlay index IPv4";
1088 leaf evpn-gateway-ip-ipv4 {
1089 type inet:ipv4-address;
1090 }
1091 }
1092 case evpn-gateway-ip-ipv6 {
1093 when
1094 "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action,
1095 'frr-bgp-route-map:set-evpn-gateway-ip-ipv6')";
1096 description
1097 "Set EVPN gateway IP overlay index IPv6";
1098 leaf evpn-gateway-ip-ipv6 {
1099 type inet:ipv6-address;
1100 }
1101 }
1102 case l3vpn-nexthop-encapsulation {
1103 when
1104 "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action,
1105 'frr-bgp-route-map:set-l3vpn-nexthop-encapsulation')";
1106 description
1107 "Accept L3VPN traffic over other than LSP encapsulation";
1108 leaf l3vpn-nexthop-encapsulation {
1109 type enumeration {
1110 enum "gre" {
1111 value 0;
1112 description
1113 "GRE protocol";
1114 }
1115 }
1116 }
1117 }
1118 }
1119 }