public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-network v3 09/18] evpn controller: add ebgp-multihop setting
Date: Wed, 13 May 2026 17:05:55 +0200	[thread overview]
Message-ID: <20260513150609.375436-10-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20260513150609.375436-1-s.hanreich@proxmox.com>

This setting already exists in the BGP plugin, so it is moved to the
base plugin - so that it can be reused by the EVPN controller as well.
This setting only has an effect if the BGP mode is explicitly set to
eBGP. This setting is required in particular for implementing Inter-AS
Option C, defined in RFC 4364, which requires the use of multihop
eBGP sessions.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
Reviewed-by: Hannes Laimer <h.laimer@proxmox.com>
---
 src/PVE/Network/SDN/Controllers/BgpPlugin.pm  | 5 -----
 src/PVE/Network/SDN/Controllers/EvpnPlugin.pm | 8 +++++++-
 src/PVE/Network/SDN/Controllers/Plugin.pm     | 5 +++++
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/PVE/Network/SDN/Controllers/BgpPlugin.pm b/src/PVE/Network/SDN/Controllers/BgpPlugin.pm
index b8499485..43d97f04 100644
--- a/src/PVE/Network/SDN/Controllers/BgpPlugin.pm
+++ b/src/PVE/Network/SDN/Controllers/BgpPlugin.pm
@@ -30,11 +30,6 @@ sub properties {
             optional => 1,
             description => "Enable eBGP (remote-as external).",
         },
-        'ebgp-multihop' => {
-            type => 'integer',
-            optional => 1,
-            description => 'Set maximum amount of hops for eBGP peers.',
-        },
         loopback => {
             description => "Name of the loopback/dummy interface that provides the Router-IP.",
             type => 'string',
diff --git a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
index a130784d..b62fdfff 100644
--- a/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
+++ b/src/PVE/Network/SDN/Controllers/EvpnPlugin.pm
@@ -65,6 +65,7 @@ sub options {
         'route-map-out' => { optional => 1 },
         'nodes' => { optional => 1 },
         'peer-group-name' => { optional => 1 },
+        'ebgp-multihop' => { optional => 1 },
         'bgp-mode' => { optional => 1 },
     };
 }
@@ -208,7 +209,12 @@ sub generate_frr_config {
         interfaces => [],
     };
 
-    $neighbor_group->{ebgp_multihop} = 10 if $ebgp && $loopback && $bgp_mode eq 'auto';
+    if ($bgp_mode eq 'auto') {
+        $neighbor_group->{ebgp_multihop} = 10 if $ebgp && $loopback;
+    } elsif ($bgp_mode eq 'external') {
+        $neighbor_group->{ebgp_multihop} = int($plugin_config->{'ebgp-multihop'})
+            if $ebgp && $plugin_config->{'ebgp-multihop'};
+    }
 
     if ($asn != int($bgp_router->{asn})) {
         # should never trigger due to validation, but asserting it here nonetheless
diff --git a/src/PVE/Network/SDN/Controllers/Plugin.pm b/src/PVE/Network/SDN/Controllers/Plugin.pm
index 17f55ff9..6da3eec5 100644
--- a/src/PVE/Network/SDN/Controllers/Plugin.pm
+++ b/src/PVE/Network/SDN/Controllers/Plugin.pm
@@ -54,6 +54,11 @@ my $defaultData = {
             format => 'pve-sdn-route-map-id',
             optional => 1,
         },
+        'ebgp-multihop' => {
+            type => 'integer',
+            optional => 1,
+            description => 'Set maximum amount of hops for eBGP peers.',
+        },
     },
 };
 
-- 
2.47.3





  parent reply	other threads:[~2026-05-13 15:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 15:05 [PATCH docs/manager/network/proxmox-ve-rs v3 00/18] Extend EVPN controller functionality Stefan Hanreich
2026-05-13 15:05 ` [PATCH proxmox-ve-rs v3 01/18] frr: add local-as setting Stefan Hanreich
2026-05-13 15:05 ` [PATCH proxmox-ve-rs v3 02/18] frr: add support for extcommunity lists Stefan Hanreich
2026-05-13 15:05 ` [PATCH proxmox-ve-rs v3 03/18] frr-templates: render local-as setting Stefan Hanreich
2026-05-13 15:05 ` [PATCH proxmox-ve-rs v3 04/18] frr-templates: render community lists in templates Stefan Hanreich
2026-05-13 15:05 ` [PATCH pve-network v3 05/18] evpn controller: make nodes configurable Stefan Hanreich
2026-05-13 15:05 ` [PATCH pve-network v3 06/18] evpn controller: allow multiple evpn controllers in a cluster Stefan Hanreich
2026-05-13 15:05 ` [PATCH pve-network v3 07/18] evpn controller: add bgp-mode setting Stefan Hanreich
2026-05-13 15:05 ` [PATCH pve-network v3 08/18] evpn zone: add secondary-controllers and rt filtering Stefan Hanreich
2026-05-13 15:05 ` Stefan Hanreich [this message]
2026-05-13 15:05 ` [PATCH pve-network v3 10/18] test: evpn: add test for ibgp + ebgp evpn controller Stefan Hanreich
2026-05-13 15:05 ` [PATCH pve-network v3 11/18] test: evpn: add test for bgp-mode auto Stefan Hanreich
2026-05-13 15:05 ` [PATCH pve-network v3 12/18] tests: add rt_import test case when using multiple evpn controllers Stefan Hanreich
2026-05-13 15:05 ` [PATCH pve-network v3 13/18] " Stefan Hanreich
2026-05-13 15:06 ` [PATCH pve-network v3 14/18] tests: evpn: force ibgp over ebgp bgp controller with ebgp wan session Stefan Hanreich
2026-05-13 15:06 ` [PATCH pve-network v3 15/18] tests: test route filtering mechanism with multiple zones/controllers Stefan Hanreich
2026-05-13 15:06 ` [PATCH pve-manager v3 16/18] sdn: evpn: zone: controller: add new advanced fields Stefan Hanreich
2026-05-13 15:06 ` [PATCH pve-docs v3 17/18] sdn: evpn: document new zone / controller options Stefan Hanreich
2026-05-13 15:06 ` [PATCH pve-docs v3 18/18] sdn: fix typo in bgp controller Stefan Hanreich
2026-05-15  5:00 ` applied: [PATCH docs/manager/network/proxmox-ve-rs v3 00/18] Extend EVPN controller functionality Thomas Lamprecht
2026-05-15  5:04 ` Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260513150609.375436-10-s.hanreich@proxmox.com \
    --to=s.hanreich@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal