From: Gabriel Goller <g.goller@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH proxmox-ve-rs v3 07/32] sdn: allow static routes in simple zone VRFs
Date: Mon, 16 Nov 2026 17:11:27 +0100 [thread overview]
Message-ID: <20261116161154.343743-8-g.goller@proxmox.com> (raw)
In-Reply-To: <20261116161154.343743-1-g.goller@proxmox.com>
Allow simple zones to reach upstream networks through zone-wide static
routes, without requiring node-local FRR overrides. Install routes in
vrf_<zone> when dedicated-vrf is enabled, or in the default routing table
otherwise. Only generate routes on nodes that belong to the zone.
Support IPv4 and IPv6 routes, with an optional outgoing interface,
administrative distance and next-hop VRF. The next-hop VRF only selects
where to resolve the gateway; the route still belongs to the zone.
Reject prefixes with host bits set, since staticd normalizes them and
frr-reload would otherwise replace them on every reload. Keep the perl
vrf field as the outgoing interface for existing EVPN routes, separate
from the VRF in which the route is installed.
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
proxmox-frr-templates/templates/bgpd.jinja | 7 +-
.../templates/frr.conf.jinja | 3 +-
.../templates/ip_routes.jinja | 13 +-
proxmox-frr/src/ser/mod.rs | 25 ++-
proxmox-ve-config/src/sdn/mod.rs | 1 +
proxmox-ve-config/src/sdn/static_route.rs | 148 ++++++++++++++++
.../tests/static_routes/cfg/fabrics.cfg | 19 ++
.../tests/static_routes/cfg/zones.json | 20 +++
proxmox-ve-config/tests/static_routes/main.rs | 165 ++++++++++++++++++
...c_routes__preserve_legacy_evpn_routes.snap | 12 ++
...tatic_routes__simple_zone_routes_pve1.snap | 20 +++
...tatic_routes__simple_zone_routes_pve2.snap | 10 ++
...outes__vrf_fabrics_with_static_routes.snap | 70 ++++++++
13 files changed, 499 insertions(+), 14 deletions(-)
create mode 100644 proxmox-ve-config/src/sdn/static_route.rs
create mode 100644 proxmox-ve-config/tests/static_routes/cfg/fabrics.cfg
create mode 100644 proxmox-ve-config/tests/static_routes/cfg/zones.json
create mode 100644 proxmox-ve-config/tests/static_routes/main.rs
create mode 100644 proxmox-ve-config/tests/static_routes/snapshots/static_routes__preserve_legacy_evpn_routes.snap
create mode 100644 proxmox-ve-config/tests/static_routes/snapshots/static_routes__simple_zone_routes_pve1.snap
create mode 100644 proxmox-ve-config/tests/static_routes/snapshots/static_routes__simple_zone_routes_pve2.snap
create mode 100644 proxmox-ve-config/tests/static_routes/snapshots/static_routes__vrf_fabrics_with_static_routes.snap
diff --git a/proxmox-frr-templates/templates/bgpd.jinja b/proxmox-frr-templates/templates/bgpd.jinja
index 61956bb0ef49..1fc950083ce5 100644
--- a/proxmox-frr-templates/templates/bgpd.jinja
+++ b/proxmox-frr-templates/templates/bgpd.jinja
@@ -1,4 +1,5 @@
{% from "bgp_router.jinja" import bgp_router %}
+{% from "ip_routes.jinja" import static_route %}
{% for vrf_name, vrf in bgp.vrfs|items %}
!
vrf {{ vrf_name }}
@@ -6,11 +7,7 @@ vrf {{ vrf_name }}
vni {{ vrf.vni }}
{% endif %}
{% for ip_route in vrf.ip_routes %}
-{% if ip_route.vrf %}
- {{ "ipv6" if ip_route.is_ipv6 else "ip" }} route {{ ip_route.prefix }} {{ ip_route.via }} {{ ip_route.vrf }}
-{% else %}
- {{ "ipv6" if ip_route.is_ipv6 else "ip" }} route {{ ip_route.prefix }} {{ ip_route.via }}
-{% endif %}
+ {{ static_route(ip_route) }}
{% endfor %}
{% for line in vrf.custom_frr_config %}
{{ line }}
diff --git a/proxmox-frr-templates/templates/frr.conf.jinja b/proxmox-frr-templates/templates/frr.conf.jinja
index 1f98489e09fb..a6cd2afd10cc 100644
--- a/proxmox-frr-templates/templates/frr.conf.jinja
+++ b/proxmox-frr-templates/templates/frr.conf.jinja
@@ -1,3 +1,4 @@
+{% from "ip_routes.jinja" import ip_routes as render_ip_routes %}
{% include "bgpd.jinja" %}
{% include "isisd.jinja" %}
{% include "prefix_lists.jinja" %}
@@ -8,5 +9,5 @@
{% include "ospfd.jinja" %}
{% include "access_lists.jinja" %}
{% include "route_maps.jinja" %}
-{% include "ip_routes.jinja" %}
+{{ render_ip_routes(ip_routes) -}}
{% include "protocol_routemaps.jinja" %}
diff --git a/proxmox-frr-templates/templates/ip_routes.jinja b/proxmox-frr-templates/templates/ip_routes.jinja
index 3e33a709e821..c70b736bc518 100644
--- a/proxmox-frr-templates/templates/ip_routes.jinja
+++ b/proxmox-frr-templates/templates/ip_routes.jinja
@@ -1,8 +1,9 @@
-{% for ip_route in ip_routes %}
+{% macro static_route(route) -%}
+{{ "ipv6" if route.is_ipv6 else "ip" }} route {{ route.prefix }}{% if route.via %} {{ route.via }}{% endif %}{% if route.vrf %} {{ route.vrf }}{% endif %}{% if route.distance and route.distance != 1 %} {{ route.distance }}{% endif %}{% if route.nexthop_vrf %} nexthop-vrf {{ route.nexthop_vrf }}{% endif %}{% if route.destination_vrf %} vrf {{ route.destination_vrf }}{% endif %}
+{%- endmacro %}
+{% macro ip_routes(routes) -%}
+{% for ip_route in routes %}
!
-{% if ip_route.vrf %}
-{{ "ipv6" if ip_route.is_ipv6 else "ip" }} route {{ ip_route.prefix }} {{ ip_route.via }} {{ ip_route.vrf }}
-{% else %}
-{{ "ipv6" if ip_route.is_ipv6 else "ip" }} route {{ ip_route.prefix }} {{ ip_route.via }}
-{% endif %}
+{{ static_route(ip_route) }}
{% endfor %}
+{%- endmacro %}
diff --git a/proxmox-frr/src/ser/mod.rs b/proxmox-frr/src/ser/mod.rs
index b234365f07d8..574b929a0b85 100644
--- a/proxmox-frr/src/ser/mod.rs
+++ b/proxmox-frr/src/ser/mod.rs
@@ -175,8 +175,29 @@ pub struct IpRoute {
#[serde(default, deserialize_with = "proxmox_serde::perl::deserialize_bool")]
is_ipv6: bool,
prefix: Cidr,
- via: IpOrInterface,
- vrf: Option<InterfaceName>,
+ pub via: Option<IpOrInterface>,
+ /// Outgoing interface (e.g. EVPN's xvrf_<zone> veth). Keep the "vrf" perl
+ /// key for backwards compat.
+ #[serde(rename = "vrf")]
+ pub iface: Option<InterfaceName>,
+ pub distance: Option<u8>,
+ pub nexthop_vrf: Option<InterfaceName>,
+ /// VRF in which to install the route -- None selects the default VRF.
+ pub destination_vrf: Option<InterfaceName>,
+}
+
+impl IpRoute {
+ pub fn new(prefix: Cidr, via: Option<IpOrInterface>) -> Self {
+ Self {
+ is_ipv6: prefix.is_ipv6(),
+ prefix,
+ via,
+ iface: None,
+ distance: None,
+ nexthop_vrf: None,
+ destination_vrf: None,
+ }
+ }
}
#[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
diff --git a/proxmox-ve-config/src/sdn/mod.rs b/proxmox-ve-config/src/sdn/mod.rs
index 2133396145bd..9140179ef5d1 100644
--- a/proxmox-ve-config/src/sdn/mod.rs
+++ b/proxmox-ve-config/src/sdn/mod.rs
@@ -3,6 +3,7 @@ pub mod fabric;
pub mod ipam;
pub mod prefix_list;
pub mod route_map;
+pub mod static_route;
pub mod wireguard;
use std::{error::Error, fmt::Display, str::FromStr};
diff --git a/proxmox-ve-config/src/sdn/static_route.rs b/proxmox-ve-config/src/sdn/static_route.rs
new file mode 100644
index 000000000000..eab6300374ff
--- /dev/null
+++ b/proxmox-ve-config/src/sdn/static_route.rs
@@ -0,0 +1,148 @@
+//! Static routes stored as repeatable property strings in simple SDN zones.
+
+use std::collections::BTreeMap;
+use std::net::IpAddr;
+
+use anyhow::{Error, bail};
+use proxmox_network_types::Cidr;
+use proxmox_schema::{api, property_string::PropertyString};
+use serde::{Deserialize, Serialize};
+
+use crate::common::valid::Validatable;
+use crate::sdn::ZoneName;
+use crate::sdn::fabric::section_config::interface::InterfaceName;
+
+#[api(
+ properties: {
+ via: { type: String, optional: true, format: &proxmox_schema::api_types::IP_FORMAT },
+ iface: { type: InterfaceName, optional: true },
+ distance: { type: Integer, optional: true, minimum: 1, maximum: 255 },
+ "nexthop-vrf": { type: InterfaceName, optional: true },
+ },
+)]
+#[derive(Clone, Debug, Serialize, Deserialize)]
+#[serde(rename_all = "kebab-case", deny_unknown_fields)]
+/// A static route in a simple zone. The destination VRF is determined by the zone.
+pub struct StaticRoute {
+ /// Destination prefix, including 0.0.0.0/0 or ::/0 for a default route.
+ pub prefix: Cidr,
+ /// Next-hop gateway address.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub via: Option<IpAddr>,
+ /// Outgoing interface, required for IPv6 link-local gateways.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub iface: Option<InterfaceName>,
+ /// Administrative distance. FRR's default is 1; 255 prevents installation.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub distance: Option<u8>,
+ /// VRF in which to resolve the next hop, or 'default'.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub nexthop_vrf: Option<InterfaceName>,
+}
+
+impl Validatable for StaticRoute {
+ type Error = Error;
+
+ fn validate(&self) -> Result<(), Error> {
+ // staticd stores the network address, so a prefix with host bits set would never match
+ // the running config and frr-reload would replace the route on every reload
+ let canonical = match self.prefix {
+ Cidr::Ipv4(cidr) => Cidr::Ipv4(cidr.canonical()),
+ Cidr::Ipv6(cidr) => Cidr::Ipv6(cidr.canonical()),
+ };
+ if self.prefix != canonical {
+ bail!(
+ "prefix '{}' has host bits set, use '{canonical}' instead",
+ self.prefix
+ );
+ }
+ if self.via.is_none() && self.iface.is_none() {
+ bail!("a static route requires a gateway (via) or an outgoing interface (iface)");
+ }
+ if let Some(via) = self.via {
+ if via.is_ipv6() != self.prefix.is_ipv6() {
+ bail!("gateway and destination prefix must use the same address family");
+ }
+ if let IpAddr::V6(via) = via {
+ if via.is_unicast_link_local() && self.iface.is_none() {
+ bail!("an IPv6 link-local gateway requires an outgoing interface (iface)");
+ }
+ }
+ }
+ if let Some(iface) = &self.iface {
+ let iface = iface.as_str();
+ if ["null0", "blackhole", "reject"].contains(&iface.to_ascii_lowercase().as_str())
+ || iface.parse::<IpAddr>().is_ok()
+ {
+ bail!("'{iface}' is not an outgoing interface");
+ }
+ }
+ if self.distance == Some(0) {
+ bail!("administrative distance must be between 1 and 255");
+ }
+ Ok(())
+ }
+}
+
+/// The subset of zones.cfg needed to generate static routes, as represented by the perl parser.
+#[derive(Clone, Debug, Default, Deserialize)]
+pub struct ZoneRoutesConfig {
+ pub ids: BTreeMap<ZoneName, ZoneRoutes>,
+}
+
+/// Routing-related properties of a single SDN zone.
+#[derive(Clone, Debug, Deserialize)]
+pub struct ZoneRoutes {
+ #[serde(rename = "type")]
+ pub ty: String,
+ #[serde(
+ default,
+ rename = "dedicated-vrf",
+ deserialize_with = "proxmox_serde::perl::deserialize_bool"
+ )]
+ pub dedicated_vrf: bool,
+ pub nodes: Option<BTreeMap<String, serde_json::Value>>,
+ #[serde(default)]
+ pub route: Vec<PropertyString<StaticRoute>>,
+}
+
+#[cfg(feature = "frr")]
+impl ZoneRoutesConfig {
+ /// Generate routes only on nodes participating in the zone.
+ pub fn routes_for_node(&self, node: &str) -> Result<Vec<proxmox_frr::ser::IpRoute>, Error> {
+ use proxmox_frr::ser::{InterfaceName as FrrInterfaceName, IpOrInterface, IpRoute};
+
+ let to_frr = |name: &InterfaceName| FrrInterfaceName::try_from(name.as_str());
+
+ let mut routes = Vec::new();
+ for (zone, config) in &self.ids {
+ if config.route.is_empty() {
+ continue;
+ }
+ if config.ty != "simple" {
+ bail!("static routes are only supported in simple zones (zone '{zone}')");
+ }
+ if config
+ .nodes
+ .as_ref()
+ .is_some_and(|nodes| !nodes.contains_key(node))
+ {
+ continue;
+ }
+ let destination_vrf = config
+ .dedicated_vrf
+ .then(|| FrrInterfaceName::try_from(format!("vrf_{zone}")))
+ .transpose()?;
+ for route in &config.route {
+ route.validate()?;
+ let mut frr_route = IpRoute::new(route.prefix, route.via.map(IpOrInterface::Ip));
+ frr_route.iface = route.iface.as_ref().map(to_frr).transpose()?;
+ frr_route.distance = route.distance;
+ frr_route.nexthop_vrf = route.nexthop_vrf.as_ref().map(to_frr).transpose()?;
+ frr_route.destination_vrf = destination_vrf.clone();
+ routes.push(frr_route);
+ }
+ }
+ Ok(routes)
+ }
+}
diff --git a/proxmox-ve-config/tests/static_routes/cfg/fabrics.cfg b/proxmox-ve-config/tests/static_routes/cfg/fabrics.cfg
new file mode 100644
index 000000000000..7c34f1f8e9bd
--- /dev/null
+++ b/proxmox-ve-config/tests/static_routes/cfg/fabrics.cfg
@@ -0,0 +1,19 @@
+ospf_fabric: blue
+ area 0
+ ip_prefix 10.0.0.0/24
+ zone blue
+
+ospf_node: blue_pve1
+ interfaces name=ens18
+ ip 10.0.0.1
+
+bgp_fabric: red
+ bfd 0
+ ip_prefix 10.0.0.0/24
+ zone red
+
+bgp_node: red_pve1
+ asn 65001
+ interfaces name=ens19
+ ip 10.0.0.1
+ role internal
diff --git a/proxmox-ve-config/tests/static_routes/cfg/zones.json b/proxmox-ve-config/tests/static_routes/cfg/zones.json
new file mode 100644
index 000000000000..82c2cb2c14f9
--- /dev/null
+++ b/proxmox-ve-config/tests/static_routes/cfg/zones.json
@@ -0,0 +1,20 @@
+{
+ "ids": {
+ "blue": {
+ "type": "simple",
+ "dedicated-vrf": 1,
+ "route": [
+ "prefix=203.0.113.0/24,via=10.0.0.2",
+ "prefix=2001:db8:42::/64,via=fe80::2,iface=ens19,nexthop-vrf=vrf_red"
+ ]
+ },
+ "red": {
+ "type": "simple",
+ "dedicated-vrf": 1,
+ "route": [
+ "prefix=203.0.113.0/24,via=10.0.0.3,iface=ens19,distance=20",
+ "prefix=2001:db8:42::/64,iface=ens19,distance=30"
+ ]
+ }
+ }
+}
diff --git a/proxmox-ve-config/tests/static_routes/main.rs b/proxmox-ve-config/tests/static_routes/main.rs
new file mode 100644
index 000000000000..a0daf38449ff
--- /dev/null
+++ b/proxmox-ve-config/tests/static_routes/main.rs
@@ -0,0 +1,165 @@
+#![cfg(feature = "frr")]
+
+use anyhow::Error;
+use proxmox_frr::ser::{FrrConfig, IpRoute, serializer::dump};
+use proxmox_schema::property_string::PropertyString;
+use proxmox_ve_config::common::valid::Validatable;
+use proxmox_ve_config::sdn::fabric::{
+ FabricConfig, frr::build_fabric, section_config::node::NodeId,
+};
+use proxmox_ve_config::sdn::static_route::{StaticRoute, ZoneRoutesConfig};
+use serde_json::json;
+
+#[test]
+fn simple_zone_routes_to_frr() -> Result<(), Error> {
+ // This is the zones.cfg representation in the SDN running configuration. Repeated route
+ // properties remain an array, including routes with the same prefix for ECMP and failover.
+ let zones: ZoneRoutesConfig = serde_json::from_value(json!({"ids": {
+ "isolated": {
+ "type": "simple",
+ "dedicated-vrf": 1,
+ "nodes": {"pve1": 1},
+ "route": [
+ "prefix=0.0.0.0/0,via=192.0.2.1",
+ "prefix=0.0.0.0/0,via=192.0.2.2,distance=1",
+ "prefix=0.0.0.0/0,via=192.0.2.3,distance=200,nexthop-vrf=default",
+ "prefix=::/0,via=fe80::1,iface=uplink0",
+ "prefix=2001:db8:20::/64,iface=uplink1,distance=10,nexthop-vrf=vrf_other"
+ ]
+ },
+ "shared": {
+ "type": "simple",
+ "dedicated-vrf": 0,
+ "route": [
+ "prefix=0.0.0.0/0,via=198.51.100.1,iface=eth0,distance=5",
+ "prefix=::/0,via=2001:db8::1",
+ "prefix=203.0.113.0/24,iface=ppp0"
+ ]
+ },
+ "disabled": {
+ "type": "simple",
+ "nodes": {},
+ "route": ["prefix=192.0.2.0/24,iface=unused0"]
+ },
+ "unused": {"type": "vlan"}
+ }}))?;
+ let config = FrrConfig {
+ ip_routes: zones.routes_for_node("pve1")?,
+ ..Default::default()
+ };
+ let output = dump(&config)?;
+ insta::assert_snapshot!("simple_zone_routes_pve1", output);
+
+ let config = FrrConfig {
+ ip_routes: zones.routes_for_node("pve2")?,
+ ..Default::default()
+ };
+ let output = dump(&config)?;
+ insta::assert_snapshot!("simple_zone_routes_pve2", output);
+ Ok(())
+}
+
+#[test]
+fn validate_route_properties() {
+ for value in [
+ "prefix=0.0.0.0/0,via=192.0.2.1",
+ "prefix=::/0,via=fe80::1,iface=eth0",
+ "prefix=10.0.0.0/8,iface=eth0.100,distance=255",
+ "prefix=::/0,via=2001:db8::1,nexthop-vrf=default",
+ ] {
+ let route = value.parse::<PropertyString<StaticRoute>>().unwrap();
+ route.validate().unwrap();
+ let encoded = route.to_property_string().unwrap();
+ encoded
+ .parse::<PropertyString<StaticRoute>>()
+ .unwrap()
+ .validate()
+ .unwrap();
+ }
+
+ for value in [
+ "prefix=0.0.0.0/0",
+ "via=192.0.2.1",
+ "prefix=0.0.0.0/33,via=192.0.2.1",
+ "prefix=10.0.0.1/24,via=192.0.2.1",
+ "prefix=2001:db8::1/64,via=2001:db8::ffff",
+ "prefix=0.0.0.0/0,via=2001:db8::1",
+ "prefix=::/0,via=192.0.2.1",
+ "prefix=::/0,via=fe80::1",
+ "prefix=0.0.0.0/0,iface=",
+ "prefix=0.0.0.0/0,iface=interface-too-long",
+ "prefix=0.0.0.0/0,iface=eth0 vrf default",
+ "prefix=0.0.0.0/0,iface=eth0\nexit",
+ "prefix=0.0.0.0/0,iface=blackhole",
+ "prefix=0.0.0.0/0,iface=Null0",
+ "prefix=0.0.0.0/0,iface=192.0.2.1",
+ "prefix=0.0.0.0/0,via=192.0.2.1,distance=0",
+ "prefix=0.0.0.0/0,via=192.0.2.1,distance=256",
+ "prefix=0.0.0.0/0,via=192.0.2.1,vrf=vrf_other",
+ "prefix=0.0.0.0/0,via=192.0.2.1,nexthop-vrf=default vrf other",
+ "prefix=0.0.0.0/0,via=192.0.2.1,via=192.0.2.2",
+ ] {
+ let result = value
+ .parse::<PropertyString<StaticRoute>>()
+ .map_err(Error::from)
+ .and_then(|route| route.validate());
+ assert!(result.is_err(), "accepted invalid route: {value}");
+ }
+}
+
+#[test]
+fn reject_routes_in_other_zone_types() -> Result<(), Error> {
+ for ty in ["vlan", "qinq", "vxlan", "evpn", "faucet"] {
+ let zones: ZoneRoutesConfig = serde_json::from_value(json!({"ids": {
+ "zone1": {"type": ty, "route": ["prefix=0.0.0.0/0,via=192.0.2.1"]}
+ }}))?;
+ assert!(zones.routes_for_node("pve1").is_err());
+ }
+ Ok(())
+}
+
+#[test]
+fn preserve_legacy_evpn_routes() -> Result<(), Error> {
+ // The historical 'vrf' field is actually the outgoing interface, not a destination VRF.
+ let route: IpRoute = serde_json::from_value(json!({
+ "prefix": "203.0.113.0/24", "via": "10.255.255.2", "vrf": "xvrf_zone1"
+ }))?;
+ let mut config = FrrConfig::default();
+ config.ip_routes.push(route);
+ config.ip_routes.push(serde_json::from_value(json!({
+ "is_ipv6": 1, "prefix": "2001:db8::/64", "via": "fe80::2", "vrf": "xvrf_zone1"
+ }))?);
+ assert_eq!(
+ serde_json::to_value(&config.ip_routes[0])?["vrf"],
+ "xvrf_zone1"
+ );
+ config.bgp.vrfs.insert(
+ "vrf_zone1".try_into()?,
+ serde_json::from_value(json!({
+ "ip_routes": [{"prefix": "203.0.113.0/24", "via": "null0"}]
+ }))?,
+ );
+ let output = dump(&config)?;
+ insta::assert_snapshot!(output);
+ Ok(())
+}
+
+#[test]
+fn vrf_fabrics_with_static_routes() -> Result<(), Error> {
+ let fabrics = FabricConfig::parse_section_config(include_str!("cfg/fabrics.cfg"))?;
+ let zones: ZoneRoutesConfig = serde_json::from_str(include_str!("cfg/zones.json"))?;
+ let mut config = FrrConfig::default();
+
+ // Both fabrics use the same subnet, and both zones route the same IPv4 and IPv6 prefixes.
+ // Static routes must retain their installation VRF, even with a different next-hop VRF.
+ build_fabric(
+ NodeId::from_string("pve1".to_owned())?,
+ fabrics,
+ &mut config,
+ )?;
+ config.ip_routes.extend(zones.routes_for_node("pve1")?);
+
+ let output = dump(&config)?;
+ insta::assert_snapshot!(output);
+ Ok(())
+}
diff --git a/proxmox-ve-config/tests/static_routes/snapshots/static_routes__preserve_legacy_evpn_routes.snap b/proxmox-ve-config/tests/static_routes/snapshots/static_routes__preserve_legacy_evpn_routes.snap
new file mode 100644
index 000000000000..999c04522074
--- /dev/null
+++ b/proxmox-ve-config/tests/static_routes/snapshots/static_routes__preserve_legacy_evpn_routes.snap
@@ -0,0 +1,12 @@
+---
+source: proxmox-ve-config/tests/static_routes/main.rs
+expression: output
+---
+!
+vrf vrf_zone1
+ ip route 203.0.113.0/24 null0
+exit-vrf
+!
+ip route 203.0.113.0/24 10.255.255.2 xvrf_zone1
+!
+ipv6 route 2001:db8::/64 fe80::2 xvrf_zone1
diff --git a/proxmox-ve-config/tests/static_routes/snapshots/static_routes__simple_zone_routes_pve1.snap b/proxmox-ve-config/tests/static_routes/snapshots/static_routes__simple_zone_routes_pve1.snap
new file mode 100644
index 000000000000..e27dc5f49f8a
--- /dev/null
+++ b/proxmox-ve-config/tests/static_routes/snapshots/static_routes__simple_zone_routes_pve1.snap
@@ -0,0 +1,20 @@
+---
+source: proxmox-ve-config/tests/static_routes/main.rs
+expression: output
+---
+!
+ip route 0.0.0.0/0 192.0.2.1 vrf vrf_isolated
+!
+ip route 0.0.0.0/0 192.0.2.2 vrf vrf_isolated
+!
+ip route 0.0.0.0/0 192.0.2.3 200 nexthop-vrf default vrf vrf_isolated
+!
+ipv6 route ::/0 fe80::1 uplink0 vrf vrf_isolated
+!
+ipv6 route 2001:db8:20::/64 uplink1 10 nexthop-vrf vrf_other vrf vrf_isolated
+!
+ip route 0.0.0.0/0 198.51.100.1 eth0 5
+!
+ipv6 route ::/0 2001:db8::1
+!
+ip route 203.0.113.0/24 ppp0
diff --git a/proxmox-ve-config/tests/static_routes/snapshots/static_routes__simple_zone_routes_pve2.snap b/proxmox-ve-config/tests/static_routes/snapshots/static_routes__simple_zone_routes_pve2.snap
new file mode 100644
index 000000000000..ff327491d71a
--- /dev/null
+++ b/proxmox-ve-config/tests/static_routes/snapshots/static_routes__simple_zone_routes_pve2.snap
@@ -0,0 +1,10 @@
+---
+source: proxmox-ve-config/tests/static_routes/main.rs
+expression: output
+---
+!
+ip route 0.0.0.0/0 198.51.100.1 eth0 5
+!
+ipv6 route ::/0 2001:db8::1
+!
+ip route 203.0.113.0/24 ppp0
diff --git a/proxmox-ve-config/tests/static_routes/snapshots/static_routes__vrf_fabrics_with_static_routes.snap b/proxmox-ve-config/tests/static_routes/snapshots/static_routes__vrf_fabrics_with_static_routes.snap
new file mode 100644
index 000000000000..5a0093326549
--- /dev/null
+++ b/proxmox-ve-config/tests/static_routes/snapshots/static_routes__vrf_fabrics_with_static_routes.snap
@@ -0,0 +1,70 @@
+---
+source: proxmox-ve-config/tests/static_routes/main.rs
+expression: output
+---
+!
+router bgp 65001 vrf vrf_red
+ bgp router-id 10.0.0.1
+ no bgp default ipv4-unicast
+ neighbor red peer-group
+ neighbor red remote-as external
+ neighbor ens19 interface peer-group red
+ !
+ address-family ipv4 unicast
+ network 10.0.0.1/32
+ neighbor red activate
+ neighbor red soft-reconfiguration inbound
+ neighbor red route-map pve_bgp_red_in in
+ exit-address-family
+exit
+!
+router ospf vrf vrf_blue
+ ospf router-id 10.0.0.1
+exit
+!
+interface dummy_blue vrf vrf_blue
+ ip ospf area 0
+ ip ospf passive
+exit
+!
+interface ens18 vrf vrf_blue
+ ip ospf area 0
+ ip ospf network point-to-point
+exit
+!
+access-list pve_bgp_red_ips permit 10.0.0.0/24
+!
+access-list pve_ospf_blue_ips permit 10.0.0.0/24
+!
+route-map pve_bgp_red_in permit 10
+ match ip address pve_bgp_red_ips
+exit
+!
+route-map pve_bgp_vrf_red permit 110
+ match ip address pve_bgp_red_ips
+ set src 10.0.0.1
+exit
+!
+route-map pve_bgp_vrf_red permit 65535
+exit
+!
+route-map pve_ospf_vrf_blue permit 100
+ match ip address pve_ospf_blue_ips
+ set src 10.0.0.1
+exit
+!
+ip route 203.0.113.0/24 10.0.0.2 vrf vrf_blue
+!
+ipv6 route 2001:db8:42::/64 fe80::2 ens19 nexthop-vrf vrf_red vrf vrf_blue
+!
+ip route 203.0.113.0/24 10.0.0.3 ens19 20 vrf vrf_red
+!
+ipv6 route 2001:db8:42::/64 ens19 30 vrf vrf_red
+!
+vrf vrf_blue
+ ip protocol ospf route-map pve_ospf_vrf_blue
+exit-vrf
+!
+vrf vrf_red
+ ip protocol bgp route-map pve_bgp_vrf_red
+exit-vrf
--
2.47.3
next prev parent reply other threads:[~2026-11-16 16:16 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 16:11 [PATCH common/manager/network/proxmox{-ve-rs,-perl-rs,-widget-toolkit} v3 00/32] SDN VRF support Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-common v3 01/32] interfaces: preserve VRF membership across address family changes Gabriel Goller
2026-11-18 14:13 ` Stefan Hanreich
2026-11-18 15:41 ` Gabriel Goller
2026-11-16 16:11 ` [PATCH proxmox-ve-rs v3 02/32] frr: add VRF-aware OSPF rendering Gabriel Goller
2026-11-18 14:41 ` Stefan Hanreich
2026-11-18 16:21 ` Gabriel Goller
2026-11-16 16:11 ` [PATCH proxmox-ve-rs v3 03/32] sdn: add zone references to OSPF and BGP fabrics Gabriel Goller
2026-11-18 14:10 ` Stefan Hanreich
2026-11-18 16:55 ` Gabriel Goller
2026-11-16 16:11 ` [PATCH proxmox-ve-rs v3 04/32] sdn: generate fabric routing configuration in zone VRFs Gabriel Goller
2026-11-18 14:53 ` Stefan Hanreich
2026-11-18 17:26 ` Gabriel Goller
2026-11-16 16:11 ` [PATCH proxmox-ve-rs v3 05/32] sdn: fix VRF route-map scoping and zone ID validation Gabriel Goller
2026-11-16 16:11 ` [PATCH proxmox-ve-rs v3 06/32] tests: fabrics: add test for fabrics in VRFs Gabriel Goller
2026-11-18 15:01 ` Stefan Hanreich
2026-11-18 17:33 ` Gabriel Goller
2026-11-16 16:11 ` Gabriel Goller [this message]
2026-11-18 15:29 ` [PATCH proxmox-ve-rs v3 07/32] sdn: allow static routes in simple zone VRFs Stefan Hanreich
2026-11-18 18:10 ` Gabriel Goller
2026-11-16 16:11 ` [PATCH proxmox-ve-rs v3 08/32] sdn: support static routes in EVPN " Gabriel Goller
2026-11-18 15:32 ` Stefan Hanreich
2026-11-19 13:12 ` Gabriel Goller
2026-11-16 16:11 ` [PATCH proxmox-perl-rs v3 09/32] pve-rs: fabrics: assign network interfaces to configured VRFs Gabriel Goller
2026-11-16 16:11 ` [PATCH proxmox-perl-rs v3 10/32] pve-rs: fabrics: make per-fabric status queries VRF-aware Gabriel Goller
2026-11-18 15:42 ` Stefan Hanreich
2026-11-19 13:30 ` Gabriel Goller
2026-11-16 16:11 ` [PATCH proxmox-perl-rs v3 11/32] pve-rs: fabrics: include VRF routes in aggregate status Gabriel Goller
2026-11-16 16:11 ` [PATCH proxmox-perl-rs v3 12/32] pve-rs: fabrics: expose host interface membership Gabriel Goller
2026-11-16 16:11 ` [PATCH proxmox-perl-rs v3 13/32] sdn: expose static routes for simple zone uplinks Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-network v3 14/32] sdn: evpn: add unreachable IPv6 default route to zone VRFs Gabriel Goller
2026-11-18 16:08 ` Stefan Hanreich
2026-11-18 16:39 ` Stefan Hanreich
2026-11-19 13:38 ` Gabriel Goller
2026-11-19 15:51 ` Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-network v3 15/32] sdn: add optional VRFs for simple zones Gabriel Goller
2026-11-18 16:18 ` Stefan Hanreich
2026-11-19 13:44 ` Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-network v3 16/32] sdn: allow fabrics to use simple zone VRFs Gabriel Goller
2026-11-18 16:27 ` Stefan Hanreich
2026-11-19 14:14 ` Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-network v3 17/32] sdn: require underlay fabrics to use the default VRF Gabriel Goller
2026-11-18 16:30 ` Stefan Hanreich
2026-11-19 14:33 ` Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-network v3 18/32] sdn: always generate EVPN zone VRFs Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-network v3 19/32] api: sdn: allow EVPN zones as fabric VRFs Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-network v3 20/32] api: sdn: disallow BGP fabrics in EVPN zone VRFs Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-network v3 21/32] sdn: simple: support static routes in zone routing tables Gabriel Goller
2026-11-18 16:49 ` Stefan Hanreich
2026-11-19 14:53 ` Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-network v3 22/32] sdn: evpn: allow static routes Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-network v3 23/32] sdn: zones: SNAT via dedicated uplinks in zone VRFs Gabriel Goller
2026-11-18 18:07 ` Stefan Hanreich
2026-11-16 16:11 ` [PATCH pve-network v3 24/32] sdn: dhcp: only configure DHCP for zones on the local node Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-network v3 25/32] sdn: dhcp: run dnsmasq in the zone VRF Gabriel Goller
2026-11-16 16:11 ` [PATCH proxmox-widget-toolkit v3 26/32] ui: network: allow selecting a VRF for host interfaces Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-manager v3 27/32] ui: sdn: add VRF zone selection for fabrics Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-manager v3 28/32] ui: sdn: expose EVPN zones as fabric VRFs Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-manager v3 29/32] network: allow setting the VRF of host interfaces Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-manager v3 30/32] ui: sdn: allow static routes for Simple zone VRFs Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-manager v3 31/32] ui: sdn: allow static routes in EVPN zones Gabriel Goller
2026-11-16 16:11 ` [PATCH pve-manager v3 32/32] network: generate SDN DHCP config after ifreload Gabriel Goller
2026-11-18 18:27 ` [PATCH common/manager/network/proxmox{-ve-rs,-perl-rs,-widget-toolkit} v3 00/32] SDN VRF support Stefan Hanreich
2026-11-19 15:33 ` Gabriel Goller
2026-11-19 20:10 ` Gabriel Goller
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=20261116161154.343743-8-g.goller@proxmox.com \
--to=g.goller@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