summaryrefslogtreecommitdiff
path: root/PVE/Network/SDN/Controllers/BgpPlugin.pm
diff options
context:
space:
mode:
authorAlexandre Derumier <aderumier@odiso.com>2022-02-11 10:33:24 +0100
committerThomas Lamprecht <t.lamprecht@proxmox.com>2022-02-13 14:23:36 +0100
commit1262519c3de7ca0dabbdc9a988e61b76328862fa (patch)
treeb9c8670ecab92414e0cbd914fcf22d3398947d80 /PVE/Network/SDN/Controllers/BgpPlugin.pm
parentbbf4e4b17b27f00abc35572b8b6b437bf6089397 (diff)
controllers: bgp: add bgp-multipath-as-path-relax option
Some users need it to do ecmp when peering with 2 differents asn Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Diffstat (limited to 'PVE/Network/SDN/Controllers/BgpPlugin.pm')
-rw-r--r--PVE/Network/SDN/Controllers/BgpPlugin.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/PVE/Network/SDN/Controllers/BgpPlugin.pm b/PVE/Network/SDN/Controllers/BgpPlugin.pm
index 075ca90..1e4e708 100644
--- a/PVE/Network/SDN/Controllers/BgpPlugin.pm
+++ b/PVE/Network/SDN/Controllers/BgpPlugin.pm
@@ -19,6 +19,10 @@ sub type {
sub properties {
return {
+ 'bgp-multipath-as-path-relax' => {
+ type => 'boolean',
+ optional => 1,
+ },
ebgp => {
type => 'boolean',
optional => 1,
@@ -41,6 +45,7 @@ sub options {
'node' => { optional => 0 },
'asn' => { optional => 0 },
'peers' => { optional => 0 },
+ 'bgp-multipath-as-path-relax' => { optional => 1 },
'ebgp' => { optional => 1 },
'ebgp-multihop' => { optional => 1 },
'loopback' => { optional => 1 },
@@ -58,6 +63,8 @@ sub generate_controller_config {
my $ebgp = $plugin_config->{ebgp};
my $ebgp_multihop = $plugin_config->{'ebgp-multihop'};
my $loopback = $plugin_config->{loopback};
+ my $multipath_relax = $plugin_config->{'bgp-multipath-as-path-relax'};
+
my $local_node = PVE::INotify::nodename();
@@ -86,6 +93,8 @@ sub generate_controller_config {
push @controller_config, "bgp disable-ebgp-connected-route-check" if $loopback;
}
+ push @controller_config, "bgp bestpath as-path multipath-relax" if $multipath_relax;
+
#BGP neighbors
if(@peers) {
push @controller_config, "neighbor BGP peer-group";