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 {
31 "FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development
32 List: <mailto:dev@lists.frrouting.org>";
34 "This submodule contains general data definitions for use in BGP.
36 Copyright 2020 FRRouting
38 Redistribution and use in source and binary forms, with or without
39 modification, are permitted provided that the following conditions
42 1. Redistributions of source code must retain the above copyright notice,
43 this list of conditions and the following disclaimer.
45 2. Redistributions in binary form must reproduce the above copyright
46 notice, this list of conditions and the following disclaimer in the
47 documentation and/or other materials provided with the distribution.
49 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
50 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
51 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
52 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
53 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
54 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
55 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
56 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
57 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
58 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
59 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
66 grouping structure-neighbor-group-ebgp-multihop {
68 "Structural grouping used to include EBGP multi-hop
69 configuration for both BGP neighbors and peer groups.";
70 container ebgp-multihop {
72 "EBGP multi-hop parameters for the BGP group.";
73 choice hop-count-choice {
74 case default-hop-count {
79 "When enabled the referenced group or neighbors are
80 permitted to be indirectly connected - including cases
81 where the TTL can be decremented between the BGP peers.";
91 "Time-to-live value to use when packets are sent to the
92 referenced group or neighbors and ebgp-multihop is
98 leaf disable-connected-check {
102 "When set to 'true' it enforces EBGP neighbors perform multihop.";
107 grouping neighbor-local-as-options {
112 "The local autonomous system number that is to be used when
113 establishing sessions with the remote peer or peer group, if
114 this differs from the global BGP router autonomous system
122 "Do not prepend local-as to updates from EBGP peers. When
123 set to 'true' it will not prepend local-as to updates. When
124 set to 'false' it will prepend local-as to updates.";
131 "Do not prepend local-as to updates from IBGP peers.";
136 grouping neighbor-bfd-options {
137 container bfd-options {
145 leaf detect-multiplier {
146 when "../enable = 'true'";
152 "Detect multiplier.";
155 leaf required-min-rx {
156 when "../enable = 'true'";
163 "Required min receive interval.";
166 leaf desired-min-tx {
167 when "../enable = 'true'";
174 "Desired min transmit interval.";
178 when "../enable = 'true'";
179 type frr-bt:bfd-session-type;
180 default "not-configured";
185 leaf check-cp-failure {
186 when "../enable = 'true'";
190 "Link dataplane status with BGP control plane.";
195 grouping neighbor-remote-as {
196 container neighbor-remote-as {
197 leaf remote-as-type {
204 when "../remote-as-type = 'as-specified'";
207 "The remote autonomous system number received in
208 the BGP OPEN message.";
215 grouping neighbor-update-source {
217 "Source of routing updates.";
218 container update-source {
220 "Source of routing updates config.";
224 type inet:ip-address;
226 "IPv4 address/IPv6 address.";
230 case interface-based {
232 type frr-interface:interface-ref {
233 require-instance false;
236 "The local interface.";
243 grouping structure-neighbor-group-add-paths {
245 "Structural grouping used to include ADD-PATHs configuration
246 and state for both BGP neighbors and peer groups.";
247 container add-paths {
249 "Parameters relating to the advertisement and receipt of
250 multiple paths for a single NLRI (add-paths).";
252 "RFC 7911: ADD-PATH.";
254 type frr-bt:add-path-type;
257 "Enable ability to receive multiple path advertisements for
258 an NLRI from the neighbor or group.";
263 grouping structure-neighbor-group-as-path-options {
265 "Structural grouping used to include AS_PATH manipulation
266 configuration both BGP neighbors and peer groups.";
267 container as-path-options {
269 "AS_PATH manipulation parameters for the BGP neighbor or
272 case occurence-based {
278 "Specify the number of occurrences of the local BGP
279 speaker's AS that can occur within the AS_PATH before it
285 leaf allow-own-origin-as {
289 "When set to 'true' only accept my AS in the as-path
290 if the route was originated in my AS.";
295 leaf replace-peer-as {
299 "Replace occurrences of the peer's AS in the AS_PATH with
300 the local autonomous system number. This is same as override
306 grouping structure-neighbor-group-capability-options {
308 "Structural grouping used to include capability
309 configuration for both BGP neighbors and peer groups.";
310 container capability-options {
312 "Capability manipulation parameters for the BGP neighbor or
314 leaf dynamic-capability {
318 "When set to 'true' dynamic capability is advertise to this peer.";
321 leaf strict-capability {
325 "Strict capability negotiation match. When set to 'true'
326 remote and local capabilities are strictly compared
327 if capabilities are different, send Unsupported Capability
328 error then reset connection.";
331 leaf extended-nexthop-capability {
335 "When set to 'true' extended next-hop capability is advertise
339 leaf capability-negotiate {
343 "When set to 'true' sending Capability Negotiation in the open
344 message is suppressed to this peer.";
347 leaf override-capability {
351 "Overrides the result of Capability Negotiation, ignoring remote
352 peer's capability value, when set to 'true'.";
357 grouping structure-neighbor-default-originate-options {
359 "Structural grouping used to include default-originate
360 configuration for both BGP neighbors and peer groups.";
361 container default-originate {
363 "default originate parameters for the BGP neighbor or
369 "If set to 'true', send the default-route to the neighbour(s).";
373 type frr-route-map:route-map-ref;
375 "Route-map to specify criteria to originate default.";
380 grouping structure-neighbor-prefix-limit {
381 container prefix-limit {
383 "Parameters relating to the prefix limit for the AFI-SAFI.";
384 list direction-list {
387 type frr-bt:direction;
389 "Prefix limit applied on Tx route-updates or Rx route-updates.";
396 "Maximum number of prefixes that will be accepted from the
404 "Force check all received routes.";
408 when "../direction = 'in'";
415 "When set to 'true' only give warning message when limit
425 "Time interval in seconds after which the BGP session is
426 re-established after being torn down due to exceeding the
432 leaf shutdown-threshold-pct {
435 "Threshold on number of prefixes that can be received from
436 a neighbour before generation of warning messages or log
437 entries. Expressed as a percentage of max-prefixes.";
441 case threshold-restart {
442 leaf tr-shutdown-threshold-pct {
445 "Threshold on number of prefixes that can be received from
446 a neighbour before generation of warning messages or log
447 entries. Expressed as a percentage of max-prefixes.";
450 leaf tr-restart-timer {
454 "Time interval in seconds after which the BGP session is
455 re-established after being torn down due to exceeding the
460 case threshold-warning {
461 leaf tw-shutdown-threshold-pct {
464 "Threshold on number of prefixes that can be received from
465 a neighbour before generation of warning messages or log
466 entries. Expressed as a percentage of max-prefixes.";
469 leaf tw-warning-only {
473 "When set to 'true' only give warning message when limit
483 grouping structure-neighbor-nexthop-self {
484 container nexthop-self {
486 "Parameters relating to the nexthop-self for the AFI-SAFI.";
491 "When set to 'true', EBGP learned routes are announced with the
492 local speaker's nexthop.";
495 leaf next-hop-self-force {
499 "When set to 'true', EBGP learned routes are announced with the
500 local speaker's nexthop.";
505 grouping structure-neighbor-private-as {
506 container private-as {
508 "Parameters relating to the private-as for the AFI-SAFI.";
509 leaf remove-private-as-all {
513 "When set to 'true', private ASNs are removed from outbound updates;
514 applies to all AS numbers.";
517 leaf remove-private-as-all-replace {
521 "When set to 'true', private ASNs are replaced by the local
522 speaker's ASN in all outbound updates; applies to all AS numbers.";
525 leaf remove-private-as {
529 "When set to 'true', removes private ASNs in outbound updates;
530 applies to all AS numbers.";
533 leaf remove-private-as-replace {
537 "When set to 'true', private ASNs are replaced with the local
538 speaker's ASN in all outbound updates; applies to all AS numbers.";
543 grouping structure-neighbor-weight {
546 "Parameters relating to the weight for the AFI-SAFI.";
547 leaf weight-attribute {
552 "Set default weight for routes from this neighbor.";
557 grouping structure-neighbor-route-reflector {
558 container route-reflector {
560 "Parameters relating to the route-reflector for the AFI-SAFI.";
561 leaf route-reflector-client {
565 "Configure a neighbor as route reflector client.";
570 grouping structure-neighbor-route-server {
571 container route-server {
573 "Parameters relating to the route-server for the AFI-SAFI.";
574 leaf route-server-client {
578 "Configure a neighbor as route server client.";
583 grouping structure-neighbor-send-community {
584 container send-community {
586 "Parameters relating to the send-community for the AFI-SAFI.";
587 leaf send-community {
591 "Send standard community attribute to this neighbor.";
594 leaf send-ext-community {
598 "Send extended community attribute to this neighbor.";
601 leaf send-large-community {
605 "Send large community attribute to this neighbor.";
610 grouping structure-neighbor-group-admin-shutdown {
612 "Structural grouping used to include admin-shutdown
613 configuration for both BGP neighbors and peer groups.";
614 container admin-shutdown {
616 "BGP Administrative Shutdown Communication.";
620 "When set to 'true', BGP shutdown communication is enabled.";
628 "draft-ietf-idr-shutdown-06";
633 grouping structure-neighbor-group-graceful-restart {
635 "Structural grouping used to include graceful-restart
636 configuration for both BGP neighbors and peer groups.";
637 container graceful-restart {
639 "BGP Graceful restart feature.";
641 case graceful-restart-mode {
646 "Enable or disable the graceful-restart capability.
647 Setting this value to 'true' enables the graceful-restart
648 and helper both at peer level. Setting this value to 'false'
649 disables graceful restart and helper mode. The peer will inherit
650 global configuration.";
654 case graceful-restart-helper-mode {
655 leaf graceful-restart-helper {
659 "Setting this value to 'true' enables helper mode for the peer
660 Setting this value to 'false' disables the helper mode. The
661 peer will inherit global configuration.";
665 case graceful-restart-disable-mode {
666 leaf graceful-restart-disable {
670 "Setting this value to 'true' disables the graceful-restart
671 and helper Mode. Setting this value to 'false' causes the peer
672 to inherit global configuration.";
679 grouping structure-neighbor-group-soft-reconfiguration {
681 "Structural grouping used to include soft-reconfiguration
682 configuration for both BGP neighbors and peer groups.";
683 leaf soft-reconfiguration {
687 "Allow inbound soft reconfiguration for this neighbor.";
691 grouping structure-neighbor-group-attr-unchanged {
693 "Structural grouping used to include BGP route propagation
694 rules configuration for both BGP neighbors and peer groups.";
695 container attr-unchanged {
697 "BGP route propagation rules configuration.";
698 leaf as-path-unchanged {
702 "When set to 'true' as-path attribute is propagated unchanged.";
705 leaf next-hop-unchanged {
709 "When set to 'true' next-hop attribute is propagated unchanged.";
716 "When set to 'true' med attribute is propagated unchanged.";
721 grouping structure-neighbor-group-orf-capability {
723 "Structural grouping used to include orf
724 configuration for both BGP neighbors and peer groups.";
725 container orf-capability {
732 "Setting to 'true' advertises the ORF capability.";
741 "When set to 'true' it receives the orf capability.";
750 "When set to 'true' it advertises/receives the orf capability.";
757 grouping structure-neighbor-config-timers {
759 "Structural grouping used to include per neighbor timers
760 configuration for both BGP neighbors and peer groups.";
762 leaf advertise-interval {
768 "Minimum interval between sending BGP routing updates.";
777 "BGP connect timer.";
780 uses neighbor-timers;
784 grouping structure-neighbor-group-filter-config {
786 "Structural grouping used to include filter
787 configuration for both BGP neighbors and peer groups.";
788 container filter-config {
790 "BGP Policy configuration for both BGP neighbors and groups.";
791 uses rmap-policy-import;
793 uses rmap-policy-export;
795 uses plist-policy-import;
797 uses plist-policy-export;
799 uses access-list-policy-import;
801 uses access-list-policy-export;
803 uses as-path-filter-list-policy-import;
805 uses as-path-filter-list-policy-export;
807 uses unsuppress-map-policy-import;
809 uses unsuppress-map-policy-export;