* [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v2 0/5] Add MTU setting to WireGuard interfaces
@ 2026-11-17 18:43 Stefan Hanreich
2026-11-17 18:43 ` [PATCH proxmox-ve-rs v2 1/5] wireguard: add mtu option to wireguard interface properties Stefan Hanreich
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Stefan Hanreich @ 2026-11-17 18:43 UTC (permalink / raw)
To: pve-devel
This patch series adds support for configuring the MTU for WireGuard interfaces.
Since changing the default value in the API would be breaking, make it a soft
default by pre-filling the MTU value in the UI with 1420, which should work for
most use-cases, as it is the maximum MTU possible if using Ethernet with IPv6.
Changes from v1:
* rebase on top of current master
* fix documentation key
* change API type from number to integer
proxmox-ve-rs:
Stefan Hanreich (1):
wireguard: add mtu option to wireguard interface properties
.../sdn/fabric/section_config/protocol/wireguard.rs | 13 +++++++++++++
1 file changed, 13 insertions(+)
proxmox-perl-rs:
Stefan Hanreich (1):
fabrics: wireguard: render mtu to interface config
pve-rs/src/bindings/sdn/fabrics.rs | 5 +++++
1 file changed, 5 insertions(+)
pve-network:
Stefan Hanreich (1):
fabrics: wireguard: add mtu to interface properties
src/PVE/Network/SDN/Fabrics.pm | 7 +++++++
1 file changed, 7 insertions(+)
pve-manager:
Stefan Hanreich (1):
fabrics: wireguard: add mtu to interface properties
www/manager6/sdn/fabrics/wireguard/InterfacePanel.js | 9 +++++++++
1 file changed, 9 insertions(+)
pve-docs:
Stefan Hanreich (1):
sdn: fabrics: wireguard: document mtu option
pvesdn.adoc | 2 ++
1 file changed, 2 insertions(+)
Summary over all repositories:
5 files changed, 36 insertions(+), 0 deletions(-)
--
Generated by murpp 0.12.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH proxmox-ve-rs v2 1/5] wireguard: add mtu option to wireguard interface properties
2026-11-17 18:43 [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v2 0/5] Add MTU setting to WireGuard interfaces Stefan Hanreich
@ 2026-11-17 18:43 ` Stefan Hanreich
2026-11-17 18:43 ` [PATCH proxmox-perl-rs v2 2/5] fabrics: wireguard: render mtu to interface config Stefan Hanreich
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Stefan Hanreich @ 2026-11-17 18:43 UTC (permalink / raw)
To: pve-devel
This allows users to explicitly set the MTU that should be configured
for the WireGuard interface.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
.../sdn/fabric/section_config/protocol/wireguard.rs | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/proxmox-ve-config/src/sdn/fabric/section_config/protocol/wireguard.rs b/proxmox-ve-config/src/sdn/fabric/section_config/protocol/wireguard.rs
index 8e5df37c..8a7bd734 100644
--- a/proxmox-ve-config/src/sdn/fabric/section_config/protocol/wireguard.rs
+++ b/proxmox-ve-config/src/sdn/fabric/section_config/protocol/wireguard.rs
@@ -532,6 +532,10 @@ pub struct WireGuardInterfaceProperties {
/// whether to generate an IPv6 link-local address for this interface
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) ip6_ll: Option<bool>,
+
+ /// The MTU for this WireGuard interface.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub(crate) mtu: Option<u16>,
}
impl WireGuardInterfaceProperties {
@@ -554,6 +558,11 @@ impl WireGuardInterfaceProperties {
pub fn ip6(&self) -> Option<&Ipv6Cidr> {
self.ip6.as_ref()
}
+
+ /// Get the MTU set for this interface
+ pub fn mtu(&self) -> Option<u16> {
+ self.mtu
+ }
}
/// Determines whether the given `PersistentKeepalive` value means that it is
@@ -593,6 +602,10 @@ pub struct WireGuardInterfaceCreateProperties {
/// whether to generate an IPv6 link-local address for this interface
#[serde(skip_serializing_if = "Option::is_none")]
pub(crate) ip6_ll: Option<bool>,
+
+ /// The MTU for this WireGuard interface.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub(crate) mtu: Option<u16>,
}
pub mod private_keys {
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH proxmox-perl-rs v2 2/5] fabrics: wireguard: render mtu to interface config
2026-11-17 18:43 [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v2 0/5] Add MTU setting to WireGuard interfaces Stefan Hanreich
2026-11-17 18:43 ` [PATCH proxmox-ve-rs v2 1/5] wireguard: add mtu option to wireguard interface properties Stefan Hanreich
@ 2026-11-17 18:43 ` Stefan Hanreich
2026-11-17 18:43 ` [PATCH pve-network v2 3/5] fabrics: wireguard: add mtu to interface properties Stefan Hanreich
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Stefan Hanreich @ 2026-11-17 18:43 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
pve-rs/src/bindings/sdn/fabrics.rs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pve-rs/src/bindings/sdn/fabrics.rs b/pve-rs/src/bindings/sdn/fabrics.rs
index 1d3e8b5..0dd9448 100644
--- a/pve-rs/src/bindings/sdn/fabrics.rs
+++ b/pve-rs/src/bindings/sdn/fabrics.rs
@@ -566,6 +566,11 @@ pub mod pve_rs_sdn_fabrics {
writeln!(interface, "\tlink-type wireguard")?;
writeln!(interface, "\tip-forward 1")?;
+
+ if let Some(mtu) = wireguard_interface.mtu() {
+ writeln!(interface, "\tmtu {mtu}")?;
+ }
+
writeln!(
interface,
"\tpost-up wg syncconf {name} /etc/wireguard/proxmox/{name}.conf"
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH pve-network v2 3/5] fabrics: wireguard: add mtu to interface properties
2026-11-17 18:43 [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v2 0/5] Add MTU setting to WireGuard interfaces Stefan Hanreich
2026-11-17 18:43 ` [PATCH proxmox-ve-rs v2 1/5] wireguard: add mtu option to wireguard interface properties Stefan Hanreich
2026-11-17 18:43 ` [PATCH proxmox-perl-rs v2 2/5] fabrics: wireguard: render mtu to interface config Stefan Hanreich
@ 2026-11-17 18:43 ` Stefan Hanreich
2026-11-17 18:43 ` [PATCH pve-manager v2 4/5] " Stefan Hanreich
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Stefan Hanreich @ 2026-11-17 18:43 UTC (permalink / raw)
To: pve-devel
The minimum value is based on the minimum datagram size of an IPv4
packet, as mandated by RFC 791.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
src/PVE/Network/SDN/Fabrics.pm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/PVE/Network/SDN/Fabrics.pm b/src/PVE/Network/SDN/Fabrics.pm
index 41119b2..6300109 100644
--- a/src/PVE/Network/SDN/Fabrics.pm
+++ b/src/PVE/Network/SDN/Fabrics.pm
@@ -141,6 +141,13 @@ PVE::JSONSchema::register_format(
minimum => 1,
maximum => 65535,
},
+ mtu => {
+ type => 'integer',
+ description => 'The MTU to use for this interface.',
+ optional => 1,
+ minimum => 576,
+ maximum => 65535,
+ },
},
);
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH pve-manager v2 4/5] fabrics: wireguard: add mtu to interface properties
2026-11-17 18:43 [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v2 0/5] Add MTU setting to WireGuard interfaces Stefan Hanreich
` (2 preceding siblings ...)
2026-11-17 18:43 ` [PATCH pve-network v2 3/5] fabrics: wireguard: add mtu to interface properties Stefan Hanreich
@ 2026-11-17 18:43 ` Stefan Hanreich
2026-11-17 18:43 ` [PATCH pve-docs v2 5/5] sdn: fabrics: wireguard: document mtu option Stefan Hanreich
2026-11-20 7:42 ` [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v2 0/5] Add MTU setting to WireGuard interfaces Thomas Lamprecht
5 siblings, 0 replies; 7+ messages in thread
From: Stefan Hanreich @ 2026-11-17 18:43 UTC (permalink / raw)
To: pve-devel
The minimum value of 576 is based on the minimum datagram size a node
must be able to handle, as according to RFC 791. In practice, MTU
values should be significantly higher anyway. Make 1420 a soft-default
by prefilling the MTU field. This allows for making it the de-facto
default without breaking the current behavior of the API.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
www/manager6/sdn/fabrics/wireguard/InterfacePanel.js | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/www/manager6/sdn/fabrics/wireguard/InterfacePanel.js b/www/manager6/sdn/fabrics/wireguard/InterfacePanel.js
index 80fe6919..1969cece 100644
--- a/www/manager6/sdn/fabrics/wireguard/InterfacePanel.js
+++ b/www/manager6/sdn/fabrics/wireguard/InterfacePanel.js
@@ -368,6 +368,14 @@ Ext.define('PVE.sdn.Fabric.WireGuard.InterfacePanel', {
emptyText: '2001:db8::1/64',
isFormField: false,
},
+ {
+ fieldLabel: gettext('MTU'),
+ bind: '{selectedInterface.mtu}',
+ xtype: 'proxmoxintegerfield',
+ minValue: 576,
+ maxValue: 65535,
+ isFormField: false,
+ },
{
xtype: 'pveSDNWireGuardPeerSelector',
reference: 'peerSelector',
@@ -413,6 +421,7 @@ Ext.define('PVE.sdn.Fabric.WireGuard.InterfacePanel', {
peers: [],
listen_port: listenPort,
isCreate: true,
+ mtu: 1420,
});
let interfaceGrid = me.lookupReference('interfaceGrid');
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH pve-docs v2 5/5] sdn: fabrics: wireguard: document mtu option
2026-11-17 18:43 [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v2 0/5] Add MTU setting to WireGuard interfaces Stefan Hanreich
` (3 preceding siblings ...)
2026-11-17 18:43 ` [PATCH pve-manager v2 4/5] " Stefan Hanreich
@ 2026-11-17 18:43 ` Stefan Hanreich
2026-11-20 7:42 ` [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v2 0/5] Add MTU setting to WireGuard interfaces Thomas Lamprecht
5 siblings, 0 replies; 7+ messages in thread
From: Stefan Hanreich @ 2026-11-17 18:43 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
pvesdn.adoc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pvesdn.adoc b/pvesdn.adoc
index b701636..c19485b 100644
--- a/pvesdn.adoc
+++ b/pvesdn.adoc
@@ -934,6 +934,8 @@ Peers:: A list of peers that should be configured for that interface. All nodes
that are part of the fabric can be selected as peers - the peer definition will
be auto-generated from the configuration in the node.
+MTU:: The MTU that should be configured for this interface.
+
When defining an interface, Proxmox VE automatically generates a private key
for it in `/etc/pve/priv/wg-keys.cfg` upon saving the interface, and stores the
matching public key alongside the interface in the fabric configuration so it
--
2.47.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v2 0/5] Add MTU setting to WireGuard interfaces
2026-11-17 18:43 [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v2 0/5] Add MTU setting to WireGuard interfaces Stefan Hanreich
` (4 preceding siblings ...)
2026-11-17 18:43 ` [PATCH pve-docs v2 5/5] sdn: fabrics: wireguard: document mtu option Stefan Hanreich
@ 2026-11-20 7:42 ` Thomas Lamprecht
5 siblings, 0 replies; 7+ messages in thread
From: Thomas Lamprecht @ 2026-11-20 7:42 UTC (permalink / raw)
To: pve-devel, Stefan Hanreich
On Tue, 17 Nov 2026 19:43:39 +0100, Stefan Hanreich wrote:
> This patch series adds support for configuring the MTU for WireGuard interfaces.
> Since changing the default value in the API would be breaking, make it a soft
> default by pre-filling the MTU value in the UI with 1420, which should work for
> most use-cases, as it is the maximum MTU possible if using Ethernet with IPv6.
>
> Changes from v1:
> * rebase on top of current master
> * fix documentation key
> * change API type from number to integer
>
> [...]
Applied, thanks!
Tested on a three-node cluster: the MTU is applied, and the UI fills in
1420 for new interfaces.
What I changed in your patches: the Rust side now enforces the same MTU
limits as the Perl side, and the docs explain the WireGuard overhead and
that interfaces without an MTU, including all existing ones, get the
ifupdown2 default, usually 1500, and not the 1420 of WireGuard.
What I added on top: I raised the minimum MTU from 576 to 1280. Below
that, the kernel turns off IPv6 on the interface, which makes ifreload
fail if it has an IPv6 address and drops the IPv6 routes to the peers.
This rules out IPv4-only tunnels below 1280, which I don't think fabrics
need; shout if you see that differently.
Still open: the interface panel silently keeps the last valid MTU or
listen port if you enter an invalid one, instead of refusing to save.
[proxmox-perl-rs]
[2/5] fabrics: wireguard: render mtu to interface config
commit: 66c8b3b2b894f45c5a710b1b264af653d0bf9f1b
[proxmox-ve-rs]
[1/5] wireguard: add mtu option to wireguard interface properties
commit: f8f76c236768094475f7cd2434d431f0c86ed12b
[pve-docs]
[5/5] sdn: fabrics: wireguard: document mtu option
commit: 1f39d9d56c73b2f791114a4441140cb1000653b3
[pve-manager]
[4/5] fabrics: wireguard: add mtu to interface properties
commit: b739cd12383ad5be4822c0af2b600a8c9890c8f3
[pve-network]
[3/5] fabrics: wireguard: add mtu to interface properties
commit: 018781b60dd78c0bec0a639b6b9937fc7171573c
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-20 7:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 18:43 [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v2 0/5] Add MTU setting to WireGuard interfaces Stefan Hanreich
2026-11-17 18:43 ` [PATCH proxmox-ve-rs v2 1/5] wireguard: add mtu option to wireguard interface properties Stefan Hanreich
2026-11-17 18:43 ` [PATCH proxmox-perl-rs v2 2/5] fabrics: wireguard: render mtu to interface config Stefan Hanreich
2026-11-17 18:43 ` [PATCH pve-network v2 3/5] fabrics: wireguard: add mtu to interface properties Stefan Hanreich
2026-11-17 18:43 ` [PATCH pve-manager v2 4/5] " Stefan Hanreich
2026-11-17 18:43 ` [PATCH pve-docs v2 5/5] sdn: fabrics: wireguard: document mtu option Stefan Hanreich
2026-11-20 7:42 ` [PATCH docs/manager/network/proxmox{-ve-rs,-perl-rs} v2 0/5] Add MTU setting to WireGuard interfaces Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox