1 submodule frr-bgp-common-structure {
8 import ietf-inet-types {
12 import frr-route-map {
16 import frr-interface {
20 import ietf-bgp-types {
24 import frr-bgp-types {
28 include frr-bgp-common;
33 "FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development
34 List: <mailto:dev@lists.frrouting.org>";
36 "This submodule contains general data definitions for use in BGP.
38 Copyright 2020 FRRouting
40 Redistribution and use in source and binary forms, with or without
41 modification, are permitted provided that the following conditions
44 1. Redistributions of source code must retain the above copyright notice,
45 this list of conditions and the following disclaimer.
47 2. Redistributions in binary form must reproduce the above copyright
48 notice, this list of conditions and the following disclaimer in the
49 documentation and/or other materials provided with the distribution.
51 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
52 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
53 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
54 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
55 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
56 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
57 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
58 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
59 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
60 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
61 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
68 grouping structure-neighbor-group-ebgp-multihop {
70 "Structural grouping used to include EBGP multi-hop
71 configuration for both BGP neighbors and peer groups.";
72 container ebgp-multihop {
74 "EBGP multi-hop parameters for the BGP group.";
75 choice hop-count-choice {
76 case default-hop-count {
81 "When enabled the referenced group or neighbors are
82 permitted to be indirectly connected - including cases
83 where the TTL can be decremented between the BGP peers.";
93 "Time-to-live value to use when packets are sent to the
94 referenced group or neighbors and ebgp-multihop is
100 leaf disable-connected-check {
104 "When set to 'true' it enforces EBGP neighbors perform multihop.";
109 grouping neighbor-local-as-options {
114 "The local autonomous system number that is to be used when
115 establishing sessions with the remote peer or peer group, if
116 this differs from the global BGP router autonomous system
121 when "../local-as != 0";
125 "Do not prepend local-as to updates from EBGP peers. When
126 set to 'true' it will not prepend local-as to updates. When
127 set to 'false' it will prepend local-as to updates.";
134 "Do not prepend local-as to updates from IBGP peers.";
139 grouping neighbor-bfd-options {
140 container bfd-options {
148 leaf detect-multiplier {
149 when "../enable = 'true'";
155 "Detect multiplier.";
158 leaf required-min-rx {
159 when "../enable = 'true'";
166 "Required min receive interval.";
169 leaf desired-min-tx {
170 when "../enable = 'true'";
177 "Desired min transmit interval.";
181 when "../enable = 'true'";
182 type frr-bt:bfd-session-type;
183 default "not-configured";
188 leaf check-cp-failure {
189 when "../enable = 'true'";
193 "Link dataplane status with BGP control plane.";
198 grouping neighbor-remote-as {
199 container neighbor-remote-as {
200 leaf remote-as-type {
207 when "../remote-as-type = 'as-specified'";
210 "The remote autonomous system number received in
211 the BGP OPEN message.";
218 grouping neighbor-update-source {
220 "Source of routing updates.";
221 container update-source {
223 "Source of routing updates config.";
227 type inet:ip-address;
229 "IPv4 address/IPv6 address.";
233 case interface-based {
235 type frr-interface:interface-ref {
236 require-instance false;
239 "The local interface.";
246 grouping structure-neighbor-group-add-paths {
248 "Structural grouping used to include ADD-PATHs configuration
249 and state for both BGP neighbors and peer groups.";
250 container add-paths {
252 "Parameters relating to the advertisement and receipt of
253 multiple paths for a single NLRI (add-paths).";
255 "RFC 7911: ADD-PATH.";
257 type frr-bt:add-path-type;
260 "Enable ability to receive multiple path advertisements for
261 an NLRI from the neighbor or group.";
266 grouping structure-neighbor-group-as-path-options {
268 "Structural grouping used to include AS_PATH manipulation
269 configuration both BGP neighbors and peer groups.";
270 container as-path-options {
272 "AS_PATH manipulation parameters for the BGP neighbor or
275 case occurence-based {
281 "Specify the number of occurrences of the local BGP
282 speaker's AS that can occur within the AS_PATH before it
288 leaf allow-own-origin-as {
292 "When set to 'true' only accept my AS in the as-path
293 if the route was originated in my AS.";
298 leaf replace-peer-as {
302 "Replace occurrences of the peer's AS in the AS_PATH with
303 the local autonomous system number. This is same as override
309 grouping structure-neighbor-group-capability-options {
311 "Structural grouping used to include capability
312 configuration for both BGP neighbors and peer groups.";
313 container capability-options {
315 "Capability manipulation parameters for the BGP neighbor or
317 leaf dynamic-capability {
321 "When set to 'true' dynamic capability is advertise to this peer.";
324 leaf strict-capability {
328 "Strict capability negotiation match. When set to 'true'
329 remote and local capabilities are strictly compared
330 if capabilities are different, send Unsupported Capability
331 error then reset connection.";
334 leaf extended-nexthop-capability {
338 "When set to 'true' extended next-hop capability is advertise
342 leaf capability-negotiate {
346 "When set to 'true' sending Capability Negotiation in the open
347 message is suppressed to this peer.";
350 leaf override-capability {
354 "Overrides the result of Capability Negotiation, ignoring remote
355 peer's capability value, when set to 'true'.";
360 grouping structure-neighbor-default-originate-options {
362 "Structural grouping used to include default-originate
363 configuration for both BGP neighbors and peer groups.";
364 container default-originate {
366 "default originate parameters for the BGP neighbor or
372 "If set to 'true', send the default-route to the neighbour(s).";
376 type frr-route-map:route-map-ref;
378 "Route-map to specify criteria to originate default.";
383 grouping structure-neighbor-prefix-limit {
384 container prefix-limit {
386 "Parameters relating to the prefix limit for the AFI-SAFI.";
387 list direction-list {
390 type frr-bt:direction;
392 "Prefix limit applied on Tx route-updates or Rx route-updates.";
399 "Maximum number of prefixes that will be accepted from the
407 "Force check all received routes.";
411 when "../direction = 'in'";
418 "When set to 'true' only give warning message when limit
428 "Time interval in seconds after which the BGP session is
429 re-established after being torn down due to exceeding the
435 leaf shutdown-threshold-pct {
438 "Threshold on number of prefixes that can be received from
439 a neighbour before generation of warning messages or log
440 entries. Expressed as a percentage of max-prefixes.";
444 case threshold-restart {
445 leaf tr-shutdown-threshold-pct {
448 "Threshold on number of prefixes that can be received from
449 a neighbour before generation of warning messages or log
450 entries. Expressed as a percentage of max-prefixes.";
453 leaf tr-restart-timer {
457 "Time interval in seconds after which the BGP session is
458 re-established after being torn down due to exceeding the
463 case threshold-warning {
464 leaf tw-shutdown-threshold-pct {
467 "Threshold on number of prefixes that can be received from
468 a neighbour before generation of warning messages or log
469 entries. Expressed as a percentage of max-prefixes.";
472 leaf tw-warning-only {
476 "When set to 'true' only give warning message when limit
486 grouping structure-neighbor-nexthop-self {
487 container nexthop-self {
489 "Parameters relating to the nexthop-self for the AFI-SAFI.";
494 "When set to 'true', EBGP learned routes are announced with the
495 local speaker's nexthop.";
498 leaf next-hop-self-force {
502 "When set to 'true', EBGP learned routes are announced with the
503 local speaker's nexthop.";
508 grouping structure-neighbor-private-as {
509 container private-as {
511 "Parameters relating to the private-as for the AFI-SAFI.";
512 leaf remove-private-as-all {
516 "When set to 'true', private ASNs are removed from outbound updates;
517 applies to all AS numbers.";
520 leaf remove-private-as-all-replace {
524 "When set to 'true', private ASNs are replaced by the local
525 speaker's ASN in all outbound updates; applies to all AS numbers.";
528 leaf remove-private-as {
532 "When set to 'true', removes private ASNs in outbound updates;
533 applies to all AS numbers.";
536 leaf remove-private-as-replace {
540 "When set to 'true', private ASNs are replaced with the local
541 speaker's ASN in all outbound updates; applies to all AS numbers.";
546 grouping structure-neighbor-weight {
549 "Parameters relating to the weight for the AFI-SAFI.";
550 leaf weight-attribute {
555 "Set default weight for routes from this neighbor.";
560 grouping structure-neighbor-route-reflector {
561 container route-reflector {
563 "Parameters relating to the route-reflector for the AFI-SAFI.";
564 leaf route-reflector-client {
568 "Configure a neighbor as route reflector client.";
573 grouping structure-neighbor-route-server {
574 container route-server {
576 "Parameters relating to the route-server for the AFI-SAFI.";
577 leaf route-server-client {
581 "Configure a neighbor as route server client.";
586 grouping structure-neighbor-send-community {
587 container send-community {
589 "Parameters relating to the send-community for the AFI-SAFI.";
590 leaf send-community {
594 "Send standard community attribute to this neighbor.";
597 leaf send-ext-community {
601 "Send extended community attribute to this neighbor.";
604 leaf send-large-community {
608 "Send large community attribute to this neighbor.";
613 grouping structure-neighbor-group-admin-shutdown {
615 "Structural grouping used to include admin-shutdown
616 configuration for both BGP neighbors and peer groups.";
617 container admin-shutdown {
619 "BGP Administrative Shutdown Communication.";
623 "When set to 'true', BGP shutdown communication is enabled.";
631 "draft-ietf-idr-shutdown-06";
636 grouping structure-neighbor-group-graceful-restart {
638 "Structural grouping used to include graceful-restart
639 configuration for both BGP neighbors and peer groups.";
640 container graceful-restart {
642 "BGP Graceful restart feature.";
644 case graceful-restart-mode {
649 "Enable or disable the graceful-restart capability.
650 Setting this value to 'true' enables the graceful-restart
651 and helper both at peer level. Setting this value to 'false'
652 disables graceful restart and helper mode. The peer will inherit
653 global configuration.";
657 case graceful-restart-helper-mode {
658 leaf graceful-restart-helper {
662 "Setting this value to 'true' enables helper mode for the peer
663 Setting this value to 'false' disables the helper mode. The
664 peer will inherit global configuration.";
668 case graceful-restart-disable-mode {
669 leaf graceful-restart-disable {
673 "Setting this value to 'true' disables the graceful-restart
674 and helper Mode. Setting this value to 'false' causes the peer
675 to inherit global configuration.";
682 grouping structure-neighbor-group-soft-reconfiguration {
684 "Structural grouping used to include soft-reconfiguration
685 configuration for both BGP neighbors and peer groups.";
686 leaf soft-reconfiguration {
690 "Allow inbound soft reconfiguration for this neighbor.";
694 grouping structure-neighbor-group-attr-unchanged {
696 "Structural grouping used to include BGP route propagation
697 rules configuration for both BGP neighbors and peer groups.";
698 container attr-unchanged {
700 "BGP route propagation rules configuration.";
701 leaf as-path-unchanged {
705 "When set to 'true' as-path attribute is propagated unchanged.";
708 leaf next-hop-unchanged {
712 "When set to 'true' next-hop attribute is propagated unchanged.";
719 "When set to 'true' med attribute is propagated unchanged.";
724 grouping structure-neighbor-group-orf-capability {
726 "Structural grouping used to include orf
727 configuration for both BGP neighbors and peer groups.";
728 container orf-capability {
735 "Setting to 'true' advertises the ORF capability.";
744 "When set to 'true' it receives the orf capability.";
753 "When set to 'true' it advertises/receives the orf capability.";
760 grouping structure-neighbor-config-timers {
762 "Structural grouping used to include per neighbor timers
763 configuration for both BGP neighbors and peer groups.";
765 leaf advertise-interval {
771 "Minimum interval between sending BGP routing updates.";
780 "BGP connect timer.";
783 uses neighbor-timers;
787 grouping structure-neighbor-group-filter-config {
789 "Structural grouping used to include filter
790 configuration for both BGP neighbors and peer groups.";
791 container filter-config {
793 "BGP Policy configuration for both BGP neighbors and groups.";
794 uses rmap-policy-import;
796 uses rmap-policy-export;
798 uses plist-policy-import;
800 uses plist-policy-export;
802 uses access-list-policy-import;
804 uses access-list-policy-export;
806 uses as-path-filter-list-policy-import;
808 uses as-path-filter-list-policy-export;
810 uses unsuppress-map-policy-import;
812 uses unsuppress-map-policy-export;