From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id CF2CF1FF0DA for ; Thu, 19 Nov 2026 20:43:01 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 0D3F421889; Thu, 19 Nov 2026 20:41:59 +0100 (CET) From: Gabriel Goller To: pve-devel@lists.proxmox.com Subject: [PATCH common/manager/network/proxmox{-ve-rs,-perl-rs,-widget-toolkit} v3 00/28] SDN VRF support Date: Thu, 19 Nov 2026 20:40:46 +0100 Message-ID: <20261119194116.575520-1-g.goller@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795117281165 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.227 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: Y7GPMDRAVGDPSW6IERMFNMFWC7AVZQLP X-Message-ID-Hash: Y7GPMDRAVGDPSW6IERMFNMFWC7AVZQLP X-MailFrom: g.goller@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This series adds VRF support to SDN zones and fabrics. A simple zone can now use either the default VRF or a dedicated VRF. The simple zone dialog has a checkbox for this and uses the default VRF by default. If the checkbox is disabled, the zone creates a dedicated VRF named `vrf_`. EVPN zones always create a dedicated VRF. BGP and OSPF fabrics can select a zone and run inside its VRF. This is the second iteration. The first iteration added VRFs as a separate SDN object with a distinct GUI subdirectory. This was scrapped because VRFs are an implementation detail and should not be exposed on their own in the GUI. Zones already provide a logical L3 building block and should map to VRFs instead. Route leaking between VRFs partly depends on the following FRR change, so it will come a bit later: https://github.com/FRRouting/frr/pull/22426 Static routes on simple zones always require Sys.Modify on '/nodes/' for all nodes of the zone, in addition to SDN.Allocate on the zone. This applies when creating or deleting a zone with routes, changing its routes, and changing the nodes or the dedicated-vrf setting of a zone with routes. Zones without nodes require Sys.Modify on all cluster nodes. Routes can change the routing of the host, e.g. via a host interface or the default routing table, so SDN.Allocate alone is not enough. Host interfaces can be added to a zone VRF in the host network config, which is local to each node. Disabling dedicated-vrf, removing a node from the zone, or deleting the zone removes the VRF on that node, but host interfaces may still reference it. ifreload then fails to enslave the interface and to add its gateway, and reports this in the apply log. This is not checked on purpose: the zone API cannot see the network config of other nodes, and the failure leaves the main routing table untouched. Users have to remove the VRF from host interfaces before removing the VRF itself. As always, thanks to Stefan Hanreich for his help. Changelog: v3: (thanks @Stefan) * removed SNAT (coming in a subsequent series) * removed static routes for EVPN zones (coming in a subsequent series) * removed the nexthop-vrf property on the routes (coming in a subsequent series) * added dhcp-dns-server option in ui * made ipv6 unreachable route add fallible * some api permission check updates * disable vrfs for ovs interfaces and fabric interfaces v2: (thanks @Stefan) * allow interfaces to be added to vrfs * allow static routes to be configured on vrfs * fix ospf vrf statistics * fix dhcp * fix snat RFC (v1): * rebase pve-common: Gabriel Goller (1): interfaces: preserve VRF membership across address family changes src/PVE/Network/Interfaces.pm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) proxmox-ve-rs: Gabriel Goller (6): frr: add VRF-aware OSPF rendering sdn: add zone references to OSPF and BGP fabrics sdn: generate fabric routing configuration in zone VRFs sdn: fix VRF route-map scoping and zone ID validation tests: fabrics: add tests for fabrics in VRFs sdn: allow static routes in simple zone VRFs proxmox-frr-templates/templates/bgpd.jinja | 7 +- .../templates/frr.conf.jinja | 3 +- .../templates/interface.jinja | 6 +- .../templates/ip_routes.jinja | 13 +- proxmox-frr-templates/templates/ospfd.jinja | 14 +- .../templates/protocol_routemaps.jinja | 13 + proxmox-frr/src/ser/mod.rs | 27 +- proxmox-frr/src/ser/ospf.rs | 5 +- proxmox-ve-config/src/sdn/fabric/frr.rs | 123 +++++--- proxmox-ve-config/src/sdn/fabric/mod.rs | 24 +- .../src/sdn/fabric/section_config/fabric.rs | 12 +- .../sdn/fabric/section_config/protocol/bgp.rs | 10 + .../fabric/section_config/protocol/ospf.rs | 10 + proxmox-ve-config/src/sdn/mod.rs | 12 + proxmox-ve-config/src/sdn/static_route.rs | 181 ++++++++++++ .../tests/fabric/cfg/vrf/fabrics.cfg | 43 +++ .../tests/fabric/cfg/vrf/route-maps.cfg | 15 + .../tests/fabric/cfg/vrf_default/fabrics.cfg | 37 +++ .../tests/fabric/cfg/vrf_ipv6/fabrics.cfg | 25 ++ .../tests/fabric/cfg/vrf_ipv6/route-maps.cfg | 7 + .../fabric/cfg/vrf_redistribute/fabrics.cfg | 23 ++ .../cfg/vrf_redistribute/route-maps.cfg | 7 + .../fabric/cfg/vrf_route_filter/fabrics.cfg | 23 ++ .../cfg/vrf_route_filter/prefix-lists.cfg | 8 + proxmox-ve-config/tests/fabric/helper.rs | 40 +++ proxmox-ve-config/tests/fabric/main.rs | 275 +++++++++++++++++- .../snapshots/fabric__vrf_default_pve.snap | 113 +++++++ .../snapshots/fabric__vrf_ipv6_pve.snap | 102 +++++++ .../fabric/snapshots/fabric__vrf_pve.snap | 134 +++++++++ .../fabric__vrf_redistribute_pve.snap | 74 +++++ .../fabric__vrf_route_filter_pve.snap | 85 ++++++ .../tests/static_routes/cfg/fabrics.cfg | 19 ++ .../tests/static_routes/cfg/zones.json | 20 ++ proxmox-ve-config/tests/static_routes/main.rs | 188 ++++++++++++ ...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 +++++ 38 files changed, 1739 insertions(+), 71 deletions(-) create mode 100644 proxmox-ve-config/src/sdn/static_route.rs create mode 100644 proxmox-ve-config/tests/fabric/cfg/vrf/fabrics.cfg create mode 100644 proxmox-ve-config/tests/fabric/cfg/vrf/route-maps.cfg create mode 100644 proxmox-ve-config/tests/fabric/cfg/vrf_default/fabrics.cfg create mode 100644 proxmox-ve-config/tests/fabric/cfg/vrf_ipv6/fabrics.cfg create mode 100644 proxmox-ve-config/tests/fabric/cfg/vrf_ipv6/route-maps.cfg create mode 100644 proxmox-ve-config/tests/fabric/cfg/vrf_redistribute/fabrics.cfg create mode 100644 proxmox-ve-config/tests/fabric/cfg/vrf_redistribute/route-maps.cfg create mode 100644 proxmox-ve-config/tests/fabric/cfg/vrf_route_filter/fabrics.cfg create mode 100644 proxmox-ve-config/tests/fabric/cfg/vrf_route_filter/prefix-lists.cfg create mode 100644 proxmox-ve-config/tests/fabric/snapshots/fabric__vrf_default_pve.snap create mode 100644 proxmox-ve-config/tests/fabric/snapshots/fabric__vrf_ipv6_pve.snap create mode 100644 proxmox-ve-config/tests/fabric/snapshots/fabric__vrf_pve.snap create mode 100644 proxmox-ve-config/tests/fabric/snapshots/fabric__vrf_redistribute_pve.snap create mode 100644 proxmox-ve-config/tests/fabric/snapshots/fabric__vrf_route_filter_pve.snap 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 proxmox-perl-rs: Gabriel Goller (5): pve-rs: fabrics: assign network interfaces to configured VRFs pve-rs: fabrics: make per-fabric status queries VRF-aware pve-rs: fabrics: include VRF routes in aggregate status pve-rs: fabrics: expose host interface membership sdn: expose static routes for simple zone uplinks pve-rs/src/bindings/sdn/fabrics.rs | 407 +++++++++++++++++++---------- pve-rs/src/bindings/sdn/mod.rs | 18 +- pve-rs/src/sdn/status.rs | 149 +++++++++-- 3 files changed, 402 insertions(+), 172 deletions(-) pve-network: Gabriel Goller (10): sdn: evpn: add unreachable IPv6 default route to zone VRFs sdn: add optional VRFs for simple zones sdn: allow fabrics to use simple zone VRFs sdn: require underlay fabrics to use the default VRF sdn: move full range CIDR formats into a separate module sdn: simple: support static routes in zone routing tables sdn: dhcp: only configure DHCP for zones on the local node sdn: dhcp: run dnsmasq in the zone VRF sdn: dhcp: fix DNS server option for IPv4 subnets without gateway sdn: evpn: no exit node null routes for simple zone VRFs src/PVE/API2/Network/SDN/Fabrics/Fabric.pm | 56 +++- .../API2/Network/SDN/Fabrics/FabricNode.pm | 20 ++ src/PVE/API2/Network/SDN/Zones.pm | 58 ++++ src/PVE/Network/SDN.pm | 22 +- src/PVE/Network/SDN/Controllers/BgpPlugin.pm | 2 +- src/PVE/Network/SDN/Controllers/EvpnPlugin.pm | 12 +- src/PVE/Network/SDN/Dhcp.pm | 14 +- src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 70 +++- src/PVE/Network/SDN/Fabrics.pm | 49 +++ src/PVE/Network/SDN/Formats.pm | 51 +++ src/PVE/Network/SDN/Makefile | 1 + src/PVE/Network/SDN/PrefixLists.pm | 40 +-- src/PVE/Network/SDN/SubnetPlugin.pm | 8 +- src/PVE/Network/SDN/Zones.pm | 59 +++- src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 12 +- src/PVE/Network/SDN/Zones/Plugin.pm | 72 ++++ src/PVE/Network/SDN/Zones/SimplePlugin.pm | 33 +- src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 5 + src/test/Makefile | 8 +- src/test/run_test_fabric_host_vrf.pl | 93 ++++++ src/test/run_test_static_routes.pl | 313 ++++++++++++++++++ src/test/run_test_vnets_blackbox.pl | 42 +++ .../advertise_subnets/expected_sdn_interfaces | 1 + .../evpn/auto_mode/expected_sdn_interfaces | 1 + .../evpn/bgp_ebgp/expected_sdn_interfaces | 1 + .../bgp_ebgp_multihop/expected_sdn_interfaces | 1 + .../expected_sdn_interfaces | 1 + .../expected_sdn_interfaces | 1 + .../evpn/bgp_fabric/expected_sdn_interfaces | 1 + .../evpn/bgp_loopback/expected_sdn_interfaces | 1 + .../expected_sdn_interfaces | 1 + .../combined_bgp_isis/expected_sdn_interfaces | 1 + .../expected_sdn_interfaces | 1 + .../zones/evpn/ebgp/expected_sdn_interfaces | 1 + .../expected_sdn_interfaces | 1 + .../expected_sdn_interfaces | 1 + .../expected_sdn_interfaces | 2 + .../ebgp_loopback/expected_sdn_interfaces | 1 + .../expected_sdn_interfaces | 1 + .../expected_sdn_interfaces | 2 + .../evpn/exitnode/expected_sdn_interfaces | 1 + .../expected_sdn_interfaces | 1 + .../expected_sdn_interfaces | 1 + .../exitnode_primary/expected_sdn_interfaces | 1 + .../exitnode_snat/expected_sdn_interfaces | 1 + .../exitnodenullroute/expected_sdn_interfaces | 2 + .../expected_controller_config | 78 +++++ .../expected_sdn_interfaces | 67 ++++ .../exitnodenullroute_simple_vrf/interfaces | 7 + .../exitnodenullroute_simple_vrf/sdn_config | 47 +++ .../frr_local_merge/expected_sdn_interfaces | 1 + .../expected_sdn_interfaces | 1 + .../zones/evpn/ipv4/expected_sdn_interfaces | 1 + .../evpn/ipv4ipv6/expected_sdn_interfaces | 1 + .../ipv4ipv6nogateway/expected_sdn_interfaces | 1 + .../zones/evpn/ipv6/expected_sdn_interfaces | 1 + .../evpn/ipv6underlay/expected_sdn_interfaces | 1 + .../zones/evpn/isis/expected_sdn_interfaces | 1 + .../isis_loopback/expected_sdn_interfaces | 1 + .../multipath_relax/expected_sdn_interfaces | 1 + .../multiplezones/expected_sdn_interfaces | 2 + .../openfabric_fabric/expected_sdn_interfaces | 1 + .../expected_sdn_interfaces | 1 + .../expected_sdn_interfaces | 1 + .../evpn/ospf_fabric/expected_sdn_interfaces | 1 + .../evpn/routemap/expected_sdn_interfaces | 1 + .../expected_sdn_interfaces | 1 + .../expected_sdn_interfaces | 1 + .../evpn/rt_import/expected_sdn_interfaces | 1 + .../evpn/vxlanport/expected_sdn_interfaces | 1 + .../hetzner-vrf/expected_sdn_interfaces | 27 ++ src/test/zones/simple/hetzner-vrf/interfaces | 6 + src/test/zones/simple/hetzner-vrf/sdn_config | 34 ++ .../simple/vrf-empty/expected_sdn_interfaces | 7 + src/test/zones/simple/vrf-empty/interfaces | 2 + src/test/zones/simple/vrf-empty/sdn_config | 12 + .../zones/simple/vrf/expected_sdn_interfaces | 14 + src/test/zones/simple/vrf/interfaces | 2 + src/test/zones/simple/vrf/sdn_config | 17 + 79 files changed, 1330 insertions(+), 78 deletions(-) create mode 100644 src/PVE/Network/SDN/Formats.pm create mode 100755 src/test/run_test_fabric_host_vrf.pl create mode 100644 src/test/run_test_static_routes.pl create mode 100644 src/test/zones/evpn/exitnodenullroute_simple_vrf/expected_controller_config create mode 100644 src/test/zones/evpn/exitnodenullroute_simple_vrf/expected_sdn_interfaces create mode 100644 src/test/zones/evpn/exitnodenullroute_simple_vrf/interfaces create mode 100644 src/test/zones/evpn/exitnodenullroute_simple_vrf/sdn_config create mode 100644 src/test/zones/simple/hetzner-vrf/expected_sdn_interfaces create mode 100644 src/test/zones/simple/hetzner-vrf/interfaces create mode 100644 src/test/zones/simple/hetzner-vrf/sdn_config create mode 100644 src/test/zones/simple/vrf-empty/expected_sdn_interfaces create mode 100644 src/test/zones/simple/vrf-empty/interfaces create mode 100644 src/test/zones/simple/vrf-empty/sdn_config create mode 100644 src/test/zones/simple/vrf/expected_sdn_interfaces create mode 100644 src/test/zones/simple/vrf/interfaces create mode 100644 src/test/zones/simple/vrf/sdn_config proxmox-widget-toolkit: Gabriel Goller (1): ui: network: allow selecting a VRF for host interfaces src/node/NetworkEdit.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) pve-manager: Gabriel Goller (5): ui: sdn: add VRF zone selection for fabrics network: allow setting the VRF of host interfaces ui: sdn: allow static routes for Simple zone VRFs network: generate SDN DHCP config after ifreload ui: sdn: subnet: allow setting the DHCP DNS server PVE/API2/Network.pm | 60 +++++-- bin/pve-sdn-commit | 5 +- www/manager6/Makefile | 1 + www/manager6/Toolkit.js | 2 +- www/manager6/form/SDNZoneSelector.js | 46 ++++- www/manager6/node/Config.js | 12 ++ www/manager6/sdn/StaticRoutes.js | 222 +++++++++++++++++++++++++ www/manager6/sdn/SubnetEdit.js | 15 ++ www/manager6/sdn/fabrics/FabricEdit.js | 15 ++ www/manager6/sdn/zones/Base.js | 22 ++- www/manager6/sdn/zones/SimpleEdit.js | 21 +++ 11 files changed, 404 insertions(+), 17 deletions(-) create mode 100644 www/manager6/sdn/StaticRoutes.js Summary over all repositories: 133 files changed, 3907 insertions(+), 339 deletions(-) -- Generated by murpp 0.11.0