* [PATCH proxmox-ve-rs v2 1/3] fabrics: ospf: expose network-type interface property
2026-05-05 9:13 [PATCH manager/network/proxmox-ve-rs v2 0/3] Expose OSPF Network-Type option Gabriel Goller
@ 2026-05-05 9:13 ` Gabriel Goller
2026-05-05 9:13 ` [PATCH pve-network v2 2/3] fabrics: add ospf network_type property to interfaces Gabriel Goller
2026-05-05 9:13 ` [PATCH pve-manager v2 3/3] fabrics: ospf: add network-type property in interface panel Gabriel Goller
2 siblings, 0 replies; 4+ messages in thread
From: Gabriel Goller @ 2026-05-05 9:13 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. Rename the existing
area module to ospf while at it, as it now contains more OSPF-specific
types than just the Area type.
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
proxmox-frr/src/ser/ospf.rs | 20 +--------------
proxmox-sdn-types/src/lib.rs | 2 +-
proxmox-sdn-types/src/{area.rs => ospf.rs} | 25 +++++++++++++++++++
proxmox-ve-config/src/sdn/fabric/frr.rs | 13 +++++++---
.../fabric/section_config/protocol/ospf.rs | 8 +++++-
5 files changed, 43 insertions(+), 25 deletions(-)
rename proxmox-sdn-types/src/{area.rs => ospf.rs} (65%)
diff --git a/proxmox-frr/src/ser/ospf.rs b/proxmox-frr/src/ser/ospf.rs
index c18725e08f25..bd8113da125d 100644
--- a/proxmox-frr/src/ser/ospf.rs
+++ b/proxmox-frr/src/ser/ospf.rs
@@ -1,6 +1,7 @@
use std::fmt::Debug;
use std::net::Ipv4Addr;
+use proxmox_sdn_types::ospf::NetworkType;
use serde::{Deserialize, Serialize};
use thiserror::Error;
@@ -107,25 +108,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.
-#[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 cff44917739e..efd9b8d2a00b 100644
--- a/proxmox-sdn-types/src/lib.rs
+++ b/proxmox-sdn-types/src/lib.rs
@@ -1,7 +1,7 @@
-pub mod area;
pub mod bgp;
pub mod net;
pub mod openfabric;
+pub mod ospf;
pub mod wireguard;
use serde::{Deserialize, Serialize};
diff --git a/proxmox-sdn-types/src/area.rs b/proxmox-sdn-types/src/ospf.rs
similarity index 65%
rename from proxmox-sdn-types/src/area.rs
rename to proxmox-sdn-types/src/ospf.rs
index 3eba3b1b2545..42833587c204 100644
--- a/proxmox-sdn-types/src/area.rs
+++ b/proxmox-sdn-types/src/ospf.rs
@@ -1,3 +1,5 @@
+use proxmox_schema::api;
+use serde::{Deserialize, Serialize};
use std::{fmt::Display, net::Ipv4Addr};
use anyhow::Error;
@@ -61,3 +63,26 @@ impl Area {
}
}
}
+
+/// 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.
+#[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 1ef840cf1cd4..d9e211e89c2c 100644
--- a/proxmox-ve-config/src/sdn/fabric/frr.rs
+++ b/proxmox-ve-config/src/sdn/fabric/frr.rs
@@ -555,10 +555,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 17bf88079f0b..0bf9ca721356 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
@@ -1,7 +1,7 @@
use std::ops::{Deref, DerefMut};
use proxmox_network_types::ip_address::Ipv4Cidr;
-use proxmox_sdn_types::area::Area;
+use proxmox_sdn_types::ospf::Area;
use serde::{Deserialize, Serialize};
use proxmox_schema::{api, property_string::PropertyString, ApiStringFormat, Updater};
@@ -228,6 +228,12 @@ pub struct OspfInterfaceProperties {
/// OSPF area
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) area: Option<Area>,
+
+ /// 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 related [flat|nested] 4+ messages in thread* [PATCH pve-network v2 2/3] fabrics: add ospf network_type property to interfaces
2026-05-05 9:13 [PATCH manager/network/proxmox-ve-rs v2 0/3] Expose OSPF Network-Type option Gabriel Goller
2026-05-05 9:13 ` [PATCH proxmox-ve-rs v2 1/3] fabrics: ospf: expose network-type interface property Gabriel Goller
@ 2026-05-05 9:13 ` Gabriel Goller
2026-05-05 9:13 ` [PATCH pve-manager v2 3/3] fabrics: ospf: add network-type property in interface panel Gabriel Goller
2 siblings, 0 replies; 4+ messages in thread
From: Gabriel Goller @ 2026-05-05 9:13 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 7ae801c40516..345be44a117d 100644
--- a/src/PVE/Network/SDN/Fabrics.pm
+++ b/src/PVE/Network/SDN/Fabrics.pm
@@ -228,6 +228,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 related [flat|nested] 4+ messages in thread* [PATCH pve-manager v2 3/3] fabrics: ospf: add network-type property in interface panel
2026-05-05 9:13 [PATCH manager/network/proxmox-ve-rs v2 0/3] Expose OSPF Network-Type option Gabriel Goller
2026-05-05 9:13 ` [PATCH proxmox-ve-rs v2 1/3] fabrics: ospf: expose network-type interface property Gabriel Goller
2026-05-05 9:13 ` [PATCH pve-network v2 2/3] fabrics: add ospf network_type property to interfaces Gabriel Goller
@ 2026-05-05 9:13 ` Gabriel Goller
2 siblings, 0 replies; 4+ messages in thread
From: Gabriel Goller @ 2026-05-05 9:13 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 b521b1a220a2..370137cba19b 100644
--- a/www/manager6/sdn/fabrics/ospf/InterfacePanel.js
+++ b/www/manager6/sdn/fabrics/ospf/InterfacePanel.js
@@ -1,5 +1,54 @@
+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',
hasIpv6Support: false,
+
+ 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 related [flat|nested] 4+ messages in thread