* [PATCH manager/network/proxmox-ve-rs 0/4] Expose OSPF Network-Type option
@ 2026-02-18 15:11 Gabriel Goller
2026-02-18 15:11 ` [PATCH proxmox-ve-rs 1/2] cargo: bump proxmox-network-types Gabriel Goller
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Gabriel Goller @ 2026-02-18 15:11 UTC (permalink / raw)
To: pve-devel
Previously the network-type option on OSPF interfaces was set to either
point-to-point or broadcast, depending on if an ip address was configured on
the interface. This is not enough, as some users want to have a switched
network (e.g. switch) between their nodes, which calls for the
point-to-multipoint network type.
In order to uphold backwards-compatibility, make network-type an `Option`,
where `None` will be the "automatic" network-type selection we had before.
┌──────────┐ ┌──────────────┐ ┌───────────────────┐ ┌───┐
│None(auto)│ │Point-to-Point│ │Point-to-Multipoint│ │...│
└────┬─────┘ └──────────────┘ └───────────────────┘ └───┘
│
▼
┌─────────────────┐
│Is there an ip │
│on the interface?│
└──┬────────────┬─┘
│no │yes
▼ ▼
┌──────────────┐ ┌────────────────────────┐
│Point-to-Point│ │No FRR network statement│
└──────────────┘ └───────────┬────────────┘
│
▼
┌────────────────────────────┐
│FRR selects either Broadcast│
│Point-to-Point or Loopback │
│(internal network-type) │
└────────────────────────────┘
This series relies on the template series:
https://lore.proxmox.com/pve-devel/20260203160246.353351-1-g.goller@proxmox.com/
proxmox-ve-rs:
Gabriel Goller (2):
cargo: bump proxmox-network-types
fabrics: ospf: expose network-type interface property
Cargo.toml | 2 +-
proxmox-frr/debian/control | 4 +--
proxmox-frr/src/ser/ospf.rs | 27 +---------------
proxmox-sdn-types/debian/control | 3 +-
proxmox-sdn-types/src/lib.rs | 1 +
proxmox-sdn-types/src/ospf.rs | 32 +++++++++++++++++++
proxmox-ve-config/debian/control | 8 ++---
proxmox-ve-config/src/sdn/fabric/frr.rs | 13 +++++---
.../fabric/section_config/protocol/ospf.rs | 6 ++++
9 files changed, 57 insertions(+), 39 deletions(-)
create mode 100644 proxmox-sdn-types/src/ospf.rs
pve-network:
Gabriel Goller (1):
fabrics: add ospf network_type property to interfaces
src/PVE/Network/SDN/Fabrics.pm | 11 +++++++++++
1 file changed, 11 insertions(+)
pve-manager:
Gabriel Goller (1):
fabrics: ospf: add network-type property in interface panel
.../sdn/fabrics/ospf/InterfacePanel.js | 49 +++++++++++++++++++
1 file changed, 49 insertions(+)
Summary over all repositories:
11 files changed, 117 insertions(+), 39 deletions(-)
--
Generated by git-murpp 0.8.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH proxmox-ve-rs 1/2] cargo: bump proxmox-network-types
2026-02-18 15:11 [PATCH manager/network/proxmox-ve-rs 0/4] Expose OSPF Network-Type option Gabriel Goller
@ 2026-02-18 15:11 ` Gabriel Goller
2026-02-18 15:11 ` [PATCH proxmox-ve-rs 2/2] fabrics: ospf: expose network-type interface property Gabriel Goller
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Gabriel Goller @ 2026-02-18 15:11 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
Cargo.toml | 2 +-
proxmox-frr/debian/control | 4 ++--
proxmox-sdn-types/debian/control | 3 +--
proxmox-ve-config/debian/control | 8 ++++----
4 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index 99bd54a27949..7fe3283ec239 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,7 +25,7 @@ serde = { version = "1" }
thiserror = "2.0.0"
proxmox-frr = { version = "0.2", path = "proxmox-frr" }
-proxmox-network-types = { version = "0.1.1" }
+proxmox-network-types = { version = "1.0.1" }
proxmox-schema = { version = "5" }
proxmox-sdn-types = { version = "0.1", path = "proxmox-sdn-types" }
proxmox-serde = { version = "1.0.0" }
diff --git a/proxmox-frr/debian/control b/proxmox-frr/debian/control
index fb0960c4c75d..5f1fad3fdebd 100644
--- a/proxmox-frr/debian/control
+++ b/proxmox-frr/debian/control
@@ -13,7 +13,7 @@ Build-Depends-Arch: cargo:native <!nocheck>,
librust-minijinja-2+multi-template-dev (>= 2.5-~~) <!nocheck>,
librust-phf-0.11+default-dev (>= 0.11.2-~~) <!nocheck>,
librust-phf-0.11+macros-dev (>= 0.11.2-~~) <!nocheck>,
- librust-proxmox-network-types-0.1+default-dev (>= 0.1.1-~~) <!nocheck>,
+ librust-proxmox-network-types-1+default-dev (>= 1.0.1-~~) <!nocheck>,
librust-proxmox-sdn-types-0.1+default-dev <!nocheck>,
librust-proxmox-serde-1+default-dev <!nocheck>,
librust-serde-1+default-dev <!nocheck>,
@@ -40,7 +40,7 @@ Depends:
librust-minijinja-2+multi-template-dev (>= 2.5-~~),
librust-phf-0.11+default-dev (>= 0.11.2-~~),
librust-phf-0.11+macros-dev (>= 0.11.2-~~),
- librust-proxmox-network-types-0.1+default-dev (>= 0.1.1-~~),
+ librust-proxmox-network-types-1+default-dev (>= 1.0.1-~~),
librust-proxmox-sdn-types-0.1+default-dev,
librust-proxmox-serde-1+default-dev,
librust-serde-1+default-dev,
diff --git a/proxmox-sdn-types/debian/control b/proxmox-sdn-types/debian/control
index a0b7af9e2bc9..7c2aa3a46196 100644
--- a/proxmox-sdn-types/debian/control
+++ b/proxmox-sdn-types/debian/control
@@ -16,12 +16,11 @@ Build-Depends-Arch: cargo:native <!nocheck>,
librust-serde-1+default-dev <!nocheck>,
librust-serde-1+derive-dev <!nocheck>
Maintainer: Proxmox Support Team <support@proxmox.com>
-Standards-Version: 4.7.0
+Standards-Version: 4.7.2
Vcs-Git: git://git.proxmox.com/git/proxmox-ve-rs.git
Vcs-Browser: https://git.proxmox.com/?p=proxmox-ve-rs.git
Homepage: https://proxmox.com
X-Cargo-Crate: proxmox-sdn-types
-Rules-Requires-Root: no
Package: librust-proxmox-sdn-types-dev
Architecture: any
diff --git a/proxmox-ve-config/debian/control b/proxmox-ve-config/debian/control
index b21182748393..164ea64fbcc2 100644
--- a/proxmox-ve-config/debian/control
+++ b/proxmox-ve-config/debian/control
@@ -10,8 +10,8 @@ Build-Depends-Arch: cargo:native <!nocheck>,
librust-const-format-0.2+default-dev <!nocheck>,
librust-log-0.4+default-dev <!nocheck>,
librust-nix-0.29+default-dev <!nocheck>,
- librust-proxmox-network-types-0.1+api-types-dev (>= 0.1.1-~~) <!nocheck>,
- librust-proxmox-network-types-0.1+default-dev (>= 0.1.1-~~) <!nocheck>,
+ librust-proxmox-network-types-1+api-types-dev (>= 1.0.1-~~) <!nocheck>,
+ librust-proxmox-network-types-1+default-dev (>= 1.0.1-~~) <!nocheck>,
librust-proxmox-schema-5+api-types-dev <!nocheck>,
librust-proxmox-schema-5+default-dev <!nocheck>,
librust-proxmox-sdn-types-0.1+default-dev <!nocheck>,
@@ -41,8 +41,8 @@ Depends:
librust-const-format-0.2+default-dev,
librust-log-0.4+default-dev,
librust-nix-0.29+default-dev,
- librust-proxmox-network-types-0.1+api-types-dev (>= 0.1.1-~~),
- librust-proxmox-network-types-0.1+default-dev (>= 0.1.1-~~),
+ librust-proxmox-network-types-1+api-types-dev (>= 1.0.1-~~),
+ librust-proxmox-network-types-1+default-dev (>= 1.0.1-~~),
librust-proxmox-schema-5+api-types-dev,
librust-proxmox-schema-5+default-dev,
librust-proxmox-sdn-types-0.1+default-dev,
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH proxmox-ve-rs 2/2] fabrics: ospf: expose network-type interface property
2026-02-18 15:11 [PATCH manager/network/proxmox-ve-rs 0/4] Expose OSPF Network-Type option Gabriel Goller
2026-02-18 15:11 ` [PATCH proxmox-ve-rs 1/2] cargo: bump proxmox-network-types Gabriel Goller
@ 2026-02-18 15:11 ` Gabriel Goller
2026-02-18 15:11 ` [PATCH pve-network 1/1] fabrics: add ospf network_type property to interfaces Gabriel Goller
2026-02-18 15:11 ` [PATCH pve-manager 1/1] fabrics: ospf: add network-type property in interface panel Gabriel Goller
3 siblings, 0 replies; 5+ messages in thread
From: Gabriel Goller @ 2026-02-18 15:11 UTC (permalink / raw)
To: pve-devel
Expose the network-type interface property to the api. Previously it was
internal-only and could be changed from point-to-point to broadcast by
setting or not setting an ip on the interface. Now we expose all the
possible options in the ui. This is also a Option, so that we can 1)
stay backwards compatible and 2) can let FRR figure out the correct
mode (e.g. when adding an ip with an explicit `peer`).
Also move the NetworkType enum to proxmox-sdn-types because we need it
in both proxmox-frr and proxmox-ve-config and we don't want to add the
`frr` feature to the whole section-config module.
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
proxmox-frr/src/ser/ospf.rs | 27 +---------------
proxmox-sdn-types/src/lib.rs | 1 +
proxmox-sdn-types/src/ospf.rs | 32 +++++++++++++++++++
proxmox-ve-config/src/sdn/fabric/frr.rs | 13 +++++---
.../fabric/section_config/protocol/ospf.rs | 6 ++++
5 files changed, 49 insertions(+), 30 deletions(-)
create mode 100644 proxmox-sdn-types/src/ospf.rs
diff --git a/proxmox-frr/src/ser/ospf.rs b/proxmox-frr/src/ser/ospf.rs
index 8b26f42e2e46..e83e8ab5a53c 100644
--- a/proxmox-frr/src/ser/ospf.rs
+++ b/proxmox-frr/src/ser/ospf.rs
@@ -2,6 +2,7 @@ use std::fmt::Debug;
use std::net::Ipv4Addr;
use bon::Builder;
+use proxmox_sdn_types::ospf::NetworkType;
use serde::{Deserialize, Serialize};
use thiserror::Error;
@@ -81,32 +82,6 @@ pub enum OspfInterfaceError {
FrrWordParse(#[from] FrrWordError),
}
-/// The NetworkType of the interface.
-///
-/// The most important options here are Broadcast (which is the default) and PointToPoint.
-/// When PointToPoint is set, then the interface has to have a /32 address and will be treated as
-/// unnumbered.
-///
-/// This roughly serializes to:
-/// ```text
-/// ip ospf network point-to-point
-/// ! or
-/// ip ospf network broadcast
-/// ```
-#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
-#[serde(rename_all = "kebab-case")]
-pub enum NetworkType {
- Broadcast,
- NonBroadcast,
- /// If the interface is unnumbered (i.e. the router-id /32 ip-address is set on the interface).
- ///
- /// If OSPF is used in an unnumbered way, you don't need to configure peer-to-peer (e.g. /31)
- /// addresses at every interface, but you just need to set the router-id at the interface
- /// (/32). You also need to configure the `ip ospf network point-to-point` FRR option.
- PointToPoint,
- PointToMultipoint,
-}
-
/// The OSPF interface properties.
///
/// The interface gets tied to its fabric by the area property and the FRR `ip ospf area <area>`
diff --git a/proxmox-sdn-types/src/lib.rs b/proxmox-sdn-types/src/lib.rs
index 1656f1d44b95..29455a23e5c9 100644
--- a/proxmox-sdn-types/src/lib.rs
+++ b/proxmox-sdn-types/src/lib.rs
@@ -1,3 +1,4 @@
pub mod area;
pub mod net;
pub mod openfabric;
+pub mod ospf;
diff --git a/proxmox-sdn-types/src/ospf.rs b/proxmox-sdn-types/src/ospf.rs
new file mode 100644
index 000000000000..43497def7ff2
--- /dev/null
+++ b/proxmox-sdn-types/src/ospf.rs
@@ -0,0 +1,32 @@
+use proxmox_schema::api;
+use serde::{Deserialize, Serialize};
+
+/// The NetworkType of the interface.
+///
+/// The most important options here are Broadcast (which is the default) and PointToPoint.
+/// When PointToPoint is set, then the interface has to have a /32 address and will be treated as
+/// unnumbered.
+///
+/// This roughly serializes to:
+/// ```text
+/// ip ospf network point-to-point
+/// ! or
+/// ip ospf network broadcast
+/// ```
+#[api]
+#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
+#[serde(rename_all = "kebab-case")]
+pub enum NetworkType {
+ /// Broadcast
+ Broadcast,
+ /// Non-Broadcast
+ NonBroadcast,
+ /// If the interface is unnumbered (i.e. the router-id /32 ip-address is set on the interface).
+ ///
+ /// If OSPF is used in an unnumbered way, you don't need to configure peer-to-peer (e.g. /31)
+ /// addresses at every interface, but you just need to set the router-id at the interface
+ /// (/32). You also need to configure the `ip ospf network point-to-point` FRR option.
+ PointToPoint,
+ /// Point-to-Multipoint
+ PointToMultipoint,
+}
diff --git a/proxmox-ve-config/src/sdn/fabric/frr.rs b/proxmox-ve-config/src/sdn/fabric/frr.rs
index ac5e88e905a3..291371052fbe 100644
--- a/proxmox-ve-config/src/sdn/fabric/frr.rs
+++ b/proxmox-ve-config/src/sdn/fabric/frr.rs
@@ -309,10 +309,15 @@ fn build_ospf_interface(
area,
// Interfaces are always non-passive
passive: None,
- network_type: if interface.ip.is_some() {
- None
- } else {
- Some(ser::ospf::NetworkType::PointToPoint)
+ network_type: match interface.network_type {
+ None => {
+ if interface.ip.is_some() {
+ None
+ } else {
+ Some(proxmox_sdn_types::ospf::NetworkType::PointToPoint)
+ }
+ }
+ Some(network_type) => Some(network_type),
},
};
diff --git a/proxmox-ve-config/src/sdn/fabric/section_config/protocol/ospf.rs b/proxmox-ve-config/src/sdn/fabric/section_config/protocol/ospf.rs
index df0be9591a76..d195546447b2 100644
--- a/proxmox-ve-config/src/sdn/fabric/section_config/protocol/ospf.rs
+++ b/proxmox-ve-config/src/sdn/fabric/section_config/protocol/ospf.rs
@@ -124,6 +124,12 @@ pub struct OspfInterfaceProperties {
/// If IP is unset, then this is an unnumbered interface
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) ip: Option<Ipv4Cidr>,
+
+ /// Network Type of the interface. Contains all the NetworkTypes from FRR, but also includes a
+ /// `None` variant which enables us to decide the network-type automatically depending on if a
+ /// ip is given or not. (This also enables this change to be backwards-compatible).
+ #[serde(default, skip_serializing_if = "Option::is_none")]
+ pub(crate) network_type: Option<proxmox_sdn_types::ospf::NetworkType>,
}
impl OspfInterfaceProperties {
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH pve-network 1/1] fabrics: add ospf network_type property to interfaces
2026-02-18 15:11 [PATCH manager/network/proxmox-ve-rs 0/4] Expose OSPF Network-Type option Gabriel Goller
2026-02-18 15:11 ` [PATCH proxmox-ve-rs 1/2] cargo: bump proxmox-network-types Gabriel Goller
2026-02-18 15:11 ` [PATCH proxmox-ve-rs 2/2] fabrics: ospf: expose network-type interface property Gabriel Goller
@ 2026-02-18 15:11 ` Gabriel Goller
2026-02-18 15:11 ` [PATCH pve-manager 1/1] fabrics: ospf: add network-type property in interface panel Gabriel Goller
3 siblings, 0 replies; 5+ messages in thread
From: Gabriel Goller @ 2026-02-18 15:11 UTC (permalink / raw)
To: pve-devel
This property lets us choose all the possible network types frr supports
on an ospf interface.
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
src/PVE/Network/SDN/Fabrics.pm | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/PVE/Network/SDN/Fabrics.pm b/src/PVE/Network/SDN/Fabrics.pm
index 3ca362a02660..552ac68e9052 100644
--- a/src/PVE/Network/SDN/Fabrics.pm
+++ b/src/PVE/Network/SDN/Fabrics.pm
@@ -180,6 +180,17 @@ sub node_properties {
format => 'pve-iface',
description => 'Name of the network interface',
},
+ network_type => {
+ type => 'string',
+ description => 'Network Type of the OSPF interface',
+ enum => [
+ 'broadcast',
+ 'non-broadcast',
+ 'point-to-multipoint',
+ 'point-to-point',
+ ],
+ optional => 1,
+ },
ip => {
type => 'string',
format => 'CIDRv4',
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH pve-manager 1/1] fabrics: ospf: add network-type property in interface panel
2026-02-18 15:11 [PATCH manager/network/proxmox-ve-rs 0/4] Expose OSPF Network-Type option Gabriel Goller
` (2 preceding siblings ...)
2026-02-18 15:11 ` [PATCH pve-network 1/1] fabrics: add ospf network_type property to interfaces Gabriel Goller
@ 2026-02-18 15:11 ` Gabriel Goller
3 siblings, 0 replies; 5+ messages in thread
From: Gabriel Goller @ 2026-02-18 15:11 UTC (permalink / raw)
To: pve-devel
This allows the user to select a specific network type which will be
used for the ospf interface.
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
.../sdn/fabrics/ospf/InterfacePanel.js | 49 +++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/www/manager6/sdn/fabrics/ospf/InterfacePanel.js b/www/manager6/sdn/fabrics/ospf/InterfacePanel.js
index 29f0502fac36..d7f722be5055 100644
--- a/www/manager6/sdn/fabrics/ospf/InterfacePanel.js
+++ b/www/manager6/sdn/fabrics/ospf/InterfacePanel.js
@@ -1,3 +1,52 @@
+Ext.define('PVE.sdn.Fabric.Ospf.NetworkTypeSelector', {
+ extend: 'Proxmox.form.ComboGrid',
+ alias: ['widget.pveOspfNetworkTypeSelector'],
+
+ valueField: 'name',
+ displayField: 'name',
+
+ emptyText: 'auto',
+
+ listConfig: {
+ columns: [
+ {
+ header: gettext('NetworkType'),
+ dataIndex: 'name',
+ hideable: false,
+ sortable: true,
+ flex: 3,
+ },
+ ],
+ width: 360,
+ },
+
+ store: {
+ fields: ['name'],
+ data: [
+ {name: 'broadcast'},
+ {name: 'non-broadcast'},
+ {name: 'point-to-multipoint'},
+ {name: 'point-to-point'},
+ ],
+ },
+});
+
Ext.define('PVE.sdn.Fabric.Ospf.InterfacePanel', {
extend: 'PVE.sdn.Fabric.InterfacePanel',
+
+ additionalColumns: [
+ {
+ text: gettext('Network Type'),
+ xtype: 'widgetcolumn',
+ dataIndex: 'network_type',
+ flex: 1,
+ widget: {
+ xtype: 'pveOspfNetworkTypeSelector',
+ isFormField: false,
+ bind: {
+ disabled: '{record.isDisabled}',
+ },
+ },
+ },
+ ],
});
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-02-18 15:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-18 15:11 [PATCH manager/network/proxmox-ve-rs 0/4] Expose OSPF Network-Type option Gabriel Goller
2026-02-18 15:11 ` [PATCH proxmox-ve-rs 1/2] cargo: bump proxmox-network-types Gabriel Goller
2026-02-18 15:11 ` [PATCH proxmox-ve-rs 2/2] fabrics: ospf: expose network-type interface property Gabriel Goller
2026-02-18 15:11 ` [PATCH pve-network 1/1] fabrics: add ospf network_type property to interfaces Gabriel Goller
2026-02-18 15:11 ` [PATCH pve-manager 1/1] fabrics: ospf: add network-type property in interface panel Gabriel Goller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.