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
124 "Do not prepend local-as to updates from EBGP peers. When
125 set to 'true' it will not prepend local-as to updates. When
126 set to 'false' it will prepend local-as to updates.";
133 "Do not prepend local-as to updates from IBGP peers.";
138 grouping neighbor-bfd-options {
139 container bfd-options {
147 leaf detect-multiplier {
148 when "../enable = 'true'";
154 "Detect multiplier.";
157 leaf required-min-rx {
158 when "../enable = 'true'";
165 "Required min receive interval.";
168 leaf desired-min-tx {
169 when "../enable = 'true'";
176 "Desired min transmit interval.";
180 when "../enable = 'true'";
181 type frr-bt:bfd-session-type;
182 default "not-configured";
187 leaf check-cp-failure {
188 when "../enable = 'true'";
192 "Link dataplane status with BGP control plane.";
197 grouping neighbor-remote-as {
198 container neighbor-remote-as {
199 leaf remote-as-type {
206 when "../remote-as-type = 'as-specified'";
209 "The remote autonomous system number received in
210 the BGP OPEN message.";
217 grouping neighbor-update-source {
219 "Source of routing updates.";
220 container update-source {
222 "Source of routing updates config.";
226 type inet:ip-address;
228 "IPv4 address/IPv6 address.";
232 case interface-based {
234 type frr-interface:interface-ref {
235 require-instance false;
238 "The local interface.";
245 grouping structure-neighbor-group-add-paths {
247 "Structural grouping used to include ADD-PATHs configuration
248 and state for both BGP neighbors and peer groups.";
249 container add-paths {
251 "Parameters relating to the advertisement and receipt of
252 multiple paths for a single NLRI (add-paths).";
254 "RFC 7911: ADD-PATH.";
256 type frr-bt:add-path-type;
259 "Enable ability to receive multiple path advertisements for
260 an NLRI from the neighbor or group.";
265 grouping structure-neighbor-group-as-path-options {
267 "Structural grouping used to include AS_PATH manipulation
268 configuration both BGP neighbors and peer groups.";
269 container as-path-options {
271 "AS_PATH manipulation parameters for the BGP neighbor or
274 case occurence-based {
280 "Specify the number of occurrences of the local BGP
281 speaker's AS that can occur within the AS_PATH before it
287 leaf allow-own-origin-as {
291 "When set to 'true' only accept my AS in the as-path
292 if the route was originated in my AS.";
297 leaf replace-peer-as {
301 "Replace occurrences of the peer's AS in the AS_PATH with
302 the local autonomous system number. This is same as override
308 grouping structure-neighbor-group-capability-options {
310 "Structural grouping used to include capability
311 configuration for both BGP neighbors and peer groups.";
312 container capability-options {
314 "Capability manipulation parameters for the BGP neighbor or
316 leaf dynamic-capability {
320 "When set to 'true' dynamic capability is advertise to this peer.";
323 leaf strict-capability {
327 "Strict capability negotiation match. When set to 'true'
328 remote and local capabilities are strictly compared
329 if capabilities are different, send Unsupported Capability
330 error then reset connection.";
333 leaf extended-nexthop-capability {
337 "When set to 'true' extended next-hop capability is advertise
341 leaf capability-negotiate {
345 "When set to 'true' sending Capability Negotiation in the open
346 message is suppressed to this peer.";
349 leaf override-capability {
353 "Overrides the result of Capability Negotiation, ignoring remote
354 peer's capability value, when set to 'true'.";
359 grouping structure-neighbor-default-originate-options {
361 "Structural grouping used to include default-originate
362 configuration for both BGP neighbors and peer groups.";
363 container default-originate {
365 "default originate parameters for the BGP neighbor or
371 "If set to 'true', send the default-route to the neighbour(s).";
375 type frr-route-map:route-map-ref;
377 "Route-map to specify criteria to originate default.";
382 grouping structure-neighbor-prefix-limit {
383 container prefix-limit {
385 "Parameters relating to the prefix limit for the AFI-SAFI.";
386 list direction-list {
389 type frr-bt:direction;
391 "Prefix limit applied on Tx route-updates or Rx route-updates.";
398 "Maximum number of prefixes that will be accepted from the
406 "Force check all received routes.";
410 when "../direction = 'in'";
417 "When set to 'true' only give warning message when limit
427 "Time interval in seconds after which the BGP session is
428 re-established after being torn down due to exceeding the
434 leaf shutdown-threshold-pct {
437 "Threshold on number of prefixes that can be received from
438 a neighbour before generation of warning messages or log
439 entries. Expressed as a percentage of max-prefixes.";
443 case threshold-restart {
444 leaf tr-shutdown-threshold-pct {
447 "Threshold on number of prefixes that can be received from
448 a neighbour before generation of warning messages or log
449 entries. Expressed as a percentage of max-prefixes.";
452 leaf tr-restart-timer {
456 "Time interval in seconds after which the BGP session is
457 re-established after being torn down due to exceeding the
462 case threshold-warning {
463 leaf tw-shutdown-threshold-pct {
466 "Threshold on number of prefixes that can be received from
467 a neighbour before generation of warning messages or log
468 entries. Expressed as a percentage of max-prefixes.";
471 leaf tw-warning-only {
475 "When set to 'true' only give warning message when limit
485 grouping structure-neighbor-nexthop-self {
486 container nexthop-self {
488 "Parameters relating to the nexthop-self for the AFI-SAFI.";
493 "When set to 'true', EBGP learned routes are announced with the
494 local speaker's nexthop.";
497 leaf next-hop-self-force {
501 "When set to 'true', EBGP learned routes are announced with the
502 local speaker's nexthop.";
507 grouping structure-neighbor-private-as {
508 container private-as {
510 "Parameters relating to the private-as for the AFI-SAFI.";
511 leaf remove-private-as-all {
515 "When set to 'true', private ASNs are removed from outbound updates;
516 applies to all AS numbers.";
519 leaf remove-private-as-all-replace {
523 "When set to 'true', private ASNs are replaced by the local
524 speaker's ASN in all outbound updates; applies to all AS numbers.";
527 leaf remove-private-as {
531 "When set to 'true', removes private ASNs in outbound updates;
532 applies to all AS numbers.";
535 leaf remove-private-as-replace {
539 "When set to 'true', private ASNs are replaced with the local
540 speaker's ASN in all outbound updates; applies to all AS numbers.";
545 grouping structure-neighbor-weight {
548 "Parameters relating to the weight for the AFI-SAFI.";
549 leaf weight-attribute {
554 "Set default weight for routes from this neighbor.";
559 grouping structure-neighbor-route-reflector {
560 container route-reflector {
562 "Parameters relating to the route-reflector for the AFI-SAFI.";
563 leaf route-reflector-client {
567 "Configure a neighbor as route reflector client.";
572 grouping structure-neighbor-route-server {
573 container route-server {
575 "Parameters relating to the route-server for the AFI-SAFI.";
576 leaf route-server-client {
580 "Configure a neighbor as route server client.";
585 grouping structure-neighbor-send-community {
586 container send-community {
588 "Parameters relating to the send-community for the AFI-SAFI.";
589 leaf send-community {
593 "Send standard community attribute to this neighbor.";
596 leaf send-ext-community {
600 "Send extended community attribute to this neighbor.";
603 leaf send-large-community {
607 "Send large community attribute to this neighbor.";
612 grouping structure-neighbor-group-admin-shutdown {
614 "Structural grouping used to include admin-shutdown
615 configuration for both BGP neighbors and peer groups.";
616 container admin-shutdown {
618 "BGP Administrative Shutdown Communication.";
622 "When set to 'true', BGP shutdown communication is enabled.";
630 "draft-ietf-idr-shutdown-06";
635 grouping structure-neighbor-group-graceful-restart {
637 "Structural grouping used to include graceful-restart
638 configuration for both BGP neighbors and peer groups.";
639 container graceful-restart {
641 "BGP Graceful restart feature.";
643 case graceful-restart-mode {
648 "Enable or disable the graceful-restart capability.
649 Setting this value to 'true' enables the graceful-restart
650 and helper both at peer level. Setting this value to 'false'
651 disables graceful restart and helper mode. The peer will inherit
652 global configuration.";
656 case graceful-restart-helper-mode {
657 leaf graceful-restart-helper {
661 "Setting this value to 'true' enables helper mode for the peer
662 Setting this value to 'false' disables the helper mode. The
663 peer will inherit global configuration.";
667 case graceful-restart-disable-mode {
668 leaf graceful-restart-disable {
672 "Setting this value to 'true' disables the graceful-restart
673 and helper Mode. Setting this value to 'false' causes the peer
674 to inherit global configuration.";
681 grouping structure-neighbor-group-soft-reconfiguration {
683 "Structural grouping used to include soft-reconfiguration
684 configuration for both BGP neighbors and peer groups.";
685 leaf soft-reconfiguration {
689 "Allow inbound soft reconfiguration for this neighbor.";
693 grouping structure-neighbor-group-attr-unchanged {
695 "Structural grouping used to include BGP route propagation
696 rules configuration for both BGP neighbors and peer groups.";
697 container attr-unchanged {
699 "BGP route propagation rules configuration.";
700 leaf as-path-unchanged {
704 "When set to 'true' as-path attribute is propagated unchanged.";
707 leaf next-hop-unchanged {
711 "When set to 'true' next-hop attribute is propagated unchanged.";
718 "When set to 'true' med attribute is propagated unchanged.";
723 grouping structure-neighbor-group-orf-capability {
725 "Structural grouping used to include orf
726 configuration for both BGP neighbors and peer groups.";
727 container orf-capability {
734 "Setting to 'true' advertises the ORF capability.";
743 "When set to 'true' it receives the orf capability.";
752 "When set to 'true' it advertises/receives the orf capability.";
759 grouping structure-neighbor-config-timers {
761 "Structural grouping used to include per neighbor timers
762 configuration for both BGP neighbors and peer groups.";
764 leaf advertise-interval {
770 "Minimum interval between sending BGP routing updates.";
779 "BGP connect timer.";
782 uses neighbor-timers;
786 grouping structure-neighbor-group-filter-config {
788 "Structural grouping used to include filter
789 configuration for both BGP neighbors and peer groups.";
790 container filter-config {
792 "BGP Policy configuration for both BGP neighbors and groups.";
793 uses rmap-policy-import;
795 uses rmap-policy-export;
797 uses plist-policy-import;
799 uses plist-policy-export;
801 uses access-list-policy-import;
803 uses access-list-policy-export;
805 uses as-path-filter-list-policy-import;
807 uses as-path-filter-list-policy-export;
809 uses unsuppress-map-policy-import;
811 uses unsuppress-map-policy-export;