]> git.proxmox.com Git - mirror_frr.git/blame - yang/frr-bgp-common.yang
Merge pull request #7683 from volta-networks/feat_zapi_client_close
[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
361 leaf ebgp-requires-policy {
362 type boolean;
363 default "true";
364 description
365 "When set to 'true' BGP speaker requires in and out policy
366 for EBGP peers (RFC8212).";
367 }
368
369 leaf show-hostname {
370 type boolean;
371 default "false";
372 description
373 "When set to 'true' BGP show hostname in certain command outputs.";
374 }
375
376 leaf show-nexthop-hostname {
377 type boolean;
378 default "false";
379 description
380 "When set to 'true' BGP show hostname for nexthop in certain
381 command outputs.";
382 }
383 }
384
385 grouping global-neighbor-config {
386 container global-neighbor-config {
387 leaf dynamic-neighbors-limit {
388 type uint32 {
389 range "1..5000";
390 }
391 description
392 "Maximum number of BGP Dynamic Neighbors that can be created.";
393 }
394
395 leaf log-neighbor-changes {
396 type boolean;
397 default "false";
398 description
399 "When set to 'true' BGP will start logging neighbor up/down and reset reason.
400 When set to 'false' BGP will stop logging neighbor up/down and reset reason.";
401 }
402
403 container packet-quanta-config {
404 leaf wpkt-quanta {
405 type uint32 {
406 range "1..64";
407 }
408 default "64";
409 description
410 "How many packets to write to peer socket per run.";
411 }
412
413 leaf rpkt-quanta {
414 type uint32 {
415 range "1..10";
416 }
417 default "10";
418 description
419 "How many packets to read from peer socket per I/O cycle.";
420 }
421 }
422 }
423 }
424
425 grouping global-update-group-config {
426 container global-update-group-config {
427 leaf subgroup-pkt-queue-size {
428 type uint32 {
429 range "20..100";
430 }
431 default "40";
432 description
433 "Subgroup packet queue size.";
434 }
435
436 leaf coalesce-time {
437 type uint32 {
438 range "0..4294967295";
439 }
440 units "miliseconds";
441 default "1000";
442 description
443 "Configures the Subgroup coalesce timer.";
444 }
445 }
446 }
447
448 grouping global-network-config {
449 leaf import-check {
450 type boolean;
451 default "false";
452 description
453 "When set to 'true' bgp creates entries for network statements
454 if a matching prefix exists in the rib. When set to 'false' bgp
455 creates entries for networks that the router cannot reach.";
456 }
457 }
458
459 grouping neighbor-timers {
460 leaf hold-time {
461 type uint16 {
462 range "0 | 3..65535";
463 }
464 units "seconds";
465 default "180";
466 description
467 "Time interval (in seconds) for the HoldTimer established
468 with the peer. When read as operational data (ro), the
469 value of this object is calculated by this BGP speaker,
470 using the smaller of the values in hold-time that was
471 configured (rw) in the running datastore and the Hold Time
472 received in the OPEN message.
473
474 This value must be at least three seconds
475 if it is not zero (0).
476
477 If the Hold Timer has not been established
478 with the peer this object MUST have a value
479 of zero (0).
480
481 If the configured value of hold-time object was
482 a value of (0), then when read this object MUST have a
483 value of (0) also.";
484 reference
485 "RFC 4271";
486 }
487
488 leaf keepalive {
489 type uint16 {
490 range "0..65535";
491 }
492 units "seconds";
493 default "60";
494 description
495 "When used as a configuration (rw) value, this Time interval
496 (in seconds) for the KeepAlive timer configured for this BGP
497 speaker with this peer. The value of this object will only
498 determine the KEEPALIVE messages' frequency relative to
499 the value specified in configured value for hold-time.
500
501 If the value of this object is zero (0), no periodical
502 KEEPALIVE messages are sent to the peer after the BGP
503 connection has been established. The suggested value for
504 this timer is 30 seconds.;
505
506 The actual time interval for the KEEPALIVE messages is
507 indicated by operational value of keepalive. That value
508 of this object is calculated by this BGP speaker such that,
509 when compared with hold-time, it has the same proportion
510 that keepalive has, compared with hold-time. A
511 reasonable maximum value for this timer would be one third
512 of that of hold-time.";
513 reference
514 "RFC 4271";
515 }
516 }
517
518 grouping global-config-timers {
519 container global-config-timers {
520 leaf rmap-delay-time {
521 type uint16 {
522 range "0..600";
523 }
524 units "seconds";
525 default "5";
526 description
527 "Time to wait before processing route-map changes.";
528 }
529
530 leaf update-delay-time {
531 type uint16 {
532 range "0..3600";
533 }
534 units "seconds";
535 description
536 "Time to force initial delay for best-path and updates.";
537 }
538
539 leaf establish-wait-time {
540 type uint16 {
541 range "1..3600";
542 }
543 units "seconds";
544 description
545 "Time to force initial delay for updates.";
546 }
547
548 leaf connect-retry-interval {
549 type uint16 {
550 range "1..max";
551 }
552 units "seconds";
553 default "120";
554 description
555 "Time interval (in seconds) for the ConnectRetryTimer. The
556 suggested value for this timer is 120 seconds.";
557 reference
558 "RFC 4271, This is the value used
559 to initialize the 'ConnectRetryTimer'.";
560 }
561
562 uses neighbor-timers;
563 }
564 }
565
566 grouping graceful-restart-config {
567 description
568 "Configuration parameters relating to BGP graceful restart.";
569 choice mode {
570 case graceful-restart-mode {
571 leaf enabled {
572 type boolean;
573 default "false";
574 description
575 "Enable or disable the graceful-restart capability. When set to 'true'
576 it will enable graceful restart and helper both globally. When set
577 to 'false' it will enable the default behaviour global helper mode.";
578 }
579 }
580
581 case graceful-restart-disable-mode {
582 leaf graceful-restart-disable {
583 type boolean;
584 default "false";
585 description
586 "When set to 'true' it will disable graceful restart and helper both
587 globally. when set to 'false' it will enable the default behaviour
588 global helper mode.";
589 }
590 }
591 }
592
593 leaf preserve-fw-entry {
594 type boolean;
595 default "false";
596 description
597 "Sets F-bit indication that fib is preserved while doing Graceful Restart.
598 When set to 'true' Zebra would preserve the FIB entry on the restarting
599 node.";
600 }
601
602 leaf restart-time {
603 type uint16 {
604 range "1..3600";
605 }
606 units "seconds";
607 default "120";
608 description
609 "Estimated time (in seconds) for the local BGP speaker to
610 restart a session. This value is advertise in the graceful
611 restart BGP capability. This is a 12-bit value, referred to
612 as Restart Time in RFC4724. Per RFC4724, the suggested
613 default value is <= the hold-time value. This timer is
614 applicable for helper node.";
615 reference
616 "RFC 4724: Graceful Restart Mechanism for BGP.";
617 }
618
619 leaf stale-routes-time {
620 type uint16 {
621 range "1..3600";
622 }
623 units "seconds";
624 default "360";
625 description
626 "An upper-bound on the time that stale routes will be
627 retained by a router after a session is restarted. If an
628 End-of-RIB (EOR) marker is received prior to this timer
629 expiring stale-routes will be flushed upon its receipt - if
630 no EOR is received, then when this timer expires stale paths
631 will be purged. This timer is applicable for restarting node.";
632 reference
633 "RFC 4724: Graceful Restart Mechanism for BGP.";
634 }
635
636 leaf selection-deferral-time {
637 type uint16 {
638 range "0..3600";
639 }
640 units "seconds";
641 default "360";
642 description
643 "An upper-bound on the time that restarting router defers
644 the route selection process after restart.";
645 reference
646 "RFC 4724: Graceful Restart Mechanism for BGP.";
647 }
648
649 leaf rib-stale-time {
650 type uint16 {
651 range "1..3600";
652 }
653 units "seconds";
654 default "500";
655 description
656 "An upper-bound on the time that helper router holds the
657 stale routes in Zebra, When this timer gets expired Zebra
658 removes the stale routes.";
659 }
660 }
661
662 grouping global-group-use-multiple-paths {
663 description
664 "Common grouping used for both global and groups which provides
665 configuration parameters relating to use of multiple paths.";
666 container use-multiple-paths {
667 description
668 "Parameters related to the use of multiple paths for the
669 same NLRI.";
670 container ebgp {
671 description
672 "Multi-Path parameters for EBGP.";
673 leaf maximum-paths {
674 type uint16;
675 default "64";
676 description
677 "Maximum number of parallel paths to consider when using
678 BGP multi-path. The default is use a single path.";
679 }
680 }
681
682 container ibgp {
683 description
684 "Multi-Path parameters for IBGP.";
685 leaf maximum-paths {
686 type uint16;
687 default "64";
688 description
689 "Maximum number of parallel paths to consider when using
690 IBGP multi-path. The default is to use a single path.";
691 }
692
693 leaf cluster-length-list {
694 when "../maximum-paths != 0";
695 type boolean;
696 default "false";
697 description
698 "When set to 'true' route with the shortest cluster-list
699 length is used. The cluster-list reflects the IBGP
700 reflection path the route has taken. It's the part
701 of route selection algo.";
702 }
703 }
704 }
705 }
706
707 grouping global-redistribute {
708 description
709 "List of route redistribution per AFI.";
710 list redistribution-list {
711 key "route-type route-instance";
712 leaf route-type {
713 type frr-rt-type:frr-route-types;
714 description
715 "Protocol route type.";
716 }
717
718 leaf route-instance {
719 type uint16 {
720 range "0..65535";
721 }
722 description
723 "Protocol Instance.";
724 }
725
726 leaf metric {
727 type uint32 {
728 range "0..4294967295";
729 }
730 description
731 "Metric for redistributed routes.";
732 }
733
734 leaf rmap-policy-import {
45c70d4a 735 type frr-route-map:route-map-ref;
2228b116 736 description
737 "Route-map to be applied for redistributed routes into the bgp.";
738 }
739 }
740 }
741
742 grouping mp-afi-safi-network-config {
743 leaf label-index {
744 type rt-types:mpls-label;
745 description
746 "Label index to associate with the prefix.";
747 }
748
749 leaf rmap-policy-export {
45c70d4a 750 type frr-route-map:route-map-ref;
2228b116 751 description
752 "Route-map to modify the attributes for Routes going out
753 via BGP updates.";
754 }
755 }
756
757 grouping mp-afi-safi-agg-route-config {
758 leaf as-set {
759 type boolean;
760 default "false";
761 description
762 "When set to 'true' AS set path information is generated
763 for aggregate address. When set to 'false' AS set path
764 information is not generated.";
765 }
766
767 leaf summary-only {
768 type boolean;
769 default "false";
770 description
771 "When set to 'true' it advertise only the aggregate route
772 and suppress the advertisement of all the component routes.
773 When set to 'false' all more-specific routes summarized
774 by the aggregate route are advertised.";
775 }
776
777 leaf rmap-policy-export {
45c70d4a 778 type frr-route-map:route-map-ref;
2228b116 779 description
780 "Apply route map to aggregate network.";
781 }
3b66fcef
CS
782
783 leaf origin {
784 type enumeration {
785 enum "igp" {
786 value 0;
787 description
788 "Local IGP.";
789 }
790 enum "egp" {
791 value 1;
792 description
793 "Remote EGP.";
794 }
795 enum "incomplete" {
796 value 2;
797 description
798 "Unknown heritage.";
799 }
800 enum "unspecified" {
801 value 255;
802 description
803 "Unspecified.";
804 }
805 }
806 default "unspecified";
807 description
808 "BGP origin type.";
809 }
90e21f35 810
fa423774
CS
811 leaf match-med {
812 type boolean;
813 default "false";
814 description
815 "When set to 'true' aggregate-route matches only
816 med.";
817 }
90e21f35
CS
818
819 leaf suppress-map {
820 type string;
821 description
822 "Suppress more specific routes specified in route-map.";
823 }
2228b116 824 }
825
826 grouping admin-distance {
827 container admin-distance {
828 description
829 "Administrative distance (or preference) assigned to
830 routes received from different sources
831 (external, internal, and local).";
832 leaf external {
833 type uint8 {
834 range "1..255";
835 }
3b66fcef 836 default "20";
2228b116 837 description
838 "Administrative distance for routes learned from
839 external BGP (EBGP).";
840 }
841
842 leaf internal {
843 type uint8 {
844 range "1..255";
845 }
3b66fcef 846 default "200";
2228b116 847 description
848 "Administrative distance for routes learned from
849 internal BGP (IBGP).";
850 }
851
852 leaf local {
853 type uint8 {
854 range "1..255";
855 }
3b66fcef 856 default "200";
2228b116 857 description
858 "Administrative distance for routes learned from
859 local.";
860 }
861 }
862 }
863
864 grouping distance-per-route-config {
865 leaf distance {
866 type uint8 {
867 range "1..255";
868 }
869 mandatory true;
870 description
871 "Administrative distance for route.";
872 }
873
874 leaf access-list-policy-export {
875 type frr-bt:access-list-ref;
876 description
877 "Access-list policy applied on routes going from BGP to Zebra.";
878 }
879 }
880
881 grouping route-flap-dampening {
882 container route-flap-dampening {
883 description
884 "Dampening feature";
885 leaf enable {
886 type boolean;
887 default "false";
888 description
889 "Enable route flap dampening.";
890 }
891
892 leaf reach-decay {
893 when "../enable = 'true'";
894 type uint8 {
895 range "1..45";
896 }
897 units "seconds";
898 default "15";
899 description
900 "This value specifies the time desired for the instability
901 metric value to reach one-half of its current value when
902 the route is reachable. This half-life value determines
903 the rate at which the metric value is decayed. A smaller
904 half-life value makes a suppressed route reusable sooner
905 than a larger value. The accumulated penalty will be reduced
906 to half after this duration.";
907 }
908
909 leaf reuse-above {
910 when "../enable = 'true'";
911 type uint16 {
912 range "1..20000";
913 }
914 default "750";
915 description
916 "This is the value of the instability metric at which a
917 suppressed route becomes unsuppressed if it is reachable
918 but currently suppressed. The value assigned to
919 reuse-below must be less than suppress-above.";
920 }
921
922 leaf suppress-above {
923 when "../enable = 'true'";
924 type uint16 {
925 range "1..20000";
926 }
927 default "2000";
928 description
929 "This is the value of the instability metric at which
930 route suppression takes place. A route is not installed
931 in the forwarding information base (FIB), or announced
932 even if it is reachable during the period that it is
933 suppressed.";
934 }
935
936 leaf unreach-decay {
937 when "../enable = 'true'";
938 type uint8 {
939 range "1..255";
940 }
941 units "seconds";
942 default "60";
943 description
944 "This value acts the same as reach-decay except that it
945 specifies the rate at which the instability metric is
946 decayed when a route is unreachable. It should have a
947 value greater than or equal to reach-decay.";
948 }
949 }
950 }
951
952 grouping flow-spec-config {
953 container flow-spec-config {
954 description
955 "Flow spec feature.";
956 leaf interface {
957 type frr-interface:interface-ref {
958 require-instance false;
959 }
960 description
961 "The local interface.";
962 }
963 }
964 }
965
966 grouping global-graceful-shutdown {
967 description
968 "Structural grouping used to include graceful-shutdown
969 configuration for both BGP neighbors and peer groups.";
970 container graceful-shutdown {
971 description
972 "BGP Graceful shutdown feature.";
973 leaf enable {
974 type boolean;
975 default "false";
976 description
977 "Enable graceful-shutdown feature.";
978 }
979 }
980 }
981
982 grouping global-filter-config {
983 description
984 "Structural grouping used to include filter
985 configuration for BGP RIB table.";
986 container filter-config {
987 description
988 "BGP table to RIB route download filter.";
989 uses rmap-policy-export;
990 }
991 }
992
993 grouping route-distinguisher-params {
994 description
995 "Route distinguisher value as per RFC4364.";
996 leaf rd {
997 type rt-types:route-distinguisher;
998 description
999 "Route distinguisher value as per RFC4364.";
1000 }
1001 }
1002
1003 grouping vpn-label-params {
1004 description
1005 "Label value for VRF.";
1006 choice label-allocation-mode {
1007 case manual {
1008 leaf label {
1009 type rt-types:mpls-label;
1010 description
1011 "Label index to associate with the prefix.";
1012 }
1013 }
1014
1015 case auto {
1016 leaf label-auto {
1017 type boolean;
1018 default "false";
1019 description
1020 "Automatically assign a label.";
1021 }
1022 }
1023 }
1024 }
1025
1026 grouping vpn-nexthop-params {
1027 description
1028 "Specify next hop to use for VRF advertised prefixes.";
1029 leaf nexthop {
1030 type inet:ip-address;
1031 description
1032 "Nexthop IP address.";
1033 }
1034 }
1035
1036 grouping rt-list {
1037 description
1038 "Route Target list";
1039 leaf-list import-rt-list {
1040 type rt-types:route-target;
1041 description
1042 "For routes leaked from vpn to current address-family: match any.";
1043 }
1044
1045 leaf-list export-rt-list {
1046 type rt-types:route-target;
1047 description
1048 "For routes leaked from current address-family to vpn: set.";
1049 }
1050 }
1051
1052 grouping vpn-route-target-params {
1053 description
1054 "Route Target value.";
1055 leaf redirect-rt {
1056 type rt-types:route-target;
1057 description
1058 "Flow-spec redirect type route target.";
1059 }
1060
1061 choice rt-direction {
1062 case import-export {
1063 uses rt-list;
1064 }
3b66fcef 1065
2228b116 1066 case both {
1067 leaf-list rt-list {
1068 type rt-types:route-target;
1069 description
1070 "Both import: match any and export: set.";
1071 }
1072 }
1073 }
1074 }
1075
1076 grouping vpn-import-params {
1077 description
1078 "VPN route leaking parameters.";
1079 leaf import-vpn {
1080 type boolean;
1081 default "false";
1082 description
1083 "Import routes from default instance VPN RIB.";
1084 }
1085
1086 leaf export-vpn {
1087 type boolean;
1088 default "false";
1089 description
1090 "Export routes to default instance VPN RIB.";
1091 }
1092
1093 list import-vrf-list {
1094 key "vrf";
1095 description
1096 "List of VRFs to import routes from.";
1097 leaf vrf {
1098 type frr-vrf:vrf-ref {
1099 require-instance false;
1100 }
1101 description
1102 "Routing instance.";
1103 }
1104 }
1105
1106 uses rmap-policy-import;
1107
1108 uses rmap-policy-export;
1109 }
1110
1111 grouping global-afi-safi-vpn-config {
1112 container vpn-config {
3b66fcef
CS
1113 leaf rd {
1114 type string;
1115 description
1116 "Route distinguisher value as per RFC4364.";
1117 }
2228b116 1118
1119 uses vpn-label-params;
1120
1121 uses vpn-nexthop-params;
1122
1123 uses vpn-import-params;
1124
1125 uses vpn-route-target-params;
1126 }
1127 }
1128
1129 grouping global-afi-safi-vpn-network-config {
1130 list network-config {
1131 key "rd";
1132 description
1133 "A list of rd.";
1134 uses route-distinguisher-params;
1135
1136 list prefix-list {
1137 key "prefix";
1138 description
1139 "A list of prefix.";
1140 leaf prefix {
1141 type inet:ip-prefix;
1142 description
1143 "IP destination prefix.";
1144 }
1145
1146 leaf label-index {
1147 type uint32;
1148 mandatory true;
1149 description
1150 "Label index to associate with the prefix.";
1151 }
1152
1153 leaf rmap-policy-export {
45c70d4a 1154 type frr-route-map:route-map-ref;
2228b116 1155 description
1156 "Route-map to modify the attributes for Routes going out
1157 via BGP updates.";
1158 }
1159 }
1160 }
1161 }
1162}