summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yang/frr-bgp-bmp.yang203
-rw-r--r--yang/frr-bgp-common-multiprotocol.yang209
-rw-r--r--yang/frr-bgp-common-structure.yang807
-rw-r--r--yang/frr-bgp-common.yang1108
-rw-r--r--yang/frr-bgp-neighbor.yang137
-rw-r--r--yang/frr-bgp-peer-group.yang89
-rw-r--r--yang/frr-bgp-rpki.yang209
-rw-r--r--yang/frr-bgp-types.yang154
-rw-r--r--yang/frr-bgp.yang1239
-rw-r--r--yang/frr-deviations-bgp-datacenter.yang106
-rw-r--r--yang/frr-routing.yang70
-rw-r--r--yang/ietf/ietf-bgp-types.yang525
12 files changed, 4856 insertions, 0 deletions
diff --git a/yang/frr-bgp-bmp.yang b/yang/frr-bgp-bmp.yang
new file mode 100644
index 0000000000..344448f104
--- /dev/null
+++ b/yang/frr-bgp-bmp.yang
@@ -0,0 +1,203 @@
+submodule frr-bgp-bmp {
+ yang-version 1.1;
+
+ belongs-to frr-bgp {
+ prefix "bgp";
+ }
+
+ import ietf-inet-types {
+ prefix inet;
+ }
+
+ import frr-bgp-types {
+ prefix frr-bt;
+ }
+
+ include frr-bgp-common-multiprotocol;
+
+ organization
+ "FRRouting";
+ contact
+ "FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development
+ List: <mailto:dev@lists.frrouting.org>";
+ description
+ "This submodule defines a model for managing FRR BGP BMP.
+
+ Copyright 2020 FRRouting
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
+
+ revision 2019-12-03 {
+ description
+ "Initial revision.";
+ }
+
+ grouping bmp-incoming-session {
+ container incoming-session {
+ list session-list {
+ key "address tcp-port";
+ leaf address {
+ type inet:ip-address;
+ description
+ "IPv4 address to listen on.";
+ }
+
+ leaf tcp-port {
+ type uint32;
+ }
+ }
+ }
+ }
+
+ grouping bmp-outgoing-session {
+ container outgoing-session {
+ list session-list {
+ key "hostname tcp-port";
+ leaf hostname {
+ type string;
+ }
+
+ leaf tcp-port {
+ type uint32;
+ }
+
+ leaf min-retry-time {
+ type uint32 {
+ range "100..86400000";
+ }
+ units "miliseconds";
+ default "30000";
+ description
+ "Minimum connection retry interval.";
+ }
+
+ leaf max-retry-time {
+ type uint32 {
+ range "100..86400000";
+ }
+ units "miliseconds";
+ default "720000";
+ description
+ "Maximum connection retry interval.";
+ }
+ }
+ }
+ }
+
+ grouping bmp-afi-safis {
+ container afi-safis {
+ description
+ "List of address-families associated with the BGP
+ instance.";
+ list afi-safi {
+ key "afi-safi-name";
+ description
+ "AFI, SAFI configuration available for the
+ neighbour or group.";
+ uses mp-afi-safi-config;
+
+ uses mp-all-afi-safi-list-contents;
+ }
+ }
+ }
+
+ grouping bmp-afi-safi-common-config {
+ container common-config {
+ leaf pre-policy {
+ type boolean;
+ default "false";
+ description
+ "Send state before policy and filter processing.";
+ }
+
+ leaf post-policy {
+ type boolean;
+ default "false";
+ description
+ "Send state after policy and filter processing.";
+ }
+ }
+ }
+
+ grouping global-bmp-config {
+ description
+ "Structural grouping used to include filter
+ configuration for BMP.";
+ container bmp-config {
+ description
+ "BMP related parameters.";
+ list target-list {
+ key "target-name";
+ leaf target-name {
+ type string;
+ description
+ "Targets group name.";
+ }
+
+ uses bmp-incoming-session;
+
+ uses bmp-outgoing-session;
+
+ leaf mirror {
+ type boolean;
+ default "false";
+ description
+ "When set to 'TRUE' it send BMP route mirroring messages.";
+ }
+
+ leaf stats-time {
+ type uint32 {
+ range "100..86400000";
+ }
+ units "miliseconds";
+ description
+ "Interval to send BMP Stats.";
+ }
+
+ leaf ipv4-access-list {
+ type frr-bt:access-list-ref;
+ description
+ "Access list to restrict BMP sessions.";
+ }
+
+ leaf ipv6-access-list {
+ type frr-bt:access-list-ref;
+ description
+ "Access list to restrict BMP sessions.";
+ }
+
+ uses bmp-afi-safis;
+ }
+
+ leaf mirror-buffer-limit {
+ type uint32 {
+ range "0..4294967294";
+ }
+ units "bytes";
+ description
+ "Maximum memory used for buffered mirroring messages.";
+ }
+ }
+ }
+}
diff --git a/yang/frr-bgp-common-multiprotocol.yang b/yang/frr-bgp-common-multiprotocol.yang
new file mode 100644
index 0000000000..aefdf02ba6
--- /dev/null
+++ b/yang/frr-bgp-common-multiprotocol.yang
@@ -0,0 +1,209 @@
+submodule frr-bgp-common-multiprotocol {
+ yang-version 1.1;
+
+ belongs-to frr-bgp {
+ prefix "bgp";
+ }
+
+ import frr-routing {
+ prefix frr-rt;
+ }
+
+ include frr-bgp-common;
+
+ organization
+ "FRRouting";
+ contact
+ "FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development
+ List: <mailto:dev@lists.frrouting.org>";
+ description
+ "This module contains general data definitions for use in BGP
+ Multiprotocol.
+
+ Copyright 2020 FRRouting
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
+
+ revision 2019-12-03 {
+ description
+ "Initial revision.";
+ }
+
+ grouping mp-afi-safi-config {
+ description
+ "Configuration parameters used for all BGP AFI-SAFIs.";
+ leaf afi-safi-name {
+ type identityref {
+ base frr-rt:afi-safi-type;
+ }
+ description
+ "AFI, SAFI.";
+ }
+ }
+
+ grouping mp-all-afi-safi-list-contents {
+ description
+ "A common grouping used for contents of the list that is used
+ for AFI-SAFI entries.";
+ container ipv4-unicast {
+ when "derived-from-or-self(../afi-safi-name, 'ipv4-unicast')" {
+ description
+ "Include this container for IPv4 Unicast specific
+ configuration.";
+ }
+ description
+ "IPv4 unicast configuration options.";
+ }
+
+ container ipv6-unicast {
+ when "derived-from-or-self(../afi-safi-name, 'ipv6-unicast')" {
+ description
+ "Include this container for IPv6 Unicast specific
+ configuration.";
+ }
+ description
+ "IPv6 unicast configuration options.";
+ }
+
+ container ipv4-labeled-unicast {
+ when "derived-from-or-self(../afi-safi-name, 'ipv4-labeled-unicast')" {
+ description
+ "Include this container for IPv4 Labeled Unicast specific
+ configuration.";
+ }
+ description
+ "IPv4 Labeled Unicast configuration options.";
+ }
+
+ container ipv6-labeled-unicast {
+ when "derived-from-or-self(../afi-safi-name, 'ipv6-labeled-unicast')" {
+ description
+ "Include this container for IPv6 Labeled Unicast specific
+ configuration.";
+ }
+ description
+ "IPv6 Labeled Unicast configuration options.";
+ }
+
+ container l3vpn-ipv4-unicast {
+ when "derived-from-or-self(../afi-safi-name, 'l3vpn-ipv4-unicast')" {
+ description
+ "Include this container for IPv4 Unicast L3VPN specific
+ configuration.";
+ }
+ description
+ "Unicast IPv4 L3VPN configuration options.";
+ }
+
+ container l3vpn-ipv6-unicast {
+ when "derived-from-or-self(../afi-safi-name, 'l3vpn-ipv6-unicast')" {
+ description
+ "Include this container for unicast IPv6 L3VPN specific
+ configuration.";
+ }
+ description
+ "Unicast IPv6 L3VPN configuration options.";
+ }
+
+ container l3vpn-ipv4-multicast {
+ when "derived-from-or-self(../afi-safi-name, 'l3vpn-ipv4-multicast')" {
+ description
+ "Include this container for multicast IPv4 L3VPN specific
+ configuration.";
+ }
+ description
+ "Multicast IPv4 L3VPN configuration options.";
+ }
+
+ container l3vpn-ipv6-multicast {
+ when "derived-from-or-self(../afi-safi-name, 'l3vpn-ipv6-multicast')" {
+ description
+ "Include this container for multicast IPv6 L3VPN specific
+ configuration.";
+ }
+ description
+ "Multicast IPv6 L3VPN configuration options.";
+ }
+
+ container l2vpn-vpls {
+ when "derived-from-or-self(../afi-safi-name, 'l2vpn-vpls')" {
+ description
+ "Include this container for BGP-signalled VPLS specific
+ configuration.";
+ }
+ description
+ "BGP-signalled VPLS configuration options.";
+ }
+
+ container l2vpn-evpn {
+ when "derived-from-or-self(../afi-safi-name, 'l2vpn-evpn')" {
+ description
+ "Include this container for BGP EVPN specific
+ configuration.";
+ }
+ description
+ "BGP EVPN configuration options.";
+ }
+
+ container ipv4-multicast {
+ when "derived-from-or-self(../afi-safi-name, 'ipv4-multicast')" {
+ description
+ "Include this container for IPv4 multicast specific
+ configuration.";
+ }
+ description
+ "IPv4 multicast configuration options.";
+ }
+
+ container ipv6-multicast {
+ when "derived-from-or-self(../afi-safi-name, 'ipv6-multicast')" {
+ description
+ "Include this container for IPv6 multicast specific
+ configuration.";
+ }
+ description
+ "IPv6 multicast configuration options.";
+ }
+
+ container ipv4-flowspec {
+ when "derived-from-or-self(../afi-safi-name, 'ipv4-flowspec')" {
+ description
+ "Include this container for IPv4 flowspec specific
+ configuration.";
+ }
+ description
+ "IPv4 flowspec configuration options.";
+ }
+
+ container ipv6-flowspec {
+ when "derived-from-or-self(../afi-safi-name, 'ipv6-flowspec')" {
+ description
+ "Include this container for IPv6 flowspec specific
+ configuration.";
+ }
+ description
+ "IPv6 flowspec configuration options.";
+ }
+ }
+}
diff --git a/yang/frr-bgp-common-structure.yang b/yang/frr-bgp-common-structure.yang
new file mode 100644
index 0000000000..8162527e90
--- /dev/null
+++ b/yang/frr-bgp-common-structure.yang
@@ -0,0 +1,807 @@
+submodule frr-bgp-common-structure {
+ yang-version 1.1;
+
+ belongs-to frr-bgp {
+ prefix "bgp";
+ }
+
+ import ietf-inet-types {
+ prefix inet;
+ }
+
+ import frr-interface {
+ prefix frr-interface;
+ }
+
+ import ietf-bgp-types {
+ prefix bt;
+ }
+
+ import frr-bgp-types {
+ prefix frr-bt;
+ }
+
+ include frr-bgp-common;
+
+ organization
+ "FRRouting";
+ contact
+ "FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development
+ List: <mailto:dev@lists.frrouting.org>";
+ description
+ "This submodule contains general data definitions for use in BGP.
+
+ Copyright 2020 FRRouting
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
+
+ revision 2019-12-03 {
+ description
+ "Initial revision.";
+ }
+
+ grouping structure-neighbor-group-ebgp-multihop {
+ description
+ "Structural grouping used to include EBGP multi-hop
+ configuration for both BGP neighbors and peer groups.";
+ container ebgp-multihop {
+ description
+ "EBGP multi-hop parameters for the BGP group.";
+ choice hop-count-choice {
+ case default-hop-count {
+ leaf enabled {
+ type boolean;
+ default "false";
+ description
+ "When enabled the referenced group or neighbors are
+ permitted to be indirectly connected - including cases
+ where the TTL can be decremented between the BGP peers.";
+ }
+ }
+
+ case max-hop-count {
+ leaf multihop-ttl {
+ type uint8 {
+ range "1..255";
+ }
+ description
+ "Time-to-live value to use when packets are sent to the
+ referenced group or neighbors and ebgp-multihop is
+ enabled.";
+ }
+ }
+ }
+
+ leaf disable-connected-check {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' it enforces EBGP neighbors perform multihop.";
+ }
+ }
+ }
+
+ grouping neighbor-local-as-options {
+ container local-as {
+ leaf local-as {
+ type inet:as-number;
+ mandatory true;
+ description
+ "The local autonomous system number that is to be used when
+ establishing sessions with the remote peer or peer group, if
+ this differs from the global BGP router autonomous system
+ number.";
+ }
+
+ leaf no-prepend {
+ when "../local-as != 0";
+ type boolean;
+ default "false";
+ description
+ "Do not prepend local-as to updates from EBGP peers. When
+ set to 'true' it will not prepend local-as to updates. When
+ set to 'false' it will prepend local-as to updates.";
+ }
+
+ leaf no-replace-as {
+ type boolean;
+ default "false";
+ description
+ "Do not prepend local-as to updates from IBGP peers.";
+ }
+ }
+ }
+
+ grouping neighbor-bfd-options {
+ container bfd-options {
+ leaf enable {
+ type boolean;
+ default "false";
+ description
+ "BFD support.";
+ }
+
+ leaf detect-multiplier {
+ when "../enable = 'true'";
+ type uint8 {
+ range "2..255";
+ }
+ default "3";
+ description
+ "Detect multiplier.";
+ }
+
+ leaf required-min-rx {
+ when "../enable = 'true'";
+ type uint16 {
+ range "50..60000";
+ }
+ units "miliseconds";
+ default "300";
+ description
+ "Required min receive interval.";
+ }
+
+ leaf desired-min-tx {
+ when "../enable = 'true'";
+ type uint16 {
+ range "50..60000";
+ }
+ units "miliseconds";
+ default "300";
+ description
+ "Desired min transmit interval.";
+ }
+
+ leaf session-type {
+ when "../enable = 'true'";
+ type frr-bt:bfd-session-type;
+ default "not-configured";
+ description
+ "BFD session type.";
+ }
+
+ leaf check-cp-failure {
+ when "../enable = 'true'";
+ type boolean;
+ default "false";
+ description
+ "Link dataplane status with BGP control plane.";
+ }
+ }
+ }
+
+ grouping neighbor-remote-as {
+ container neighbor-remote-as {
+ leaf remote-as-type {
+ type frr-bt:as-type;
+ mandatory true;
+ description
+ "Remote AS type.";
+ }
+
+ leaf remote-as {
+ when "../remote-as-type = 'as-specified'";
+ type inet:as-number;
+ description
+ "The remote autonomous system number received in
+ the BGP OPEN message.";
+ reference
+ "RFC 4271";
+ }
+ }
+ }
+
+ grouping neighbor-update-source {
+ description
+ "Source of routing updates.";
+ container update-source {
+ description
+ "Source of routing updates config.";
+ choice source {
+ case ip-based {
+ leaf ip {
+ type inet:ip-address;
+ description
+ "IPv4 address/IPv6 address.";
+ }
+ }
+
+ case interface-based {
+ leaf interface {
+ type frr-interface:interface-ref {
+ require-instance false;
+ }
+ description
+ "The local interface.";
+ }
+ }
+ }
+ }
+ }
+
+ grouping structure-neighbor-group-add-paths {
+ description
+ "Structural grouping used to include ADD-PATHs configuration
+ and state for both BGP neighbors and peer groups.";
+ container add-paths {
+ description
+ "Parameters relating to the advertisement and receipt of
+ multiple paths for a single NLRI (add-paths).";
+ reference
+ "RFC 7911: ADD-PATH.";
+ leaf path-type {
+ type frr-bt:add-path-type;
+ default "none";
+ description
+ "Enable ability to receive multiple path advertisements for
+ an NLRI from the neighbor or group.";
+ }
+ }
+ }
+
+ grouping structure-neighbor-group-as-path-options {
+ description
+ "Structural grouping used to include AS_PATH manipulation
+ configuration both BGP neighbors and peer groups.";
+ container as-path-options {
+ description
+ "AS_PATH manipulation parameters for the BGP neighbor or
+ group.";
+ choice allowas-in {
+ case occurence-based {
+ leaf allow-own-as {
+ type uint8 {
+ range "1..10";
+ }
+ description
+ "Specify the number of occurrences of the local BGP
+ speaker's AS that can occur within the AS_PATH before it
+ is rejected.";
+ }
+ }
+
+ case origin-based {
+ leaf allow-own-origin-as {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' only accept my AS in the as-path
+ if the route was originated in my AS.";
+ }
+ }
+ }
+
+ leaf replace-peer-as {
+ type boolean;
+ default "false";
+ description
+ "Replace occurrences of the peer's AS in the AS_PATH with
+ the local autonomous system number. This is same as override
+ ASN CLI.";
+ }
+ }
+ }
+
+ grouping structure-neighbor-group-capability-options {
+ description
+ "Structural grouping used to include capability
+ configuration for both BGP neighbors and peer groups.";
+ container capability-options {
+ description
+ "Capability manipulation parameters for the BGP neighbor or
+ group.";
+ leaf dynamic-capability {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' dynamic capability is advertise to this peer.";
+ }
+
+ leaf strict-capability {
+ type boolean;
+ default "false";
+ description
+ "Strict capability negotiation match. When set to 'true'
+ remote and local capabilities are strictly compared
+ if capabilities are different, send Unsupported Capability
+ error then reset connection.";
+ }
+
+ leaf extended-nexthop-capability {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' extended next-hop capability is advertise
+ to this peer.";
+ }
+
+ leaf capability-negotiate {
+ type boolean;
+ default "true";
+ description
+ "When set to 'true' sending Capability Negotiation in the open
+ message is supressed to this peer.";
+ }
+
+ leaf override-capability {
+ type boolean;
+ default "false";
+ description
+ "Overrides the result of Capability Negotiation, ignoring remote
+ peer's capability value, when set to 'true'.";
+ }
+ }
+ }
+
+ grouping structure-neighbor-default-originate-options {
+ description
+ "Structural grouping used to include default-originate
+ configuration for both BGP neighbors and peer groups.";
+ container default-originate-options {
+ description
+ "default originate parameters for the BGP neighbor or
+ group.";
+ leaf send-default-route {
+ type boolean;
+ default "false";
+ description
+ "If set to 'true', send the default-route to the neighbour(s).";
+ }
+
+ leaf rmap-policy-export {
+ type frr-bt:rmap-ref;
+ description
+ "Route-map to specify criteria to originate default.";
+ }
+ }
+ }
+
+ grouping structure-neighbor-prefix-limit {
+ container prefix-limit {
+ description
+ "Parameters relating to the prefix limit for the AFI-SAFI.";
+ list direction-list {
+ key "direction";
+ leaf direction {
+ type frr-bt:direction;
+ description
+ "Prefix limit applied on Tx route-updates or Rx route-updates.";
+ }
+
+ leaf max-prefixes {
+ type uint32;
+ mandatory true;
+ description
+ "Maximum number of prefixes that will be accepted from the
+ neighbour.";
+ }
+
+ container prefix-limit-options {
+ when "../direction = 'in'";
+ choice options {
+ case warning {
+ leaf warning-only {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' only give warning message when limit
+ is exceeded.";
+ }
+ }
+
+ case restart {
+ leaf restart-timer {
+ type uint16;
+ units "minutes";
+ description
+ "Time interval in seconds after which the BGP session is
+ re-established after being torn down due to exceeding the
+ max-prefix limit.";
+ }
+ }
+
+ case threshold {
+ leaf shutdown-threshold-pct {
+ type bt:percentage;
+ description
+ "Threshold on number of prefixes that can be received from
+ a neighbour before generation of warning messages or log
+ entries. Expressed as a percentage of max-prefixes.";
+ }
+ }
+
+ case threshold-restart {
+ leaf tr-shutdown-threshold-pct {
+ type bt:percentage;
+ description
+ "Threshold on number of prefixes that can be received from
+ a neighbour before generation of warning messages or log
+ entries. Expressed as a percentage of max-prefixes.";
+ }
+
+ leaf tr-restart-timer {
+ type uint32;
+ units "minutes";
+ description
+ "Time interval in seconds after which the BGP session is
+ re-established after being torn down due to exceeding the
+ max-prefix limit.";
+ }
+ }
+
+ case threshold-warning {
+ leaf tw-shutdown-threshold-pct {
+ type bt:percentage;
+ description
+ "Threshold on number of prefixes that can be received from
+ a neighbour before generation of warning messages or log
+ entries. Expressed as a percentage of max-prefixes.";
+ }
+
+ leaf tw-warning-only {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' only give warning message when limit
+ is exceeded.";
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ grouping structure-neighbor-nexthop-self {
+ container nexthop-self {
+ description
+ "Parameters relating to the nexthop-self for the AFI-SAFI.";
+ leaf next-hop-self {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true', EBGP learned routes are announced with the
+ local speaker's nexthop.";
+ }
+
+ leaf next-hop-self-force {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true', EBGP learned routes are announced with the
+ local speaker's nexthop.";
+ }
+ }
+ }
+
+ grouping structure-neighbor-private-as {
+ container private-as {
+ description
+ "Parameters relating to the private-as for the AFI-SAFI.";
+ leaf remove-private-as-all {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true', private ASNs are removed from outbound updates;
+ applies to all AS numbers.";
+ }
+
+ leaf remove-private-as-all-replace {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true', private ASNs are replaced by the local
+ speaker's ASN in all outbound updates; applies to all AS numbers.";
+ }
+
+ leaf remove-private-as {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true', removes private ASNs in outbound updates;
+ applies to all AS numbers.";
+ }
+
+ leaf remove-private-as-replace {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true', private ASNs are replaced with the local
+ speaker's ASN in all outbound updates; applies to all AS numbers.";
+ }
+ }
+ }
+
+ grouping structure-neighbor-weight {
+ container weight {
+ description
+ "Parameters relating to the weight for the AFI-SAFI.";
+ leaf weight-attribute {
+ type uint16 {
+ range "0..65535";
+ }
+ description
+ "Set default weight for routes from this neighbor.";
+ }
+ }
+ }
+
+ grouping structure-neighbor-route-reflector {
+ container route-reflector {
+ description
+ "Parameters relating to the route-reflector for the AFI-SAFI.";
+ leaf route-reflector-client {
+ type boolean;
+ default "false";
+ description
+ "Configure a neighbor as route reflector client.";
+ }
+ }
+ }
+
+ grouping structure-neighbor-route-server {
+ container route-server {
+ description
+ "Parameters relating to the route-server for the AFI-SAFI.";
+ leaf route-server-client {
+ type boolean;
+ default "false";
+ description
+ "Configure a neighbor as route server client.";
+ }
+ }
+ }
+
+ grouping structure-neighbor-send-community {
+ container send-community {
+ description
+ "Parameters relating to the send-community for the AFI-SAFI.";
+ leaf send-community {
+ type boolean;
+ default "true";
+ description
+ "Send standard community attribute to this neighbor.";
+ }
+
+ leaf send-ext-community {
+ type boolean;
+ default "true";
+ description
+ "Send extended community attribute to this neighbor.";
+ }
+
+ leaf send-large-community {
+ type boolean;
+ default "false";
+ description
+ "Send large community attribute to this neighbor.";
+ }
+ }
+ }
+
+ grouping structure-neighbor-group-admin-shutdown {
+ description
+ "Structural grouping used to include admin-shutdown
+ configuration for both BGP neighbors and peer groups.";
+ container admin-shutdown {
+ description
+ "BGP Administrative Shutdown Communication.";
+ leaf enable {
+ type boolean;
+ mandatory true;
+ description
+ "When set to 'true', BGP shutdown communication is enabled.";
+ }
+
+ leaf message {
+ type string;
+ description
+ "Shutdown message.";
+ reference
+ "draft-ietf-idr-shutdown-06";
+ }
+ }
+ }
+
+ grouping structure-neighbor-group-graceful-restart {
+ description
+ "Structural grouping used to include graceful-restart
+ configuration for both BGP neighbors and peer groups.";
+ container graceful-restart {
+ description
+ "BGP Graceful restart feature.";
+ choice mode {
+ case graceful-restart-mode {
+ leaf enable {
+ type boolean;
+ default "false";
+ description
+ "Enable or disable the graceful-restart capability.
+ Setting this value to 'true' enables the graceful-restart
+ and helper both at peer level. Setting this value to 'false'
+ disables graceful restart and helper mode. The peer will inherit
+ global configuration.";
+ }
+ }
+
+ case graceful-restart-helper-mode {
+ leaf graceful-restart-helper {
+ type boolean;
+ default "false";
+ description
+ "Setting this value to 'true' enables helper mode for the peer
+ Setting this value to 'false' disables the helper mode. The
+ peer will inherit global configuration.";
+ }
+ }
+
+ case graceful-restart-disable-mode {
+ leaf graceful-restart-disable {
+ type boolean;
+ default "false";
+ description
+ "Setting this value to 'true' disables the graceful-restart
+ and helper Mode. Setting this value to 'false' causes the peer
+ to inherit global configuration.";
+ }
+ }
+ }
+ }
+ }
+
+ grouping structure-neighbor-group-soft-reconfiguration {
+ description
+ "Structural grouping used to include soft-reconfiguration
+ configuration for both BGP neighbors and peer groups.";
+ leaf soft-reconfiguration {
+ type boolean;
+ default "false";
+ description
+ "Allow inbound soft reconfiguration for this neighbor.";
+ }
+ }
+
+ grouping structure-neighbor-group-attr-unchanged {
+ description
+ "Structural grouping used to include BGP route propagation
+ rules configuration for both BGP neighbors and peer groups.";
+ container attr-unchanged {
+ description
+ "BGP route propagation rules configuration.";
+ leaf as-path-unchanged {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' as-path attribute is propagated unchanged.";
+ }
+
+ leaf next-hop-unchanged {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' next-hop attribute is propagated unchanged.";
+ }
+
+ leaf med-unchanged {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' med attribute is propagated unchanged.";
+ }
+ }
+ }
+
+ grouping structure-neighbor-group-orf-capability {
+ description
+ "Structural grouping used to include orf
+ configuration for both BGP neighbors and peer groups.";
+ container orf-capability {
+ choice orf-update {
+ case send {
+ leaf orf-send {
+ type boolean;
+ default "false";
+ description
+ "Setting to 'true' advertises the ORF capability.";
+ }
+ }
+
+ case receive {
+ leaf orf-receive {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' it receives the orf capability.";
+ }
+ }
+
+ case both {
+ leaf orf-both {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' it advertises/receives the orf capability.";
+ }
+ }
+ }
+ }
+ }
+
+ grouping structure-neighbor-config-timers {
+ description
+ "Structural grouping used to include per neighbor timers
+ configuration for both BGP neighbors and peer groups.";
+ container timers {
+ leaf advertise-interval {
+ type uint16 {
+ range "0..600";
+ }
+ units "seconds";
+ description
+ "Minimum interval between sending BGP routing updates.";
+ }
+
+ leaf connect-time {
+ type uint16 {
+ range "1..65535";
+ }
+ units "seconds";
+ description
+ "BGP connect timer.";
+ }
+
+ uses neighbor-timers;
+ }
+ }
+
+ grouping structure-neighbor-group-filter-config {
+ description
+ "Structural grouping used to include filter
+ configuration for both BGP neighbors and peer groups.";
+ container filter-config {
+ description
+ "BGP Policy configuration for both BGP neighbors and groups.";
+ uses rmap-policy-import;
+
+ uses rmap-policy-export;
+
+ uses plist-policy-import;
+
+ uses plist-policy-export;
+
+ uses access-list-policy-import;
+
+ uses access-list-policy-export;
+
+ uses as-path-filter-list-policy-import;
+
+ uses as-path-filter-list-policy-export;
+
+ uses unsupress-map-policy-import;
+
+ uses unsupress-map-policy-export;
+ }
+ }
+}
diff --git a/yang/frr-bgp-common.yang b/yang/frr-bgp-common.yang
new file mode 100644
index 0000000000..188cf856db
--- /dev/null
+++ b/yang/frr-bgp-common.yang
@@ -0,0 +1,1108 @@
+submodule frr-bgp-common {
+ yang-version 1.1;
+
+ belongs-to frr-bgp {
+ prefix "bgp";
+ }
+
+ import ietf-bgp-types {
+ prefix bt;
+ }
+
+ import ietf-inet-types {
+ prefix inet;
+ }
+
+ import frr-bgp-types {
+ prefix frr-bt;
+ }
+
+ import frr-route-types {
+ prefix frr-rt-type;
+ }
+
+ import frr-vrf {
+ prefix frr-vrf;
+ }
+
+ import ietf-routing-types {
+ prefix rt-types;
+ }
+
+ import frr-interface {
+ prefix frr-interface;
+ }
+
+ organization
+ "FRRouting";
+ contact
+ "FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development
+ List: <mailto:dev@lists.frrouting.org>";
+ description
+ "This submodule contains general data definitions for use in BGP.
+
+ Copyright 2020 FRRouting
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
+
+ revision 2019-12-03 {
+ description
+ "Initial revision.";
+ }
+
+ grouping rmap-policy-import {
+ leaf rmap-import {
+ type frr-bt:rmap-ref;
+ }
+ }
+
+ grouping rmap-policy-export {
+ leaf rmap-export {
+ type frr-bt:rmap-ref;
+ }
+ }
+
+ grouping unsupress-map-policy-import {
+ leaf unsupress-map-import {
+ type frr-bt:rmap-ref;
+ }
+ }
+
+ grouping unsupress-map-policy-export {
+ leaf unsupress-map-export {
+ type frr-bt:rmap-ref;
+ }
+ }
+
+ grouping plist-policy-import {
+ leaf plist-import {
+ type frr-bt:plist-ref;
+ }
+ }
+
+ grouping plist-policy-export {
+ leaf plist-export {
+ type frr-bt:plist-ref;
+ }
+ }
+
+ grouping access-list-policy-import {
+ leaf access-list-import {
+ type frr-bt:access-list-ref;
+ }
+ }
+
+ grouping access-list-policy-export {
+ leaf access-list-export {
+ type frr-bt:access-list-ref;
+ }
+ }
+
+ grouping as-path-filter-list-policy-import {
+ leaf as-path-filter-list-import {
+ type frr-bt:as-path-filter-ref;
+ }
+ }
+
+ grouping as-path-filter-list-policy-export {
+ leaf as-path-filter-list-export {
+ type frr-bt:as-path-filter-ref;
+ }
+ }
+
+ grouping route-selection-options {
+ description
+ "Configuration relating to route selection options.";
+ container route-selection-options {
+ description
+ "Parameters relating to options for route selection.";
+ leaf always-compare-med {
+ type boolean;
+ default "false";
+ description
+ "Compare multi-exit discriminator (MED) value from
+ different ASes when selecting the best route. The
+ default behaviour is to only compare MEDs for paths
+ received from the same AS.";
+ }
+
+ leaf deterministic-med {
+ type boolean;
+ default "false";
+ description
+ "Compare multi-exit discriminator (MED) value from
+ Same ASes when selecting the best route.";
+ }
+
+ leaf confed-med {
+ type boolean;
+ default "false";
+ description
+ "Compare multi-exit discriminator (MED) value from
+ different Sub ASes when selecting the best route.";
+ }
+
+ leaf missing-as-worst-med {
+ type boolean;
+ default "false";
+ description
+ "Missing multi-exit discriminator (MED) value is
+ considered as value of infinity, making the path
+ least desirable when selecting the best route.";
+ }
+
+ leaf aspath-confed {
+ type boolean;
+ default "false";
+ description
+ "Compare path lengths including confederation sets
+ and sequences in selecting a route.";
+ }
+
+ leaf ignore-as-path-length {
+ type boolean;
+ default "false";
+ description
+ "Ignore the AS path length when selecting the best path.
+ The default is to use the AS path length and prefer paths
+ with shorter length.";
+ }
+
+ leaf external-compare-router-id {
+ type boolean;
+ default "true";
+ description
+ "When comparing similar routes received from external BGP
+ peers, use the router-id as a criterion to select the
+ active path.";
+ }
+
+ leaf allow-multiple-as {
+ type boolean;
+ default "false";
+ description
+ "Allow multi-path to use paths from different neighbouring
+ ASes. The default is to only consider multiple paths
+ from the same neighbouring AS.";
+ }
+
+ leaf multi-path-as-set {
+ when "../allow-multiple-as = 'true'";
+ type boolean;
+ default "false";
+ description
+ "Multi-path with AS-SET, When set to 'true' it adds AS set
+ information for aggregate routes, When set to 'false' it
+ prevents AS set generation.";
+ }
+ }
+ }
+
+ grouping med-config {
+ description
+ "Configuration relating to MED.";
+ container med-config {
+ leaf enable-med-admin {
+ type boolean;
+ default "false";
+ description
+ "Flag to enable receiving of MED metric attribute
+ in routing updates.";
+ }
+ leaf max-med-admin {
+ type uint32 {
+ range "0..4294967295";
+ }
+ default "4294967294";
+ description
+ "Tells the router to announce routes with this MED value
+ This MED value is applicable for indefinite time.";
+ }
+
+ leaf max-med-onstart-up-time {
+ type uint32 {
+ range "5..86400";
+ }
+ units "seconds";
+ description
+ "Tells the router to announce routes with MED value,
+ This MED value is applicable for this duration during
+ start-up.";
+ }
+
+ leaf max-med-onstart-up-value {
+ type uint32 {
+ range "0..4294967295";
+ }
+ default "4294967294";
+ description
+ "Tells the router to announce routes with this MED value
+ This MED value is applicable for start-up time.";
+ }
+ }
+ }
+
+ grouping route-reflector-config {
+ description
+ "Grouping used to include route reflector
+ configuration for BGP global.";
+ container route-reflector {
+ description
+ "Route reflector parameters for the BGP global.";
+ leaf route-reflector-cluster-id {
+ type bt:rr-cluster-id-type;
+ description
+ "Route Reflector cluster ID to use when local router is
+ configured as a route reflector. Commonly set at the
+ group level, but allows a different cluster ID to be set
+ for each neighbor.";
+ reference
+ "RFC 4456: BGP Route Reflection: An Alternative to
+ Full Mesh.";
+ }
+
+ leaf no-client-reflect {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true', this disables route redistribution
+ by the Route Reflector. It is set 'true' when the client is
+ fully meshed to prevent sending of redundant route
+ advertisements.";
+ reference
+ "TODO: Add reference when IETF writes a draft describing
+ this.";
+ }
+
+ leaf allow-outbound-policy {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true', this allow RR to modify the attributes of the
+ reflected IBGP routes as per the out route-map. It is set 'false'
+ RR will not modify the attributes of the reflected IBGP routes as
+ per the out route-map rules.";
+ }
+ }
+ }
+
+ grouping global-bgp-config {
+ leaf instance-type-view {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' BGP instance type is view.
+ When set to 'false' BGP instance type is regular.";
+ }
+
+ leaf ebgp-multihop-connected-route-check {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' it will disable checking if nexthop is connected
+ on EBGP sessions. When set to 'false' it will enable checking if
+ nexthop is connected on EBGP sessions.";
+ }
+
+ leaf fast-external-failover {
+ type boolean;
+ default "true";
+ description
+ "It's an interface tracking mechanism. When set to 'true' don't
+ immediately reset session if a link to a directly connected
+ external peer goes down. When set to 'false' it will immediately
+ reset session if a link to a directly connected external peer goes down.";
+ }
+
+ leaf local-pref {
+ type uint32;
+ default "100";
+ description
+ "BGP local preference attribute sent to internal peers to
+ indicate the degree of preference for externally learned
+ routes. The route with the highest local preference
+ value is preferred.";
+ reference
+ "RFC 4271.";
+ }
+
+ leaf default-shutdown {
+ type boolean;
+ default "false";
+ description
+ "Apply administrative shutdown to newly configured peers.";
+ }
+
+ leaf ebgp-requires-policy {
+ type boolean;
+ default "true";
+ description
+ "When set to 'true' BGP speaker requires in and out policy
+ for EBGP peers (RFC8212).";
+ }
+
+ leaf show-hostname {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' BGP show hostname in certain command outputs.";
+ }
+
+ leaf show-nexthop-hostname {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' BGP show hostname for nexthop in certain
+ command outputs.";
+ }
+ }
+
+ grouping global-neighbor-config {
+ container global-neighbor-config {
+ leaf dynamic-neighbors-limit {
+ type uint32 {
+ range "1..5000";
+ }
+ description
+ "Maximum number of BGP Dynamic Neighbors that can be created.";
+ }
+
+ leaf log-neighbor-changes {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' BGP will start logging neighbor up/down and reset reason.
+ When set to 'false' BGP will stop logging neighbor up/down and reset reason.";
+ }
+
+ container packet-quanta-config {
+ leaf wpkt-quanta {
+ type uint32 {
+ range "1..64";
+ }
+ default "64";
+ description
+ "How many packets to write to peer socket per run.";
+ }
+
+ leaf rpkt-quanta {
+ type uint32 {
+ range "1..10";
+ }
+ default "10";
+ description
+ "How many packets to read from peer socket per I/O cycle.";
+ }
+ }
+ }
+ }
+
+ grouping global-update-group-config {
+ container global-update-group-config {
+ leaf subgroup-pkt-queue-size {
+ type uint32 {
+ range "20..100";
+ }
+ default "40";
+ description
+ "Subgroup packet queue size.";
+ }
+
+ leaf coalesce-time {
+ type uint32 {
+ range "0..4294967295";
+ }
+ units "miliseconds";
+ default "1000";
+ description
+ "Configures the Subgroup coalesce timer.";
+ }
+ }
+ }
+
+ grouping global-network-config {
+ leaf import-check {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' bgp creates entries for network statements
+ if a matching prefix exists in the rib. When set to 'false' bgp
+ creates entries for networks that the router cannot reach.";
+ }
+ }
+
+ grouping neighbor-timers {
+ leaf hold-time {
+ type uint16 {
+ range "0 | 3..65535";
+ }
+ units "seconds";
+ default "180";
+ description
+ "Time interval (in seconds) for the HoldTimer established
+ with the peer. When read as operational data (ro), the
+ value of this object is calculated by this BGP speaker,
+ using the smaller of the values in hold-time that was
+ configured (rw) in the running datastore and the Hold Time
+ received in the OPEN message.
+
+ This value must be at least three seconds
+ if it is not zero (0).
+
+ If the Hold Timer has not been established
+ with the peer this object MUST have a value
+ of zero (0).
+
+ If the configured value of hold-time object was
+ a value of (0), then when read this object MUST have a
+ value of (0) also.";
+ reference
+ "RFC 4271";
+ }
+
+ leaf keepalive {
+ type uint16 {
+ range "0..65535";
+ }
+ units "seconds";
+ default "60";
+ description
+ "When used as a configuration (rw) value, this Time interval
+ (in seconds) for the KeepAlive timer configured for this BGP
+ speaker with this peer. The value of this object will only
+ determine the KEEPALIVE messages' frequency relative to
+ the value specified in configured value for hold-time.
+
+ If the value of this object is zero (0), no periodical
+ KEEPALIVE messages are sent to the peer after the BGP
+ connection has been established. The suggested value for
+ this timer is 30 seconds.;
+
+ The actual time interval for the KEEPALIVE messages is
+ indicated by operational value of keepalive. That value
+ of this object is calculated by this BGP speaker such that,
+ when compared with hold-time, it has the same proportion
+ that keepalive has, compared with hold-time. A
+ reasonable maximum value for this timer would be one third
+ of that of hold-time.";
+ reference
+ "RFC 4271";
+ }
+ }
+
+ grouping global-config-timers {
+ container global-config-timers {
+ leaf rmap-delay-time {
+ type uint16 {
+ range "0..600";
+ }
+ units "seconds";
+ default "5";
+ description
+ "Time to wait before processing route-map changes.";
+ }
+
+ leaf update-delay-time {
+ type uint16 {
+ range "0..3600";
+ }
+ units "seconds";
+ description
+ "Time to force initial delay for best-path and updates.";
+ }
+
+ leaf establish-wait-time {
+ type uint16 {
+ range "1..3600";
+ }
+ units "seconds";
+ description
+ "Time to force initial delay for updates.";
+ }
+
+ leaf connect-retry-interval {
+ type uint16 {
+ range "1..max";
+ }
+ units "seconds";
+ default "120";
+ description
+ "Time interval (in seconds) for the ConnectRetryTimer. The
+ suggested value for this timer is 120 seconds.";
+ reference
+ "RFC 4271, This is the value used
+ to initialize the 'ConnectRetryTimer'.";
+ }
+
+ uses neighbor-timers;
+ }
+ }
+
+ grouping graceful-restart-config {
+ description
+ "Configuration parameters relating to BGP graceful restart.";
+ choice mode {
+ case graceful-restart-mode {
+ leaf enabled {
+ type boolean;
+ default "false";
+ description
+ "Enable or disable the graceful-restart capability. When set to 'true'
+ it will enable graceful restart and helper both globally. When set
+ to 'false' it will enable the default behaviour global helper mode.";
+ }
+ }
+
+ case graceful-restart-disable-mode {
+ leaf graceful-restart-disable {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' it will disable graceful restart and helper both
+ globally. when set to 'false' it will enable the default behaviour
+ global helper mode.";
+ }
+ }
+ }
+
+ leaf preserve-fw-entry {
+ type boolean;
+ default "false";
+ description
+ "Sets F-bit indication that fib is preserved while doing Graceful Restart.
+ When set to 'true' Zebra would preserve the FIB entry on the restarting
+ node.";
+ }
+
+ leaf restart-time {
+ type uint16 {
+ range "1..3600";
+ }
+ units "seconds";
+ default "120";
+ description
+ "Estimated time (in seconds) for the local BGP speaker to
+ restart a session. This value is advertise in the graceful
+ restart BGP capability. This is a 12-bit value, referred to
+ as Restart Time in RFC4724. Per RFC4724, the suggested
+ default value is <= the hold-time value. This timer is
+ applicable for helper node.";
+ reference
+ "RFC 4724: Graceful Restart Mechanism for BGP.";
+ }
+
+ leaf stale-routes-time {
+ type uint16 {
+ range "1..3600";
+ }
+ units "seconds";
+ default "360";
+ description
+ "An upper-bound on the time that stale routes will be
+ retained by a router after a session is restarted. If an
+ End-of-RIB (EOR) marker is received prior to this timer
+ expiring stale-routes will be flushed upon its receipt - if
+ no EOR is received, then when this timer expires stale paths
+ will be purged. This timer is applicable for restarting node.";
+ reference
+ "RFC 4724: Graceful Restart Mechanism for BGP.";
+ }
+
+ leaf selection-deferral-time {
+ type uint16 {
+ range "0..3600";
+ }
+ units "seconds";
+ default "360";
+ description
+ "An upper-bound on the time that restarting router defers
+ the route selection process after restart.";
+ reference
+ "RFC 4724: Graceful Restart Mechanism for BGP.";
+ }
+
+ leaf rib-stale-time {
+ type uint16 {
+ range "1..3600";
+ }
+ units "seconds";
+ default "500";
+ description
+ "An upper-bound on the time that helper router holds the
+ stale routes in Zebra, When this timer gets expired Zebra
+ removes the stale routes.";
+ }
+ }
+
+ grouping global-group-use-multiple-paths {
+ description
+ "Common grouping used for both global and groups which provides
+ configuration parameters relating to use of multiple paths.";
+ container use-multiple-paths {
+ description
+ "Parameters related to the use of multiple paths for the
+ same NLRI.";
+ container ebgp {
+ description
+ "Multi-Path parameters for EBGP.";
+ leaf maximum-paths {
+ type uint16;
+ default "64";
+ description
+ "Maximum number of parallel paths to consider when using
+ BGP multi-path. The default is use a single path.";
+ }
+ }
+
+ container ibgp {
+ description
+ "Multi-Path parameters for IBGP.";
+ leaf maximum-paths {
+ type uint16;
+ default "64";
+ description
+ "Maximum number of parallel paths to consider when using
+ IBGP multi-path. The default is to use a single path.";
+ }
+
+ leaf cluster-length-list {
+ when "../maximum-paths != 0";
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' route with the shortest cluster-list
+ length is used. The cluster-list reflects the IBGP
+ reflection path the route has taken. It's the part
+ of route selection algo.";
+ }
+ }
+ }
+ }
+
+ grouping global-redistribute {
+ description
+ "List of route redistribution per AFI.";
+ list redistribution-list {
+ key "route-type route-instance";
+ leaf route-type {
+ type frr-rt-type:frr-route-types;
+ description
+ "Protocol route type.";
+ }
+
+ leaf route-instance {
+ type uint16 {
+ range "0..65535";
+ }
+ description
+ "Protocol Instance.";
+ }
+
+ leaf metric {
+ type uint32 {
+ range "0..4294967295";
+ }
+ description
+ "Metric for redistributed routes.";
+ }
+
+ leaf rmap-policy-import {
+ type frr-bt:rmap-ref;
+ description
+ "Route-map to be applied for redistributed routes into the bgp.";
+ }
+ }
+ }
+
+ grouping mp-afi-safi-network-config {
+ leaf label-index {
+ type rt-types:mpls-label;
+ description
+ "Label index to associate with the prefix.";
+ }
+
+ leaf rmap-policy-export {
+ type frr-bt:rmap-ref;
+ description
+ "Route-map to modify the attributes for Routes going out
+ via BGP updates.";
+ }
+ }
+
+ grouping mp-afi-safi-agg-route-config {
+ leaf as-set {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' AS set path information is generated
+ for aggregate address. When set to 'false' AS set path
+ information is not generated.";
+ }
+
+ leaf summary-only {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' it advertise only the aggregate route
+ and suppress the advertisement of all the component routes.
+ When set to 'false' all more-specific routes summarized
+ by the aggregate route are advertised.";
+ }
+
+ leaf rmap-policy-export {
+ type frr-bt:rmap-ref;
+ description
+ "Apply route map to aggregate network.";
+ }
+ }
+
+ grouping admin-distance {
+ container admin-distance {
+ description
+ "Administrative distance (or preference) assigned to
+ routes received from different sources
+ (external, internal, and local).";
+ leaf external {
+ type uint8 {
+ range "1..255";
+ }
+ description
+ "Administrative distance for routes learned from
+ external BGP (EBGP).";
+ }
+
+ leaf internal {
+ type uint8 {
+ range "1..255";
+ }
+ description
+ "Administrative distance for routes learned from
+ internal BGP (IBGP).";
+ }
+
+ leaf local {
+ type uint8 {
+ range "1..255";
+ }
+ description
+ "Administrative distance for routes learned from
+ local.";
+ }
+ }
+ }
+
+ grouping distance-per-route-config {
+ leaf distance {
+ type uint8 {
+ range "1..255";
+ }
+ mandatory true;
+ description
+ "Administrative distance for route.";
+ }
+
+ leaf access-list-policy-export {
+ type frr-bt:access-list-ref;
+ description
+ "Access-list policy applied on routes going from BGP to Zebra.";
+ }
+ }
+
+ grouping route-flap-dampening {
+ container route-flap-dampening {
+ description
+ "Dampening feature";
+ leaf enable {
+ type boolean;
+ default "false";
+ description
+ "Enable route flap dampening.";
+ }
+
+ leaf reach-decay {
+ when "../enable = 'true'";
+ type uint8 {
+ range "1..45";
+ }
+ units "seconds";
+ default "15";
+ description
+ "This value specifies the time desired for the instability
+ metric value to reach one-half of its current value when
+ the route is reachable. This half-life value determines
+ the rate at which the metric value is decayed. A smaller
+ half-life value makes a suppressed route reusable sooner
+ than a larger value. The accumulated penalty will be reduced
+ to half after this duration.";
+ }
+
+ leaf reuse-above {
+ when "../enable = 'true'";
+ type uint16 {
+ range "1..20000";
+ }
+ default "750";
+ description
+ "This is the value of the instability metric at which a
+ suppressed route becomes unsuppressed if it is reachable
+ but currently suppressed. The value assigned to
+ reuse-below must be less than suppress-above.";
+ }
+
+ leaf suppress-above {
+ when "../enable = 'true'";
+ type uint16 {
+ range "1..20000";
+ }
+ default "2000";
+ description
+ "This is the value of the instability metric at which
+ route suppression takes place. A route is not installed
+ in the forwarding information base (FIB), or announced
+ even if it is reachable during the period that it is
+ suppressed.";
+ }
+
+ leaf unreach-decay {
+ when "../enable = 'true'";
+ type uint8 {
+ range "1..255";
+ }
+ units "seconds";
+ default "60";
+ description
+ "This value acts the same as reach-decay except that it
+ specifies the rate at which the instability metric is
+ decayed when a route is unreachable. It should have a
+ value greater than or equal to reach-decay.";
+ }
+ }
+ }
+
+ grouping flow-spec-config {
+ container flow-spec-config {
+ description
+ "Flow spec feature.";
+ leaf interface {
+ type frr-interface:interface-ref {
+ require-instance false;
+ }
+ description
+ "The local interface.";
+ }
+ }
+ }
+
+ grouping global-graceful-shutdown {
+ description
+ "Structural grouping used to include graceful-shutdown
+ configuration for both BGP neighbors and peer groups.";
+ container graceful-shutdown {
+ description
+ "BGP Graceful shutdown feature.";
+ leaf enable {
+ type boolean;
+ default "false";
+ description
+ "Enable graceful-shutdown feature.";
+ }
+ }
+ }
+
+ grouping global-filter-config {
+ description
+ "Structural grouping used to include filter
+ configuration for BGP RIB table.";
+ container filter-config {
+ description
+ "BGP table to RIB route download filter.";
+ uses rmap-policy-export;
+ }
+ }
+
+ grouping route-distinguisher-params {
+ description
+ "Route distinguisher value as per RFC4364.";
+ leaf rd {
+ type rt-types:route-distinguisher;
+ description
+ "Route distinguisher value as per RFC4364.";
+ }
+ }
+
+ grouping vpn-label-params {
+ description
+ "Label value for VRF.";
+ choice label-allocation-mode {
+ case manual {
+ leaf label {
+ type rt-types:mpls-label;
+ description
+ "Label index to associate with the prefix.";
+ }
+ }
+
+ case auto {
+ leaf label-auto {
+ type boolean;
+ default "false";
+ description
+ "Automatically assign a label.";
+ }
+ }
+ }
+ }
+
+ grouping vpn-nexthop-params {
+ description
+ "Specify next hop to use for VRF advertised prefixes.";
+ leaf nexthop {
+ type inet:ip-address;
+ description
+ "Nexthop IP address.";
+ }
+ }
+
+ grouping rt-list {
+ description
+ "Route Target list";
+ leaf-list import-rt-list {
+ type rt-types:route-target;
+ description
+ "For routes leaked from vpn to current address-family: match any.";
+ }
+
+ leaf-list export-rt-list {
+ type rt-types:route-target;
+ description
+ "For routes leaked from current address-family to vpn: set.";
+ }
+ }
+
+ grouping vpn-route-target-params {
+ description
+ "Route Target value.";
+ leaf redirect-rt {
+ type rt-types:route-target;
+ description
+ "Flow-spec redirect type route target.";
+ }
+
+ choice rt-direction {
+ case import-export {
+ uses rt-list;
+ }
+ case both {
+ leaf-list rt-list {
+ type rt-types:route-target;
+ description
+ "Both import: match any and export: set.";
+ }
+ }
+ }
+ }
+
+ grouping vpn-import-params {
+ description
+ "VPN route leaking parameters.";
+ leaf import-vpn {
+ type boolean;
+ default "false";
+ description
+ "Import routes from default instance VPN RIB.";
+ }
+
+ leaf export-vpn {
+ type boolean;
+ default "false";
+ description
+ "Export routes to default instance VPN RIB.";
+ }
+
+ list import-vrf-list {
+ key "vrf";
+ description
+ "List of VRFs to import routes from.";
+ leaf vrf {
+ type frr-vrf:vrf-ref {
+ require-instance false;
+ }
+ description
+ "Routing instance.";
+ }
+ }
+
+ uses rmap-policy-import;
+
+ uses rmap-policy-export;
+ }
+
+ grouping global-afi-safi-vpn-config {
+ container vpn-config {
+ uses route-distinguisher-params;
+
+ uses vpn-label-params;
+
+ uses vpn-nexthop-params;
+
+ uses vpn-import-params;
+
+ uses vpn-route-target-params;
+ }
+ }
+
+ grouping global-afi-safi-vpn-network-config {
+ list network-config {
+ key "rd";
+ description
+ "A list of rd.";
+ uses route-distinguisher-params;
+
+ list prefix-list {
+ key "prefix";
+ description
+ "A list of prefix.";
+ leaf prefix {
+ type inet:ip-prefix;
+ description
+ "IP destination prefix.";
+ }
+
+ leaf label-index {
+ type uint32;
+ mandatory true;
+ description
+ "Label index to associate with the prefix.";
+ }
+
+ leaf rmap-policy-export {
+ type frr-bt:rmap-ref;
+ description
+ "Route-map to modify the attributes for Routes going out
+ via BGP updates.";
+ }
+ }
+ }
+ }
+}
diff --git a/yang/frr-bgp-neighbor.yang b/yang/frr-bgp-neighbor.yang
new file mode 100644
index 0000000000..3b8d63c447
--- /dev/null
+++ b/yang/frr-bgp-neighbor.yang
@@ -0,0 +1,137 @@
+submodule frr-bgp-neighbor {
+ yang-version 1.1;
+
+ belongs-to frr-bgp {
+ prefix "bgp";
+ }
+
+ include frr-bgp-common-structure;
+ include frr-bgp-common-multiprotocol;
+
+ organization
+ "FRRouting";
+ contact
+ "FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development
+ List: <mailto:dev@lists.frrouting.org>";
+ description
+ "This submodule contains general data definitions for use in BGP neighbor.
+
+ Copyright 2020 FRRouting
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
+
+ revision 2019-12-03 {
+ description
+ "Initial revision.";
+ }
+
+ grouping neighbor-parameters {
+ leaf password {
+ type string {
+ length "1..254";
+ }
+ description
+ "Actual password.";
+ }
+
+ leaf ttl-security {
+ type uint8;
+ description
+ "BGP Time To Live (TTL) security check.";
+ reference
+ "RFC 5082: The Generalized TTL Security Mechanism
+ (GTSM),
+ RFC 7454: BGP Operations and Security.";
+ }
+
+ leaf solo {
+ type boolean;
+ default "false";
+ description
+ "Solo peer - part of its own update group.";
+ }
+
+ leaf enforce-first-as {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' it will enforce the first AS for EBGP routes.";
+ }
+
+ leaf description {
+ type string;
+ description
+ "An optional textual description (intended primarily for use
+ with a peer or group.";
+ }
+
+ leaf passive-mode {
+ type boolean;
+ default "false";
+ description
+ "Don't send open messages to this neighbor.";
+ }
+
+ uses structure-neighbor-group-capability-options;
+
+ uses neighbor-update-source;
+
+ uses neighbor-remote-as;
+
+ uses structure-neighbor-group-ebgp-multihop;
+
+ uses neighbor-local-as-options;
+
+ uses neighbor-bfd-options;
+
+ uses structure-neighbor-group-admin-shutdown;
+
+ uses structure-neighbor-group-graceful-restart;
+
+ uses structure-neighbor-config-timers;
+
+ container afi-safis {
+ description
+ "List of address-families associated with the BGP
+ instance.";
+ list afi-safi {
+ key "afi-safi-name";
+ description
+ "AFI, SAFI configuration available for the
+ neighbour or group.";
+ uses mp-afi-safi-config;
+
+ leaf enabled {
+ type boolean;
+ default "false";
+ description
+ "This leaf indicates whether the IPv4 Unicast AFI, SAFI is
+ enabled for the neighbour or group.";
+ }
+
+ uses mp-all-afi-safi-list-contents;
+ }
+ }
+ }
+}
diff --git a/yang/frr-bgp-peer-group.yang b/yang/frr-bgp-peer-group.yang
new file mode 100644
index 0000000000..3ce628d2b7
--- /dev/null
+++ b/yang/frr-bgp-peer-group.yang
@@ -0,0 +1,89 @@
+submodule frr-bgp-peer-group {
+ yang-version 1.1;
+
+ belongs-to frr-bgp {
+ prefix "bgp";
+ }
+
+ import ietf-inet-types {
+ prefix inet;
+ }
+
+ include frr-bgp-common-structure;
+ include frr-bgp-neighbor;
+
+ organization
+ "FRRouting";
+ contact
+ "FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development
+ List: <mailto:dev@lists.frrouting.org>";
+ description
+ "This submodule contains general data definitions for use in BGP
+ peer group.
+
+ Copyright 2020 FRRouting
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
+
+ revision 2019-12-03 {
+ description
+ "Initial revision.";
+ }
+
+ grouping bgp-peer-group-base {
+ description
+ "Parameters related to a BGP group.";
+ leaf peer-group-name {
+ type string;
+ description
+ "Name of the BGP peer-group.";
+ }
+
+ leaf-list ipv4-listen-range {
+ type inet:ipv4-address;
+ description
+ "Configure BGP dynamic neighbors listen range.";
+ }
+
+ leaf-list ipv6-listen-range {
+ type inet:ipv6-address;
+ description
+ "Configure BGP dynamic neighbors listen range.";
+ }
+
+ uses neighbor-parameters;
+ }
+
+ grouping bgp-peer-group-list {
+ description
+ "The list of BGP peer groups.";
+ list peer-group {
+ key "peer-group-name";
+ description
+ "List of BGP peer-groups configured on the local system -
+ uniquely identified by peer-group name.";
+ uses bgp-peer-group-base;
+ }
+ }
+}
diff --git a/yang/frr-bgp-rpki.yang b/yang/frr-bgp-rpki.yang
new file mode 100644
index 0000000000..e9b6752f26
--- /dev/null
+++ b/yang/frr-bgp-rpki.yang
@@ -0,0 +1,209 @@
+module frr-bgp-rpki {
+ yang-version 1.1;
+ namespace "http://frrouting.org/yang/frr-bgp-rpki";
+ prefix frr-bgp-rpki;
+
+ import ietf-inet-types {
+ prefix inet;
+ }
+
+ import frr-vrf {
+ prefix frr-vrf;
+ }
+
+ organization
+ "FRRouting";
+ contact
+ "FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development
+ List: <mailto:dev@lists.frrouting.org>";
+ description
+ "This module defines a model for managing FRR BGP RPKI.
+
+ Copyright 2020 FRRouting
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
+
+ revision 2019-12-03 {
+ description
+ "Initial revision.";
+ }
+
+ typedef transport-type {
+ type enumeration {
+ enum "TCP" {
+ value 1;
+ description
+ "Connection to server is TCP based.";
+ }
+ enum "SSH" {
+ value 2;
+ description
+ "Connection to server is SSH based.";
+ }
+ }
+ }
+
+ grouping bgp-rpki-timers {
+ container rpki-timers {
+ description
+ "RPKI timers config.";
+ leaf polling-time {
+ type uint32 {
+ range "1..86400";
+ }
+ units "seconds";
+ default "3600";
+ description
+ "Set the number of seconds the router waits until the
+ router asks the cache again for updated data.";
+ }
+
+ leaf expire-time {
+ type uint32 {
+ range "600..172800";
+ }
+ units "seconds";
+ default "7200";
+ description
+ "Set the expire interval.";
+ }
+
+ leaf retry-time {
+ type uint16 {
+ range "1..7200";
+ }
+ units "seconds";
+ default "600";
+ description
+ "Set the retry interval.";
+ }
+ }
+ }
+
+ grouping bgp-rpki-cache-server {
+ container rpki-cache-server {
+ description
+ "Add a cache server to the socket.";
+ list cache-list {
+ key "preference";
+ leaf preference {
+ type uint8 {
+ range "1..255";
+ }
+ description
+ "Preference of the cache server.";
+ }
+
+ leaf cache-type {
+ type transport-type;
+ mandatory true;
+ description
+ "Specifies a transport method for the RPKI cache.";
+ }
+
+ choice server {
+ case ip-address {
+ leaf ip-address {
+ type inet:ip-address;
+ mandatory true;
+ }
+ }
+
+ case host-name {
+ leaf ip-host-address {
+ type inet:host;
+ mandatory true;
+ }
+ }
+ }
+
+ container transport {
+ container tcp {
+ when "../../cache-type = 'TCP'";
+ description
+ "TCP server details.";
+ leaf tcp-port {
+ type uint32;
+ }
+ }
+
+ container ssh {
+ when "../../cache-type = 'SSH'";
+ description
+ "SSH login details";
+ leaf ssh-port {
+ type uint32 {
+ range "1..65535";
+ }
+ description
+ "SSH port on which session gets opened.";
+ }
+
+ leaf user-name {
+ type string;
+ description
+ "SSH username to establish an SSH connection to the
+ cache server.";
+ }
+
+ leaf private-key {
+ type string;
+ description
+ "Local path that includes the private key file of the router.";
+ }
+
+ leaf public-key {
+ type string;
+ description
+ "Local path that includes the public key file of the router.";
+ }
+
+ leaf server-public-ley {
+ type string;
+ description
+ "Server public key.";
+ }
+ }
+ }
+ }
+ }
+ }
+
+ augment "/frr-vrf:lib/frr-vrf:vrf" {
+ container bgp-rpki {
+ description
+ "RPKI configuration parameters.";
+ leaf enable {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' it enables the RPKI.";
+ }
+
+ uses bgp-rpki-timers;
+
+ uses bgp-rpki-cache-server;
+ }
+ }
+}
diff --git a/yang/frr-bgp-types.yang b/yang/frr-bgp-types.yang
new file mode 100644
index 0000000000..0afdea1ba6
--- /dev/null
+++ b/yang/frr-bgp-types.yang
@@ -0,0 +1,154 @@
+module frr-bgp-types {
+ yang-version 1.1;
+ namespace "http://frrouting.org/yang/bgp-types";
+ prefix frr-bt;
+
+ organization
+ "FRRouting";
+ contact
+ "FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development
+ List: <mailto:dev@lists.frrouting.org>";
+ description
+ "This module contains general data definitions for use in BGP.
+
+ Copyright 2020 FRRouting
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
+
+ revision 2019-12-03 {
+ description
+ "Initial revision.";
+ }
+
+ typedef rmap-ref {
+ type string;
+ }
+
+ typedef plist-ref {
+ type string;
+ }
+
+ typedef access-list-ref {
+ type string;
+ }
+
+ typedef as-path-filter-ref {
+ type string;
+ }
+
+ typedef bgp-instance-type {
+ type enumeration {
+ enum "default" {
+ value 1;
+ description
+ "BGP instance default.";
+ }
+ enum "vrf" {
+ value 2;
+ description
+ "BGP instance vrf.";
+ }
+ enum "view" {
+ value 3;
+ description
+ "BGP instance view.";
+ }
+ }
+ }
+
+ typedef as-type {
+ type enumeration {
+ enum "as-specified" {
+ value 1;
+ description
+ "AS has explicitly specified value.";
+ }
+ enum "internal" {
+ value 2;
+ description
+ "Internal BGP peer.";
+ }
+ enum "external" {
+ value 3;
+ description
+ "External BGP peer.";
+ }
+ }
+ }
+
+ typedef add-path-type {
+ type enumeration {
+ enum "all" {
+ value 1;
+ description
+ "To advertise all paths to a neighbor.";
+ }
+ enum "per-as" {
+ value 2;
+ description
+ "To advertise the best path per each neighboring AS.";
+ }
+ enum "none" {
+ value 3;
+ description
+ "Add path feature is disabled.";
+ }
+ }
+ }
+
+ typedef bfd-session-type {
+ type enumeration {
+ enum "single-hop" {
+ value 1;
+ description
+ "Single hop session.";
+ }
+ enum "multi-hop" {
+ value 2;
+ description
+ "Multiple hop session.";
+ }
+ enum "not-configured" {
+ value 3;
+ description
+ "Not Configured.";
+ }
+ }
+ }
+
+ typedef direction {
+ type enumeration {
+ enum "in" {
+ value 1;
+ description
+ "IN, ingress, Rx.";
+ }
+ enum "out" {
+ value 2;
+ description
+ "OUT, egress, Tx.";
+ }
+ }
+ }
+}
diff --git a/yang/frr-bgp.yang b/yang/frr-bgp.yang
new file mode 100644
index 0000000000..3e5b1da7d3
--- /dev/null
+++ b/yang/frr-bgp.yang
@@ -0,0 +1,1239 @@
+module frr-bgp {
+ yang-version 1.1;
+ namespace "http://frrouting.org/yang/bgp";
+ prefix frr-bgp;
+
+ import frr-routing {
+ prefix frr-rt;
+ }
+
+ import ietf-inet-types {
+ prefix inet;
+ }
+
+ import ietf-routing-types {
+ prefix rt-types;
+ }
+
+ import frr-interface {
+ prefix frr-interface;
+ }
+
+ include "frr-bgp-common-structure";
+
+ include "frr-bgp-common";
+
+ include "frr-bgp-common-multiprotocol";
+
+ include "frr-bgp-neighbor";
+
+ include "frr-bgp-peer-group";
+
+ include "frr-bgp-bmp";
+
+ organization
+ "FRRouting";
+ contact
+ "FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development
+ List: <mailto:dev@lists.frrouting.org>";
+ description
+ "This module defines a model for managing FRR bgpd daemon.
+
+ Copyright 2020 FRRouting
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
+
+ revision 2019-12-03 {
+ description
+ "Initial revision.";
+ }
+
+ identity bgp {
+ base frr-rt:routing-protocol;
+ description
+ "BGP protocol.";
+ }
+
+ grouping mp-afi-unicast-common {
+ uses global-group-use-multiple-paths;
+
+ uses global-redistribute;
+
+ uses admin-distance;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol" {
+ container bgp {
+ when "../frr-rt:type = 'frr-bgp:bgp'" {
+ description
+ "BGP protocol augmentation of ietf-routing module
+ control-plane-protocol.";
+ }
+ description
+ "Top-level configuration for the BGP router.";
+ container global {
+ presence "Enables global configuration of BGP";
+ description
+ "Global configuration for the BGP router.";
+ leaf local-as {
+ type inet:as-number;
+ mandatory true;
+ description
+ "Local autonomous system number of the router. Uses
+ the 32-bit as-number type from the model in RFC 6991.";
+ }
+
+ uses frr-rt:router-id;
+
+ container confederation {
+ description
+ "Configuration options specifying parameters when the
+ local router is within an autonomous system which is
+ part of a BGP confederation.";
+ leaf identifier {
+ type inet:as-number;
+ description
+ "Confederation identifier for the autonomous system.";
+ }
+
+ leaf-list member-as {
+ type inet:as-number;
+ description
+ "Remote autonomous systems that are to be treated
+ as part of the local confederation.";
+ }
+ }
+
+ uses med-config;
+
+ uses route-reflector-config;
+
+ uses route-selection-options;
+
+ uses global-neighbor-config;
+
+ container graceful-restart {
+ description
+ "Parameters relating the graceful restart mechanism for
+ BGP.";
+ uses graceful-restart-config;
+ }
+
+ uses global-update-group-config;
+
+ uses global-config-timers;
+
+ uses global-bgp-config;
+
+ uses global-network-config;
+
+ uses global-graceful-shutdown;
+
+ uses global-bmp-config;
+
+ container afi-safis {
+ description
+ "List of address-families associated with the BGP
+ instance.";
+ list afi-safi {
+ key "afi-safi-name";
+ description
+ "AFI, SAFI configuration available for the
+ neighbour or group.";
+ uses mp-afi-safi-config;
+
+ uses mp-all-afi-safi-list-contents;
+ }
+ }
+ }
+
+ container neighbors {
+ description
+ "Configuration for BGP neighbors.";
+ list neighbor {
+ key "remote-address";
+ description
+ "List of BGP neighbors configured on the local system,
+ uniquely identified by remote IPv[46] address.";
+ leaf remote-address {
+ type inet:ip-address;
+ description
+ "The remote IP address of this entry's BGP peer.";
+ }
+
+ leaf local-interface {
+ type frr-interface:interface-ref {
+ require-instance false;
+ }
+ description
+ "Neighbor's interface name.";
+ }
+
+ leaf local-port {
+ type inet:port-number {
+ range "0..65535";
+ }
+ description
+ "Neighbor's BGP TCP port number.";
+ }
+
+ leaf peer-group {
+ type leafref {
+ path "../../../peer-groups/peer-group/peer-group-name";
+ }
+ description
+ "The peer-group with which this neighbor is associated.";
+ }
+
+ uses neighbor-parameters;
+ }
+
+ list unnumbered-neighbor {
+ key "interface";
+ description
+ "List of BGP neighbors configured on the local system,
+ uniquely identified by interfaces.";
+ leaf interface {
+ type frr-interface:interface-ref {
+ require-instance false;
+ }
+ description
+ "The local interface of this entry's BGP peer.";
+ }
+
+ leaf v6only {
+ type boolean;
+ default "false";
+ description
+ "When set to 'true' it will create a neighbor with v6
+ link local only.";
+ }
+
+ leaf peer-group {
+ type leafref {
+ path "../../../peer-groups/peer-group/peer-group-name";
+ }
+ description
+ "The peer-group with which this neighbor is associated.";
+ }
+
+ uses neighbor-parameters;
+ }
+ }
+
+ container peer-groups {
+ description
+ "Configuration for BGP peer-groups.";
+ uses bgp-peer-group-list;
+ }
+ }
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/global/afi-safis/afi-safi/ipv4-unicast" {
+ list network-config {
+ key "prefix";
+ description
+ "A list of network routes.";
+ leaf prefix {
+ type inet:ipv4-prefix;
+ description
+ "IPv4 destination prefix.";
+ }
+
+ leaf backdoor {
+ type boolean;
+ default "false";
+ description
+ "Specify a BGP backdoor route.";
+ }
+
+ uses mp-afi-safi-network-config;
+ }
+
+ list aggregate-route {
+ key "prefix";
+ description
+ "A list of aggregated routes.";
+ leaf prefix {
+ type inet:ipv4-prefix;
+ description
+ "IPv4 destination prefix.";
+ }
+
+ uses mp-afi-safi-agg-route-config;
+ }
+
+ list admin-distance-route {
+ key "prefix";
+ description
+ "A list of routes with a particular admin distance.";
+ leaf prefix {
+ type inet:ipv4-prefix;
+ description
+ "IPv4 destination prefix.";
+ }
+
+ uses distance-per-route-config;
+ }
+
+ uses route-flap-dampening;
+
+ uses mp-afi-unicast-common;
+
+ uses global-filter-config;
+
+ uses global-afi-safi-vpn-config;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/global/afi-safis/afi-safi/ipv6-unicast" {
+ list network-config {
+ key "prefix";
+ description
+ "A list of network routes.";
+ leaf prefix {
+ type inet:ipv6-prefix;
+ description
+ "IPv6 destination prefix.";
+ }
+
+ leaf backdoor {
+ type boolean;
+ default "false";
+ description
+ "Specify a BGP backdoor route.";
+ }
+
+ uses mp-afi-safi-network-config;
+ }
+
+ list aggregate-route {
+ key "prefix";
+ description
+ "A list of aggregated routes.";
+ leaf prefix {
+ type inet:ipv6-prefix;
+ description
+ "IPv6 destination prefix.";
+ }
+
+ uses mp-afi-safi-agg-route-config;
+ }
+
+ list admin-distance-route {
+ key "prefix";
+ description
+ "A list of routes with a particular admin distance.";
+ leaf prefix {
+ type inet:ipv6-prefix;
+ description
+ "IPv6 destination prefix.";
+ }
+
+ uses distance-per-route-config;
+ }
+
+ uses mp-afi-unicast-common;
+
+ uses global-filter-config;
+
+ uses global-afi-safi-vpn-config;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast" {
+ uses global-group-use-multiple-paths;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast" {
+ uses global-group-use-multiple-paths;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/global/afi-safis/afi-safi/ipv4-multicast" {
+ list network-config {
+ key "prefix";
+ description
+ "A list of network routes.";
+ leaf prefix {
+ type rt-types:ipv4-multicast-group-address;
+ description
+ "IPv4 multicast destination prefix.";
+ }
+
+ leaf backdoor {
+ type boolean;
+ default "false";
+ description
+ "Specify a BGP backdoor route.";
+ }
+
+ uses mp-afi-safi-network-config;
+ }
+
+ list aggregate-route {
+ key "prefix";
+ description
+ "A list of aggregated routes.";
+ leaf prefix {
+ type rt-types:ipv4-multicast-group-address;
+ description
+ "IPv4 multicast destination prefix.";
+ }
+
+ uses mp-afi-safi-agg-route-config;
+ }
+
+ list admin-distance-route {
+ key "prefix";
+ description
+ "A list of routes with a particular admin distance.";
+ leaf prefix {
+ type rt-types:ipv4-multicast-group-address;
+ description
+ "IPv4 multicast destination prefix.";
+ }
+ }
+
+ uses admin-distance;
+
+ uses route-flap-dampening;
+
+ uses global-filter-config;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/global/afi-safis/afi-safi/ipv6-multicast" {
+ list network-config {
+ key "prefix";
+ description
+ "A list of network routes.";
+ leaf prefix {
+ type rt-types:ipv6-multicast-group-address;
+ description
+ "IPv6 multicast destination prefix.";
+ }
+
+ leaf backdoor {
+ type boolean;
+ default "false";
+ description
+ "Specify a BGP backdoor route.";
+ }
+
+ uses mp-afi-safi-network-config;
+ }
+
+ list aggregate-route {
+ key "prefix";
+ description
+ "A list of aggregated routes.";
+ leaf prefix {
+ type rt-types:ipv6-multicast-group-address;
+ description
+ "IPv6 multicast destination prefix.";
+ }
+
+ uses mp-afi-safi-agg-route-config;
+ }
+
+ list admin-distance-route {
+ key "prefix";
+ description
+ "A list of routes with a particular admin distance.";
+ leaf prefix {
+ type rt-types:ipv6-multicast-group-address;
+ description
+ "IPv6 multicast destination prefix.";
+ }
+ }
+
+ uses admin-distance;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/global/afi-safis/afi-safi/ipv4-flowspec" {
+ uses flow-spec-config;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast" {
+ uses global-afi-safi-vpn-network-config;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast" {
+ uses global-afi-safi-vpn-network-config;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv4-unicast" {
+ uses bmp-afi-safi-common-config;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv4-multicast" {
+ uses bmp-afi-safi-common-config;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv6-unicast" {
+ uses bmp-afi-safi-common-config;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv6-multicast" {
+ uses bmp-afi-safi-common-config;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-default-originate-options;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-weight;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-group-filter-config;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast" {
+ leaf nexthop-local-unchanged {
+ type boolean;
+ default "false";
+ description
+ "Configure treatment of outgoing link-local nexthop attribute.
+ When set to 'true' it leaves link-local nexthop unchanged
+ for this peer.";
+ }
+
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn" {
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec" {
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec" {
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-default-originate-options;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-weight;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-group-filter-config;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast" {
+ leaf nexthop-local-unchanged {
+ type boolean;
+ default "false";
+ description
+ "Configure treatment of outgoing link-local nexthop attribute.
+ When set to 'true' it leaves link-local nexthop unchanged
+ for this peer.";
+ }
+
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn" {
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec" {
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec" {
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-default-originate-options;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-weight;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-group-filter-config;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast" {
+ leaf nexthop-local-unchanged {
+ type boolean;
+ default "false";
+ description
+ "Configure treatment of outgoing link-local nexthop attribute.
+ When set to 'true' it leaves link-local nexthop unchanged
+ for this peer.";
+ }
+
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-group-orf-capability;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast" {
+ uses structure-neighbor-group-add-paths;
+
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-prefix-limit;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-private-as;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-send-community;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+
+ uses structure-neighbor-weight;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn" {
+ uses structure-neighbor-group-as-path-options;
+
+ uses structure-neighbor-group-attr-unchanged;
+
+ uses structure-neighbor-nexthop-self;
+
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec" {
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+ }
+
+ augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec" {
+ uses structure-neighbor-route-reflector;
+
+ uses structure-neighbor-route-server;
+
+ uses structure-neighbor-group-soft-reconfiguration;
+ }
+}
diff --git a/yang/frr-deviations-bgp-datacenter.yang b/yang/frr-deviations-bgp-datacenter.yang
new file mode 100644
index 0000000000..9d2725b253
--- /dev/null
+++ b/yang/frr-deviations-bgp-datacenter.yang
@@ -0,0 +1,106 @@
+module frr-deviations-bgp-datacenter {
+ yang-version 1.1;
+ namespace "http://frrouting.org/yang/frr-deviations-bgp-datacenter";
+ prefix frr-deviations-bgp-dc;
+
+ import frr-routing {
+ prefix frr-rt;
+ }
+
+ import frr-bgp {
+ prefix frr-bgp;
+ }
+
+ organization
+ "FRRouting";
+ contact
+ "FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development
+ List: <mailto:dev@lists.frrouting.org>";
+ description
+ "This module defines deviations for the frr-bgp module with
+ datacenter profile.
+
+ Copyright 2020 FRRouting
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
+
+ revision 2019-12-03 {
+ description
+ "Initial revision.";
+ }
+
+ deviation "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/frr-bgp:bgp/frr-bgp:global/frr-bgp:global-config-timers/frr-bgp:connect-retry-interval" {
+ deviate replace {
+ default "10";
+ }
+ }
+
+ deviation "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/frr-bgp:bgp/frr-bgp:global/frr-bgp:global-config-timers/frr-bgp:hold-time" {
+ deviate replace {
+ default "9";
+ }
+ }
+
+ deviation "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/frr-bgp:bgp/frr-bgp:global/frr-bgp:global-config-timers/frr-bgp:keepalive" {
+ deviate replace {
+ default "3";
+ }
+ }
+
+ deviation "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/frr-bgp:bgp/frr-bgp:global/frr-bgp:route-selection-options/frr-bgp:deterministic-med" {
+ deviate replace {
+ default "false";
+ }
+ }
+
+ deviation "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/frr-bgp:bgp/frr-bgp:global/frr-bgp:import-check" {
+ deviate replace {
+ default "true";
+ }
+ }
+
+ deviation "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/frr-bgp:bgp/frr-bgp:global/frr-bgp:show-hostname" {
+ deviate replace {
+ default "true";
+ }
+ }
+
+ deviation "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/frr-bgp:bgp/frr-bgp:global/frr-bgp:show-nexthop-hostname" {
+ deviate replace {
+ default "true";
+ }
+ }
+
+ deviation "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/frr-bgp:bgp/frr-bgp:global/frr-bgp:ebgp-requires-policy" {
+ deviate replace {
+ default "false";
+ }
+ }
+
+ deviation "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol/frr-bgp:bgp/frr-bgp:global/frr-bgp:global-neighbor-config/frr-bgp:log-neighbor-changes" {
+ deviate replace {
+ default "true";
+ }
+ }
+}
diff --git a/yang/frr-routing.yang b/yang/frr-routing.yang
index d22e12074f..52607f9ad0 100644
--- a/yang/frr-routing.yang
+++ b/yang/frr-routing.yang
@@ -101,6 +101,76 @@ module frr-routing {
"This identity represents the IPv6 multicast address family.";
}
+ identity ipv4-labeled-unicast {
+ base afi-safi-type;
+ description
+ "This identity represents the IPv4 labeled unicast address family.";
+ }
+
+
+ identity ipv6-labeled-unicast {
+ base afi-safi-type;
+ description
+ "This identity represents the IPv6 labeled unicast address family.";
+ }
+
+
+ identity l3vpn-ipv4-unicast {
+ base afi-safi-type;
+ description
+ "This identity represents the L3vpn IPv4 unicast address family.";
+ }
+
+
+ identity l3vpn-ipv6-unicast {
+ base afi-safi-type;
+ description
+ "This identity represents the L3vpn IPv6 unicast address family.";
+ }
+
+
+ identity l3vpn-ipv4-multicast {
+ base afi-safi-type;
+ description
+ "This identity represents the L3vpn IPv4 multicast address family.";
+ }
+
+
+ identity l3vpn-ipv6-multicast {
+ base afi-safi-type;
+ description
+ "This identity represents the L3vpn IPv6 multicast address family.";
+ }
+
+
+ identity l2vpn-vpls {
+ base afi-safi-type;
+ description
+ "This identity represents the L2vpn VPLS address family.";
+ }
+
+
+ identity l2vpn-evpn {
+ base afi-safi-type;
+ description
+ "This identity represents the L2vpn EVPN address family.";
+ }
+
+
+ identity ipv4-flowspec {
+ base afi-safi-type;
+ description
+ "This identity represents the IPv4 flowspec address family.";
+ }
+
+
+ identity ipv6-flowspec {
+ base afi-safi-type;
+ description
+ "This identity represents the IPv6 flowspec address family.";
+ }
+
+
identity control-plane-protocol {
description
"Base identity from which control-plane protocol identities are
diff --git a/yang/ietf/ietf-bgp-types.yang b/yang/ietf/ietf-bgp-types.yang
new file mode 100644
index 0000000000..9c7a6af76c
--- /dev/null
+++ b/yang/ietf/ietf-bgp-types.yang
@@ -0,0 +1,525 @@
+module ietf-bgp-types {
+ yang-version "1.1";
+ namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-types";
+
+ prefix "bt";
+
+ import ietf-inet-types {
+ prefix inet;
+ }
+
+ // meta
+ organization
+ "IETF IDR Working Group";
+
+ contact
+ "WG Web: <http://tools.ietf.org/wg/idr>
+ WG List: <idr@ietf.org>
+
+ Authors: Mahesh Jethanandani (mjethanandani at gmail.com),
+ Keyur Patel (keyur at arrcus.com),
+ Susan Hares (shares at ndzh.com),
+ Jeffrey Haas (jhaas at pfrc.org).";
+ description
+ "This module contains general data definitions for use in BGP
+ policy. It can be imported by modules that make use of BGP
+ attributes";
+
+ revision 2019-10-03 {
+ description
+ "Initial Version";
+ reference
+ "RFC XXX, BGP Model for Service Provider Network.";
+ }
+
+ identity bgp-capability {
+ description "Base identity for a BGP capability";
+ }
+
+ identity mp-bgp {
+ base bgp-capability;
+ description
+ "Multi-protocol extensions to BGP";
+ reference
+ "RFC 4760";
+ }
+
+ identity route-refresh {
+ base bgp-capability;
+ description
+ "The BGP route-refresh functionality";
+ reference
+ "RFC2918";
+ }
+
+ identity asn32 {
+ base bgp-capability;
+ description
+ "4-byte (32-bit) AS number functionality";
+ reference
+ "RFC6793";
+ }
+
+ identity graceful-restart {
+ base bgp-capability;
+ description
+ "Graceful restart functionality";
+ reference
+ "RFC4724";
+ }
+
+ identity add-paths {
+ base bgp-capability;
+ description
+ "BGP add-paths";
+ reference
+ "RFC 7911.";
+ }
+
+ identity afi-safi-type {
+ description
+ "Base identity type for AFI,SAFI tuples for BGP-4";
+ reference
+ "RFC4760 - multi-protocol extensions for BGP-4";
+ }
+
+ identity ipv4-unicast {
+ base afi-safi-type;
+ description
+ "IPv4 unicast (AFI,SAFI = 1,1)";
+ reference
+ "RFC4760";
+ }
+
+ identity ipv6-unicast {
+ base afi-safi-type;
+ description
+ "IPv6 unicast (AFI,SAFI = 2,1)";
+ reference
+ "RFC4760";
+ }
+
+ identity ipv4-labeled-unicast {
+ base afi-safi-type;
+ description
+ "Labeled IPv4 unicast (AFI,SAFI = 1,4)";
+ reference
+ "RFC3107";
+ }
+
+ identity ipv6-labeled-unicast {
+ base afi-safi-type;
+ description
+ "Labeled IPv6 unicast (AFI,SAFI = 2,4)";
+ reference
+ "RFC3107";
+ }
+
+ identity l3vpn-ipv4-unicast {
+ base afi-safi-type;
+ description
+ "Unicast IPv4 MPLS L3VPN (AFI,SAFI = 1,128)";
+ reference
+ "RFC4364";
+ }
+
+ identity l3vpn-ipv6-unicast {
+ base afi-safi-type;
+ description
+ "Unicast IPv6 MPLS L3VPN (AFI,SAFI = 2,128)";
+ reference
+ "RFC4659";
+ }
+
+ identity l3vpn-ipv4-multicast {
+ base afi-safi-type;
+ description
+ "Multicast IPv4 MPLS L3VPN (AFI,SAFI = 1,129)";
+ reference
+ "RFC6514";
+ }
+
+ identity l3vpn-ipv6-multicast {
+ base afi-safi-type;
+ description
+ "Multicast IPv6 MPLS L3VPN (AFI,SAFI = 2,129)";
+ reference
+ "RFC6514";
+ }
+
+ identity l2vpn-vpls {
+ base afi-safi-type;
+ description
+ "BGP-signalled VPLS (AFI,SAFI = 25,65)";
+ reference
+ "RFC4761";
+ }
+
+ identity l2vpn-evpn {
+ base afi-safi-type;
+ description
+ "BGP MPLS Based Ethernet VPN (AFI,SAFI = 25,70)";
+ }
+
+ identity bgp-well-known-std-community {
+ description
+ "Base identity for reserved communities within the standard
+ community space defined by RFC1997. These communities must
+ fall within the range 0xFFFF0000 to 0xFFFFFFFF";
+ reference
+ "RFC 1997: BGP Communities Attribute.";
+ }
+
+ identity no-export {
+ base bgp-well-known-std-community;
+ description
+ "Do not export NLRI received carrying this community outside
+ the bounds of this autonomous system, or this confederation if
+ the local autonomous system is a confederation member AS. This
+ community has a value of 0xFFFFFF01.";
+ reference
+ "RFC 1997: BGP Communities Attribute.";
+ }
+
+ identity no-advertise {
+ base bgp-well-known-std-community;
+ description
+ "All NLRI received carrying this community must not be
+ advertised to other BGP peers. This community has a value of
+ 0xFFFFFF02.";
+ reference
+ "RFC 1997: BGP Communities Attribute.";
+ }
+
+ identity no-export-subconfed {
+ base bgp-well-known-std-community;
+ description
+ "All NLRI received carrying this community must not be
+ advertised to external BGP peers - including over confederation
+ sub-AS boundaries. This community has a value of 0xFFFFFF03.";
+ reference
+ "RFC 1997: BGP Communities Attribute.";
+ }
+
+ identity no-peer {
+ base bgp-well-known-std-community;
+ description
+ "An autonomous system receiving NLRI tagged with this community
+ is advised not to re-advertise the NLRI to external bi-lateral
+ peer autonomous systems. An AS may also filter received NLRI
+ from bilateral peer sessions when they are tagged with this
+ community value";
+ reference
+ "RFC 3765: NOPEER Community for BGP.";
+ }
+ identity as-path-segment-type {
+ description
+ "Base AS Path Segment Type. In [BGP-4], the path segment type
+ is a 1-octet field with the following values defined.";
+ reference
+ "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.3.";
+ }
+
+ identity as-set {
+ base as-path-segment-type;
+ description
+ "Unordered set of autonomous systems that a route in the UPDATE
+ message has traversed.";
+ reference
+ "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.3.";
+ }
+
+ identity as-sequence {
+ base as-path-segment-type;
+ description
+ "Ordered set of autonomous systems that a route in the UPDATE
+ message has traversed.";
+ reference
+ "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.3.";
+ }
+
+ identity as-confed-sequence {
+ base as-path-segment-type;
+ description
+ "Ordered set of Member Autonomous Systems in the local
+ confederation that the UPDATE message has traversed.";
+ reference
+ "RFC 5065, Autonomous System Configuration for BGP.";
+ }
+
+ identity as-confed-set {
+ base as-path-segment-type;
+ description
+ "Unordered set of Member Autonomous Systems in the local
+ confederation that the UPDATE message has traversed.";
+ reference
+ "RFC 5065, Autonomous System Configuration for BGP.";
+ }
+
+ /*
+ * Features.
+ */
+ feature send-communities {
+ description
+ "Enable the propogation of communities.";
+ }
+
+ feature ttl-security {
+ description
+ "BGP Time To Live (TTL) security check support.";
+ reference
+ "RFC 5082, The Generalized TTL Security Mechanism (GTSM)";
+ }
+
+ feature bfd {
+ description
+ "Support for BFD detection of BGP neighbor reachability.";
+ reference
+ "RFC 5880, Bidirectional Forward Detection (BFD),
+ RFC 5881, Bidirectional Forward Detection for IPv4 and IPv6
+ (Single Hop).
+ RFC 5883, Bidirectional Forwarding Detection (BFD) for Multihop
+ Paths";
+ }
+
+ typedef bgp-session-direction {
+ type enumeration {
+ enum INBOUND {
+ description
+ "Refers to all NLRI received from the BGP peer";
+ }
+ enum OUTBOUND {
+ description
+ "Refers to all NLRI advertised to the BGP peer";
+ }
+ }
+ description
+ "Type to describe the direction of NLRI transmission";
+ }
+
+ typedef bgp-well-known-community-type {
+ type identityref {
+ base bgp-well-known-std-community;
+ }
+ description
+ "Type definition for well-known IETF community attribute
+ values";
+ reference
+ "IANA Border Gateway Protocol (BGP) Well Known Communities";
+ }
+
+ typedef bgp-std-community-type {
+ // TODO: further refine restrictions and allowed patterns
+ // 4-octet value:
+ // <as number> 2 octets
+ // <community value> 2 octets
+ type union {
+ type uint32 {
+ // per RFC 1997, 0x00000000 - 0x0000FFFF and 0xFFFF0000 -
+ // 0xFFFFFFFF are reserved
+ range "65536..4294901759"; // 0x00010000..0xFFFEFFFF
+ }
+ type string {
+ pattern '([0-9]+:[0-9]+)';
+ }
+ }
+ description
+ "Type definition for standard community attributes";
+ reference
+ "RFC 1997 - BGP Communities Attribute";
+ }
+
+ typedef bgp-ext-community-type {
+ // TODO: needs more work to make this more precise given the
+ // variability of extended community attribute specifications
+ // 8-octet value:
+ // <type> 2 octects
+ // <value> 6 octets
+
+ type union {
+ type string {
+ // Type 1: 2-octet global and 4-octet local
+ // (AS number) (Integer)
+ pattern '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' +
+ '[1-9][0-9]{1,4}|[0-9]):' +
+ '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' +
+ '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])';
+ }
+ type string {
+ // Type 2: 4-octet global and 2-octet local
+ // (ipv4-address) (integer)
+ pattern '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' +
+ '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' +
+ '2[0-4][0-9]|25[0-5]):' +
+ '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' +
+ '[1-9][0-9]{1,4}|[0-9])';
+ }
+ type string {
+ // route-target with Type 1
+ // route-target:(ASN):(local-part)
+ pattern 'route\-target:(6[0-5][0-5][0-3][0-5]|' +
+ '[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):' +
+ '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' +
+ '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])';
+ }
+ type string {
+ // route-target with Type 2
+ // route-target:(IPv4):(local-part)
+ pattern 'route\-target:' +
+ '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' +
+ '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' +
+ '2[0-4][0-9]|25[0-5]):' +
+ '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' +
+ '[1-9][0-9]{1,4}|[0-9])';
+ }
+ type string {
+ // route-origin with Type 1
+ pattern 'route\-origin:(6[0-5][0-5][0-3][0-5]|' +
+ '[1-5][0-9]{4}|[1-9][0-9]{1,4}|[0-9]):' +
+ '(4[0-2][0-9][0-4][0-9][0-6][0-7][0-2][0-9][0-6]|' +
+ '[1-3][0-9]{9}|[1-9]([0-9]{1,7})?[0-9]|[1-9])';
+ }
+ type string {
+ // route-origin with Type 2
+ pattern 'route\-origin:' +
+ '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' +
+ '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|' +
+ '2[0-4][0-9]|25[0-5]):' +
+ '(6[0-5][0-5][0-3][0-5]|[1-5][0-9]{4}|' +
+ '[1-9][0-9]{1,4}|[0-9])';
+ }
+ }
+ description
+ "Type definition for extended community attributes";
+ reference
+ "RFC 4360 - BGP Extended Communities Attribute";
+ }
+
+ typedef bgp-community-regexp-type {
+ // TODO: needs more work to decide what format these regexps can
+ // take.
+ type string;
+ description
+ "Type definition for communities specified as regular
+ expression patterns";
+ }
+
+ typedef bgp-origin-attr-type {
+ type enumeration {
+ enum igp {
+ description "Origin of the NLRI is internal";
+ }
+ enum egp {
+ description "Origin of the NLRI is EGP";
+ }
+ enum incomplete {
+ description "Origin of the NLRI is neither IGP or EGP";
+ }
+ }
+ description
+ "Type definition for standard BGP origin attribute";
+ reference
+ "RFC 4271 - A Border Gateway Protocol 4 (BGP-4), Sec 4.3";
+ }
+
+ typedef peer-type {
+ type enumeration {
+ enum internal {
+ description
+ "internal (iBGP) peer";
+ }
+ enum external {
+ description
+ "external (eBGP) peer";
+ }
+ enum confederation {
+ description
+ "Confederation as peer";
+ }
+ }
+ description
+ "Labels a peer or peer group as explicitly internal,
+ external or confederation.";
+ }
+
+ identity REMOVE_PRIVATE_AS_OPTION {
+ description
+ "Base identity for options for removing private autonomous
+ system numbers from the AS_PATH attribute";
+ }
+
+ identity PRIVATE_AS_REMOVE_ALL {
+ base REMOVE_PRIVATE_AS_OPTION;
+ description
+ "Strip all private autonomous system numbers from the AS_PATH.
+ This action is performed regardless of the other content of the
+ AS_PATH attribute, and for all instances of private AS numbers
+ within that attribute.";
+ }
+
+ identity PRIVATE_AS_REPLACE_ALL {
+ base REMOVE_PRIVATE_AS_OPTION;
+ description
+ "Replace all instances of private autonomous system numbers in
+ the AS_PATH with the local BGP speaker's autonomous system
+ number. This action is performed regardless of the other
+ content of the AS_PATH attribute, and for all instances of
+ private AS number within that attribute.";
+ }
+
+ typedef remove-private-as-option {
+ type identityref {
+ base REMOVE_PRIVATE_AS_OPTION;
+ }
+ description
+ "Set of options for configuring how private AS path numbers
+ are removed from advertisements";
+ }
+
+ typedef percentage {
+ type uint8 {
+ range "0..100";
+ }
+ description
+ "Integer indicating a percentage value";
+ }
+
+ typedef rr-cluster-id-type {
+ type union {
+ type uint32;
+ type inet:ipv4-address;
+ }
+ description
+ "Union type for route reflector cluster ids:
+ option 1: 4-byte number
+ option 2: IP address";
+ }
+
+ typedef community-type {
+ type bits {
+ bit standard {
+ position 0;
+ description
+ "Send only standard communities.";
+ reference
+ "RFC 1997: BGP Communities Attribute.";
+ }
+ bit extended {
+ description
+ "Send only extended communities.";
+ reference
+ "RFC 4360: BGP Extended Communities Attribute.";
+ }
+ bit large {
+ description
+ "Send only large communities.";
+ reference
+ "RFC 8092: BGP Large Communities Attribute.";
+ }
+ }
+ description
+ "Type describing variations of community attributes.
+ The community types can be combined and a value of 0
+ implies 'none'";
+ }
+}