[PATCH pve-manager v2 6/7] ui: sdn: add BGP fabric support

Hannes Laimer
2026-04-15T11:12:20Z

Register BGP as a fabric protocol in the UI. The fabric editor omits
the ASN field since each node must specify its own unique ASN for
eBGP unnumbered peering. The interface panel excludes the IP column
since BGP unnumbered interfaces have no IP addresses.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
www/manager6/Makefile | 3 ++
www/manager6/sdn/FabricsView.js | 12 +++++
www/manager6/sdn/fabrics/NodeEdit.js | 1 +
www/manager6/sdn/fabrics/bgp/FabricEdit.js | 53 +++++++++++++++++++
.../sdn/fabrics/bgp/InterfacePanel.js | 13 +++++
www/manager6/sdn/fabrics/bgp/NodeEdit.js | 32 +++++++++++
6 files changed, 114 insertions(+)
create mode 100644 www/manager6/sdn/fabrics/bgp/FabricEdit.js
create mode 100644 www/manager6/sdn/fabrics/bgp/InterfacePanel.js
create mode 100644 www/manager6/sdn/fabrics/bgp/NodeEdit.js

diff --git a/www/manager6/Makefile b/www/manager6/Makefile
index b506849d..b40b373c 100644
--- a/www/manager6/Makefile
+++ b/www/manager6/Makefile
@@ -335,6 +335,9 @@ JSSRC= \
sdn/fabrics/ospf/InterfacePanel.js \
sdn/fabrics/ospf/NodeEdit.js \
sdn/fabrics/ospf/FabricEdit.js \
+ sdn/fabrics/bgp/InterfacePanel.js \
+ sdn/fabrics/bgp/NodeEdit.js \
+ sdn/fabrics/bgp/FabricEdit.js \
storage/ContentView.js \
storage/BackupView.js \
storage/Base.js \
diff --git a/www/manager6/sdn/FabricsView.js b/www/manager6/sdn/FabricsView.js
index 093a70f3..6b067247 100644
--- a/www/manager6/sdn/FabricsView.js
+++ b/www/manager6/sdn/FabricsView.js
@@ -33,6 +33,7 @@ Ext.define('PVE.sdn.Fabric.View', {
const PROTOCOL_DISPLAY_NAMES = {
openfabric: 'OpenFabric',
ospf: 'OSPF',
+ bgp: 'BGP',
};
const displayValue = PROTOCOL_DISPLAY_NAMES[value];
if (rec.data.state === undefined || rec.data.state === null) {
@@ -194,6 +195,10 @@ Ext.define('PVE.sdn.Fabric.View', {
text: 'OSPF',
handler: 'addOspf',
},
+ {
+ text: 'BGP',
+ handler: 'addBgp',
+ },
],
},
addNodeButton,
@@ -272,6 +277,7 @@ Ext.define('PVE.sdn.Fabric.View', {
const FABRIC_PANELS = {
openfabric: 'PVE.sdn.Fabric.OpenFabric.Fabric.Edit',
ospf: 'PVE.sdn.Fabric.Ospf.Fabric.Edit',
+ bgp: 'PVE.sdn.Fabric.Bgp.Fabric.Edit',
};

return FABRIC_PANELS[protocol];
@@ -281,6 +287,7 @@ Ext.define('PVE.sdn.Fabric.View', {
const NODE_PANELS = {
openfabric: 'PVE.sdn.Fabric.OpenFabric.Node.Edit',
ospf: 'PVE.sdn.Fabric.Ospf.Node.Edit',
+ bgp: 'PVE.sdn.Fabric.Bgp.Node.Edit',
};

return NODE_PANELS[protocol];
@@ -296,6 +303,11 @@ Ext.define('PVE.sdn.Fabric.View', {
me.openFabricAddWindow('ospf');
},

+ addBgp: function () {
+ let me = this;
+ me.openFabricAddWindow('bgp');
+ },
+
openFabricAddWindow: function (protocol) {
let me = this;

diff --git a/www/manager6/sdn/fabrics/NodeEdit.js b/www/manager6/sdn/fabrics/NodeEdit.js
index 161917cc..2e88b684 100644
--- a/www/manager6/sdn/fabrics/NodeEdit.js
+++ b/www/manager6/sdn/fabrics/NodeEdit.js
@@ -200,6 +200,7 @@ Ext.define('PVE.sdn.Fabric.Node.Edit', {
const INTERFACE_PANELS = {
openfabric: 'PVE.sdn.Fabric.OpenFabric.InterfacePanel',
ospf: 'PVE.sdn.Fabric.Ospf.InterfacePanel',
+ bgp: 'PVE.sdn.Fabric.Bgp.InterfacePanel',
};

return INTERFACE_PANELS[protocol];
diff --git a/www/manager6/sdn/fabrics/bgp/FabricEdit.js b/www/manager6/sdn/fabrics/bgp/FabricEdit.js
new file mode 100644
index 00000000..ab8a75c4
--- /dev/null
+++ b/www/manager6/sdn/fabrics/bgp/FabricEdit.js
@@ -0,0 +1,53 @@
+Ext.define('PVE.sdn.Fabric.Bgp.Fabric.Edit', {
+ extend: 'PVE.sdn.Fabric.Fabric.Edit',
+
+ subject: 'BGP',
+ onlineHelp: 'pvesdn_bgp_fabric',
+
+ viewModel: {
+ data: {
+ showIpv6ForwardingHint: false,
+ },
+ },
+
+ extraRequestParams: {
+ protocol: 'bgp',
+ },
+
+ additionalItems: [
+ {
+ xtype: 'displayfield',
+ value: 'To make IPv6 fabrics work, enable global IPv6 forwarding on all nodes.',
+ bind: {
+ hidden: '{!showIpv6ForwardingHint}',
+ },
+ userCls: 'pmx-hint',
+ },
+ {
+ xtype: 'proxmoxtextfield',
+ fieldLabel: gettext('IPv6 Prefix'),
+ labelWidth: 120,
+ name: 'ip6_prefix',
+ allowBlank: true,
+ skipEmptyText: true,
+ cbind: {
+ disabled: '{!isCreate}',
+ deleteEmpty: '{!isCreate}',
+ },
+ listeners: {
+ change: function (textbox, value) {
+ let vm = textbox.up('window').getViewModel();
+ vm.set('showIpv6ForwardingHint', !!value);
+ },
+ },
+ },
+ {
+ xtype: 'proxmoxcheckbox',
+ fieldLabel: gettext('BFD'),
+ labelWidth: 120,
+ name: 'bfd',
+ uncheckedValue: 0,
+ defaultValue: 0,
+ },
+ ],
+});
diff --git a/www/manager6/sdn/fabrics/bgp/InterfacePanel.js b/www/manager6/sdn/fabrics/bgp/InterfacePanel.js
new file mode 100644
index 00000000..d9f46de0
--- /dev/null
+++ b/www/manager6/sdn/fabrics/bgp/InterfacePanel.js
@@ -0,0 +1,13 @@
+Ext.define('PVE.sdn.Fabric.Bgp.InterfacePanel', {
+ extend: 'PVE.sdn.Fabric.InterfacePanel',
+
+ // BGP unnumbered interfaces have no IP - override commonColumns to
+ // exclude the IP column that the base class defines.
+ initComponent: function () {
+ let me = this;
+
+ me.commonColumns = me.commonColumns.filter((col) => col.dataIndex !== 'ip');
+
+ me.callParent();
+ },
+});
diff --git a/www/manager6/sdn/fabrics/bgp/NodeEdit.js b/www/manager6/sdn/fabrics/bgp/NodeEdit.js
new file mode 100644
index 00000000..4a172872
--- /dev/null
+++ b/www/manager6/sdn/fabrics/bgp/NodeEdit.js
@@ -0,0 +1,32 @@
+Ext.define('PVE.sdn.Fabric.Bgp.Node.Edit', {
+ extend: 'PVE.sdn.Fabric.Node.Edit',
+ protocol: 'bgp',
+
+ extraRequestParams: {
+ protocol: 'bgp',
+ role: 'internal',
+ },
+
+ additionalItems: [
+ {
+ xtype: 'proxmoxtextfield',
+ fieldLabel: gettext('IPv6'),
+ labelWidth: 120,
+ name: 'ip6',
+ allowBlank: true,
+ skipEmptyText: true,
+ cbind: {
+ deleteEmpty: '{!isCreate}',
+ },
+ },
+ {
+ xtype: 'proxmoxintegerfield',
+ fieldLabel: gettext('ASN'),
+ labelWidth: 120,
+ name: 'asn',
+ minValue: 1,
+ maxValue: 4294967295,
+ allowBlank: false,
+ },
+ ],
+});
--
2.47.3