]> git.proxmox.com Git - mirror_frr.git/blame - yang/frr-bgp-common.yang
bgpd: evpn route-map match ead type-1 route-type
[mirror_frr.git] / yang / frr-bgp-common.yang
CommitLineData
2228b116 1submodule frr-bgp-common {
2 yang-version 1.1;
3
4 belongs-to frr-bgp {
5 prefix "bgp";
6 }
7
8 import ietf-bgp-types {
9 prefix bt;
10 }
11
12 import ietf-inet-types {
13 prefix inet;
14 }
15
16 import frr-bgp-types {
17 prefix frr-bt;
18 }
19
45c70d4a
IR
20 import frr-route-map {
21 prefix frr-route-map;
22 }
23
2228b116 24 import frr-route-types {
25 prefix frr-rt-type;
26 }
27
28 import frr-vrf {
29 prefix frr-vrf;
30 }
31
32 import ietf-routing-types {
33 prefix rt-types;
34 }
35
36 import frr-interface {
37 prefix frr-interface;
38 }
39
40 organization
41 "FRRouting";
42 contact
43 "FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development
44 List: <mailto:dev@lists.frrouting.org>";
45 description
46 "This submodule contains general data definitions for use in BGP.
47
48 Copyright 2020 FRRouting
49
50 Redistribution and use in source and binary forms, with or without
51 modification, are permitted provided that the following conditions
52 are met:
53
54 1. Redistributions of source code must retain the above copyright notice,
55 this list of conditions and the following disclaimer.
56
57 2. Redistributions in binary form must reproduce the above copyright
58 notice, this list of conditions and the following disclaimer in the
59 documentation and/or other materials provided with the distribution.
60
61 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
62 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
63 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
64 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
65 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
66 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
67 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
68 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
69 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
70 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
71 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
72
73 revision 2019-12-03 {
74 description
75 "Initial revision.";
76 }
77
78 grouping rmap-policy-import {
79 leaf rmap-import {
45c70d4a 80 type frr-route-map:route-map-ref;
2228b116 81 }
82 }
83
84 grouping rmap-policy-export {
85 leaf rmap-export {
45c70d4a 86 type frr-route-map:route-map-ref;
2228b116 87 }
88 }
89
7c98d487
DA
90 grouping unsuppress-map-policy-import {
91 leaf unsuppress-map-import {
45c70d4a 92 type frr-route-map:route-map-ref;
2228b116 93 }
94 }
95
7c98d487
DA
96 grouping unsuppress-map-policy-export {
97 leaf unsuppress-map-export {
45c70d4a 98 type frr-route-map:route-map-ref;
2228b116 99 }
100 }
101
102 grouping plist-policy-import {
103 leaf plist-import {
104 type frr-bt:plist-ref;
105 }
106 }
107
108 grouping plist-policy-export {
109 leaf plist-export {
110 type frr-bt:plist-ref;
111 }
112 }
113
114 grouping access-list-policy-import {
115 leaf access-list-import {
116 type frr-bt:access-list-ref;
117 }
118 }
119
120 grouping access-list-policy-export {
121 leaf access-list-export {
122 type frr-bt:access-list-ref;
123 }
124 }
125
126 grouping as-path-filter-list-policy-import {
127 leaf as-path-filter-list-import {
128 type frr-bt:as-path-filter-ref;
129 }
130 }
131
132 grouping as-path-filter-list-policy-export {
133 leaf as-path-filter-list-export {
134 type frr-bt:as-path-filter-ref;
135 }
136 }
137
138 grouping route-selection-options {
139 description
140 "Configuration relating to route selection options.";
141 container route-selection-options {
142 description
143 "Parameters relating to options for route selection.";
144 leaf always-compare-med {
145 type boolean;
146 default "false";
147 description
148 "Compare multi-exit discriminator (MED) value from
149 different ASes when selecting the best route. The
150 default behaviour is to only compare MEDs for paths
151 received from the same AS.";
152 }
153
154 leaf deterministic-med {
155 type boolean;
156 default "false";
157 description
158 "Compare multi-exit discriminator (MED) value from
159 Same ASes when selecting the best route.";
160 }
161
162 leaf confed-med {
163 type boolean;
164 default "false";
165 description
166 "Compare multi-exit discriminator (MED) value from
167 different Sub ASes when selecting the best route.";
168 }
169
170 leaf missing-as-worst-med {
171 type boolean;
172 default "false";
173 description
174 "Missing multi-exit discriminator (MED) value is
175 considered as value of infinity, making the path
176 least desirable when selecting the best route.";
177 }
178
179 leaf aspath-confed {
180 type boolean;
181 default "false";
182 description
183 "Compare path lengths including confederation sets
184 and sequences in selecting a route.";
185 }
186
187 leaf ignore-as-path-length {
188 type boolean;
189 default "false";
190 description
191 "Ignore the AS path length when selecting the best path.
192 The default is to use the AS path length and prefer paths
193 with shorter length.";
194 }
195
196 leaf external-compare-router-id {
197 type boolean;
ff8a8a7a 198 default "false";
2228b116 199 description
200 "When comparing similar routes received from external BGP
201 peers, use the router-id as a criterion to select the
202 active path.";
203 }
204
205 leaf allow-multiple-as {
206 type boolean;
207 default "false";
208 description
209 "Allow multi-path to use paths from different neighbouring
210 ASes. The default is to only consider multiple paths
211 from the same neighbouring AS.";
212 }
213
214 leaf multi-path-as-set {
215 when "../allow-multiple-as = 'true'";
216 type boolean;
217 default "false";
218 description
219 "Multi-path with AS-SET, When set to 'true' it adds AS set
220 information for aggregate routes, When set to 'false' it
221 prevents AS set generation.";
222 }
223 }
224 }
225
226 grouping med-config {
227 description
228 "Configuration relating to MED.";
229 container med-config {
230 leaf enable-med-admin {
231 type boolean;
232 default "false";
233 description
234 "Flag to enable receiving of MED metric attribute
235 in routing updates.";
236 }
237 leaf max-med-admin {
238 type uint32 {
239 range "0..4294967295";
240 }
241 default "4294967294";
242 description
243 "Tells the router to announce routes with this MED value
244 This MED value is applicable for indefinite time.";
245 }
246
247 leaf max-med-onstart-up-time {
248 type uint32 {
249 range "5..86400";
250 }
251 units "seconds";
252 description
253 "Tells the router to announce routes with MED value,
254 This MED value is applicable for this duration during
255 start-up.";
256 }
257
258 leaf max-med-onstart-up-value {
259 type uint32 {
260 range "0..4294967295";
261 }
262 default "4294967294";
263 description
264 "Tells the router to announce routes with this MED value
265 This MED value is applicable for start-up time.";
266 }
267 }
268 }
269
270 grouping route-reflector-config {
271 description
272 "Grouping used to include route reflector
273 configuration for BGP global.";
274 container route-reflector {
275 description
276 "Route reflector parameters for the BGP global.";
277 leaf route-reflector-cluster-id {
278 type bt:rr-cluster-id-type;
279 description
280 "Route Reflector cluster ID to use when local router is
281 configured as a route reflector. Commonly set at the
282 group level, but allows a different cluster ID to be set
283 for each neighbor.";
284 reference
285 "RFC 4456: BGP Route Reflection: An Alternative to
286 Full Mesh.";
287 }
288
289 leaf no-client-reflect {
290 type boolean;
291 default "false";
292 description
293 "When set to 'true', this disables route redistribution
294 by the Route Reflector. It is set 'true' when the client is
295 fully meshed to prevent sending of redundant route
296 advertisements.";
297 reference
298 "TODO: Add reference when IETF writes a draft describing
299 this.";
300 }
301
302 leaf allow-outbound-policy {
303 type boolean;
304 default "false";
305 description
306 "When set to 'true', this allow RR to modify the attributes of the
307 reflected IBGP routes as per the out route-map. It is set 'false'
308 RR will not modify the attributes of the reflected IBGP routes as
309 per the out route-map rules.";
310 }
311 }
312 }
313
314 grouping global-bgp-config {
315 leaf instance-type-view {
316 type boolean;
317 default "false";
318 description
319 "When set to 'true' BGP instance type is view.
320 When set to 'false' BGP instance type is regular.";
321 }
322
323 leaf ebgp-multihop-connected-route-check {
324 type boolean;
325 default "false";
326 description
327 "When set to 'true' it will disable checking if nexthop is connected
328 on EBGP sessions. When set to 'false' it will enable checking if
329 nexthop is connected on EBGP sessions.";
330 }
331
332 leaf fast-external-failover {
333 type boolean;
334 default "true";
335 description
336 "It's an interface tracking mechanism. When set to 'true' don't
337 immediately reset session if a link to a directly connected
338 external peer goes down. When set to 'false' it will immediately
339 reset session if a link to a directly connected external peer goes down.";
340 }
341
342 leaf local-pref {
343 type uint32;
344 default "100";
345 description
346 "BGP local preference attribute sent to internal peers to
347 indicate the degree of preference for externally learned
348 routes. The route with the highest local preference
349 value is preferred.";
350 reference
351 "RFC 4271.";
352 }
353
354 leaf default-shutdown {
355 type boolean;
356 default "false";
357 description
358 "Apply administrative shutdown to newly configured peers.";
359 }
360
2adac256
DA
361 leaf suppress-duplicates {
362 type boolean;
363 default "true";
364 description
365 "Suppress duplicate updates if the route actually not changed.";
366 }
367
2228b116 368 leaf ebgp-requires-policy {
369 type boolean;
370 default "true";
371 description
372 "When set to 'true' BGP speaker requires in and out policy
373 for EBGP peers (RFC8212).";
374 }
375
376 leaf show-hostname {
377 type boolean;
378 default "false";
379 description
380 "When set to 'true' BGP show hostname in certain command outputs.";
381 }
382
383 leaf show-nexthop-hostname {
384 type boolean;
385 default "false";
386 description
387 "When set to 'true' BGP show hostname for nexthop in certain
388 command outputs.";
389 }
390 }
391
392 grouping global-neighbor-config {
393 container global-neighbor-config {
394 leaf dynamic-neighbors-limit {
395 type uint32 {
5b1b6b8b 396 range "1..65535";
2228b116 397 }
398 description
399 "Maximum number of BGP Dynamic Neighbors that can be created.";
400 }
401
402 leaf log-neighbor-changes {
403 type boolean;
404 default "false";
405 description
406 "When set to 'true' BGP will start logging neighbor up/down and reset reason.
407 When set to 'false' BGP will stop logging neighbor up/down and reset reason.";
408 }
409
410 container packet-quanta-config {
411 leaf wpkt-quanta {
412 type uint32 {
413 range "1..64";
414 }
415 default "64";
416 description
417 "How many packets to write to peer socket per run.";
418 }
419
420 leaf rpkt-quanta {
421 type uint32 {
422 range "1..10";
423 }
424 default "10";
425 description
426 "How many packets to read from peer socket per I/O cycle.";
427 }
428 }
429 }
430 }
431
432 grouping global-update-group-config {
433 container global-update-group-config {
434 leaf subgroup-pkt-queue-size {
435 type uint32 {
436 range "20..100";
437 }
438 default "40";
439 description
440 "Subgroup packet queue size.";
441 }
442
443 leaf coalesce-time {
444 type uint32 {
445 range "0..4294967295";
446 }
447 units "miliseconds";
448 default "1000";
449 description
450 "Configures the Subgroup coalesce timer.";
451 }
452 }
453 }
454
455 grouping global-network-config {
456 leaf import-check {
457 type boolean;
3bb513c3 458 default "true";
2228b116 459 description
460 "When set to 'true' bgp creates entries for network statements
461 if a matching prefix exists in the rib. When set to 'false' bgp
3bb513c3
CH
462 creates entries for networks that the router cannot reach.
463
464 In FRR versions < 7.4 this used to default to 'false' this is an
465 incompatible backward change";
2228b116 466 }
467 }
468
469 grouping neighbor-timers {
470 leaf hold-time {
471 type uint16 {
472 range "0 | 3..65535";
473 }
474 units "seconds";
475 default "180";
476 description
477 "Time interval (in seconds) for the HoldTimer established
478 with the peer. When read as operational data (ro), the
479 value of this object is calculated by this BGP speaker,
480 using the smaller of the values in hold-time that was
481 configured (rw) in the running datastore and the Hold Time
482 received in the OPEN message.
483
484 This value must be at least three seconds
485 if it is not zero (0).
486
487 If the Hold Timer has not been established
488 with the peer this object MUST have a value
489 of zero (0).
490
491 If the configured value of hold-time object was
492 a value of (0), then when read this object MUST have a
493 value of (0) also.";
494 reference
495 "RFC 4271";
496 }
497
498 leaf keepalive {
499 type uint16 {
500 range "0..65535";
501 }
502 units "seconds";
503 default "60";
504 description
505 "When used as a configuration (rw) value, this Time interval
506 (in seconds) for the KeepAlive timer configured for this BGP
507 speaker with this peer. The value of this object will only
508 determine the KEEPALIVE messages' frequency relative to
509 the value specified in configured value for hold-time.
510
511 If the value of this object is zero (0), no periodical
512 KEEPALIVE messages are sent to the peer after the BGP
513 connection has been established. The suggested value for
514 this timer is 30 seconds.;
515
516 The actual time interval for the KEEPALIVE messages is
517 indicated by operational value of keepalive. That value
518 of this object is calculated by this BGP speaker such that,
519 when compared with hold-time, it has the same proportion
520 that keepalive has, compared with hold-time. A
521 reasonable maximum value for this timer would be one third
522 of that of hold-time.";
523 reference
524 "RFC 4271";
525 }
526 }
527
528 grouping global-config-timers {
529 container global-config-timers {
530 leaf rmap-delay-time {
531 type uint16 {
532 range "0..600";
533 }
534 units "seconds";
535 default "5";
536 description
537 "Time to wait before processing route-map changes.";
538 }
539
540 leaf update-delay-time {
541 type uint16 {
542 range "0..3600";
543 }
544 units "seconds";
545 description
546 "Time to force initial delay for best-path and updates.";
547 }
548
549 leaf establish-wait-time {
550 type uint16 {
551 range "1..3600";
552 }
553 units "seconds";
554 description
555 "Time to force initial delay for updates.";
556 }
557
558 leaf connect-retry-interval {
559 type uint16 {
560 range "1..max";
561 }
562 units "seconds";
563 default "120";
564 description
565 "Time interval (in seconds) for the ConnectRetryTimer. The
566 suggested value for this timer is 120 seconds.";
567 reference
568 "RFC 4271, This is the value used
569 to initialize the 'ConnectRetryTimer'.";
570 }
571
572 uses neighbor-timers;
573 }
574 }
575
576 grouping graceful-restart-config {
577 description
578 "Configuration parameters relating to BGP graceful restart.";
579 choice mode {
580 case graceful-restart-mode {
581 leaf enabled {
582 type boolean;
583 default "false";
584 description
585 "Enable or disable the graceful-restart capability. When set to 'true'
586 it will enable graceful restart and helper both globally. When set
587 to 'false' it will enable the default behaviour global helper mode.";
588 }
589 }
590
591 case graceful-restart-disable-mode {
592 leaf graceful-restart-disable {
593 type boolean;
594 default "false";
595 description
596 "When set to 'true' it will disable graceful restart and helper both
597 globally. when set to 'false' it will enable the default behaviour
598 global helper mode.";
599 }
600 }
601 }
602
603 leaf preserve-fw-entry {
604 type boolean;
605 default "false";
606 description
607 "Sets F-bit indication that fib is preserved while doing Graceful Restart.
608 When set to 'true' Zebra would preserve the FIB entry on the restarting
609 node.";
610 }
611
612 leaf restart-time {
613 type uint16 {
614 range "1..3600";
615 }
616 units "seconds";
617 default "120";
618 description
619 "Estimated time (in seconds) for the local BGP speaker to
620 restart a session. This value is advertise in the graceful
621 restart BGP capability. This is a 12-bit value, referred to
622 as Restart Time in RFC4724. Per RFC4724, the suggested
623 default value is <= the hold-time value. This timer is
624 applicable for helper node.";
625 reference
626 "RFC 4724: Graceful Restart Mechanism for BGP.";
627 }
628
629 leaf stale-routes-time {
630 type uint16 {
631 range "1..3600";
632 }
633 units "seconds";
634 default "360";
635 description
636 "An upper-bound on the time that stale routes will be
637 retained by a router after a session is restarted. If an
638 End-of-RIB (EOR) marker is received prior to this timer
639 expiring stale-routes will be flushed upon its receipt - if
640 no EOR is received, then when this timer expires stale paths
641 will be purged. This timer is applicable for restarting node.";
642 reference
643 "RFC 4724: Graceful Restart Mechanism for BGP.";
644 }
645
646 leaf selection-deferral-time {
647 type uint16 {
648 range "0..3600";
649 }
650 units "seconds";
651 default "360";
652 description
653 "An upper-bound on the time that restarting router defers
654 the route selection process after restart.";
655 reference
656 "RFC 4724: Graceful Restart Mechanism for BGP.";
657 }
658
659 leaf rib-stale-time {
660 type uint16 {
661 range "1..3600";
662 }
663 units "seconds";
664 default "500";
665 description
666 "An upper-bound on the time that helper router holds the
667 stale routes in Zebra, When this timer gets expired Zebra
668 removes the stale routes.";
669 }
670 }
671
672 grouping global-group-use-multiple-paths {
673 description
674 "Common grouping used for both global and groups which provides
675 configuration parameters relating to use of multiple paths.";
676 container use-multiple-paths {
677 description
678 "Parameters related to the use of multiple paths for the
679 same NLRI.";
680 container ebgp {
681 description
682 "Multi-Path parameters for EBGP.";
683 leaf maximum-paths {
684 type uint16;
685 default "64";
686 description
687 "Maximum number of parallel paths to consider when using
688 BGP multi-path. The default is use a single path.";
689 }
690 }
691
692 container ibgp {
693 description
694 "Multi-Path parameters for IBGP.";
695 leaf maximum-paths {
696 type uint16;
697 default "64";
698 description
699 "Maximum number of parallel paths to consider when using
700 IBGP multi-path. The default is to use a single path.";
701 }
702
703 leaf cluster-length-list {
704 when "../maximum-paths != 0";
705 type boolean;
706 default "false";
707 description
708 "When set to 'true' route with the shortest cluster-list
709 length is used. The cluster-list reflects the IBGP
710 reflection path the route has taken. It's the part
711 of route selection algo.";
712 }
713 }
714 }
715 }
716
717 grouping global-redistribute {
718 description
719 "List of route redistribution per AFI.";
720 list redistribution-list {
721 key "route-type route-instance";
722 leaf route-type {
723 type frr-rt-type:frr-route-types;
724 description
725 "Protocol route type.";
726 }
727
728 leaf route-instance {
729 type uint16 {
730 range "0..65535";
731 }
732 description
733 "Protocol Instance.";
734 }
735
736 leaf metric {
737 type uint32 {
738 range "0..4294967295";
739 }
740 description
741 "Metric for redistributed routes.";
742 }
743
744 leaf rmap-policy-import {
45c70d4a 745 type frr-route-map:route-map-ref;
2228b116 746 description
747 "Route-map to be applied for redistributed routes into the bgp.";
748 }
749 }
750 }
751
752 grouping mp-afi-safi-network-config {
753 leaf label-index {
754 type rt-types:mpls-label;
755 description
756 "Label index to associate with the prefix.";
757 }
758
759 leaf rmap-policy-export {
45c70d4a 760 type frr-route-map:route-map-ref;
2228b116 761 description
762 "Route-map to modify the attributes for Routes going out
763 via BGP updates.";
764 }
765 }
766
767 grouping mp-afi-safi-agg-route-config {
768 leaf as-set {
769 type boolean;
770 default "false";
771 description
772 "When set to 'true' AS set path information is generated
773 for aggregate address. When set to 'false' AS set path
774 information is not generated.";
775 }
776
777 leaf summary-only {
778 type boolean;
779 default "false";
780 description
781 "When set to 'true' it advertise only the aggregate route
782 and suppress the advertisement of all the component routes.
783 When set to 'false' all more-specific routes summarized
784 by the aggregate route are advertised.";
785 }
786
787 leaf rmap-policy-export {
45c70d4a 788 type frr-route-map:route-map-ref;
2228b116 789 description
790 "Apply route map to aggregate network.";
791 }
3b66fcef
CS
792
793 leaf origin {
794 type enumeration {
795 enum "igp" {
796 value 0;
797 description
798 "Local IGP.";
799 }
800 enum "egp" {
801 value 1;
802 description
803 "Remote EGP.";
804 }
805 enum "incomplete" {
806 value 2;
807 description
808 "Unknown heritage.";
809 }
810 enum "unspecified" {
811 value 255;
812 description
813 "Unspecified.";
814 }
815 }
816 default "unspecified";
817 description
818 "BGP origin type.";
819 }
90e21f35 820
fa423774
CS
821 leaf match-med {
822 type boolean;
823 default "false";
824 description
825 "When set to 'true' aggregate-route matches only
826 med.";
827 }
90e21f35
CS
828
829 leaf suppress-map {
830 type string;
831 description
832 "Suppress more specific routes specified in route-map.";
833 }
2228b116 834 }
835
836 grouping admin-distance {
837 container admin-distance {
838 description
839 "Administrative distance (or preference) assigned to
840 routes received from different sources
841 (external, internal, and local).";
842 leaf external {
843 type uint8 {
844 range "1..255";
845 }
3b66fcef 846 default "20";
2228b116 847 description
848 "Administrative distance for routes learned from
849 external BGP (EBGP).";
850 }
851
852 leaf internal {
853 type uint8 {
854 range "1..255";
855 }
3b66fcef 856 default "200";
2228b116 857 description
858 "Administrative distance for routes learned from
859 internal BGP (IBGP).";
860 }
861
862 leaf local {
863 type uint8 {
864 range "1..255";
865 }
3b66fcef 866 default "200";
2228b116 867 description
868 "Administrative distance for routes learned from
869 local.";
870 }
871 }
872 }
873
874 grouping distance-per-route-config {
875 leaf distance {
876 type uint8 {
877 range "1..255";
878 }
879 mandatory true;
880 description
881 "Administrative distance for route.";
882 }
883
884 leaf access-list-policy-export {
885 type frr-bt:access-list-ref;
886 description
887 "Access-list policy applied on routes going from BGP to Zebra.";
888 }
889 }
890
891 grouping route-flap-dampening {
892 container route-flap-dampening {
893 description
894 "Dampening feature";
895 leaf enable {
896 type boolean;
897 default "false";
898 description
899 "Enable route flap dampening.";
900 }
901
902 leaf reach-decay {
903 when "../enable = 'true'";
904 type uint8 {
905 range "1..45";
906 }
907 units "seconds";
908 default "15";
909 description
910 "This value specifies the time desired for the instability
911 metric value to reach one-half of its current value when
912 the route is reachable. This half-life value determines
913 the rate at which the metric value is decayed. A smaller
914 half-life value makes a suppressed route reusable sooner
915 than a larger value. The accumulated penalty will be reduced
916 to half after this duration.";
917 }
918
919 leaf reuse-above {
920 when "../enable = 'true'";
921 type uint16 {
922 range "1..20000";
923 }
924 default "750";
925 description
926 "This is the value of the instability metric at which a
927 suppressed route becomes unsuppressed if it is reachable
928 but currently suppressed. The value assigned to
929 reuse-below must be less than suppress-above.";
930 }
931
932 leaf suppress-above {
933 when "../enable = 'true'";
934 type uint16 {
935 range "1..20000";
936 }
937 default "2000";
938 description
939 "This is the value of the instability metric at which
940 route suppression takes place. A route is not installed
941 in the forwarding information base (FIB), or announced
942 even if it is reachable during the period that it is
943 suppressed.";
944 }
945
946 leaf unreach-decay {
947 when "../enable = 'true'";
948 type uint8 {
949 range "1..255";
950 }
951 units "seconds";
952 default "60";
953 description
954 "This value acts the same as reach-decay except that it
955 specifies the rate at which the instability metric is
956 decayed when a route is unreachable. It should have a
957 value greater than or equal to reach-decay.";
958 }
959 }
960 }
961
962 grouping flow-spec-config {
963 container flow-spec-config {
964 description
965 "Flow spec feature.";
966 leaf interface {
967 type frr-interface:interface-ref {
968 require-instance false;
969 }
970 description
971 "The local interface.";
972 }
973 }
974 }
975
976 grouping global-graceful-shutdown {
977 description
978 "Structural grouping used to include graceful-shutdown
979 configuration for both BGP neighbors and peer groups.";
980 container graceful-shutdown {
981 description
982 "BGP Graceful shutdown feature.";
983 leaf enable {
984 type boolean;
985 default "false";
986 description
987 "Enable graceful-shutdown feature.";
988 }
989 }
990 }
991
992 grouping global-filter-config {
993 description
994 "Structural grouping used to include filter
995 configuration for BGP RIB table.";
996 container filter-config {
997 description
998 "BGP table to RIB route download filter.";
999 uses rmap-policy-export;
1000 }
1001 }
1002
1003 grouping route-distinguisher-params {
1004 description
1005 "Route distinguisher value as per RFC4364.";
1006 leaf rd {
1007 type rt-types:route-distinguisher;
1008 description
1009 "Route distinguisher value as per RFC4364.";
1010 }
1011 }
1012
1013 grouping vpn-label-params {
1014 description
1015 "Label value for VRF.";
1016 choice label-allocation-mode {
1017 case manual {
1018 leaf label {
1019 type rt-types:mpls-label;
1020 description
1021 "Label index to associate with the prefix.";
1022 }
1023 }
1024
1025 case auto {
1026 leaf label-auto {
1027 type boolean;
1028 default "false";
1029 description
1030 "Automatically assign a label.";
1031 }
1032 }
1033 }
1034 }
1035
1036 grouping vpn-nexthop-params {
1037 description
1038 "Specify next hop to use for VRF advertised prefixes.";
1039 leaf nexthop {
1040 type inet:ip-address;
1041 description
1042 "Nexthop IP address.";
1043 }
1044 }
1045
1046 grouping rt-list {
1047 description
1048 "Route Target list";
1049 leaf-list import-rt-list {
1050 type rt-types:route-target;
1051 description
1052 "For routes leaked from vpn to current address-family: match any.";
1053 }
1054
1055 leaf-list export-rt-list {
1056 type rt-types:route-target;
1057 description
1058 "For routes leaked from current address-family to vpn: set.";
1059 }
1060 }
1061
1062 grouping vpn-route-target-params {
1063 description
1064 "Route Target value.";
1065 leaf redirect-rt {
1066 type rt-types:route-target;
1067 description
1068 "Flow-spec redirect type route target.";
1069 }
1070
1071 choice rt-direction {
1072 case import-export {
1073 uses rt-list;
1074 }
3b66fcef 1075
2228b116 1076 case both {
1077 leaf-list rt-list {
1078 type rt-types:route-target;
1079 description
1080 "Both import: match any and export: set.";
1081 }
1082 }
1083 }
1084 }
1085
1086 grouping vpn-import-params {
1087 description
1088 "VPN route leaking parameters.";
1089 leaf import-vpn {
1090 type boolean;
1091 default "false";
1092 description
1093 "Import routes from default instance VPN RIB.";
1094 }
1095
1096 leaf export-vpn {
1097 type boolean;
1098 default "false";
1099 description
1100 "Export routes to default instance VPN RIB.";
1101 }
1102
1103 list import-vrf-list {
1104 key "vrf";
1105 description
1106 "List of VRFs to import routes from.";
1107 leaf vrf {
1108 type frr-vrf:vrf-ref {
1109 require-instance false;
1110 }
1111 description
1112 "Routing instance.";
1113 }
1114 }
1115
1116 uses rmap-policy-import;
1117
1118 uses rmap-policy-export;
1119 }
1120
1121 grouping global-afi-safi-vpn-config {
1122 container vpn-config {
3b66fcef
CS
1123 leaf rd {
1124 type string;
1125 description
1126 "Route distinguisher value as per RFC4364.";
1127 }
2228b116 1128
1129 uses vpn-label-params;
1130
1131 uses vpn-nexthop-params;
1132
1133 uses vpn-import-params;
1134
1135 uses vpn-route-target-params;
1136 }
1137 }
1138
1139 grouping global-afi-safi-vpn-network-config {
1140 list network-config {
1141 key "rd";
1142 description
1143 "A list of rd.";
1144 uses route-distinguisher-params;
1145
1146 list prefix-list {
1147 key "prefix";
1148 description
1149 "A list of prefix.";
1150 leaf prefix {
1151 type inet:ip-prefix;
1152 description
1153 "IP destination prefix.";
1154 }
1155
1156 leaf label-index {
1157 type uint32;
1158 mandatory true;
1159 description
1160 "Label index to associate with the prefix.";
1161 }
1162
1163 leaf rmap-policy-export {
45c70d4a 1164 type frr-route-map:route-map-ref;
2228b116 1165 description
1166 "Route-map to modify the attributes for Routes going out
1167 via BGP updates.";
1168 }
1169 }
1170 }
1171 }
1172}